protected override void PickupObject()
{
int obj;
int room;
PopRoomAndObj(out room, out obj);
if (room == 0)
room = _roomResource;
for (var i = 0; i < _inventory.Length; i++)
{
if (_inventory[i] == obj)
{
PutOwner(obj, (byte)Variables[VariableEgo.Value]);
RunInventoryScript(obj);
return;
}
}
AddObjectToInventory(obj, (byte)room);
PutOwner(obj, (byte)Variables[VariableEgo.Value]);
PutClass(obj, (int)ObjectClass.Untouchable, true);
PutState(obj, 1);
MarkObjectRectAsDirty(obj);
ClearDrawObjectQueue();
RunInventoryScript(obj);
}