summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-04-02 20:35:41 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-04-02 20:35:41 +0200
commit31010d6d3ba6600860a9f6dd925ac3d8e3f2c830 (patch)
tree88e0c06f16f00e635860f1ecc7d65d8e0cf4d1de /src/net
parentbbb4c1c61863b9032af2291bff20814733995391 (diff)
parent9015268746ed9052a9dc83839b2834b5feeab166 (diff)
downloadmana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.gz
mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.bz2
mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.xz
mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.zip
Merge branch '0.6'
Diffstat (limited to 'src/net')
-rw-r--r--src/net/download.cpp8
-rw-r--r--src/net/manaserv/connection.h1
-rw-r--r--src/net/tmwa/beinghandler.cpp5
3 files changed, 8 insertions, 6 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index 988cc662..bccba7a3 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -220,9 +220,11 @@ int Download::downloadThread(void *ptr)
curl_easy_setopt(d->mCurl, CURLOPT_WRITEDATA, file);
}
- curl_easy_setopt(d->mCurl, CURLOPT_USERAGENT,
- strprintf(PACKAGE_EXTENDED_VERSION,
- branding.getStringValue("appShort").c_str()).c_str());
+ const std::string appShort = branding.getStringValue("appShort");
+ const std::string userAgent =
+ strprintf(PACKAGE_EXTENDED_VERSION, appShort.c_str());
+
+ curl_easy_setopt(d->mCurl, CURLOPT_USERAGENT, userAgent.c_str());
curl_easy_setopt(d->mCurl, CURLOPT_ERRORBUFFER, d->mError);
curl_easy_setopt(d->mCurl, CURLOPT_URL, d->mUrl.c_str());
curl_easy_setopt(d->mCurl, CURLOPT_NOPROGRESS, 0);
diff --git a/src/net/manaserv/connection.h b/src/net/manaserv/connection.h
index 954849de..42932c47 100644
--- a/src/net/manaserv/connection.h
+++ b/src/net/manaserv/connection.h
@@ -23,6 +23,7 @@
#define NET_MANASERV_CONNECTION_H
#include <enet/enet.h>
+#include "net/manaserv/network.h"
#include <iosfwd>
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index c94e08df..b7d84685 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -427,9 +427,8 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
if (player_relations.hasPermission(dstBeing, PlayerRelation::EMOTE))
{
- const int fx = EmoteDB::get(msg.readInt8())->effect;
- //TODO: figure out why the -1 is needed
- effectManager->trigger(fx - 1, dstBeing);
+ const int fx = EmoteDB::get(msg.readInt8() - 1)->effect;
+ effectManager->trigger(fx, dstBeing);
}
break;