From 7c34adebb068549ca6a56bdf1b211398a0b1de11 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 22 May 2011 00:23:08 +0300 Subject: Allow show equipment from other players from context menu "show items". Also allow undress separate items from players locally. --- src/net/tmwa/inventoryhandler.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/net') diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h index 5f674eab0..c6c680b13 100644 --- a/src/net/tmwa/inventoryhandler.h +++ b/src/net/tmwa/inventoryhandler.h @@ -25,6 +25,7 @@ #include "equipment.h" #include "inventory.h" +#include "log.h" #include "playerinfo.h" #include "gui/inventorywindow.h" @@ -58,9 +59,8 @@ class EquipBackend : public Equipment::Backend { int invyIndex = mEquipment[index]; if (invyIndex == -1) - { return NULL; - } + return PlayerInfo::getInventory()->getItem(invyIndex); } @@ -72,9 +72,7 @@ class EquipBackend : public Equipment::Backend { Item* item = PlayerInfo::getInventory()->getItem(i); if (item) - { item->setEquipped(false); - } } mEquipment[i] = -1; -- cgit v1.2.3-60-g2f50