summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-20 17:18:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-20 17:18:10 +0300
commitd7f5bf6c2ad9fdcf2308b1c9d3a70e0f17b30adf (patch)
tree83f74801c0d950fb2e78ed583b8f71c74f8b1e9a /src/net/eathena
parentb2c6603542af1d5c34a3e252d9454ddf0b21fcc5 (diff)
downloadplus-d7f5bf6c2ad9fdcf2308b1c9d3a70e0f17b30adf.tar.gz
plus-d7f5bf6c2ad9fdcf2308b1c9d3a70e0f17b30adf.tar.bz2
plus-d7f5bf6c2ad9fdcf2308b1c9d3a70e0f17b30adf.tar.xz
plus-d7f5bf6c2ad9fdcf2308b1c9d3a70e0f17b30adf.zip
Show card name in insert card dialog.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/inventoryhandler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 48fdb67b8..61d081434 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -833,9 +833,13 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg)
void InventoryHandler::processPlayerUseCard(Net::MessageIn &msg)
{
+ const Inventory *const inv = PlayerInfo::getInventory();
+ const int index = inventoryHandler->getItemIndex();
+ const Item *item1 = nullptr;
+ if (inv)
+ item1 = inv->getItem(index);
SellDialog *const dialog = CREATEWIDGETR(InsertCardDialog,
- inventoryHandler->getItemIndex());
- Inventory *const inv = PlayerInfo::getInventory();
+ index, item1);
const int count = (msg.readInt16("len") - 4) / 2;
for (int f = 0; f < count; f ++)