summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-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)