From 9015268746ed9052a9dc83839b2834b5feeab166 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 1 Apr 2012 22:13:39 +0200 Subject: Fixed problems with using the last emote The tmwa/BeingHandler was adjusting the effect id rather than the emote id, causing it to not find the last emote (and the rest of the emotes only worked correctly because the effect ids were consecutive in the same order as the emote ids). Furthermore, the EmoteShortcutContainer refused to draw the icon for the last emote due to an off-by-one error in dealing with the 1-adjusted emote ids used by the EmoteShortcut class. Also cleaned up some old remains of a player ignore strategy that used to use the two balloon emotes (this had been their original purpose). Reviewed-by: Erik Schilling --- src/net/tmwa/beinghandler.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/net/tmwa/beinghandler.cpp') 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; -- cgit v1.2.3-70-g09d2