summaryrefslogtreecommitdiff
path: root/src/net/eathena/inventoryhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/inventoryhandler.cpp')
-rw-r--r--src/net/eathena/inventoryhandler.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 3eb10d28b..3861945df 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -22,6 +22,8 @@
#include "net/eathena/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;
@@ -392,4 +396,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 EAthena