--- 补充玩家所有枪械弹夹子弹 local BuffAction_FillUpWithBullets = { BuffDesc = "补充玩家所有枪械弹夹子弹"; } BuffAction_FillUpWithBullets.FullShootWeaponEnums = { ESurviveWeaponPropSlot.SWPS_MainShootWeapon1, ESurviveWeaponPropSlot.SWPS_MainShootWeapon2, ESurviveWeaponPropSlot.SWPS_SubShootWeapon, } function BuffAction_FillUpWithBullets:ApplyBuff(BuffTag, ValidPawn) -- Apply逻辑 local AllWeapon = UGCWeaponManagerSystem.GetWeaponManagerComponent(ValidPawn):GetAllInventoryWeaponList() UGCLogSystem.Log("[FillUpWithBullets_fun] AllWeapon:%d ", #AllWeapon) for k, Weapon in pairs(AllWeapon) do if table.hasValue(BuffAction_FillUpWithBullets.FullShootWeaponEnums, Weapon:GetWeaponSlot()) then Weapon:ForceModifyCurrentBulletNumInClipOnServer(UGCGunSystem.GetMaxBulletNumInOneClip(Weapon)) end end return true end return BuffAction_FillUpWithBullets