summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/loginrecv.cpp3
-rw-r--r--src/net/eathena/packetsout.inc4
-rw-r--r--src/net/eathena/protocolout.cpp1
-rw-r--r--src/net/eathena/protocolout.h3
-rw-r--r--src/net/eathena/updateprotocol.cpp3
-rw-r--r--src/net/tmwa/loginrecv.cpp4
-rw-r--r--src/net/tmwa/packetsout.inc4
-rw-r--r--src/net/tmwa/protocolout.h3
-rw-r--r--src/net/tmwa/updateprotocol.cpp1
9 files changed, 26 insertions, 0 deletions
diff --git a/src/net/eathena/loginrecv.cpp b/src/net/eathena/loginrecv.cpp
index cd0a09060..af9592b7a 100644
--- a/src/net/eathena/loginrecv.cpp
+++ b/src/net/eathena/loginrecv.cpp
@@ -30,6 +30,8 @@
#include "net/messagein.h"
+#include "net/eathena/updateprotocol.h"
+
#include "utils/gettext.h"
#include "utils/paths.h"
@@ -164,6 +166,7 @@ void LoginRecv::processServerVersion(Net::MessageIn &msg)
{
logger->log("Hercules without version");
}
+ updateProtocol();
client->setState(STATE_LOGIN);
}
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index d7f45e567..3f4b714f1 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -265,3 +265,7 @@ packet(CMSG_SEARCHSTORE_CLICK, 0x0835);
packet(CMSG_SET_STATUS, 0x0b0e);
packet(CMSG_ONLINE_LIST, 0x0b0f);
+
+#ifdef PACKETS_UPDATE
+// condition code here
+#endif
diff --git a/src/net/eathena/protocolout.cpp b/src/net/eathena/protocolout.cpp
index 3bc15194f..bae259af5 100644
--- a/src/net/eathena/protocolout.cpp
+++ b/src/net/eathena/protocolout.cpp
@@ -23,6 +23,7 @@ namespace EAthena
#include "net/protocoloutdefine.h"
#include "net/eathena/packetsout.inc"
#undef packet
+
} // namespace EAthena
#include "debug.h"
diff --git a/src/net/eathena/protocolout.h b/src/net/eathena/protocolout.h
index 9216d2447..571edfccf 100644
--- a/src/net/eathena/protocolout.h
+++ b/src/net/eathena/protocolout.h
@@ -29,5 +29,8 @@ namespace EAthena
} // namespace Eathena
#undef packet
+#undef packet2
+#undef startCondition
+#undef endCondition
#endif // NET_EATHENA_PROTOCOLOUT_H
diff --git a/src/net/eathena/updateprotocol.cpp b/src/net/eathena/updateprotocol.cpp
index ebe17c575..c9d2c07d7 100644
--- a/src/net/eathena/updateprotocol.cpp
+++ b/src/net/eathena/updateprotocol.cpp
@@ -20,6 +20,8 @@
#include "net/eathena/updateprotocol.h"
+#include "logger.h"
+
#include "net/eathena/network.h"
#include "net/eathena/protocolout.h"
@@ -30,6 +32,7 @@ namespace EAthena
void updateProtocol()
{
+#define PACKETS_UPDATE
#include "net/protocoloutupdate.h"
#include "net/eathena/packetsout.inc"
#undef packet
diff --git a/src/net/tmwa/loginrecv.cpp b/src/net/tmwa/loginrecv.cpp
index d5ca68241..c6aa48b83 100644
--- a/src/net/tmwa/loginrecv.cpp
+++ b/src/net/tmwa/loginrecv.cpp
@@ -29,6 +29,8 @@
#include "net/messagein.h"
+#include "net/tmwa/updateprotocol.h"
+
#include "utils/gettext.h"
#include "debug.h"
@@ -80,6 +82,8 @@ void LoginRecv::processServerVersion(Net::MessageIn &msg)
else
logger->log("Server without version");
+ updateProtocol();
+
if (serverVersion < 5)
{
if (client->getState() != STATE_LOGIN)
diff --git a/src/net/tmwa/packetsout.inc b/src/net/tmwa/packetsout.inc
index db7bad749..eca0bb73d 100644
--- a/src/net/tmwa/packetsout.inc
+++ b/src/net/tmwa/packetsout.inc
@@ -121,3 +121,7 @@ packet(CMSG_IGNORE_NICK, 0x00cf);
packet(CMSG_CLIENT_DISCONNECT, 0x7532);
packet(CMSG_IGNORE_ALL, 0x00d0);
+
+#ifdef PACKETS_UPDATE
+// condition code here
+#endif
diff --git a/src/net/tmwa/protocolout.h b/src/net/tmwa/protocolout.h
index 4de75a35c..ce137d8a6 100644
--- a/src/net/tmwa/protocolout.h
+++ b/src/net/tmwa/protocolout.h
@@ -29,5 +29,8 @@ namespace TmwAthena
} // namespace TmwAthena
#undef packet
+#undef packet2
+#undef startCondition
+#undef endCondition
#endif // NET_TMWA_PROTOCOLOUT_H
diff --git a/src/net/tmwa/updateprotocol.cpp b/src/net/tmwa/updateprotocol.cpp
index 59d0d836a..391d01a63 100644
--- a/src/net/tmwa/updateprotocol.cpp
+++ b/src/net/tmwa/updateprotocol.cpp
@@ -30,6 +30,7 @@ namespace TmwAthena
void updateProtocol()
{
+#define PACKETS_UPDATE
#include "net/protocoloutupdate.h"
#include "net/tmwa/packetsout.inc"
#undef packet