diff options
Diffstat (limited to 'src/actorsprite.cpp')
-rw-r--r-- | src/actorsprite.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp index 6a1dcbc7..3d0e7d54 100644 --- a/src/actorsprite.cpp +++ b/src/actorsprite.cpp @@ -23,6 +23,7 @@ #include "client.h" #include "effectmanager.h" +#include "eventmanager.h" #include "imagesprite.h" #include "localplayer.h" #include "log.h" @@ -53,9 +54,7 @@ ActorSprite::ActorSprite(int id): mChildParticleEffects(&mStatusParticleEffects, false), mMustResetParticles(false), mUsedTargetCursor(NULL) -{ - // -} +{} ActorSprite::~ActorSprite() { @@ -261,12 +260,28 @@ void ActorSprite::internalTriggerEffect(int effectId, bool sfx, bool gfx) void ActorSprite::updateStunMode(int oldMode, int newMode) { + if (this == player_node) + { + Mana::Event event("Stun"); + event.setInt("oldMode", oldMode); + event.setInt("newMode", newMode); + Mana::EventManager::trigger("ActorSprite", event); + } + handleStatusEffect(StatusEffect::getStatusEffect(oldMode, false), -1); handleStatusEffect(StatusEffect::getStatusEffect(newMode, true), -1); } void ActorSprite::updateStatusEffect(int index, bool newStatus) { + if (this == player_node) + { + Mana::Event event("UpdateStatusEffect"); + event.setInt("index", index); + event.setBool("newStatus", newStatus); + Mana::EventManager::trigger("ActorSprite", event); + } + handleStatusEffect(StatusEffect::getStatusEffect(index, newStatus), index); } |