summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-26 20:37:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-26 20:37:28 +0300
commit5207555e9c1ffca77dca0f1544830838b26a0c7e (patch)
tree2c0df386bc09691299304fa4b3bcd7edb7936e25
parent2198ecc98ecc5e94f2856795065d198557387ade (diff)
downloadmv-5207555e9c1ffca77dca0f1544830838b26a0c7e.tar.gz
mv-5207555e9c1ffca77dca0f1544830838b26a0c7e.tar.bz2
mv-5207555e9c1ffca77dca0f1544830838b26a0c7e.tar.xz
mv-5207555e9c1ffca77dca0f1544830838b26a0c7e.zip
eathena: impliment being particle effects.
-rw-r--r--src/net/eathena/beinghandler.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 2e349808c..d321adc91 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -1687,10 +1687,25 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg)
void BeingHandler::processBeingSpecialEffect(Net::MessageIn &msg)
{
- // +++ need somhow show this effects.
- // type is not same with self/misc effect.
- msg.readInt32("account id");
- msg.readInt32("effect type");
+ if (!effectManager || !actorManager)
+ return;
+
+ const int id = static_cast<uint32_t>(msg.readInt32("being id"));
+ Being *const being = actorManager->findBeing(id);
+ if (!being)
+ return;
+
+ const int effectType = msg.readInt32("effect type");
+
+ if (Particle::enabled)
+ effectManager->trigger(effectType, being);
+
+ // +++ need dehard code effectType == 3
+ if (effectType == 3 && being->getType() == ActorType::Player
+ && socialWindow)
+ { // reset received damage
+ socialWindow->resetDamage(being->getName());
+ }
}
void BeingHandler::processBeingSpecialEffectNum(Net::MessageIn &msg)