summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-06-14 12:42:49 +0000
committerDavid Athay <ko2fan@gmail.com>2008-06-14 12:42:49 +0000
commit5fbb6c822dcf01297a29078eb6abc552dcb8b80d (patch)
tree5c6a76a2875b588063ad8d5c9200ff7994c30668
parent2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258 (diff)
downloadmana-client-5fbb6c822dcf01297a29078eb6abc552dcb8b80d.tar.gz
mana-client-5fbb6c822dcf01297a29078eb6abc552dcb8b80d.tar.bz2
mana-client-5fbb6c822dcf01297a29078eb6abc552dcb8b80d.tar.xz
mana-client-5fbb6c822dcf01297a29078eb6abc552dcb8b80d.zip
Fixed compilation errors and trade bug.
-rw-r--r--ChangeLog5
-rw-r--r--src/gui/browserbox.cpp2
-rw-r--r--src/gui/shop.cpp2
-rw-r--r--src/net/tradehandler.cpp5
4 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3104f53e..419e4e4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-14 David Athay <ko2fan@gmail.com>
+
+ * src/gui/shop.cpp, src/gui/browserbox.cpp, src/net/tradehandler.cpp: Fixed
+ compilation errors. Fixed trade bug (although a little hacky right now).
+
2008-06-08 Fate <fate.tmw@googlemail.com>
* src/gui/table.cpp: Invalidate mTopWidget whenever the model is
diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp
index f6c9c51c..bc76335f 100644
--- a/src/gui/browserbox.cpp
+++ b/src/gui/browserbox.cpp
@@ -50,7 +50,7 @@ BrowserBox::BrowserBox(unsigned int mode):
addMouseListener(this);
#ifdef USE_OPENGL
- if (config.getValue("opengl", 0)) {
+ if (config.getValue("opengl", 0.0f)) {
if (instances == 0) {
browserFont = new gcn::ImageFont(
"graphics/gui/browserfont.png",
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp
index ff6e3d68..62d18769 100644
--- a/src/gui/shop.cpp
+++ b/src/gui/shop.cpp
@@ -25,6 +25,8 @@
#include "../utils/dtor.h"
+#include <algorithm>
+
ShopItems::~ShopItems()
{
clear();
diff --git a/src/net/tradehandler.cpp b/src/net/tradehandler.cpp
index 85ab65c1..ed1536eb 100644
--- a/src/net/tradehandler.cpp
+++ b/src/net/tradehandler.cpp
@@ -159,6 +159,11 @@ void TradeHandler::handleMessage(MessageIn *msg)
// Trade: New Item add response (was 0x00ea, now 01b1)
{
const int index = msg->readInt16();
+ if (index == 0)
+ {
+ tradeWindow->receivedOk(true);
+ return;
+ }
Item *item = player_node->getInventory()->getItem(index);
Sint16 quantity = msg->readInt16();