diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-08-02 02:32:18 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-08-02 02:48:03 -0600 |
commit | 42f6993e0deacc857302f48004031dd45b739874 (patch) | |
tree | f8a25e94b32257c1364864824fcf61c83b834d6d /src/actorsprite.cpp | |
parent | 6a0e5f20c9faf7623a465daa4a8b350d3a52e5e6 (diff) | |
download | mana-42f6993e0deacc857302f48004031dd45b739874.tar.gz mana-42f6993e0deacc857302f48004031dd45b739874.tar.bz2 mana-42f6993e0deacc857302f48004031dd45b739874.tar.xz mana-42f6993e0deacc857302f48004031dd45b739874.zip |
Remove non-GUI references to MiniStatusWindow
Reviewed-by: Freeyorp
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); } |