diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-01-13 15:33:49 +0000 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-01-13 15:33:49 +0000 |
commit | 938e215a848a65281be0fc5cda10dd0872c846a4 (patch) | |
tree | 7b3727bf9f6f2b7a024411e3f599148d41e9258e /src/localplayer.cpp | |
parent | a40e07c2c86aff20c3b5529228bc519f9cc4c61d (diff) | |
download | mana-938e215a848a65281be0fc5cda10dd0872c846a4.tar.gz mana-938e215a848a65281be0fc5cda10dd0872c846a4.tar.bz2 mana-938e215a848a65281be0fc5cda10dd0872c846a4.tar.xz mana-938e215a848a65281be0fc5cda10dd0872c846a4.zip |
Supress level up notifications when starting
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index f6803973..6c36fa1c 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -817,7 +817,7 @@ void LocalPlayer::lowerAttribute(size_t attr) Net::getPlayerHandler()->decreaseAttribute(attr); } -void LocalPlayer::setAttributeBase(int num, int value) +void LocalPlayer::setAttributeBase(int num, int value, bool notify) { int old = mAttributeBase[num]; @@ -827,7 +827,8 @@ void LocalPlayer::setAttributeBase(int num, int value) if (skillDialog->update(num).empty() || !(value > old)) return; - effectManager->trigger(1, this); + if (old != 0 && notify) + effectManager->trigger(1, this); } if (statusWindow) @@ -867,7 +868,7 @@ void LocalPlayer::setSkillPoints(int points) skillDialog->update(); } -void LocalPlayer::setExperience(int skill, int current, int next) +void LocalPlayer::setExperience(int skill, int current, int next, bool notify) { std::pair<int, int> cur = getExperience(skill); int diff = current - cur.first; @@ -875,11 +876,12 @@ void LocalPlayer::setExperience(int skill, int current, int next) cur = std::pair<int, int>(current, next); mSkillExp[skill] = cur; + std::string name; if (skillDialog) name = skillDialog->update(skill); - if (mMap && cur.first != -1 && diff > 0 && !name.empty()) + if (mMap && notify && cur.first != -1 && diff > 0 && !name.empty()) { addMessageToQueue(strprintf("%d %s xp", diff, name.c_str())); } |