diff options
author | Freeyorp <Freeyorp101@hotmail.com> | 2009-12-16 17:56:34 +1300 |
---|---|---|
committer | Freeyorp <Freeyorp101@hotmail.com> | 2009-12-16 17:56:34 +1300 |
commit | 2fb618f226a5cc0c3fd7238bdc3391de24f3ec1d (patch) | |
tree | 17a266613bfbb16df818bf17f5bdcd290f154e1d | |
parent | 43b21002699c9c9707c742c3b30454487f4329a7 (diff) | |
download | mana-client-2fb618f226a5cc0c3fd7238bdc3391de24f3ec1d.tar.gz mana-client-2fb618f226a5cc0c3fd7238bdc3391de24f3ec1d.tar.bz2 mana-client-2fb618f226a5cc0c3fd7238bdc3391de24f3ec1d.tar.xz mana-client-2fb618f226a5cc0c3fd7238bdc3391de24f3ec1d.zip |
Handle skill_damage (eathena)
-rw-r--r-- | src/net/ea/beinghandler.cpp | 18 | ||||
-rw-r--r-- | src/net/ea/protocol.h | 1 |
2 files changed, 19 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()); diff --git a/src/net/ea/protocol.h b/src/net/ea/protocol.h index 75d0d30e..f17ded61 100644 --- a/src/net/ea/protocol.h +++ b/src/net/ea/protocol.h @@ -95,6 +95,7 @@ static const int STORAGE_OFFSET = 1; #define SMSG_PLAYER_SKILLS 0x010f #define SMSG_PLAYER_SKILL_UP 0x010e #define SMSG_SKILL_FAILED 0x0110 +#define SMSG_SKILL_DAMAGE 0x01de #define SMSG_ITEM_USE_RESPONSE 0x00a8 #define SMSG_ITEM_VISIBLE 0x009d /**< An item is on the floor */ #define SMSG_ITEM_DROPPED 0x009e /**< An item is dropped */ |