31 lines
903 B
Lua
31 lines
903 B
Lua
|
local BuffActionBase = require('Script.Global.BuffSystem.BuffActionBase')
|
||
|
|
||
|
local BuffAction_InfiniteBullets = setmetatable(
|
||
|
{},
|
||
|
{ __index = BuffActionBase, __metatable = BuffActionBase }
|
||
|
);
|
||
|
|
||
|
|
||
|
function BuffAction_InfiniteBullets:LuaDoAction()
|
||
|
BuffActionBase.LuaDoAction(self)
|
||
|
if not UGCGameSystem.IsServer() then return true end
|
||
|
UGCLogSystem.Log("[BuffAction_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
|
||
|
end
|
||
|
|
||
|
--function BuffAction_InfiniteBullets:LuaUndoAction()
|
||
|
-- self.BuffActionBase.LuaUndoAction(self)
|
||
|
--end
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
return BuffAction_InfiniteBullets;
|