summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);