diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-03 21:03:21 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-03 21:03:21 +0300 |
commit | 294fbc6e2b47556a7d8f1cdf5bc0232c8ec89a4a (patch) | |
tree | 9bca9eb3411a907922772a1dd2d0c7d7e2257534 /src/net | |
parent | 0ec09e012ef73e7592e23b080ace185fcbb0fdda (diff) | |
download | manaplus-294fbc6e2b47556a7d8f1cdf5bc0232c8ec89a4a.tar.gz manaplus-294fbc6e2b47556a7d8f1cdf5bc0232c8ec89a4a.tar.bz2 manaplus-294fbc6e2b47556a7d8f1cdf5bc0232c8ec89a4a.tar.xz manaplus-294fbc6e2b47556a7d8f1cdf5bc0232c8ec89a4a.zip |
Add some legacy packets.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/itemrecv.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/packetsin.inc | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/net/eathena/itemrecv.cpp b/src/net/eathena/itemrecv.cpp index 526168e49..d20072a21 100644 --- a/src/net/eathena/itemrecv.cpp +++ b/src/net/eathena/itemrecv.cpp @@ -39,7 +39,9 @@ void ItemRecv::processItemDropped(Net::MessageIn &msg) { const BeingId id = msg.readBeingId("id"); const int itemId = msg.readInt16("item id"); - const ItemTypeT itemType = static_cast<ItemTypeT>(msg.readInt16("type")); + ItemTypeT itemType = ItemType::Unknown; + if (msg.getVersion() >= 20130000) + itemType = static_cast<ItemTypeT>(msg.readInt16("type")); const Identified identified = fromInt( msg.readUInt8("identify"), Identified); const int x = msg.readInt16("x"); diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 1fa826723..6e24e0666 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -21,11 +21,14 @@ */ // very outdated packets +packet(SMSG_MAP_LOGIN_SUCCESS, 0x0073, 11, &GameRecv::processMapLogin, 1); packet(SMSG_BEING_FAKE_NAME, 0x0078, 54, &BeingRecv::processBeingFakeName, 1); packet(SMSG_BEING_SPAWN, 0x0079, 53, &BeingRecv::processBeingSpawn, 1); +packet(SMSG_BEING_MOVE, 0x007b, 60, &BeingRecv::processBeingMove, 1); packet(SMSG_BEING_SPAWN_OUTDATED, 0x007c, 41, nullptr, 1); packet(SMSG_WHISPER, 0x0097, -1, &ChatRecv::processWhisper, 1); packet(SMSG_WHISPER_RESPONSE, 0x0098, 3, &ChatRecv::processWhisperResponse, 1); +packet(SMSG_ITEM_DROPPED, 0x009e, 17, &ItemRecv::processItemDropped, 1); packet(SMSG_PLAYER_EQUIPMENT, 0x00a4, -1, &InventoryRecv::processPlayerEquipment, 1); packet(SMSG_PLAYER_STORAGE_EQUIP, 0x00a6, -1, &InventoryRecv::processPlayerStorageEquip, 1); packet(SMSG_BEING_CHANGE_LOOKS_OUTDATED, 0x00c3, 8, nullptr, 1); @@ -33,6 +36,7 @@ packet(SMSG_TRADE_REQUEST, 0x00e5, 26, &TradeRecv::processTrade packet(SMSG_TRADE_ITEM_ADD, 0x00e9, 19, &TradeRecv::processTradeItemAdd, 1); packet(SMSG_TRADE_RESPONSE_OUTDATED, 0x00e7, 3, nullptr, 0); packet(SMSG_PLAYER_STORAGE_ADD, 0x00f4, 21, &InventoryRecv::processPlayerStorageAdd, 1); +packet(SMSG_PARTY_INVITED, 0x00fe, 30, &PartyRecv::processPartyInvited, 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); @@ -44,11 +48,8 @@ packet(SMSG_SKILL_CASTING, 0x013e, 24, &BeingRecv::processSkill packet(SMSG_BEING_STATUS_CHANGE, 0x0196, 9, &BeingRecv::processBeingStatusChange, 1); packet(SMSG_QUEST_LIST, 0x02b1, -1, &QuestRecv::processAddQuests, 1); packet(SMSG_BEING_VIEW_EQUIPMENT, 0x02d7, -1, &BeingRecv::processBeingViewEquipment, 1); -packet(SMSG_BEING_MOVE, 0x007b, 60, &BeingRecv::processBeingMove, 1); -packet(SMSG_PARTY_INVITED, 0x00fe, 30, &PartyRecv::processPartyInvited, 1); packet(SMSG_PARTY_SETTINGS, 0x0101, 6, &PartyRecv::processPartySettings, 1); packet(SMSG_PLAYER_HP, 0x0106, 10, &BeingRecv::processBeingHp, 1); -packet(SMSG_MAP_LOGIN_SUCCESS, 0x0073, 11, &GameRecv::processMapLogin, 1); // fake packets for add packet name packet(SMSG_SELECT_CART, 0x0000, 0, nullptr, 0); @@ -719,7 +720,10 @@ if (packetVersion >= 20121212) } // 20130000 -packet(SMSG_ITEM_DROPPED, 0x084b, 19, &ItemRecv::processItemDropped, 20130000); +if (packetVersion >= 20130000) +{ + packet(SMSG_ITEM_DROPPED, 0x084b, 19, &ItemRecv::processItemDropped, 20130000); +} // 20130710 packet(SMSG_PLAYER_RANK_POINTS, 0x097e, 12, &PlayerRecv::processPlayerRankPoints, 20130710); |