diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-04-01 22:13:39 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-04-02 20:24:42 +0200 |
commit | 9015268746ed9052a9dc83839b2834b5feeab166 (patch) | |
tree | 6516c0acb2833e27bd3911672a68d0117b818739 /src/resources/emotedb.cpp | |
parent | 4c7ff677593ea5a56326ec5a43814291f36bd452 (diff) | |
download | mana-9015268746ed9052a9dc83839b2834b5feeab166.tar.gz mana-9015268746ed9052a9dc83839b2834b5feeab166.tar.bz2 mana-9015268746ed9052a9dc83839b2834b5feeab166.tar.xz mana-9015268746ed9052a9dc83839b2834b5feeab166.zip |
Fixed problems with using the last emotev0.6.1
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
Diffstat (limited to 'src/resources/emotedb.cpp')
-rw-r--r-- | src/resources/emotedb.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resources/emotedb.cpp b/src/resources/emotedb.cpp index 6a001078..00721ac4 100644 --- a/src/resources/emotedb.cpp +++ b/src/resources/emotedb.cpp @@ -45,7 +45,7 @@ void EmoteDB::load() unload(); mUnknown.name = "unknown"; - mUnknown.effect = 0; + mUnknown.effect = -1; mUnknown.sprite = new ImageSprite( ResourceManager::getInstance()->getImage("graphics/sprites/error.png")); @@ -91,7 +91,7 @@ void EmoteDB::load() const int width = XML::getProperty(emoteNode, "width", 0); const int height = XML::getProperty(emoteNode, "height", 0); - if (imageName.empty() || !(width > 0) || !(height > 0)) + if (imageName.empty() || width <= 0 || height <= 0) { logger->log("Emote Database: Warning: Emote with bad imageset values"); delete currentEmote; @@ -150,7 +150,7 @@ const Emote *EmoteDB::get(int id) } } -const int &EmoteDB::getLast() +int EmoteDB::getLast() { return mLastEmote; } |