summaryrefslogtreecommitdiff
path: root/src/net/eathena/mail2recv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-25 00:21:24 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-25 00:21:24 +0300
commit3874b588e2a9d70eb678c8a33785a575b16fa7b2 (patch)
tree430a7a47663b8eee6bc1df8a07d36795547e2c22 /src/net/eathena/mail2recv.cpp
parent595272de98760925cc3629455f16d023906ef89e (diff)
downloadmanaverse-3874b588e2a9d70eb678c8a33785a575b16fa7b2.tar.gz
manaverse-3874b588e2a9d70eb678c8a33785a575b16fa7b2.tar.bz2
manaverse-3874b588e2a9d70eb678c8a33785a575b16fa7b2.tar.xz
manaverse-3874b588e2a9d70eb678c8a33785a575b16fa7b2.zip
Fix error messages about adding item to mail.
Diffstat (limited to 'src/net/eathena/mail2recv.cpp')
-rw-r--r--src/net/eathena/mail2recv.cpp28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp
index ee9c6b6da..bb0403681 100644
--- a/src/net/eathena/mail2recv.cpp
+++ b/src/net/eathena/mail2recv.cpp
@@ -119,45 +119,27 @@ void Mail2Recv::processAddItemResult(Net::MessageIn &msg)
if (res != 0)
{
- Inventory *const inv = PlayerInfo::getInventory();
- std::string itemName;
- const Item *const item = inv->getItem(index);
- if (item == nullptr)
- {
- const ItemInfo &info = ItemDB::get(itemId);
- itemName = info.getName();
- }
- else
- {
- itemName = item->getName();
- }
-
switch (res)
{
case 1:
NotifyManager::notify(
- NotifyTypes::MAIL_ATTACH_ITEM_WEIGHT_ERROR,
- itemName);
+ NotifyTypes::MAIL_ATTACH_ITEM_WEIGHT_ERROR);
break;
case 2:
NotifyManager::notify(
- NotifyTypes::MAIL_ATTACH_ITEM_FATAL_ERROR,
- itemName);
+ NotifyTypes::MAIL_ATTACH_ITEM_FATAL_ERROR);
break;
case 3:
NotifyManager::notify(
- NotifyTypes::MAIL_ATTACH_ITEM_NO_SPACE,
- itemName);
+ NotifyTypes::MAIL_ATTACH_ITEM_NO_SPACE);
break;
case 4:
NotifyManager::notify(
- NotifyTypes::MAIL_ATTACH_ITEM_NOT_TRADEABLE,
- itemName);
+ NotifyTypes::MAIL_ATTACH_ITEM_NOT_TRADEABLE);
break;
default:
NotifyManager::notify(
- NotifyTypes::MAIL_ATTACH_ITEM_UNKNOWN_ERROR,
- itemName);
+ NotifyTypes::MAIL_ATTACH_ITEM_UNKNOWN_ERROR);
UNIMPLEMENTEDPACKETFIELD(res);
break;
}