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

33 lines
1.1 KiB
Lua

local Buff_MoveSpeedStrengthen = {};
-- Script.Blueprint.UGCBuffs.BuffAction.Buff_MoveSpeedStrengthen
function Buff_MoveSpeedStrengthen:LuaDoAction()
if not UGCGameSystem.IsServer() then return true end
UGCLogSystem.Log("[Buff_MoveSpeedStrengthen_LuaDoAction]")
local OwnerPawn = self:GetOwnerPawn()
if UE.IsValid(OwnerPawn) and self.Params[1] then
UGCPawnAttrSystem.SetSpeedScale(OwnerPawn, UGCPawnAttrSystem.GetSpeedScale(OwnerPawn) * self.Params[1])
end
return true
end
function Buff_MoveSpeedStrengthen:LuaUndoAction()
if not UGCGameSystem.IsServer() then return true end
UGCLogSystem.Log("[Buff_MoveSpeedStrengthen_LuaUndoAction]")
local OwnerPawn = self:GetOwnerPawn()
if UE.IsValid(OwnerPawn) and self.Params[1] then
UGCPawnAttrSystem.SetSpeedScale(OwnerPawn, UGCPawnAttrSystem.GetSpeedScale(OwnerPawn) / self.Params[1])
end
return true
end
function Buff_MoveSpeedStrengthen:LuaResetAction()
UGCLogSystem.Log("[Buff_MoveSpeedStrengthen_LuaResetAction]")
return true
end
--function Buff_MoveSpeedStrengthen:LuaUpdateAction(DeltaSeconds)
-- return true
--end
return Buff_MoveSpeedStrengthen;