From 5c1093ffa9fea3d979a720169e97ed31725e95c4 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 23 Feb 2005 23:46:23 +0000 Subject: Committed patch by Mra, which fixes multiple NPCs talks in one window and moves the action listener used with BuySellDialog into that class. --- src/graphic/graphic.cpp | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src/graphic/graphic.cpp') diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 96f36bbd..8b13e0e9 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -75,28 +75,6 @@ void ChatListener::action(const std::string& eventId) } } -void BuySellListener::action(const std::string& eventId) -{ - int actionId = -1; - - if (eventId == "buy") { - actionId = 0; - } - else if (eventId == "sell") { - actionId = 1; - } - - if (actionId > -1) { - WFIFOW(0) = net_w_value(0x00c5); - WFIFOL(2) = net_l_value(current_npc); - WFIFOB(6) = net_b_value(actionId); - WFIFOSET(7); - } - - buySellDialog->setVisible(false); -} - - char hairtable[16][4][2] = { // S(x,y) W(x,y) N(x,y) E(x,y) { { 0, 0}, {-1, 2}, {-1, 2}, {0, 2} }, // STAND @@ -287,7 +265,7 @@ Engine::Engine() sellDialog = new SellDialog(); sellDialog->setVisible(false); - buySellDialog = new BuySellDialog(new BuySellListener()); + buySellDialog = new BuySellDialog(); buySellDialog->setVisible(false); inventoryWindow = new InventoryWindow(); -- cgit v1.2.3-60-g2f50