diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-02 20:18:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-02 20:18:44 +0300 |
commit | 013284123a69dfe15016b8823ecc8b8bed54c561 (patch) | |
tree | e152b63b723fadf253f85d483b3d7044de97cd77 /src | |
parent | 9a3120e7c3d89c3d35d5032114b387e49d462154 (diff) | |
download | mv-013284123a69dfe15016b8823ecc8b8bed54c561.tar.gz mv-013284123a69dfe15016b8823ecc8b8bed54c561.tar.bz2 mv-013284123a69dfe15016b8823ecc8b8bed54c561.tar.xz mv-013284123a69dfe15016b8823ecc8b8bed54c561.zip |
Sort more packets. Add version checks inside packets.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 14 | ||||
-rw-r--r-- | src/net/eathena/packetsin.inc | 37 |
2 files changed, 38 insertions, 13 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index 057617a1c..5d8056d0f 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -1165,15 +1165,21 @@ void BeingRecv::processSkillGroundNoDamage(Net::MessageIn &msg) void BeingRecv::processSkillEntry(Net::MessageIn &msg) { - msg.readInt16("len"); + if (msg.getVersion() >= 20110718) + msg.readInt16("len"); const BeingId id = msg.readBeingId("skill unit id"); const BeingId creatorId = msg.readBeingId("creator accound id"); const int x = msg.readInt16("x"); const int y = msg.readInt16("y"); - const int job = msg.readInt32("job"); - msg.readUInt8("radius"); + int job = 0; + if (msg.getVersion() >= 20121212) + job = msg.readInt32("job"); + if (msg.getVersion() >= 20110718) + msg.readUInt8("radius"); msg.readUInt8("visible"); - const int level = msg.readUInt8("level"); + int level = 0; + if (msg.getVersion() >= 20130731) + level = msg.readUInt8("level"); Being *const dstBeing = createBeing2(msg, id, job, BeingType::SKILL); if (!dstBeing) return; diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 0816a976f..60646d6fa 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -21,14 +21,15 @@ */ // very outdated packets -packet(SMSG_BEING_CHANGE_LOOKS_OUTDATED, 0x00c3, 8, nullptr, 1); packet(SMSG_BEING_FAKE_NAME, 0x0078, 54, &BeingRecv::processBeingFakeName, 1); -packet(SMSG_BEING_STATUS_CHANGE, 0x0196, 9, &BeingRecv::processBeingStatusChange, 1); -packet(SMSG_PLAYER_STATUS_CHANGE, 0x0119, 13, &BeingRecv::processPlayerStatusChange, 1); +packet(SMSG_BEING_CHANGE_LOOKS_OUTDATED, 0x00c3, 8, nullptr, 1); packet(SMSG_PLAYER_STORAGE_ADD, 0x00f4, 21, &InventoryRecv::processPlayerStorageAdd, 1); -packet(SMSG_QUEST_LIST, 0x02b1, -1, &QuestRecv::processAddQuests, 1); -packet(SMSG_SKILL_CASTING, 0x013e, 24, &BeingRecv::processSkillCasting, 1); +packet(SMSG_PLAYER_STATUS_CHANGE, 0x0119, 13, &BeingRecv::processPlayerStatusChange, 1); packet(SMSG_SKILL_DAMAGE, 0x0114, 31, &BeingRecv::processSkillDamage, 1); +packet(SMSG_SKILL_ENTRY, 0x011f, 16, &BeingRecv::processSkillEntry, 1); +packet(SMSG_SKILL_CASTING, 0x013e, 24, &BeingRecv::processSkillCasting, 1); +packet(SMSG_BEING_STATUS_CHANGE, 0x0196, 9, &BeingRecv::processBeingStatusChange, 1); +packet(SMSG_QUEST_LIST, 0x02b1, -1, &QuestRecv::processAddQuests, 1); // 3 if (packetVersion >= 3) @@ -306,6 +307,12 @@ packet(SMSG_GUILD_EXPULSION, 0x0839, 66, &GuildRecv::processGuild // 20101124 packet(SMSG_BEING_VIEW_EQUIPMENT, 0x0859, -1, &BeingRecv::processBeingViewEquipment, 20101124); +// 20110718 +if (packetVersion >= 20110718) +{ + packet(SMSG_SKILL_ENTRY, 0x08c7, -1, &BeingRecv::processSkillEntry, 20110718); +} + // 20120000 packet(SMSG_LOGIN_ERROR2, 0x083e, 26, &LoginRecv::processLoginError2, 20120000); @@ -350,6 +357,12 @@ if (packetVersion >= 20120925) // 20121010 packet(SMSG_MAP_TYPE_PROPERTY2, 0x099b, 8, &BeingRecv::processMapTypeProperty, 20121010); +// 20121212 +if (packetVersion >= 20121212) +{ + packet(SMSG_SKILL_ENTRY, 0x099f, -1, &BeingRecv::processSkillEntry, 20121212); +} + // 20130000 packet(SMSG_ITEM_DROPPED, 0x084b, 19, &ItemRecv::processItemDropped, 20130000); @@ -361,6 +374,12 @@ packet(SMSG_BANK_STATUS, 0x09a6, 12, &BankRecv::processBankSt packet(SMSG_BANK_DEPOSIT, 0x09a8, 16, &BankRecv::processBankDeposit, 20130724); packet(SMSG_BANK_WITHDRAW, 0x09aa, 16, &BankRecv::processBankWithdraw, 20130724); +// 20130731 +if (packetVersion >= 20130731) +{ + packet(SMSG_SKILL_ENTRY, 0x09ca, -1, &BeingRecv::processSkillEntry, 20130731); +} + // 20131223 packet(SMSG_BEING_ACTION2, 0x08c8, 34, &BeingRecv::processBeingAction2, 20131223); packet(SMSG_NPC_MARKET_OPEN, 0x09d5, -1, &MarketRecv::processMarketOpen, 20131223); @@ -584,10 +603,9 @@ packet(SMSG_SERVER_PING, 0x007f, 6, &GameRecv::processServer packet(SMSG_SKILL_ARROW_CREATE_LIST, 0x01ad, -1, &SkillRecv::processSkillArrowCreateList, 0); packet(SMSG_SKILL_AUTO_CAST, 0x0147, 39, &BeingRecv::processSkillAutoCast, 0); packet(SMSG_SKILL_CAST_CANCEL, 0x01b9, 6, &BeingRecv::processSkillCancel, 0); +packet(SMSG_SKILL_DEVOTION_EFFECT, 0x01cf, 28, &SkillRecv::processSkillDevotionEffect, 0); // 20150000 or near -packet(SMSG_SKILL_DEVOTION_EFFECT, 0x01cf, 28, &SkillRecv::processSkillDevotionEffect, 0); -packet(SMSG_SKILL_ENTRY, 0x09ca, -1, &BeingRecv::processSkillEntry, 0); packet(SMSG_SKILL_FAILED, 0x0110, 10, &SkillRecv::processSkillFailed, 0); packet(SMSG_SKILL_GROUND_DAMAGE_UNUSED, 0x0115, 35, nullptr, 0); packet(SMSG_SKILL_GROUND_NO_DAMAGE, 0x0117, 18, &BeingRecv::processSkillGroundNoDamage, 0); @@ -629,8 +647,6 @@ packet(SMSG_WHO_ANSWER, 0x00c2, 6, &Ea::GameRecv::processWh // evol packets if (serverVersion > 0) { - packet(SMSG_SERVER_VERSION_RESPONSE, 0x7531, -1, &LoginRecv::processServerVersion, 0); - packet(SMSG_NPC_COMMAND, 0x0b00, 16, &Ea::NpcRecv::processNpcCommand, 0); packet(SMSG_BEING_NAME_RESPONSE2, 0x0b01, -1, &BeingRecv::processNameResponse2, 0); packet(SMSG_MAP_MASK, 0x0b02, 10, &Ea::PlayerRecv::processMapMask, 0); @@ -709,3 +725,6 @@ packet(SMSG_BOOKING_REFUSE_VOLUNTEER, 0x08fa, 6, nullptr, packet(SMSG_BOOKING_CANCEL_VOLUNTEER, 0x0909, 6, nullptr, 0); packet(SMSG_BOOKING_ADD_FILTERING_LIST, 0x090b, 30, nullptr, 0); packet(SMSG_BOOKING_SUB_FILTERING_LIST, 0x090c, 30, nullptr, 0); + +// evol version packet +packet(SMSG_SERVER_VERSION_RESPONSE, 0x7531, -1, &LoginRecv::processServerVersion, 0); |