summaryrefslogtreecommitdiff
path: root/src/mmo
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-04-10 14:14:51 -0400
committermekolat <mekolat@users.noreply.github.com>2016-04-10 15:51:50 -0400
commitfcf31a258f2925650cf51f15d0280c0efb67c6a2 (patch)
treed7959d448dcfa0f0ae34789845e2a6b9b778fdf1 /src/mmo
parent3cda94665c73447b09338d6f219ef22b58f066bd (diff)
downloadtmwa-fcf31a258f2925650cf51f15d0280c0efb67c6a2.tar.gz
tmwa-fcf31a258f2925650cf51f15d0280c0efb67c6a2.tar.bz2
tmwa-fcf31a258f2925650cf51f15d0280c0efb67c6a2.tar.xz
tmwa-fcf31a258f2925650cf51f15d0280c0efb67c6a2.zip
consolidate client version handling
Diffstat (limited to 'src/mmo')
-rw-r--r--src/mmo/fwd.hpp1
-rw-r--r--src/mmo/ids.hpp1
-rw-r--r--src/mmo/ids.py1
-rw-r--r--src/mmo/version.hpp8
4 files changed, 8 insertions, 3 deletions
diff --git a/src/mmo/fwd.hpp b/src/mmo/fwd.hpp
index 434885e..d98bd33 100644
--- a/src/mmo/fwd.hpp
+++ b/src/mmo/fwd.hpp
@@ -44,6 +44,7 @@ class PartyId;
class ItemNameId;
class BlockId;
class GmLevel;
+class ClientVersion;
class AccountName;
class AccountPass;
diff --git a/src/mmo/ids.hpp b/src/mmo/ids.hpp
index 28b146a..22f5eae 100644
--- a/src/mmo/ids.hpp
+++ b/src/mmo/ids.hpp
@@ -41,6 +41,7 @@ class ItemNameId : public Wrapped<uint16_t> { public: constexpr ItemNameId() : W
class BlockId : public Wrapped<uint32_t> { public: constexpr BlockId() : Wrapped<uint32_t>() {} protected: constexpr explicit BlockId(uint32_t a) : Wrapped<uint32_t>(a) {} };
class QuestId : public Wrapped<uint16_t> { public: constexpr QuestId() : Wrapped<uint16_t>() {} protected: constexpr explicit QuestId(uint16_t a) : Wrapped<uint16_t>(a) {} };
+class ClientVersion : public Wrapped<uint32_t>{ public: constexpr ClientVersion() : Wrapped<uint32_t>() {} protected: constexpr explicit ClientVersion(uint32_t a) : Wrapped<uint32_t>(a) {} };
bool impl_extract(XString str, GmLevel *lvl);
class GmLevel
diff --git a/src/mmo/ids.py b/src/mmo/ids.py
index a98920f..0d39aae 100644
--- a/src/mmo/ids.py
+++ b/src/mmo/ids.py
@@ -6,6 +6,7 @@ for s in [
'ItemNameId',
'BlockId',
'QuestId',
+ 'ClientVersion',
]:
class OtherId(object):
__slots__ = ('_value')
diff --git a/src/mmo/version.hpp b/src/mmo/version.hpp
index 459b500..79d67fe 100644
--- a/src/mmo/version.hpp
+++ b/src/mmo/version.hpp
@@ -37,9 +37,11 @@ namespace tmwa
// increase the min version when the protocol is incompatible with old m+ versions
// 1 = latest mana, old manaplus, bots
-// 2 = manaplus 1.5.5.9 and above
-// 3 = manaplus 1.5.5.23 and above
-// 4 = manaplus 1.5.8.15 and above
+// 2 = manaplus 1.5.5.9 to manaplus 1.5.5.23
+// 3 = manaplus 1.5.5.23 to manaplus 1.5.8.15
+// 4 = manaplus 1.5.8.15 to manaplus 1.6.3.15
+// 5 = manaplus 1.6.3.15 to 1.6.4.23 (adds SMSG_SCRIPT_MESSAGE)
+// 6 = manaplus 1.6.4.23 and above
#define MIN_CLIENT_VERSION 1
// TODO now that I generate the protocol, split 'flags' out of the struct