summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-05 21:08:58 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-05 21:08:58 +0300
commitcc79a815a38dab8970e28a692b9a051627c8e56a (patch)
treef8bf44c5dcfe3e554555c827594570bbf8309312 /src/net/eathena
parentc4274b8b5798ffaee2a783f7a1f10e6f80c93f9e (diff)
downloadplus-cc79a815a38dab8970e28a692b9a051627c8e56a.tar.gz
plus-cc79a815a38dab8970e28a692b9a051627c8e56a.tar.bz2
plus-cc79a815a38dab8970e28a692b9a051627c8e56a.tar.xz
plus-cc79a815a38dab8970e28a692b9a051627c8e56a.zip
Change packet version to 11. Impliment fixed packets for same version.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/beingrecv.cpp10
-rw-r--r--src/net/eathena/network.h2
-rw-r--r--src/net/eathena/packetsin.inc23
3 files changed, 30 insertions, 5 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 7a3c09697..639ce37ab 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -65,6 +65,8 @@
#include "debug.h"
+extern int serverVersion;
+
namespace EAthena
{
@@ -253,6 +255,8 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg)
// Information about a being in range
const BeingId id = msg.readBeingId("being id");
+ if (serverVersion == 0 || serverVersion >= 11)
+ msg.readBeingId("char id");
BeingId spawnId;
if (id == Ea::BeingRecv::mSpawnId)
spawnId = Ea::BeingRecv::mSpawnId;
@@ -413,6 +417,8 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg)
// Information about a being in range
const BeingId id = msg.readBeingId("being id");
+ if (serverVersion == 0 || serverVersion >= 11)
+ msg.readBeingId("char id");
BeingId spawnId;
if (id == Ea::BeingRecv::mSpawnId)
spawnId = Ea::BeingRecv::mSpawnId;
@@ -587,6 +593,8 @@ void BeingRecv::processBeingSpawn(Net::MessageIn &msg)
// Information about a being in range
const BeingId id = msg.readBeingId("being id");
+ if (serverVersion == 0 || serverVersion >= 11)
+ msg.readBeingId("char id");
Ea::BeingRecv::mSpawnId = id;
const BeingId spawnId = id;
int16_t speed = msg.readInt16("speed");
@@ -910,6 +918,8 @@ void BeingRecv::processBeingAction2(Net::MessageIn &msg)
const int srcSpeed = msg.readInt32("src speed");
msg.readInt32("dst speed");
const int param1 = msg.readInt32("damage");
+ if (serverVersion == 0 || serverVersion >= 11)
+ msg.readUInt8("is sp damaged");
msg.readInt16("count");
const AttackTypeT type = static_cast<AttackTypeT>(
msg.readUInt8("action"));
diff --git a/src/net/eathena/network.h b/src/net/eathena/network.h
index 235f0dbfd..0b628256f 100644
--- a/src/net/eathena/network.h
+++ b/src/net/eathena/network.h
@@ -29,7 +29,7 @@
* Protocol version, reported to the eAthena char and mapserver who can adjust
* the protocol accordingly.
*/
-#define CLIENT_PROTOCOL_VERSION 15
+#define CLIENT_PROTOCOL_VERSION 16
namespace EAthena
{
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 8ee533ec5..7f7200fc8 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -20,6 +20,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+// < 20131223
+if (serverVersion > 0 && serverVersion <= 10)
+{
+ packet(SMSG_BEING_VISIBLE, 0x0915, -1, &BeingRecv::processBeingVisible);
+ packet(SMSG_BEING_ACTION2, 0x02e1, 33, &BeingRecv::processBeingAction2);
+ packet(SMSG_BEING_SPAWN, 0x090f, -1, &BeingRecv::processBeingSpawn);
+ packet(SMSG_BEING_MOVE, 0x0914, -1, &BeingRecv::processBeingMove);
+}
+
+// 20150000 or near
packet(SMSG_ADMIN_ACCOUNT_STATS, 0x0214, 42, &AdminRecv::processAccountStats);
packet(SMSG_ADMIN_GET_LOGIN_ACK, 0x01e0, 30, &AdminRecv::processAdminGetLoginAck);
packet(SMSG_ADMIN_KICK_ACK, 0x00cd, 6, &Ea::AdminRecv::processKickAck);
@@ -46,7 +56,6 @@ packet(SMSG_BATTLE_QUEUE_ACK, 0x08d8, 27, &BattleGroundRecv::proce
packet(SMSG_BATTLE_UPDATE_COORDS, 0x02df, 36, &BattleGroundRecv::processBattleUpdateCoords);
packet(SMSG_BATTLE_UPDATE_SCORE, 0x02de, 6, &BattleGroundRecv::processBattleUpdateScore);
packet(SMSG_BEING_ACTION, 0x008a, 29, &Ea::BeingRecv::processBeingAction);
-packet(SMSG_BEING_ACTION2, 0x02e1, 33, &BeingRecv::processBeingAction2);
packet(SMSG_BEING_ATTRS, 0x0b0a, -1, &BeingRecv::processBeingAttrs);
packet(SMSG_BEING_CHANGE_DIRECTION, 0x009c, 9, &BeingRecv::processBeingChangeDirection);
packet(SMSG_BEING_CHANGE_LOOKS2, 0x01d7, 11, &BeingRecv::processBeingChangeLook2);
@@ -58,7 +67,6 @@ packet(SMSG_BEING_EMOTION, 0x00c0, 7, &Ea::BeingRecv::processB
packet(SMSG_BEING_FAKE_NAME, 0x0078, 55, &BeingRecv::processBeingFakeName);
packet(SMSG_BEING_FONT, 0x02ef, 8, &BeingRecv::processBeingFont);
packet(SMSG_BEING_MILLENIUM_SHIELD, 0x0440, 10, &BeingRecv::processBeingMilleniumShield);
-packet(SMSG_BEING_MOVE, 0x0914, -1, &BeingRecv::processBeingMove);
packet(SMSG_BEING_MOVE2, 0x0086, 16, &BeingRecv::processBeingMove2);
packet(SMSG_BEING_MOVE3, 0x0b04, -1, &Ea::BeingRecv::processBeingMove3);
packet(SMSG_BEING_NAME_RESPONSE, 0x0095, 30, &Ea::BeingRecv::processNameResponse);
@@ -69,14 +77,12 @@ packet(SMSG_BEING_RESURRECT, 0x0148, 8, &BeingRecv::processBeing
packet(SMSG_BEING_SELFEFFECT, 0x019b, 10, &BeingRecv::processBeingSelfEffect);
packet(SMSG_BEING_SLIDE, 0x01ff, 10, &BeingRecv::processBeingSlide);
packet(SMSG_BEING_SOUND_EFFECT, 0x01d3, 35, &BeingRecv::processBeingSoundEffect);
-packet(SMSG_BEING_SPAWN, 0x090f, -1, &BeingRecv::processBeingSpawn);
packet(SMSG_BEING_SPECIAL_EFFECT, 0x01f3, 10, &BeingRecv::processBeingSpecialEffect);
packet(SMSG_BEING_SPECIAL_EFFECT_NUM, 0x0284, 14, &BeingRecv::processBeingSpecialEffectNum);
packet(SMSG_BEING_STATUS_CHANGE, 0x0983, 29, &BeingRecv::processBeingStatusChange);
packet(SMSG_BEING_STATUS_CHANGE2, 0x043f, 25, &BeingRecv::processBeingStatusChange2);
packet(SMSG_BEING_STAT_UPDATE_1, 0x01ab, 12, &BeingRecv::processBeingStatUpdate1);
packet(SMSG_BEING_VIEW_EQUIPMENT, 0x0997, -1, &BeingRecv::processBeingViewEquipment);
-packet(SMSG_BEING_VISIBLE, 0x0915, -1, &BeingRecv::processBeingVisible);
packet(SMSG_BIND_ITEM, 0x02d3, 4, &InventoryRecv::processBindItem);
packet(SMSG_BLACKSMITH_RANKS_LIST, 0x0219, 282, &BeingRecv::processBlacksmithRanksList);
packet(SMSG_BLADE_STOP, 0x01d1, 14, &BeingRecv::processBladeStop);
@@ -432,6 +438,15 @@ packet(SMSG_WHISPER, 0x0097, -1, &ChatRecv::processWhispe
packet(SMSG_WHISPER_RESPONSE, 0x09df, 7, &ChatRecv::processWhisperResponse);
packet(SMSG_WHO_ANSWER, 0x00c2, 6, &Ea::GameRecv::processWhoAnswer);
+// 20150000 fix
+if (serverVersion >= 11)
+{
+ packet(SMSG_BEING_VISIBLE, 0x09dd, -1, &BeingRecv::processBeingVisible);
+ packet(SMSG_BEING_ACTION2, 0x08c8, 34, &BeingRecv::processBeingAction2);
+ packet(SMSG_BEING_SPAWN, 0x09dc, -1, &BeingRecv::processBeingSpawn);
+ packet(SMSG_BEING_MOVE, 0x09db, -1, &BeingRecv::processBeingMove);
+}
+
if (serverVersion >= 8 && packetVersion >= 20150226)
{
packet(SMSG_VENDING_OPEN, 0x0136, -1, &VendingRecv::processOpen);