diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-28 21:36:49 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-28 21:36:49 +0000 |
commit | d9b0d3ec1d3af85bfe35a7dd5d4d2ee2a9fb8331 (patch) | |
tree | 2322671cc5455a0b4ded770ba3291873e181413c /src/game.cpp | |
parent | c6213e58858a1fbe3c28ca79ed5a5c32976fac1f (diff) | |
download | mana-d9b0d3ec1d3af85bfe35a7dd5d4d2ee2a9fb8331.tar.gz mana-d9b0d3ec1d3af85bfe35a7dd5d4d2ee2a9fb8331.tar.bz2 mana-d9b0d3ec1d3af85bfe35a7dd5d4d2ee2a9fb8331.tar.xz mana-d9b0d3ec1d3af85bfe35a7dd5d4d2ee2a9fb8331.zip |
Ported sell dialog to Guichan.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/game.cpp b/src/game.cpp index 1ca1b35f..94abec3a 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -759,13 +759,20 @@ void do_parse() { break; // Sell dialog case 0x00c7: - n_items = (len-4)/10; - if(n_items>0) { - show_npc_dialog = 4; - for(int k=0;k<n_items;k++) - add_sell_item(RFIFOW(4+10*k), RFIFOL(4+10*k+2)); - } else chatlog.chat_log("Nothing to sell", BY_SERVER, font); - break; + n_items = (len - 4) / 10; + if (n_items > 0) { + sellDialog->reset(); + sellDialog->setVisible(true); + for (int k = 0; k < n_items; k++) { + sellDialog->addItem( + RFIFOW(4 + 10 * k), RFIFOL(4 + 10 * k + 2)); + //add_sell_item(RFIFOW(4 + 10 * k), RFIFOL(4 + 10 * k + 2)); + } + } + else { + chatlog.chat_log("Nothing to sell", BY_SERVER, font); + } + break; // Answer to buy case 0x00ca: if(RFIFOB(2)==0) |