diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/download.cpp | 8 | ||||
-rw-r--r-- | src/net/manaserv/connection.h | 1 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 5 |
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; |