Aura.Channel.World.Inventory.CreatureInventory.ChangeWeaponSet C# (CSharp) Метод

ChangeWeaponSet() публичный Метод

Changes weapon set, if necessary, and updates clients.
public ChangeWeaponSet ( WeaponSet set ) : void
set WeaponSet
Результат void
		public void ChangeWeaponSet(WeaponSet set)
		{
			var unequipRightHand = this.RightHand;
			var unequipLeftHand = this.LeftHand;
			var unequipMagazine = this.Magazine;

			this.WeaponSet = set;
			this.UpdateEquipReferences();

			if (unequipRightHand != null) this.OnUnequip(unequipRightHand);
			if (unequipLeftHand != null) this.OnUnequip(unequipLeftHand);
			if (unequipMagazine != null) this.OnUnequip(unequipMagazine);

			if (this.RightHand != null) this.OnEquip(this.RightHand);
			if (this.LeftHand != null) this.OnEquip(this.LeftHand);
			if (this.Magazine != null) this.OnEquip(this.Magazine);

			this.UpdateEquipStats();

			// Make sure the creature is logged in
			if (_creature.Region != Region.Limbo)
				Send.UpdateWeaponSet(_creature);

			// Check touchability
			this.UnequipIfCantBeTouched(this.RightHand);
			this.UnequipIfCantBeTouched(this.LeftHand);
			this.UnequipIfCantBeTouched(this.Magazine);
		}