summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-18 17:34:23 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-18 17:34:23 +0300
commit4688d64d9881d296193b03d3dd6f5a7305bbf3a7 (patch)
tree7fb0653434004d6cbb5d441892c98eecc31b5a3a /src/net/ea
parent240cf581ec7e1727097065a55a654dfdb6330ccd (diff)
downloadplus-4688d64d9881d296193b03d3dd6f5a7305bbf3a7.tar.gz
plus-4688d64d9881d296193b03d3dd6f5a7305bbf3a7.tar.bz2
plus-4688d64d9881d296193b03d3dd6f5a7305bbf3a7.tar.xz
plus-4688d64d9881d296193b03d3dd6f5a7305bbf3a7.zip
Move processBeingAction from ea namespace into tmwa.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/beinghandler.cpp91
-rw-r--r--src/net/ea/beinghandler.h2
2 files changed, 0 insertions, 93 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 54f13472e..58e7c334c 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -166,97 +166,6 @@ void BeingHandler::processSkillDamage(Net::MessageIn &msg)
BLOCK_END("BeingHandler::processSkillDamage")
}
-void BeingHandler::processBeingAction(Net::MessageIn &msg)
-{
- BLOCK_START("BeingHandler::processBeingAction")
- if (!actorManager)
- {
- BLOCK_END("BeingHandler::processBeingAction")
- return;
- }
-
- Being *const srcBeing = actorManager->findBeing(
- msg.readInt32("src being id"));
- Being *const dstBeing = actorManager->findBeing(
- msg.readInt32("dst being id"));
-
- msg.readInt32("tick");
- const int srcSpeed = msg.readInt32("src speed");
- msg.readInt32("dst speed");
- const int param1 = msg.readInt16("param1");
- msg.readInt16("param 2");
- const uint8_t type = msg.readUInt8("type");
- msg.readInt16("param 3");
-
- switch (type)
- {
- case AttackType::HIT: // Damage
- case AttackType::CRITICAL: // Critical Damage
- case AttackType::MULTI: // Critical Damage
- case AttackType::REFLECT: // Reflected Damage
- case AttackType::FLEE: // Lucky Dodge
- if (srcBeing)
- {
- if (srcSpeed && srcBeing->getType() == ActorType::Player)
- srcBeing->setAttackDelay(srcSpeed);
- // attackid=1, type
- srcBeing->handleAttack(dstBeing, param1, 1);
- if (srcBeing->getType() == ActorType::Player)
- srcBeing->setAttackTime();
- }
- if (dstBeing)
- {
- dstBeing->takeDamage(srcBeing, param1,
- static_cast<AttackType::Type>(type));
- }
- break;
-
- case 0x01: // dead or pickup?
- break;
- // tmw server can send here garbage?
-// if (srcBeing)
-// srcBeing->setAction(BeingAction::DEAD, 0);
-
- case 0x02: // Sit
- if (srcBeing)
- {
- srcBeing->setAction(BeingAction::SIT, 0);
- if (srcBeing->getType() == ActorType::Player)
- {
- srcBeing->setMoveTime();
- if (localPlayer)
- localPlayer->imitateAction(srcBeing, BeingAction::SIT);
- }
- }
- break;
-
- case 0x03: // Stand up
- if (srcBeing)
- {
- srcBeing->setAction(BeingAction::STAND, 0);
- if (srcBeing->getType() == ActorType::Player)
- {
- srcBeing->setMoveTime();
- if (localPlayer)
- {
- localPlayer->imitateAction(srcBeing,
- BeingAction::STAND);
- }
- }
- }
- break;
- default:
- logger->log("QQQ1 SMSG_BEING_ACTION:");
- if (srcBeing)
- logger->log("srcBeing:" + toString(srcBeing->getId()));
- if (dstBeing)
- logger->log("dstBeing:" + toString(dstBeing->getId()));
- logger->log("type: " + toString(type));
- break;
- }
- BLOCK_END("BeingHandler::processBeingAction")
-}
-
void BeingHandler::processBeingEmotion(Net::MessageIn &msg)
{
BLOCK_START("BeingHandler::processBeingEmotion")
diff --git a/src/net/ea/beinghandler.h b/src/net/ea/beinghandler.h
index f9d787e72..5b43bbf32 100644
--- a/src/net/ea/beinghandler.h
+++ b/src/net/ea/beinghandler.h
@@ -50,8 +50,6 @@ class BeingHandler notfinal : public Net::BeingHandler
static void processSkillDamage(Net::MessageIn &msg);
- static void processBeingAction(Net::MessageIn &msg);
-
static void processBeingEmotion(Net::MessageIn &msg);
static void processNameResponse(Net::MessageIn &msg);