summaryrefslogtreecommitdiff
path: root/src/graphic
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-23 23:46:23 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-23 23:46:23 +0000
commit5c1093ffa9fea3d979a720169e97ed31725e95c4 (patch)
tree3f40c4000c2f0317e12640eb818a781c3a892497 /src/graphic
parent1fcefe616a39c2e572b8078c5c51c8e81a59c487 (diff)
downloadmana-5c1093ffa9fea3d979a720169e97ed31725e95c4.tar.gz
mana-5c1093ffa9fea3d979a720169e97ed31725e95c4.tar.bz2
mana-5c1093ffa9fea3d979a720169e97ed31725e95c4.tar.xz
mana-5c1093ffa9fea3d979a720169e97ed31725e95c4.zip
Committed patch by Mra, which fixes multiple NPCs talks in one window and
moves the action listener used with BuySellDialog into that class.
Diffstat (limited to 'src/graphic')
-rw-r--r--src/graphic/graphic.cpp24
-rw-r--r--src/graphic/graphic.h8
2 files changed, 1 insertions, 31 deletions
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();
diff --git a/src/graphic/graphic.h b/src/graphic/graphic.h
index 765a6318..c660f49c 100644
--- a/src/graphic/graphic.h
+++ b/src/graphic/graphic.h
@@ -88,14 +88,6 @@ class ChatListener : public gcn::ActionListener {
};
/**
- * The action listener for the buy or sell dialog.
- */
-class BuySellListener : public gcn::ActionListener {
- public:
- void action(const std::string& eventId);
-};
-
-/**
* 9 images defining a rectangle. 4 corners, 4 sides and a middle area. The
* topology is as follows:
*