summaryrefslogtreecommitdiffstats
path: root/src/game-server/gamehandler.cpp
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-04-27 21:09:23 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-05-08 14:02:51 +0200
commitcec65058123f710643290c13b7f2b0512b878381 (patch)
tree8130d69617e8da8f1920ae5538a0b5a2d8d1bfd5 /src/game-server/gamehandler.cpp
parent0a1332f04b841bc32e09552665e5cd611fa23ca8 (diff)
downloadmanaserv-cec65058123f710643290c13b7f2b0512b878381.tar.gz
manaserv-cec65058123f710643290c13b7f2b0512b878381.tar.xz
manaserv-cec65058123f710643290c13b7f2b0512b878381.zip
[Abilities] Removed the old autoattack system
As a side effect i had to remove the monster attack AI for now. I will readd this as next thing.
Diffstat (limited to 'src/game-server/gamehandler.cpp')
-rw-r--r--src/game-server/gamehandler.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/game-server/gamehandler.cpp b/src/game-server/gamehandler.cpp
index b1a87a2..e9890c6 100644
--- a/src/game-server/gamehandler.cpp
+++ b/src/game-server/gamehandler.cpp
@@ -27,7 +27,6 @@
#include "common/transaction.h"
#include "game-server/accountconnection.h"
#include "game-server/buysell.h"
-#include "game-server/combatcomponent.h"
#include "game-server/commandhandler.h"
#include "game-server/emotemanager.h"
#include "game-server/inventory.h"
@@ -254,10 +253,6 @@ void GameHandler::processMessage(NetComputer *computer, MessageIn &message)
handleMoveItem(client, message);
break;
- case PGMSG_ATTACK:
- handleAttack(client, message);
- break;
-
case PGMSG_USE_ABILITY_ON_BEING:
handleUseAbilityOnBeing(client, message);
break;
@@ -671,22 +666,6 @@ void GameHandler::handleMoveItem(GameClient &client, MessageIn &message)
TRANS_ITEM_MOVE, str.str());
}
-void GameHandler::handleAttack(GameClient &client, MessageIn &message)
-{
- int id = message.readInt16();
- const int publicId =
- client.character->getComponent<ActorComponent>()->getPublicID();
- LOG_DEBUG("Character " << publicId << " attacked being " << id);
-
- Entity *being = findBeingNear(client.character, id);
- if (being && being->getType() != OBJECT_NPC)
- {
- client.character->getComponent<CombatComponent>()->setTarget(being);
- client.character->getComponent<BeingComponent>()->setAction(
- *client.character, ATTACK);
- }
-}
-
void GameHandler::handleUseAbilityOnBeing(GameClient &client, MessageIn &message)
{
if (client.character->getComponent<BeingComponent>()->getAction() == DEAD)
@@ -719,7 +698,7 @@ void GameHandler::handleUseAbilityOnPoint(GameClient &client, MessageIn &message
const int publicId =
client.character->getComponent<ActorComponent>()->getPublicID();
LOG_DEBUG("Character " << publicId
- << " tries to use his ability attack " << abilityID);
+ << " tries to use his ability " << abilityID);
auto *abilityComponent = client.character
->getComponent<AbilityComponent>();
abilityComponent->useAbilityOnPoint(*client.character, abilityID, x, y);