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

OnItemLeavesInventory() private method

Handles events that need to happen when an item "leaves" the inventory.
Only called when an item is completely removed from the inventory.
private OnItemLeavesInventory ( Item item ) : void
item Item
return void
		private void OnItemLeavesInventory(Item item)
		{
			// Remove quest from quest manager
			if (item.Quest != null)
			{
				var quest = item.Quest;

				// Only give up quest if it's incomplete, otherwise the
				// completed quest would be removed from the quest manager,
				// and the player would receive auto quests again.
				if (quest.State != QuestState.Complete)
					_creature.Quests.GiveUp(item.Quest);
			}

			// Remove bag pocket
			if (item.OptionInfo.LinkedPocketId != Pocket.None)
			{
				this.Remove(item.OptionInfo.LinkedPocketId);
				item.OptionInfo.LinkedPocketId = Pocket.None;
			}
		}