summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-08-07 12:27:41 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-08-12 23:33:34 +0200
commit067ad70e9978fd678bb784783b2b5c3dc32746d1 (patch)
tree27c887e0568e364d5b6c7969df03c6b355c5da9a /src
parent9f564cc42ba650c502a31b72dc59530fcad684cd (diff)
downloadmana-client-067ad70e9978fd678bb784783b2b5c3dc32746d1.tar.gz
mana-client-067ad70e9978fd678bb784783b2b5c3dc32746d1.tar.bz2
mana-client-067ad70e9978fd678bb784783b2b5c3dc32746d1.tar.xz
mana-client-067ad70e9978fd678bb784783b2b5c3dc32746d1.zip
Fixed special keeping in list after serverside remove
Reviewed-by: Thorbjørn Lindeijer.
Diffstat (limited to 'src')
-rw-r--r--src/net/manaserv/playerhandler.cpp1
-rw-r--r--src/playerinfo.cpp5
-rw-r--r--src/playerinfo.h5
3 files changed, 11 insertions, 0 deletions
diff --git a/src/net/manaserv/playerhandler.cpp b/src/net/manaserv/playerhandler.cpp
index c2c491d5..484e551a 100644
--- a/src/net/manaserv/playerhandler.cpp
+++ b/src/net/manaserv/playerhandler.cpp
@@ -248,6 +248,7 @@ void PlayerHandler::handleMessage(MessageIn &msg)
case GPMSG_SPECIAL_STATUS :
{
+ PlayerInfo::clearSpecialStatus();
while (msg.getUnreadLength())
{
// { B specialID, L current, L max, L recharge }
diff --git a/src/playerinfo.cpp b/src/playerinfo.cpp
index 692090af..03c48340 100644
--- a/src/playerinfo.cpp
+++ b/src/playerinfo.cpp
@@ -282,6 +282,11 @@ void setBuySellState(BuySellState buySellState)
// --- Specials ---------------------------------------------------------------
+void clearSpecialStatus()
+{
+ mSpecials.clear();
+}
+
void setSpecialStatus(int id, int current, int max, int recharge)
{
logger->log("SpecialUpdate Skill #%d -- (%d/%d) -> %d", id, current, max,
diff --git a/src/playerinfo.h b/src/playerinfo.h
index d7483cc1..e228ec7e 100644
--- a/src/playerinfo.h
+++ b/src/playerinfo.h
@@ -225,6 +225,11 @@ namespace PlayerInfo
// --- Specials ---------------------------------------------------------------
/**
+ * Removes all specials.
+ */
+ void clearSpecialStatus();
+
+ /**
* Changes the status of the given special.
*/
void setSpecialStatus(int id, int current, int max, int recharge);