Aura.Channel.World.Inventory.CreatureInventory.CheckRightHand C# (CSharp) Method

CheckRightHand() private method

Makes sure you can't combine invalid equipment, like 2H and shields.
private CheckRightHand ( Item item, Pocket source, Pocket target ) : void
item Item
source Pocket
target Pocket
return void
		private void CheckRightHand(Item item, Pocket source, Pocket target)
		{
			var rightItem = this.RightHand;

			// Move 2H weapon if shield is euipped
			if (target == this.LeftHandPocket && item.IsShieldLike && (rightItem != null && rightItem.IsTwoHand))
			{
				lock (_pockets)
				{
					// Switch item
					var success = _pockets[source].Add(rightItem);

					// Fallback, temp inv
					if (!success)
						success = _pockets[Pocket.Temporary].Add(rightItem);

					if (success)
					{
						_pockets[this.RightHandPocket].Remove(rightItem);

						Send.ItemMoveInfo(_creature, rightItem, this.RightHandPocket, null);
						if (_creature.Region != Region.Limbo)
							Send.EquipmentMoved(_creature, this.RightHandPocket);

						this.OnUnequip(rightItem);
					}
				}
			}
		}