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/localplayer.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/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 11fdf44c..2d17cf90 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -35,13 +35,10 @@ #include "playerinfo.h" #include "simpleanimation.h" #include "sound.h" -#include "statuseffect.h" #include "text.h" #include "gui/gui.h" -#include "gui/ministatus.h" #include "gui/okdialog.h" -#include "gui/skilldialog.h" #include "gui/theme.h" #include "gui/userpalette.h" @@ -1084,54 +1081,6 @@ void LocalPlayer::setGotoTarget(Being *target) } } -extern MiniStatusWindow *miniStatusWindow; - -void LocalPlayer::handleStatusEffect(StatusEffect *effect, int effectId) -{ - Being::handleStatusEffect(effect, effectId); - - if (effect) - { - effect->deliverMessage(); - effect->playSFX(); - - AnimatedSprite *sprite = effect->getIcon(); - - if (!sprite) - { - // delete sprite, if necessary - for (unsigned int i = 0; i < mStatusEffectIcons.size();) - if (mStatusEffectIcons[i] == effectId) - { - mStatusEffectIcons.erase(mStatusEffectIcons.begin() + i); - miniStatusWindow->eraseIcon(i); - } - else - i++; - } - else - { - // replace sprite or append - bool found = false; - - for (unsigned int i = 0; i < mStatusEffectIcons.size(); i++) - if (mStatusEffectIcons[i] == effectId) - { - miniStatusWindow->setIcon(i, sprite); - found = true; - break; - } - - if (!found) - { // add new - int offset = mStatusEffectIcons.size(); - miniStatusWindow->setIcon(offset, sprite); - mStatusEffectIcons.push_back(effectId); - } - } - } -} - void LocalPlayer::addMessageToQueue(const std::string &message, int color) { mMessages.push_back(MessagePair(message, color)); |