diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-04-27 19:37:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-04-27 19:37:59 +0300 |
commit | 03418ce78766b062ce5af7aaf99f7f2c62152b6b (patch) | |
tree | eb0127126e8d9506ca4aeee639c896bc561fa6ca /src/being | |
parent | c77f06f7b80a67c842abe837beb2f22e9ecf60cc (diff) | |
download | manaplus-03418ce78766b062ce5af7aaf99f7f2c62152b6b.tar.gz manaplus-03418ce78766b062ce5af7aaf99f7f2c62152b6b.tar.bz2 manaplus-03418ce78766b062ce5af7aaf99f7f2c62152b6b.tar.xz manaplus-03418ce78766b062ce5af7aaf99f7f2c62152b6b.zip |
Add UpdateStatusListener.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/localplayer.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 08dce56ad..b7747464d 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -69,6 +69,8 @@ #include "resources/db/emotedb.h" #include "resources/db/weaponsdb.h" +#include "listeners/updatestatuslistener.h" + #include "utils/delete2.h" #include "utils/gettext.h" #include "utils/timer.h" @@ -1252,8 +1254,7 @@ void LocalPlayer::changeMode(unsigned *restrict const var, *var = def; if (save) config.setValue(conf, *var); - if (miniStatusWindow) - miniStatusWindow->updateStatus(); + UpdateStatusListener::distributeEvent(); const std::string str = (this->*func)(); if (str.size() > 4) debugMsg(str.substr(4)); @@ -1467,8 +1468,7 @@ void LocalPlayer::setQuickDropCounter(const int n) return; mQuickDropCounter = n; config.setValue("quickDropCounter", mQuickDropCounter); - if (miniStatusWindow) - miniStatusWindow->updateStatus(); + UpdateStatusListener::distributeEvent(); } const unsigned pickUpTypeSize = 7; @@ -1619,8 +1619,7 @@ void LocalPlayer::changeAwayMode() mAfkTime = 0; mInactive = false; updateName(); - if (miniStatusWindow) - miniStatusWindow->updateStatus(); + UpdateStatusListener::distributeEvent(); if (mAwayMode) { if (chatWindow) @@ -1691,7 +1690,7 @@ void LocalPlayer::switchGameModifiers() { mDisableGameModifiers = !mDisableGameModifiers; config.setValue("disableGameModifiers", mDisableGameModifiers); - miniStatusWindow->updateStatus(); + UpdateStatusListener::distributeEvent(); const std::string str = getGameModifiersString(); if (str.size() > 4) @@ -3680,8 +3679,7 @@ void LocalPlayer::resetYellowBar() mImitationMode = config.resetIntValue("imitationMode"); mDisableGameModifiers = config.resetBoolValue("disableGameModifiers"); - if (miniStatusWindow) - miniStatusWindow->updateStatus(); + UpdateStatusListener::distributeEvent(); } unsigned char LocalPlayer::getWalkMask() const @@ -3782,7 +3780,6 @@ void AwayListener::action(const ActionEvent &event) player_node->updateStatus(); if (outfitWindow) outfitWindow->unwearAwayOutfit(); - if (miniStatusWindow) - miniStatusWindow->updateStatus(); + UpdateStatusListener::distributeEvent(); } } |