32 lines
872 B
Lua
Raw Normal View History

2025-01-04 23:00:19 +08:00
local Buff_InfiniteBullets = {};
function Buff_InfiniteBullets:LuaDoAction()
if not UGCGameSystem.IsServer() then return true end
UGCLogSystem.Log("[Buff_InfiniteBullets_LuaDoAction]")
local OwnerPawn = self:GetOwnerPawn()
if UE.IsValid(OwnerPawn) then
for i, v in pairs(ShootWeaponEnums) do
local Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(OwnerPawn, v)
if UE.IsValid(Weapon) then
UGCGunSystem.EnableInfiniteBullets(Weapon, true);
end
end
end
return true
end
function Buff_InfiniteBullets:LuaUndoAction()
return true
end
function Buff_InfiniteBullets:LuaResetAction()
UGCLogSystem.Log("[Buff_InfiniteBullets_LuaResetAction]")
return true
end
--function Buff_InfiniteBullets:LuaUpdateAction(DeltaSeconds)
-- return true
--end
return Buff_InfiniteBullets;