summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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