summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-22 23:33:38 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-23 00:09:21 +0300
commit370771ff7a602498eac131f110b582ca4efbafef (patch)
treef96882508cdc19d62444bf24b53d0df12e54dc89 /src/net/tmwa
parentab3b909187ee0a18946bff50a6bd3e8e281970f1 (diff)
downloadmv-370771ff7a602498eac131f110b582ca4efbafef.tar.gz
mv-370771ff7a602498eac131f110b582ca4efbafef.tar.bz2
mv-370771ff7a602498eac131f110b582ca4efbafef.tar.xz
mv-370771ff7a602498eac131f110b582ca4efbafef.zip
Allow add conditions into out packets definition.
Diffstat (limited to 'src/net/tmwa')
-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
4 files changed, 12 insertions, 0 deletions
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