summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-04-14 23:16:09 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-05-08 14:02:50 +0200
commitefc1bde7fb961c2c5f22c904912cd1e7055815d9 (patch)
tree8ca09e00aeb9413a2c594e006638edae618e2af9 /src
parentfe26d911ca35fb6d4f886567d3c0e8f03120f4ef (diff)
downloadmanaserv-efc1bde7fb961c2c5f22c904912cd1e7055815d9.tar.gz
manaserv-efc1bde7fb961c2c5f22c904912cd1e7055815d9.tar.xz
manaserv-efc1bde7fb961c2c5f22c904912cd1e7055815d9.zip
[Abilities] Added network message for removed ability
This prevents really nasty code clientside
Diffstat (limited to 'src')
-rw-r--r--src/common/manaserv_protocol.h1
-rw-r--r--src/game-server/character.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/common/manaserv_protocol.h b/src/common/manaserv_protocol.h
index 5649999..05e5fd5 100644
--- a/src/common/manaserv_protocol.h
+++ b/src/common/manaserv_protocol.h
@@ -148,6 +148,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/game-server/character.cpp b/src/game-server/character.cpp
index 25b9fbd..d9462ca 100644
--- a/src/game-server/character.cpp
+++ b/src/game-server/character.cpp
@@ -731,7 +731,9 @@ bool CharacterComponent::takeAbility(int id)
if (i != mAbilities.end())
{
mAbilities.erase(i);
- mAbilitiesUpdateNeeded = true;
+ MessageOut msg(GPMSG_ABILITY_REMOVED);
+ msg.writeInt8(id);
+ gameHandler->sendTo(mClient, msg);
return true;
}
return false;