public static void SetSlotWeaponData(this PlayerWeaponBagSetComponent component, int bagIndex, EWeaponSlotType nowSlot, EntityKey weaponKey) { if (bagIndex < 0) { bagIndex = component.HeldBagPointer; } component[bagIndex][nowSlot].Sync(weaponKey); }
public static void SetHeldSlotIndex(this PlayerWeaponBagSetComponent component, int bagIndex, int nowSlot) { var bag = component[bagIndex]; if (bag.HeldSlotPointer == nowSlot) { return; } if (!WeaponUtil.VertifyEweaponSlotIndex(nowSlot, true)) { return; } bag.ChangeSlotPointer(nowSlot); }
public static void SetSlotWeaponData(this PlayerWeaponBagSetComponent component, int bagIndex, EWeaponSlotType nowSlot, EntityKey weaponKey) { component[bagIndex][nowSlot].Sync(weaponKey); }
public static EntityKey GetHeldSlotEntityKey(this PlayerWeaponBagSetComponent component) { return(component.HeldBagContainer.HeldSlotData.WeaponKey); }
public static EntityKey GetSlotDataKey(this PlayerWeaponBagSetComponent component, EWeaponSlotType slot) { return(component.HeldBagContainer[slot].WeaponKey); }
public static WeaponBagSlotData GetSlotData(this PlayerWeaponBagSetComponent component, EWeaponSlotType slot) { return(component.HeldBagContainer[slot]); }
// switch (slotType) // { // case EWeaponSlotType.MeleeWeapon: // case EWeaponSlotType.PrimeWeapon: // case EWeaponSlotType.SubWeapon: // case EWeaponSlotType.TacticWeapon: // return true; // default: // return false; // } //} public static WeaponBagSlotData GetSlotData(this PlayerWeaponBagSetComponent compoennt) { return(compoennt.HeldBagContainer.HeldSlotData); }
public static bool IsSlotEmpty(this PlayerWeaponBagSetComponent component, EWeaponSlotType slot) { return(component.HeldBagContainer[slot].IsEmpty); }
public static bool IsHeldSlotEmpty(this PlayerWeaponBagSetComponent component) { return(component.HeldBagContainer.HeldSlotData.IsEmpty); }