public PlayerWeaponBagData CombineOverridedBagData(IPlayerWeaponSharedGetter getter, PlayerWeaponBagData playerWeaponBagData) { playerWeaponBagData.CopyTo(_playerWeaponBagData); if (getter.OverrideBagTactic < 1) { return(_playerWeaponBagData); } bool replace = false; foreach (var weapon in playerWeaponBagData.weaponList) { var slot = PlayerWeaponBagData.Index2Slot(weapon.Index); if (slot == EWeaponSlotType.TacticWeapon) { weapon.WeaponTplId = getter.OverrideBagTactic; replace = true; } } if (!replace) { _playerWeaponBagData.weaponList.Add(new PlayerWeaponData { Index = PlayerWeaponBagData.Slot2Index(EWeaponSlotType.TacticWeapon), WeaponTplId = getter.OverrideBagTactic, }); } return(_playerWeaponBagData); }
public WeaponProcessHelper(IPlayerWeaponSharedGetter getter) { Getter = getter; }
public WeaponProcessUtil(IPlayerWeaponSharedGetter getter) { Getter = getter; }