summaryrefslogtreecommitdiff
path: root/src/net/ea/beinghandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/beinghandler.cpp')
-rw-r--r--src/net/ea/beinghandler.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 1ede1b8d..cba1c984 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -50,6 +50,7 @@ BeingHandler::BeingHandler(bool enableSync):
SMSG_BEING_MOVE,
SMSG_BEING_MOVE2,
SMSG_BEING_REMOVE,
+ SMSG_SKILL_DAMAGE,
SMSG_BEING_ACTION,
SMSG_BEING_SELFEFFECT,
SMSG_BEING_EMOTION,
@@ -290,6 +291,23 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
break;
+ case SMSG_SKILL_DAMAGE:
+ msg.readInt16(); // Skill Id
+ srcBeing = beingManager->findBeing(msg.readInt32());
+ dstBeing = beingManager->findBeing(msg.readInt32());
+ msg.readInt32(); // Server tick
+ msg.readInt32(); // src speed
+ msg.readInt32(); // dst speed
+ param1 = msg.readInt32(); // Damage
+ msg.readInt16(); // Skill level
+ msg.readInt16(); // Div
+ msg.readInt8(); // Skill hit/type (?)
+ if (dstBeing)
+ dstBeing->takeDamage(srcBeing, param1, Being::HIT); // Perhaps a new skill attack type should be created and used?
+ if (srcBeing)
+ srcBeing->handleAttack(dstBeing, param1, Being::HIT);
+ break;
+
case SMSG_BEING_ACTION:
srcBeing = beingManager->findBeing(msg.readInt32());
dstBeing = beingManager->findBeing(msg.readInt32());