summaryrefslogtreecommitdiff
path: root/src/net/tmwa/inventoryhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-03 23:12:01 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:56 +0300
commit9049b5a8d88f864a99df228df0152adabef4d909 (patch)
tree5797799ae8c986c0d6fafa38c22a5792680fbcd5 /src/net/tmwa/inventoryhandler.cpp
parent0af6ac61cb8fbe5b1b0a593a705a14c8a01e2fa3 (diff)
downloadplus-9049b5a8d88f864a99df228df0152adabef4d909.tar.gz
plus-9049b5a8d88f864a99df228df0152adabef4d909.tar.bz2
plus-9049b5a8d88f864a99df228df0152adabef4d909.tar.xz
plus-9049b5a8d88f864a99df228df0152adabef4d909.zip
Move processPlayerEquip from ea namespace into tmwa and eathena.
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r--src/net/tmwa/inventoryhandler.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index aa619a9f0..0ff31370d 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -22,6 +22,8 @@
#include "net/tmwa/inventoryhandler.h"
+#include "notifymanager.h"
+
#include "being/localplayer.h"
#include "being/pickup.h"
@@ -32,6 +34,8 @@
#include "net/ea/eaprotocol.h"
+#include "resources/notifytypes.h"
+
#include "debug.h"
extern Net::InventoryHandler *inventoryHandler;
@@ -396,4 +400,18 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg)
BLOCK_END("InventoryHandler::processPlayerInventory")
}
+void InventoryHandler::processPlayerEquip(Net::MessageIn &msg)
+{
+ BLOCK_START("InventoryHandler::processPlayerEquip")
+ const int index = msg.readInt16() - INVENTORY_OFFSET;
+ const int equipType = msg.readInt16();
+ const uint8_t flag = msg.readUInt8();
+
+ if (!flag)
+ NotifyManager::notify(NotifyTypes::EQUIP_FAILED);
+ else
+ mEquips.setEquipment(getSlot(equipType), index);
+ BLOCK_END("InventoryHandler::processPlayerEquip")
+}
+
} // namespace TmwAthena