diff options
author | Andrej Sinicyn <andrej4000@gmail.com> | 2005-08-01 07:21:41 +0000 |
---|---|---|
committer | Andrej Sinicyn <andrej4000@gmail.com> | 2005-08-01 07:21:41 +0000 |
commit | 15e4760a93edd430053cbad5d638b68593b61bc0 (patch) | |
tree | 09d5446aa77ad63a58e58c27aa673d80afbf9daf /src | |
parent | 29d6fcc83972ce7b862b7abd0cc7652602cc390e (diff) | |
download | mana-15e4760a93edd430053cbad5d638b68593b61bc0.tar.gz mana-15e4760a93edd430053cbad5d638b68593b61bc0.tar.bz2 mana-15e4760a93edd430053cbad5d638b68593b61bc0.tar.xz mana-15e4760a93edd430053cbad5d638b68593b61bc0.zip |
Show the name of the trade partner in the trade dialog.
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 4 | ||||
-rw-r--r-- | src/game.h | 1 | ||||
-rw-r--r-- | src/gui/popupmenu.cpp | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index b550bc43..52979547 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -60,6 +60,7 @@ extern Graphics *graphics; char map_path[480]; +char tradePartnerName[24]; bool refresh_beings = false; unsigned char keyb_state; @@ -544,6 +545,7 @@ void do_input() WFIFOW(0) = net_w_value(0x00e4); WFIFOL(2) = net_l_value(target->getId()); WFIFOSET(6); + strcpy(tradePartnerName, target->name); break; // NPC default: talk @@ -1093,6 +1095,7 @@ void do_parse() } if (requestTradeDialog == NULL) { + strcpy(tradePartnerName, RFIFOP(2)); requestTradeDialog = new RequestTradeDialog(RFIFOP(2)); } break; @@ -1116,6 +1119,7 @@ void do_parse() case 3: // Trade accepted tradeWindow->reset(); + tradeWindow->setCaption((std::string)"Trade: You and " + (std::string)tradePartnerName); tradeWindow->setVisible(true); break; case 4: @@ -41,6 +41,7 @@ #define SE 7 extern char map_path[480]; +extern char tradePartnerName[24]; extern int fps, frame, current_npc; extern volatile int tick_time; extern int server_tick; diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index e852e9aa..bd178ce1 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -132,6 +132,9 @@ void PopupMenu::handleLink(const std::string& link) WFIFOW(0) = net_w_value(0x00e4); WFIFOL(2) = net_l_value(being->getId()); WFIFOSET(6); + //tradePartner.flush(); + //tradePartner << "Trade: You and " << being->name<< ""; + strcpy(tradePartnerName, being->name); } /* // Follow Player action |