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.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index 1d99eca4..5ab6af08 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -436,7 +436,7 @@ void InventoryHandler::event(Channels channel,
{
if (channel == CHANNEL_ITEM)
{
- if (event.getName() == EVENT_DOCLOSEINVENTORY)
+ if (event.getType() == Mana::Event::DoCloseInventory)
{
// No need to worry about type
MessageOut outMsg(CMSG_CLOSE_STORAGE);
@@ -450,24 +450,24 @@ void InventoryHandler::event(Channels channel,
int index = item->getInvIndex() + INVENTORY_OFFSET;
- if (event.getName() == EVENT_DOEQUIP)
+ if (event.getType() == Mana::Event::DoEquip)
{
MessageOut outMsg(CMSG_PLAYER_EQUIP);
outMsg.writeInt16(index);
outMsg.writeInt16(0);
}
- else if (event.getName() == EVENT_DOUNEQUIP)
+ else if (event.getType() == Mana::Event::DoUnequip)
{
MessageOut outMsg(CMSG_PLAYER_UNEQUIP);
outMsg.writeInt16(index);
}
- else if (event.getName() == EVENT_DOUSE)
+ else if (event.getType() == Mana::Event::DoUse)
{
MessageOut outMsg(CMSG_PLAYER_INVENTORY_USE);
outMsg.writeInt16(index);
outMsg.writeInt32(item->getId()); // unused
}
- else if (event.getName() == EVENT_DODROP)
+ else if (event.getType() == Mana::Event::DoDrop)
{
int amount = event.getInt("amount", 1);
@@ -477,7 +477,7 @@ void InventoryHandler::event(Channels channel,
outMsg.writeInt16(index);
outMsg.writeInt16(amount);
}
- else if (event.getName() == EVENT_DOMOVE)
+ else if (event.getType() == Mana::Event::DoMove)
{
int newIndex = event.getInt("newIndex", -1);