summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-22 16:27:04 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-22 16:27:04 +0300
commit08d9fbf5d4fb388bc186729a1174bf4aef0f8095 (patch)
treee66e8de2d5cfed35f30026b764538d8b0b900caf /src
parentdc4a8bf50b6285079902da824202d29d767b90ec (diff)
downloadmv-08d9fbf5d4fb388bc186729a1174bf4aef0f8095.tar.gz
mv-08d9fbf5d4fb388bc186729a1174bf4aef0f8095.tar.bz2
mv-08d9fbf5d4fb388bc186729a1174bf4aef0f8095.tar.xz
mv-08d9fbf5d4fb388bc186729a1174bf4aef0f8095.zip
Impliment packet SMSG_PLAYER_CART_ADD_ERROR.
Diffstat (limited to 'src')
-rw-r--r--src/enums/resources/notifytypes.h2
-rw-r--r--src/net/eathena/inventoryhandler.cpp14
-rw-r--r--src/resources/notifications.h8
3 files changed, 21 insertions, 3 deletions
diff --git a/src/enums/resources/notifytypes.h b/src/enums/resources/notifytypes.h
index 19703fa75..e30b5844c 100644
--- a/src/enums/resources/notifytypes.h
+++ b/src/enums/resources/notifytypes.h
@@ -179,6 +179,8 @@ namespace NotifyTypes
REFINE_FAILURE,
REFINE_DOWNGRADE,
REFINE_UNKNOWN,
+ CART_ADD_WEIGHT_ERROR,
+ CART_ADD_COUNT_ERROR,
TYPE_END
};
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 45ea1bc3a..0b3b12b5e 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -1278,9 +1278,17 @@ void InventoryHandler::processFavoriteItem(Net::MessageIn &msg)
void InventoryHandler::processCartAddError(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
-
- msg.readUInt8("flag");
+ switch(msg.readUInt8("flag"))
+ {
+ case 0:
+ NotifyManager::notify(NotifyTypes::CART_ADD_WEIGHT_ERROR);
+ break;
+ case 1:
+ NotifyManager::notify(NotifyTypes::CART_ADD_COUNT_ERROR);
+ break;
+ default:
+ break;
+ }
}
void InventoryHandler::processBindItem(Net::MessageIn &msg)
diff --git a/src/resources/notifications.h b/src/resources/notifications.h
index 40c377b4e..cf509b104 100644
--- a/src/resources/notifications.h
+++ b/src/resources/notifications.h
@@ -641,6 +641,14 @@ namespace NotifyManager
// TRANSLATORS: notification message
N_("Refine unknown for item %s."),
NotifyFlags::STRING},
+ {"cart add weight error",
+ // TRANSLATORS: notification message
+ N_("You can't add item to card because weight too high."),
+ NotifyFlags::EMPTY},
+ {"cart add count error",
+ // TRANSLATORS: notification message
+ N_("You can't add item to card because too many items."),
+ NotifyFlags::EMPTY},
};
} // namespace NotifyManager
#endif // RESOURCES_NOTIFICATIONS_H