public void EquipWeapon(WeaponEquipPayload payload) { GD.Print("WeaponController - EquipWeapon"); Weapon weapon = payload.equipable as Weapon; WeaponStats weaponData = weapon.GetStats(); WeaponEquipType equipType = weaponData.weaponEquipType; if (equipType == WeaponEquipType.MAIN_HAND && payload.targetSlotType == WeaponSlotType.MAIN_HAND) { UnEquipWeapon(payload); mainHand = weapon; } else if (equipType == WeaponEquipType.OFF_HAND && payload.targetSlotType == WeaponSlotType.OFF_HAND) { UnEquipWeapon(payload); offHand = weapon; } else if (equipType == WeaponEquipType.TWO_HANDS) { UnEquipWeapon(payload); mainHand = weapon; offHand = weapon; } else if (equipType == WeaponEquipType.EITHER_HAND) { UnEquipWeapon(payload); if (payload.targetSlotType == WeaponSlotType.MAIN_HAND) { mainHand = weapon; } else if (payload.targetSlotType == WeaponSlotType.OFF_HAND) { offHand = weapon; } } }
protected PartyMemberEquipmentLayout(String partyMemberId, WeaponEquipType weaponEquipType, String[] equipableItemTypeDetailsIds) : base(partyMemberId) { _weaponEquipType = weaponEquipType; _equipableItemTypeDetailsIds = equipableItemTypeDetailsIds; }