diff options
author | Chuck Miller <shadowmil@gmail.com> | 2010-11-03 23:50:35 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2010-11-07 23:26:37 -0500 |
commit | c81b3c269e39700be94fd9e2629b0bdfb0d093f8 (patch) | |
tree | c4dbca3f9dbb288151fec3171089e12295d33e04 /src/net/tmwa/beinghandler.cpp | |
parent | 671a465fa2c9469bde36b78c49e84bd0325c4cf1 (diff) | |
download | mana-c81b3c269e39700be94fd9e2629b0bdfb0d093f8.tar.gz mana-c81b3c269e39700be94fd9e2629b0bdfb0d093f8.tar.bz2 mana-c81b3c269e39700be94fd9e2629b0bdfb0d093f8.tar.xz mana-c81b3c269e39700be94fd9e2629b0bdfb0d093f8.zip |
Convert the emote system to use particles
Reviewed-by: Jared Adams
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index d6ba816b..61491692 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -34,13 +34,12 @@ #include "net/tmwa/protocol.h" #include "resources/colordb.h" +#include "resources/emotedb.h" #include <iostream> namespace TmwAthena { -const int EMOTION_TIME = 150; /**< Duration of emotion icon */ - BeingHandler::BeingHandler(bool enableSync): mSync(enableSync) { @@ -376,9 +375,9 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) if (player_relations.hasPermission(dstBeing, PlayerRelation::EMOTE)) { - // only set emote if one doesnt already exist - if (!dstBeing->getEmotion()) - dstBeing->setEmote(msg.readInt8(), EMOTION_TIME); + const int fx = EmoteDB::get(msg.readInt8())->effect; + //TODO: figure out why the -1 is needed + effectManager->trigger(fx - 1, dstBeing); } break; |