2025-01-04 23:00:19 +08:00

33 lines
1.0 KiB
Lua

local Buff_DamageScale = {};
-- Script.Blueprint.UGCBuffs.BuffAction.Buff_DamageScale
function Buff_DamageScale:LuaDoAction()
if not UGCGameSystem.IsServer() then return true end
UGCLogSystem.Log("[Buff_DamageScale_LuaDoAction]")
local OwnerPawn = self:GetOwnerPawn()
if UE.IsValid(OwnerPawn) and self.Params[1] then
OwnerPawn:SetDamageScale(OwnerPawn:GetDamageScale() * self.Params[1])
end
return true
end
function Buff_DamageScale:LuaUndoAction()
if not UGCGameSystem.IsServer() then return true end
UGCLogSystem.Log("[Buff_DamageScale_LuaUndoAction]")
local OwnerPawn = self:GetOwnerPawn()
if UE.IsValid(OwnerPawn) and self.Params[1] then
OwnerPawn:SetDamageScale(OwnerPawn:GetDamageScale() / self.Params[1])
end
return true
end
function Buff_DamageScale:LuaResetAction()
UGCLogSystem.Log("[Buff_DamageScale_LuaResetAction]")
return true
end
--function Buff_DamageScale:LuaUpdateAction(DeltaSeconds)
-- return true
--end
return Buff_DamageScale;