diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-09-08 20:35:36 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-09-08 20:35:36 +0200 |
commit | 54389afd7ba9fecf0761333185145e968e2453ae (patch) | |
tree | ee3450aaa10e603ecb36ce47fa437626f550f116 /src/game-server | |
parent | 05fc955a3f8a03539088fa7569395434e29d90e8 (diff) | |
download | manaserv-54389afd7ba9fecf0761333185145e968e2453ae.tar.gz manaserv-54389afd7ba9fecf0761333185145e968e2453ae.tar.bz2 manaserv-54389afd7ba9fecf0761333185145e968e2453ae.tar.xz manaserv-54389afd7ba9fecf0761333185145e968e2453ae.zip |
Actually send the info about beings using direction abilities
Diffstat (limited to 'src/game-server')
-rw-r--r-- | src/game-server/abilitycomponent.h | 7 | ||||
-rw-r--r-- | src/game-server/state.cpp | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/game-server/abilitycomponent.h b/src/game-server/abilitycomponent.h index 5814a4ae..26a9b138 100644 --- a/src/game-server/abilitycomponent.h +++ b/src/game-server/abilitycomponent.h @@ -85,7 +85,7 @@ public: int getLastTargetBeingId() const; const Point &getLastTargetPoint() const; - ManaServ::BeingDirection getLastUsedTargetDirection() const; + ManaServ::BeingDirection getLastTargetDirection() const; private: bool abilityUseCheck(AbilityMap::iterator it); @@ -151,4 +151,9 @@ inline int AbilityComponent::getLastTargetBeingId() const return mLastTargetBeingId; } +inline ManaServ::BeingDirection AbilityComponent::getLastTargetDirection() const +{ + return mLastTargetDirection; +} + #endif /* ABILITYCOMPONENT_H_ */ diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp index b6528955..4db5caab 100644 --- a/src/game-server/state.cpp +++ b/src/game-server/state.cpp @@ -229,6 +229,17 @@ static void informPlayer(MapComposite *map, Entity *p) gameHandler->sendTo(p, abilityMsg); } + if (oflags & UPDATEFLAG_ABILITY_ON_DIRECTION) + { + MessageOut abilityMsg(GPMSG_BEING_ABILITY_DIRECTION); + abilityMsg.writeInt16(oid); + auto *abilityComponent = o->getComponent<AbilityComponent>(); + abilityMsg.writeInt8(abilityComponent->getLastUsedAbilityId()); + abilityMsg.writeInt8( + abilityComponent->getLastTargetDirection()); + gameHandler->sendTo(p, abilityMsg); + } + // Send damage messages. if (o->canFight()) { |