protected override void DoSetActiveItem(InventoryItem item) { InventoryItem item2 = base._activeItem; base._activeItem = item; if (item2 != null) { IHeldItem iface = item2.iface as IHeldItem; if (iface != null) { iface.OnDeactivate(); } } if (base._activeItem != null) { IHeldItem item4 = base._activeItem as IHeldItem; if (item4 != null) { item4.OnActivate(); } } }
protected override void DoSetActiveItem(InventoryItem item) { InventoryItem inventoryItem = this._activeItem; this._activeItem = item; if (inventoryItem != null) { IHeldItem heldItem = inventoryItem.iface as IHeldItem; if (heldItem != null) { heldItem.OnDeactivate(); } } if (this._activeItem != null) { IHeldItem heldItem1 = this._activeItem as IHeldItem; if (heldItem1 != null) { heldItem1.OnActivate(); } } }