diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/game.cpp | 4 | ||||
-rw-r--r-- | src/game.h | 1 | ||||
-rw-r--r-- | src/gui/popupmenu.cpp | 3 |
4 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2005-07-31 Andrej Sinicyn <andrej4000@gmail.com> + + * src/game.cpp, src/game.h, src/gui/popupmenu.cpp: Show the name of the + trade partner in the trade dialog. + 2005-07-31 Björn Steinbrink <B.Steinbrink@gmx.de> * src/gui/listbox.cpp: Small cleanup of the drawing code. 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 |