diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/manaserv/manaserv_protocol.h | 1 | ||||
-rw-r--r-- | src/net/manaserv/playerhandler.cpp | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/net/manaserv/manaserv_protocol.h b/src/net/manaserv/manaserv_protocol.h index 01632215..ab81846b 100644 --- a/src/net/manaserv/manaserv_protocol.h +++ b/src/net/manaserv/manaserv_protocol.h @@ -141,6 +141,7 @@ enum { PGMSG_USE_ABILITY_ON_BEING = 0x0292, // B abilityID, W being id GPMSG_ABILITY_STATUS = 0x0293, // { B abilityID, D current, D max, D recharge } PGMSG_USE_ABILITY_ON_POINT = 0x0294, // B abilityID, W*2 position + GPMSG_ABILITY_REMOVED = 0x0295, // B abilityID PGMSG_SAY = 0x02A0, // S text GPMSG_SAY = 0x02A1, // W being id, S text GPMSG_NPC_CHOICE = 0x02B0, // W being id, { S text }* diff --git a/src/net/manaserv/playerhandler.cpp b/src/net/manaserv/playerhandler.cpp index 335546be..e0d4e783 100644 --- a/src/net/manaserv/playerhandler.cpp +++ b/src/net/manaserv/playerhandler.cpp @@ -76,6 +76,7 @@ PlayerHandler::PlayerHandler() GPMSG_RAISE_ATTRIBUTE_RESPONSE, GPMSG_LOWER_ATTRIBUTE_RESPONSE, GPMSG_ABILITY_STATUS, + GPMSG_ABILITY_REMOVED, 0 }; handledMessages = _messages; @@ -245,10 +246,8 @@ void PlayerHandler::handleMessage(MessageIn &msg) case GPMSG_ABILITY_STATUS: { - PlayerInfo::clearAbilityStatus(); while (msg.getUnreadLength()) { - // { B abilityID, L current, L max, L recharge } int id = msg.readInt8(); int current = msg.readInt32(); int max = msg.readInt32(); @@ -256,6 +255,13 @@ void PlayerHandler::handleMessage(MessageIn &msg) PlayerInfo::setAbilityStatus(id, current, max, recharge); } } break; + + case GPMSG_ABILITY_REMOVED: + { + int id = msg.readInt8(); + PlayerInfo::clearAbilityStatus(id); + } break; + /* case SMSG_PLAYER_ARROW_MESSAGE: { |