summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/inventoryhandler.cpp18
-rw-r--r--src/net/tmwa/inventoryhandler.h2
2 files changed, 20 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
diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h
index 3ec37c5b5..a41e47ebf 100644
--- a/src/net/tmwa/inventoryhandler.h
+++ b/src/net/tmwa/inventoryhandler.h
@@ -64,6 +64,8 @@ class InventoryHandler final : public MessageHandler,
void processPlayerInventoryAdd(Net::MessageIn &msg);
void processPlayerInventory(Net::MessageIn &msg);
+
+ void processPlayerEquip(Net::MessageIn &msg);
};
} // namespace TmwAthena