Aura.Channel.World.Entities.Creature.CanPickUp C# (CSharp) Method

CanPickUp() public method

Returns whether creature is allowed to pick up the given item from the ground.
public CanPickUp ( Item item ) : bool
item Item
return bool
		public bool CanPickUp(Item item)
		{
			// Check if item is actually on the ground
			if (item.RegionId == 0)
				return false;

			// Check if it's actually protected
			if (item.OwnerId == 0 || item.ProtectionLimit == null || item.ProtectionLimit < DateTime.Now)
				return true;

			// Return whether the item's owner is controlled by the
			// creature's client, this way masters can pick up their
			// follower's (e.g. pet's) items.
			return this.Client.Creatures.ContainsKey(item.OwnerId);
		}