diff options
author | Chuck Miller <shadowmil@gmail.com> | 2010-07-18 23:02:25 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2010-07-18 23:10:02 -0400 |
commit | 41a23cb4511e9ba3985990e2703fb3d680a23d14 (patch) | |
tree | 2bf03217e3c3b0f28aed5649e2e43cf2b965bd1d /src/net/tmwa/inventoryhandler.cpp | |
parent | 782158dfd719fb6d196f79075f275fb8599d393c (diff) | |
download | mana-client-41a23cb4511e9ba3985990e2703fb3d680a23d14.tar.gz mana-client-41a23cb4511e9ba3985990e2703fb3d680a23d14.tar.bz2 mana-client-41a23cb4511e9ba3985990e2703fb3d680a23d14.tar.xz mana-client-41a23cb4511e9ba3985990e2703fb3d680a23d14.zip |
Move the majority of the netcode's server messages to the event system
There is still a good way to go, but this should get us
started
Reviewed-by: Jared Adams
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 41049c3d..7b019085 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -23,6 +23,8 @@ #include "configuration.h" #include "equipment.h" +#include "event.h" +#include "eventmanager.h" #include "inventory.h" #include "item.h" #include "itemshortcut.h" @@ -276,7 +278,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 +388,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 +399,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; |