diff options
Diffstat (limited to 'src/net/tmwa/beingrecv.cpp')
-rw-r--r-- | src/net/tmwa/beingrecv.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp index d02e18393..f627616f6 100644 --- a/src/net/tmwa/beingrecv.cpp +++ b/src/net/tmwa/beingrecv.cpp @@ -1364,6 +1364,34 @@ void BeingRecv::applyPlayerAction(Net::MessageIn &msg, } } +void BeingRecv::processSkillDamage(Net::MessageIn &msg) +{ + BLOCK_START("BeingRecv::processSkillDamage") + if (!actorManager) + { + BLOCK_END("BeingRecv::processSkillDamage") + return; + } + + const int id = msg.readInt16("skill id"); + Being *const srcBeing = actorManager->findBeing( + msg.readBeingId("src being id")); + Being *const dstBeing = actorManager->findBeing( + msg.readBeingId("dst being id")); + msg.readInt32("tick"); + msg.readInt32("src speed"); + msg.readInt32("dst speed"); + const int param1 = msg.readInt32("damage"); + const int level = msg.readInt16("skill level"); + msg.readInt16("div"); + msg.readUInt8("skill hit/type?"); + if (srcBeing) + srcBeing->handleSkill(dstBeing, param1, id, level); + if (dstBeing) + dstBeing->takeDamage(srcBeing, param1, AttackType::SKILL, id, level); + BLOCK_END("BeingRecv::processSkillDamage") +} + void BeingRecv::setServerGender(Being *const being, const uint8_t gender) { |