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

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

Returns item or throws security violation exception, if item didn't exist or isn't allowed to be accessed.
public GetItemSafe ( long entityId ) : Item
entityId long
Результат Item
		public Item GetItemSafe(long entityId)
		{
			var result = this.GetItem(entityId);

			if (result == null)
				throw new SevereViolation("Creature does not have an item with entity id 0x{0:X16}", entityId);

			if (!AccessiblePockets.Contains(result.Info.Pocket))
				throw new SevereViolation("Item 0x{0:X16} is located in inaccessible pocket {1}", entityId, result.Info.Pocket);

			return result;
		}