summaryrefslogtreecommitdiff
path: root/src/net/tmwa/inventoryhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r--src/net/tmwa/inventoryhandler.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index fd979dc6..ae9731ba 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -23,6 +23,7 @@
#include "configuration.h"
#include "equipment.h"
+#include "eventmanager.h"
#include "inventory.h"
#include "item.h"
#include "itemshortcut.h"
@@ -126,7 +127,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
int number, flag;
int index, amount, itemId, equipType, arrow;
int identified, cards[4], itemType;
- Inventory *inventory = player_node->getInventory();
+ Inventory *inventory = PlayerInfo::getInventory();
switch (msg.getId())
{
@@ -136,7 +137,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
{
// Clear inventory - this will be a complete refresh
mEquips.clear();
- player_node->mEquipment->setBackend(&mEquips);
+ PlayerInfo::getEquipment()->setBackend(&mEquips);
inventory->clear();
}
@@ -276,7 +277,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
if (msg.readInt8() == 0)
{
- localChatTab->chatLog(_("Failed to use item."), BY_SERVER);
+ SERVER_NOTICE(_("Failed to use item."))
}
else
{
@@ -386,7 +387,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
flag = msg.readInt8();
if (!flag)
- localChatTab->chatLog(_("Unable to equip."), BY_SERVER);
+ SERVER_NOTICE(_("Unable to equip."))
else
mEquips.setEquipment(getSlot(equipType), index);
break;
@@ -397,7 +398,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
flag = msg.readInt8();
if (!flag)
- localChatTab->chatLog(_("Unable to unequip."), BY_SERVER);
+ SERVER_NOTICE(_("Unable to unequip."))
else
mEquips.setEquipment(getSlot(equipType), -1);
break;