summaryrefslogtreecommitdiff
path: root/src/net/eathena/inventoryhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-09 15:27:42 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-09 15:27:42 +0300
commit84f1e19691aa83f0bd73d63d08de2a0baa5596bd (patch)
treeb2a260fd3c51b61e1ae9e530adc093561a95aaca /src/net/eathena/inventoryhandler.cpp
parenta2ffd7da11831cc063f25ed6bb9f6be50c3b20e8 (diff)
downloadmv-84f1e19691aa83f0bd73d63d08de2a0baa5596bd.tar.gz
mv-84f1e19691aa83f0bd73d63d08de2a0baa5596bd.tar.bz2
mv-84f1e19691aa83f0bd73d63d08de2a0baa5596bd.tar.xz
mv-84f1e19691aa83f0bd73d63d08de2a0baa5596bd.zip
eathena: add missing equip error messages.
Diffstat (limited to 'src/net/eathena/inventoryhandler.cpp')
-rw-r--r--src/net/eathena/inventoryhandler.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 7605e9177..11cc8f311 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -486,10 +486,20 @@ void InventoryHandler::processPlayerEquip(Net::MessageIn &msg)
msg.readInt16("sprite");
const uint8_t flag = msg.readUInt8("result");
- if (flag)
- NotifyManager::notify(NotifyTypes::EQUIP_FAILED);
- else
- mEquips.setEquipment(getSlot(equipType), index);
+ switch (flag)
+ {
+ case 0:
+ mEquips.setEquipment(getSlot(equipType), index);
+ break;
+ case 1:
+ NotifyManager::notify(NotifyTypes::EQUIP_FAILED_LEVEL);
+ break;
+
+ case 2:
+ default:
+ NotifyManager::notify(NotifyTypes::EQUIP_FAILED);
+ break;
+ }
BLOCK_END("InventoryHandler::processPlayerEquip")
}