diff options
67 files changed, 998 insertions, 20098 deletions
@@ -4,9 +4,8 @@ /bin/ /dist/ # Generated source files -/src/map/magic-interpreter-parser.hpp -/src/map/magic-interpreter-parser.cpp -/src/map/magic-interpreter-lexer.cpp +/src/proto2/ +/src/debug-debug/test.cpp # tags file /tags # generated by configure diff --git a/Makefile.in b/Makefile.in index 3686b60..a2cb67b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -169,10 +169,17 @@ export PATH:=$(realpath ${SRC_DIR}/tools):${PATH} # needs to *and* fails when it needs to. Just use bash. SHELL=bash +# need to generate source files before path lists +$(shell make -f ${SRC_DIR}/generate.make >&2) +obj/generated.stamp: + # if you get here, the shell above failed + false + # path lists REAL_SOURCES := $(shell cd ${SRC_DIR}; find src/ -name '*.cpp') REAL_HEADERS := $(shell cd ${SRC_DIR}; find include/ src/ -name '*.hpp' -o -name '*.tcc') PIES := $(shell cd ${SRC_DIR}; find src/ -name '*.py') +PIES := $(filter-out src/main-gdb-%.py,${PIES}) SOURCES := ${REAL_SOURCES} HEADERS := ${REAL_HEADERS} PATTERN_ROOTS := $(patsubst src/%.cpp,%,${SOURCES}) @@ -288,7 +295,9 @@ endif # first pass, include silently, but force rebuild ifndef MAKE_RESTARTS --include ${DEPENDS} +# disabled due to bad interaction with generating dependencies that fail +#-include ${DEPENDS} +include ${DEPENDS} else include ${DEPENDS} endif @@ -306,7 +315,9 @@ $(foreach root,${PATTERN_ROOTS},$(eval obj/${root}.ii obj/${root}.ll obj/${root} # test.o implicitly (NOT explicitly) depends on all (nonexistent) test_*.hpp # TODO actually have more than one test.o, each with its own set of files -$(foreach test,${PATTERN_TESTS},$(eval ${test}/test += $(patsubst %,src/%.hpp,$(filter %_test,${PATTERN_ROOTS})))) +#$(foreach test,${PATTERN_TESTS},$(eval ${test}/test += $(patsubst %,src/%.hpp,$(filter %_test,${PATTERN_ROOTS})))) +# FIXME find a better way +$(foreach test,tests,$(eval ${test}/test += $(patsubst %,src/%.hpp,$(filter %_test,${PATTERN_ROOTS})))) $(foreach main,${PATTERN_MAINS},$(eval main-${main} := $(strip $(call RECURSIVE_DEPS,${main}/main))) $(eval main-${main}-libs := ${lib_deps})) @@ -362,10 +373,13 @@ mostlyclean: clean-conf clean: mostlyclean $l rm -rf bin lib distclean: clean gen-clean -gen-clean: ; +gen-clean: + $l rm -f obj/generated.stamp + $l rm -rf ${SRC_DIR}/src/proto2/ + $l rm -rf ${SRC_DIR}/src/debug-debug/ ifndef MAKE_RESTARTS -obj/%.d: src/%.cpp +obj/%.d: src/%.cpp | obj/generated.stamp $(MKDIR_FIRST) # Not using $c because it's slow and this should be fast ${CXX} ${CPPFLAGS} -DGENERATING_DEPENDENCIES ${CXXFLAGS} -MG -MM \ @@ -392,11 +406,11 @@ obj/%.pic.o: src/%.cpp $(MKDIR_FIRST) $c ${CXX} ${CPPFLAGS} ${CXXFLAGS} -fPIC -c -o $@ $< -bin/%-gdb.py: +bin/%-gdb.py: src/main-gdb-head.py src/main-gdb-tail.py $(MKDIR_FIRST) - cat ${SRC_DIR}/src/main-gdb-head.py \ - $^ \ - ${SRC_DIR}/src/main-gdb-tail.py \ + cat $(filter %/main-gdb-head.py,$^) \ + $(filter-out %/main-gdb-head.py %/main-gdb-tail.py,$^) \ + $(filter %/main-gdb-tail.py,$^) \ > $@ bin/%: bin/%-gdb.py $(MKDIR_FIRST) @@ -414,7 +428,8 @@ lib/%.${SO_LONG}: lib/%.${SO_LONG}-gdb.py $c ln -sf $*.${SO_LONG} lib/$*.${SO_SHORT} $c ln -sf $*.${SO_SHORT} lib/$*.so -${TEST_BINARIES}: obj/gtest-all.pdc.o +#${TEST_BINARIES}: obj/gtest-all.pdc.o +bin/test-tests: obj/gtest-all.pdc.o # This isn't perfect. $(filter %_test.pdc.o,${PDC_OBJECTS}) obj/gtest-all.pdc.o: override CPPFLAGS += -DGTEST_HAS_PTHREAD=0 -I${GTEST_DIR} @@ -423,9 +438,14 @@ obj/gtest-all.pdc.o: ${GTEST_DIR}/src/gtest-all.cc $(MKDIR_FIRST) $c ${CXX} ${CPPFLAGS} ${CXXFLAGS} -c -o $@ $< -test: $(patsubst bin/%,.run-%,${TEST_BINARIES}) -.run-%: bin/% +obj/debug-debug/test.o: override CXXFLAGS += -g -O0 +obj/run-test-debug-debug.stamp: TESTER=gdb -return-child-result -nx -batch -iex 'set auto-load safe-path /' -x ${SRC_DIR}/tools/debug-debug.gdb +obj/run-test-debug-debug.stamp: tools/debug-debug.gdb + +test: $(patsubst bin/%,obj/run-%.stamp,${TEST_BINARIES}) +obj/run-%.stamp: bin/% ${TESTER} $< ${TEST_ARGS} + touch $@ install := install --backup=${ENABLE_BACKUPS_DURING_INSTALL} install_exe := ${install} diff --git a/generate.make b/generate.make new file mode 100644 index 0000000..19ff2c5 --- /dev/null +++ b/generate.make @@ -0,0 +1,33 @@ +SHELL=bash + +MKDIR_FIRST = @mkdir -p ${@D} +SRC_DIR := $(patsubst %/,%,$(dir ${MAKEFILE_LIST})) +PIES := $(shell cd ${SRC_DIR}; find src/ -name '*.py') +PIES := $(filter-out src/main-gdb-%.py,${PIES}) + +export PATH:=$(realpath ${SRC_DIR}/tools):${PATH} + +vpath %.cpp ${SRC_DIR} +vpath %.hpp ${SRC_DIR} +vpath %.tcc ${SRC_DIR} +vpath tools/% ${SRC_DIR} +vpath %.py ${SRC_DIR} + +obj/generated.stamp: + $(MKDIR_FIRST) + touch $@ +obj/generated.stamp: obj/generate-proto2.stamp +obj/generate-proto2.stamp: tools/protocol.py + $(MKDIR_FIRST) + rm -f obj/generated.stamp + mkdir -p ${SRC_DIR}/src/proto2 + cd ${SRC_DIR} && protocol.py + touch $@ +obj/generated.stamp: obj/generate-debug-debug.stamp +obj/generate-debug-debug.stamp: tools/debug-debug-scripts ${PIES} + $(MKDIR_FIRST) + rm -f obj/generated.stamp + mkdir -p ${SRC_DIR}/src/debug-debug + debug-debug-scripts $(wordlist 2,$(words $^),$^) > ${SRC_DIR}/src/debug-debug/test.cpp + touch $@ + diff --git a/src/admin/main.cpp b/src/admin/main.cpp index 678286e..1849d80 100644 --- a/src/admin/main.cpp +++ b/src/admin/main.cpp @@ -1,6 +1,6 @@ -// admin/main.cpp - dummy file to make Make dependencies work +// admin/main.cpp - entry point to tmwa-admin tool // -// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com> +// Copyright © 2013-2014 Ben Longbons <b.r.longbons@gmail.com> // // This file is part of The Mana World (Athena server) // @@ -17,6 +17,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. +#include "../mmo/core.hpp" + #include "ladmin.hpp" #include "../poison.hpp" @@ -25,3 +27,8 @@ namespace tmwa { } // namespace tmwa + +int main(int argc, char **argv) +{ + return tmwa_main(argc, argv); +} diff --git a/src/char/main.cpp b/src/char/main.cpp index 6636196..3648a74 100644 --- a/src/char/main.cpp +++ b/src/char/main.cpp @@ -1,6 +1,6 @@ -// char/main.cpp - dummy file to make Make dependencies work +// char/main.cpp - entry point to tmwa-char server // -// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com> +// Copyright © 2013-2014 Ben Longbons <b.r.longbons@gmail.com> // // This file is part of The Mana World (Athena server) // @@ -17,6 +17,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. +#include "../mmo/core.hpp" + #include "char.hpp" #include "../poison.hpp" @@ -25,3 +27,8 @@ namespace tmwa { } // namespace tmwa + +int main(int argc, char **argv) +{ + return tmwa_main(argc, argv); +} diff --git a/src/generic/dumb_ptr.py b/src/generic/dumb_ptr.py new file mode 100644 index 0000000..7d30d6c --- /dev/null +++ b/src/generic/dumb_ptr.py @@ -0,0 +1,22 @@ +class dumb_ptr(object): + __slots__ = ('_value') + name = 'tmwa::dumb_ptr' + enabled = True + + def __init__(self, value): + self._value = value + + def to_string(self): + return '0x%x' % self._value['impl'].cast(gdb.parse_and_eval('(long *)0').type) + + def children(self): + try: + sz = self._value['sz'] + yield 'sz', sz + except gdb.error: + pass + + tests = [ + ('tmwa::dumb_ptr<int>()', '0x0'), + ('tmwa::dumb_ptr<int[]>()', '0x0 = {sz = 0}'), + ] diff --git a/src/ints/wrap.py b/src/ints/wrap.py new file mode 100644 index 0000000..c8a8c6d --- /dev/null +++ b/src/ints/wrap.py @@ -0,0 +1,13 @@ +class Wrapped(object): + __slots__ = ('_value') + name = 'tmwa::ints::wrapped::Wrapped' + enabled = True + + def __init__(self, value): + self._value = value + + def to_string(self): + return self._value['_value'] + + # tests are in src/mmo/ids.py instead + tests = [] diff --git a/src/login/main.cpp b/src/login/main.cpp index b1eb8dd..48a471a 100644 --- a/src/login/main.cpp +++ b/src/login/main.cpp @@ -1,6 +1,6 @@ -// login/main.cpp - dummy file to make Make dependencies work +// login/main.cpp - entry point to tmwa-login server // -// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com> +// Copyright © 2013-2014 Ben Longbons <b.r.longbons@gmail.com> // // This file is part of The Mana World (Athena server) // @@ -17,6 +17,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. +#include "../mmo/core.hpp" + #include "login.hpp" #include "../poison.hpp" @@ -25,3 +27,8 @@ namespace tmwa { } // namespace tmwa + +int main(int argc, char **argv) +{ + return tmwa_main(argc, argv); +} diff --git a/src/main-gdb-head.py b/src/main-gdb-head.py index d8f2001..2dac471 100644 --- a/src/main-gdb-head.py +++ b/src/main-gdb-head.py @@ -30,24 +30,57 @@ def get_basic_type(type_): return type_.unqualified() def finish(): - global finish, initial_globals, FastPrinters + global finish, initial_globals, FastPrinters, EnumPrinter final_globals = {id(v):v for v in globals().values()} - diff = final_globals.keys() - initial_globals.keys() \ + diff = set(final_globals.keys()) - set(initial_globals.keys()) \ - {'finish', 'initial_globals', 'FastPrinters'} fp = FastPrinters() + ep = EnumPrinter # After this, don't access any more globals in this function. - del finish, initial_globals, FastPrinters + del finish, initial_globals, FastPrinters, EnumPrinter for i in diff: v = final_globals[i] if hasattr(v, 'children') or hasattr(v, 'to_string'): fp.add_printer(v) - gdb.current_objfile().pretty_printers.append(fp) - print('Added %d custom printers for %s' - % (len(fp.printers), gdb.current_objfile().filename)) + obj = gdb.current_objfile() + if obj is None: + obj = gdb + filename = '<unknown>' + else: + filename = obj.filename + obj.pretty_printers.append(fp) + obj.pretty_printers.append(ep) + print('Added %d+1 custom printers for %s' + % (len(fp.printers), filename)) + +class EnumPrinter(object): + __slots__ = ('_value') + name = 'enum-class' + enabled = True + + def __new__(cls, v): + type = get_basic_type(v.type) + if type.code != gdb.TYPE_CODE_ENUM: + return None + return object.__new__(cls) + + def __init__(self, v): + self._value = v + + def to_string(self): + v = self._value + self.__class__.enabled = False + try: + name = str(v) + finally: + self.__class__.enabled = True + name = name.split('::')[-1] + scope = get_basic_type(v.type).tag + return '%s::%s' % (scope, name) class FastPrinters(object): ''' printer dispatch the way gdb *should* have done it @@ -63,7 +96,7 @@ class FastPrinters(object): assert hasattr(cls, 'enabled') # TODO: check if the class name exists # this is really hard since templates are involved - self.printers[cls.name] = cls + self.printers[(cls.name, getattr(cls, 'depth', 0))] = cls @property def subprinters(self): @@ -76,14 +109,36 @@ class FastPrinters(object): name, changed = __pattern.subn('', name) return name + def get_tag_and_depth(self, type): + depth = 0 + while True: + type = get_basic_type(type) + if type.code != gdb.TYPE_CODE_PTR: + break + type = type.target() + depth += 1 + return (str(type), depth) + def __call__(self, value): - stype = get_basic_type(value.type).tag - #dtype = get_basic_type(value.dynamic_type).tag + (stype, depth) = self.get_tag_and_depth(value.type) + #(dtype, _) = self.get_tag_and_depth(value.dynamic_type) if stype is None: return stype = self.strip_templates(stype) - p = self.printers.get(stype) + p = self.printers.get((stype, depth)) if p is not None and p.enabled: return p(value) return None + +class char(object): + __slots__ = ('_value') + name = 'char' + depth = 1 + enabled = True + + def __init__(self, value): + self._value = value + + def to_string(self): + return self._value.lazy_string() diff --git a/src/map/clif.cpp b/src/map/clif.cpp index fb4041c..3b6c772 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -3697,6 +3697,7 @@ RecvResult clif_parse_GetCharNameRequest(Session *s, dumb_ptr<map_session_data> send_fpacket<0x0095, 30>(s, fixed_95); } break; + // case BL::SPELL default: if (battle_config.error_log) PRINTF("clif_parse_GetCharNameRequest : bad type %d (%d)\n"_fmt, diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp index a453c05..9a44fa9 100644 --- a/src/map/magic-expr.cpp +++ b/src/map/magic-expr.cpp @@ -75,22 +75,22 @@ dumb_ptr<area_t> dup_area(dumb_ptr<area_t> area) { CASE (const location_t&, loc) { - return dumb_ptr<area_t>::make(loc, area->size); + return dumb_ptr<area_t>::make(loc); } CASE (const AreaUnion&, a) { AreaUnion u; u.a_union[0] = dup_area(a.a_union[0]); u.a_union[1] = dup_area(a.a_union[1]); - return dumb_ptr<area_t>::make(u, area->size); + return dumb_ptr<area_t>::make(u); } CASE (const AreaRect&, rect) { - return dumb_ptr<area_t>::make(rect, area->size); + return dumb_ptr<area_t>::make(rect); } CASE (const AreaBar&, bar) { - return dumb_ptr<area_t>::make(bar, area->size); + return dumb_ptr<area_t>::make(bar); } } @@ -290,8 +290,7 @@ dumb_ptr<area_t> area_union(dumb_ptr<area_t> area, dumb_ptr<area_t> other_area) AreaUnion a; a.a_union[0] = area; a.a_union[1] = other_area; - int size = area->size + other_area->size; /* Assume no overlap */ - return dumb_ptr<area_t>::make(a, size); + return dumb_ptr<area_t>::make(a); } /** @@ -302,7 +301,7 @@ void make_area(val_t *v) { if (ValLocation *l = v->get_if<ValLocation>()) { - auto a = dumb_ptr<area_t>::make(l->v_location, 1); + auto a = dumb_ptr<area_t>::make(l->v_location); *v = ValArea{a}; } } @@ -1211,7 +1210,7 @@ int fun_rbox(dumb_ptr<env_t>, val_t *result, Slice<val_t> args) a_rect.loc.y = loc.y - radius; a_rect.width = radius * 2 + 1; a_rect.height = radius * 2 + 1; - *result = ValArea{dumb_ptr<area_t>::make(a_rect, a_rect.width * a_rect.height)}; + *result = ValArea{dumb_ptr<area_t>::make(a_rect)}; return 0; } @@ -1539,14 +1538,13 @@ dumb_ptr<area_t> eval_area(dumb_ptr<env_t> env, const e_area_t& expr_) CASE (const e_location_t&, a_loc) { location_t loc; - int size = 1; if (eval_location(env, &loc, &a_loc)) { return nullptr; } else { - return dumb_ptr<area_t>::make(loc, size); + return dumb_ptr<area_t>::make(loc); } } CASE (const ExprAreaUnion&, a) @@ -1569,8 +1567,7 @@ dumb_ptr<area_t> eval_area(dumb_ptr<env_t> env, const e_area_t& expr_) } return nullptr; } - int size = u.a_union[0]->size + u.a_union[1]->size; - return dumb_ptr<area_t>::make(u, size); + return dumb_ptr<area_t>::make(u); } CASE (const ExprAreaRect&, a_rect) { @@ -1587,10 +1584,9 @@ dumb_ptr<area_t> eval_area(dumb_ptr<env_t> env, const e_area_t& expr_) a_rect_.width = width.get_if<ValInt>()->v_int; a_rect_.height = height.get_if<ValInt>()->v_int; - int size = a_rect_.width * a_rect_.height; magic_clear_var(&width); magic_clear_var(&height); - return dumb_ptr<area_t>::make(a_rect_, size); + return dumb_ptr<area_t>::make(a_rect_); } else { @@ -1617,11 +1613,10 @@ dumb_ptr<area_t> eval_area(dumb_ptr<env_t> env, const e_area_t& expr_) a_bar_.depth = depth.get_if<ValInt>()->v_int; a_bar_.dir = dir.get_if<ValDir>()->v_dir; - int size = (a_bar_.width * 2 + 1) * a_bar_.depth; magic_clear_var(&width); magic_clear_var(&depth); magic_clear_var(&dir); - return dumb_ptr<area_t>::make(a_bar_, size); + return dumb_ptr<area_t>::make(a_bar_); } else { diff --git a/src/map/magic-expr.py b/src/map/magic-expr.py new file mode 100644 index 0000000..cdb2bcf --- /dev/null +++ b/src/map/magic-expr.py @@ -0,0 +1,32 @@ +class fun_t(object): + __slots__ = ('_value') + + name = 'tmwa::magic::fun_t' + depth = 1 + enabled = True + + def __init__(self, value): + if not value: + value = None + self._value = value + + def to_string(self): + value = self._value + if value is None: + return '(fun_t *) nullptr' + return '(fun_t *)' + + def children(self): + value = self._value + if value is None: + return + value = value.dereference() + yield '->name', value['name'] + yield '->signature', value['signature'] + yield '->ret_ty', value['ret_ty'] + yield '->fun', value['fun'] + + tests = [ + ('static_cast<tmwa::magic::fun_t *>(nullptr)', '(fun_t *) nullptr'), + ('new tmwa::magic::fun_t{"name"_s, "sig"_s, \'\\0\', nullptr}', '(fun_t *) = {->name = "name", ->signature = "sig", ->ret_ty = 0 \'\\000\', ->fun = 0x0}'), + ] diff --git a/src/map/magic-interpreter.hpp b/src/map/magic-interpreter.hpp index 526617f..3bb600c 100644 --- a/src/map/magic-interpreter.hpp +++ b/src/map/magic-interpreter.hpp @@ -87,10 +87,10 @@ struct area_t : AreaVariantBase area_t& operator = (area_t&&) = default; area_t& operator = (const area_t&) = delete; - area_t(location_t v, int sz) : AreaVariantBase(std::move(v)), size(sz) {} - area_t(AreaUnion v, int sz) : AreaVariantBase(std::move(v)), size(sz) {} - area_t(AreaRect v, int sz) : AreaVariantBase(std::move(v)), size(sz) {} - area_t(AreaBar v, int sz) : AreaVariantBase(std::move(v)), size(sz) {} + area_t(location_t v) : AreaVariantBase(std::move(v)), size(1) {} + area_t(AreaUnion v) : AreaVariantBase(std::move(v)), size(v.a_union[0]->size + v.a_union[1]->size) {} + area_t(AreaRect v) : AreaVariantBase(std::move(v)), size(v.width * v.height) {} + area_t(AreaBar v) : AreaVariantBase(std::move(v)), size((v.width * 2 + 1) * v.depth) {} }; struct ValUndef diff --git a/src/map/magic-interpreter.py b/src/map/magic-interpreter.py index f6fa4c9..cf17b1c 100644 --- a/src/map/magic-interpreter.py +++ b/src/map/magic-interpreter.py @@ -1,224 +1,215 @@ -class area_t(object): - ''' print an area_t - ''' +class AreaUnion(object): __slots__ = ('_value') - name = 'tmwa::area_t' + name = 'tmwa::magic::AreaUnion' enabled = True def __init__(self, value): self._value = value + def display_hint(self): + return 'array' + def to_string(self): return None def children(self): v = self._value - yield 'size', v['size'] - ty = v['ty'] - yield 'ty', ty - a = v['a'] - if ty == 0: - yield 'a.a_loc', a['a_loc'] - elif ty == 1: - yield 'a.a_union', a['a_union'] - elif ty == 2: - yield 'a.a_rect', a['a_rect'] - elif ty == 3: - yield 'a.a_bar', a['a_bar'] + for i in [0, 1]: + yield '[%d]', v['a_union'][i]['impl'].dereference() + tests = [] -class val_t(object): - ''' print a val_t - ''' - __slots__ = ('_value') - name = 'tmwa::val_t' +class area_t(object): enabled = True - def __init__(self, value): - self._value = value + test_extra = ''' + #include "../strings/fwd.hpp" + using tmwa::operator "" _s; + + inline + tmwa::map_local *fake_map_local_x_dup_for_area_t(tmwa::ZString name) + { + auto *p = new tmwa::map_local{}; + p->name_ = tmwa::stringish<tmwa::MapName>(name); + return p; + } + ''' - def to_string(self): - return None + tests = [ + ('tmwa::magic::area_t(tmwa::magic::location_t{fake_map_local_x_dup_for_area_t("map"_s), 123, 456})', + '{<tmwa::sexpr::Variant<tmwa::magic::location_t, tmwa::magic::AreaUnion, tmwa::magic::AreaRect, tmwa::magic::AreaBar>> = {(tmwa::magic::location_t) = {m = (map_local *) = {->name = "map", ->xs = 0, ->ys = 0}, x = 123, y = 456}}, size = 1}'), + ('tmwa::magic::area_t(tmwa::magic::AreaUnion{{tmwa::dumb_ptr<tmwa::magic::area_t>::make(tmwa::magic::location_t{fake_map_local_x_dup_for_area_t("map"_s), 123, 456}), tmwa::dumb_ptr<tmwa::magic::area_t>::make(tmwa::magic::location_t{fake_map_local_x_dup_for_area_t("map"_s), 321, 654})}})', + '{<tmwa::sexpr::Variant<tmwa::magic::location_t, tmwa::magic::AreaUnion, tmwa::magic::AreaRect, tmwa::magic::AreaBar>> = {(tmwa::magic::AreaUnion) = {{<tmwa::sexpr::Variant<tmwa::magic::location_t, tmwa::magic::AreaUnion, tmwa::magic::AreaRect, tmwa::magic::AreaBar>> = {(tmwa::magic::location_t) = {m = (map_local *) = {->name = "map", ->xs = 0, ->ys = 0}, x = 123, y = 456}}, size = 1}, {<tmwa::sexpr::Variant<tmwa::magic::location_t, tmwa::magic::AreaUnion, tmwa::magic::AreaRect, tmwa::magic::AreaBar>> = {(tmwa::magic::location_t) = {m = (map_local *) = {->name = "map", ->xs = 0, ->ys = 0}, x = 321, y = 654}}, size = 1}}}, size = 2}'), + ('tmwa::magic::area_t(tmwa::magic::AreaRect{tmwa::magic::location_t{fake_map_local_x_dup_for_area_t("map"_s), 123, 456}, 789, 102})', + '{<tmwa::sexpr::Variant<tmwa::magic::location_t, tmwa::magic::AreaUnion, tmwa::magic::AreaRect, tmwa::magic::AreaBar>> = {(tmwa::magic::AreaRect) = {loc = {m = (map_local *) = {->name = "map", ->xs = 0, ->ys = 0}, x = 123, y = 456}, width = 789, height = 102}}, size = 80478}'), + ('tmwa::magic::area_t(tmwa::magic::AreaBar{tmwa::magic::location_t{fake_map_local_x_dup_for_area_t("map"_s), 42, 43}, 123, 456, tmwa::DIR::NW})', + '{<tmwa::sexpr::Variant<tmwa::magic::location_t, tmwa::magic::AreaUnion, tmwa::magic::AreaRect, tmwa::magic::AreaBar>> = {(tmwa::magic::AreaBar) = {loc = {m = (map_local *) = {->name = "map", ->xs = 0, ->ys = 0}, x = 42, y = 43}, width = 123, depth = 456, dir = tmwa::DIR::NW}}, size = 112632}'), + ] - def children(self): - v = self._value - ty = v['ty'] - yield 'ty', ty - u = v['v'] - if ty == 1: - yield 'v.v_int', u['v_int'] - elif ty == 2: - yield 'v.v_dir', u['v_dir'] - elif ty == 3: - yield 'v.v_string', u['v_string'] - elif ty == 4: - yield 'v.v_int', u['v_int'] - yield 'v.v_entity', u['v_entity'] - elif ty == 5: - yield 'v.v_location', u['v_location'] - elif ty == 6: - yield 'v.v_area', u['v_area'] - elif ty == 7: - yield 'v.v_spell', u['v_spell'] - elif ty == 8: - yield 'v.v_int', u['v_int'] - yield 'v.v_invocation', u['v_invocation'] +class val_t(object): + enabled = True -class e_area_t(object): - ''' print an e_area_t + test_extra = ''' + #include "../strings/fwd.hpp" + using tmwa::operator "" _s; + + inline + tmwa::map_local *fake_map_local_x_dup_for_val_t(tmwa::ZString name) + { + auto *p = new tmwa::map_local{}; + p->name_ = tmwa::stringish<tmwa::MapName>(name); + return p; + } ''' + + tests = [ + ('tmwa::magic::val_t(tmwa::magic::ValUndef{})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValUndef) = {<No data fields>}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValInt{42})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValInt) = {v_int = 42}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValDir{tmwa::DIR::NW})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValDir) = {v_dir = tmwa::DIR::NW}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValString{"Hello"_s})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValString) = {v_string = "Hello"}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValEntityInt{tmwa::wrap<tmwa::BlockId>(123)})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValEntityInt) = {v_eid = 123}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValEntityPtr{tmwa::dumb_ptr<tmwa::block_list>()})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValEntityPtr) = {v_entity = 0x0}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValLocation{tmwa::magic::location_t{fake_map_local_x_dup_for_val_t("map"_s), 42, 123}})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValLocation) = {v_location = {m = (map_local *) = {->name = "map", ->xs = 0, ->ys = 0}, x = 42, y = 123}}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValArea{tmwa::dumb_ptr<tmwa::magic::area_t>()})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValArea) = {v_area = 0x0}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValSpell{tmwa::dumb_ptr<tmwa::magic::spell_t>()})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValSpell) = {v_spell = 0x0}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValInvocationInt{tmwa::wrap<tmwa::BlockId>(123)})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValInvocationInt) = {v_iid = 123}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValInvocationPtr{})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValInvocationPtr) = {v_invocation = 0x0}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValFail{})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValFail) = {<No data fields>}}, <No data fields>}'), + ('tmwa::magic::val_t(tmwa::magic::ValNegative1{})', + '{<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValNegative1) = {<No data fields>}}, <No data fields>}'), + ] + + +class ExprAreaUnion(object): __slots__ = ('_value') - name = 'tmwa::e_area_t' + name = 'tmwa::magic::ExprAreaUnion' enabled = True def __init__(self, value): self._value = value + def display_hint(self): + return 'array' + def to_string(self): return None def children(self): v = self._value - ty = v['ty'] - yield 'ty', ty - a = v['a'] - if ty == 0: - yield 'a.a_loc', a['a_loc'] - elif ty == 1: - yield 'a.a_union', a['a_union'] - elif ty == 2: - yield 'a.a_rect', a['a_rect'] - elif ty == 3: - yield 'a.a_bar', a['a_bar'] + for i in [0, 1]: + yield '[%d]', v['a_union'][i]['impl'].dereference() + tests = [] -class expr_t(object): - ''' print an expr_t - ''' - __slots__ = ('_value') - name = 'tmwa::expr_t' - enabled = True - def __init__(self, value): - self._value = value +class e_area_t(object): + enabled = True - def to_string(self): - return None + tests = [ + ('tmwa::magic::e_area_t(tmwa::magic::e_location_t())', + '{<tmwa::sexpr::Variant<tmwa::magic::e_location_t, tmwa::magic::ExprAreaUnion, tmwa::magic::ExprAreaRect, tmwa::magic::ExprAreaBar>> = {(tmwa::magic::e_location_t) = {m = 0x0, x = 0x0, y = 0x0}}, <No data fields>}'), + ('tmwa::magic::e_area_t(tmwa::magic::ExprAreaUnion{{tmwa::dumb_ptr<tmwa::magic::e_area_t>::make(tmwa::magic::e_location_t()), tmwa::dumb_ptr<tmwa::magic::e_area_t>::make(tmwa::magic::e_location_t())}})', + '{<tmwa::sexpr::Variant<tmwa::magic::e_location_t, tmwa::magic::ExprAreaUnion, tmwa::magic::ExprAreaRect, tmwa::magic::ExprAreaBar>> = {(tmwa::magic::ExprAreaUnion) = {{<tmwa::sexpr::Variant<tmwa::magic::e_location_t, tmwa::magic::ExprAreaUnion, tmwa::magic::ExprAreaRect, tmwa::magic::ExprAreaBar>> = {(tmwa::magic::e_location_t) = {m = 0x0, x = 0x0, y = 0x0}}, <No data fields>}, {<tmwa::sexpr::Variant<tmwa::magic::e_location_t, tmwa::magic::ExprAreaUnion, tmwa::magic::ExprAreaRect, tmwa::magic::ExprAreaBar>> = {(tmwa::magic::e_location_t) = {m = 0x0, x = 0x0, y = 0x0}}, <No data fields>}}}, <No data fields>}'), + ('tmwa::magic::e_area_t(tmwa::magic::ExprAreaRect{tmwa::magic::e_location_t(), tmwa::dumb_ptr<tmwa::magic::expr_t>(), tmwa::dumb_ptr<tmwa::magic::expr_t>()})', + '{<tmwa::sexpr::Variant<tmwa::magic::e_location_t, tmwa::magic::ExprAreaUnion, tmwa::magic::ExprAreaRect, tmwa::magic::ExprAreaBar>> = {(tmwa::magic::ExprAreaRect) = {loc = {m = 0x0, x = 0x0, y = 0x0}, width = 0x0, height = 0x0}}, <No data fields>}'), + ('tmwa::magic::e_area_t(tmwa::magic::ExprAreaBar{tmwa::magic::e_location_t(), tmwa::dumb_ptr<tmwa::magic::expr_t>(), tmwa::dumb_ptr<tmwa::magic::expr_t>(), tmwa::dumb_ptr<tmwa::magic::expr_t>()})', + '{<tmwa::sexpr::Variant<tmwa::magic::e_location_t, tmwa::magic::ExprAreaUnion, tmwa::magic::ExprAreaRect, tmwa::magic::ExprAreaBar>> = {(tmwa::magic::ExprAreaBar) = {loc = {m = 0x0, x = 0x0, y = 0x0}, width = 0x0, depth = 0x0, dir = 0x0}}, <No data fields>}'), + ] - def children(self): - v = self._value - ty = v['ty'] - yield 'ty', ty - u = v['e'] - if ty == 0: - yield 'e.e_val', u['e_val'] - elif ty == 1: - yield 'e.e_location', u['e_location'] - elif ty == 2: - yield 'e.e_area', u['e_area'] - elif ty == 3: - yield 'e.e_funapp', u['e_funapp'] - elif ty == 4: - yield 'e.e_id', u['e_id'] - elif ty == 5: - yield 'e.e_field', u['e_field'] -class effect_t(object): - ''' print an effect_t - ''' - __slots__ = ('_value') - name = 'tmwa::effect_t' +class expr_t(object): enabled = True - def __init__(self, value): - self._value = value + tests = [ + ('tmwa::magic::expr_t(tmwa::magic::val_t(tmwa::magic::ValUndef()))', + '{<tmwa::sexpr::Variant<tmwa::magic::val_t, tmwa::magic::e_location_t, tmwa::magic::e_area_t, tmwa::magic::ExprFunApp, tmwa::magic::ExprId, tmwa::magic::ExprField>> = {(tmwa::magic::val_t) = {<tmwa::sexpr::Variant<tmwa::magic::ValUndef, tmwa::magic::ValInt, tmwa::magic::ValDir, tmwa::magic::ValString, tmwa::magic::ValEntityInt, tmwa::magic::ValEntityPtr, tmwa::magic::ValLocation, tmwa::magic::ValArea, tmwa::magic::ValSpell, tmwa::magic::ValInvocationInt, tmwa::magic::ValInvocationPtr, tmwa::magic::ValFail, tmwa::magic::ValNegative1>> = {(tmwa::magic::ValUndef) = {<No data fields>}}, <No data fields>}}, <No data fields>}'), + ('tmwa::magic::expr_t(tmwa::magic::e_location_t())', + '{<tmwa::sexpr::Variant<tmwa::magic::val_t, tmwa::magic::e_location_t, tmwa::magic::e_area_t, tmwa::magic::ExprFunApp, tmwa::magic::ExprId, tmwa::magic::ExprField>> = {(tmwa::magic::e_location_t) = {m = 0x0, x = 0x0, y = 0x0}}, <No data fields>}'), + ('tmwa::magic::expr_t(tmwa::magic::e_area_t(tmwa::magic::e_location_t()))', + '{<tmwa::sexpr::Variant<tmwa::magic::val_t, tmwa::magic::e_location_t, tmwa::magic::e_area_t, tmwa::magic::ExprFunApp, tmwa::magic::ExprId, tmwa::magic::ExprField>> = {(tmwa::magic::e_area_t) = {<tmwa::sexpr::Variant<tmwa::magic::e_location_t, tmwa::magic::ExprAreaUnion, tmwa::magic::ExprAreaRect, tmwa::magic::ExprAreaBar>> = {(tmwa::magic::e_location_t) = {m = 0x0, x = 0x0, y = 0x0}}, <No data fields>}}, <No data fields>}'), + ('tmwa::magic::expr_t(tmwa::magic::ExprFunApp())', + '{<tmwa::sexpr::Variant<tmwa::magic::val_t, tmwa::magic::e_location_t, tmwa::magic::e_area_t, tmwa::magic::ExprFunApp, tmwa::magic::ExprId, tmwa::magic::ExprField>> = {(tmwa::magic::ExprFunApp) = {funp = (fun_t *) nullptr, line_nr = 0, column = 0, args_nr = 0, args = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}}, <No data fields>}'), + ('tmwa::magic::expr_t(tmwa::magic::ExprId{123})', + '{<tmwa::sexpr::Variant<tmwa::magic::val_t, tmwa::magic::e_location_t, tmwa::magic::e_area_t, tmwa::magic::ExprFunApp, tmwa::magic::ExprId, tmwa::magic::ExprField>> = {(tmwa::magic::ExprId) = {e_id = 123}}, <No data fields>}'), + ('tmwa::magic::expr_t(tmwa::magic::ExprField{tmwa::dumb_ptr<tmwa::magic::expr_t>(), 42})', + '{<tmwa::sexpr::Variant<tmwa::magic::val_t, tmwa::magic::e_location_t, tmwa::magic::e_area_t, tmwa::magic::ExprFunApp, tmwa::magic::ExprId, tmwa::magic::ExprField>> = {(tmwa::magic::ExprField) = {expr = 0x0, id = 42}}, <No data fields>}'), + ] - def to_string(self): - return None - def children(self): - v = self._value - yield 'next', v['next'] - ty = v['ty'] - yield 'ty', ty - u = v['e'] - if ty == 2: - yield 'e.e_assign', u['e_assign'] - elif ty == 3: - yield 'e.e_foreach', u['e_foreach'] - elif ty == 4: - yield 'e.e_for', u['e_for'] - elif ty == 5: - yield 'e.e_if', u['e_if'] - elif ty == 6: - yield 'e.e_sleep', u['e_sleep'] - elif ty == 7: - yield 'e.e_script', u['e_script'] - elif ty == 9: - yield 'e.e_op', u['e_op'] - elif ty == 11: - yield 'e.e_call', u['e_call'] +class effect_t(object): + enabled = True + + tests = [ + ('tmwa::magic::effect_t(tmwa::magic::EffectSkip{}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectSkip) = {<No data fields>}}, next = 0x0}'), + ('tmwa::magic::effect_t(tmwa::magic::EffectAbort{}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectAbort) = {<No data fields>}}, next = 0x0}'), + ('tmwa::magic::effect_t(tmwa::magic::EffectAssign{42, tmwa::dumb_ptr<tmwa::magic::expr_t>()}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectAssign) = {id = 42, expr = 0x0}}, next = 0x0}'), + ('tmwa::magic::effect_t(tmwa::magic::EffectForEach{123, tmwa::dumb_ptr<tmwa::magic::expr_t>(), tmwa::dumb_ptr<tmwa::magic::effect_t>(), tmwa::magic::FOREACH_FILTER::PC}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectForEach) = {id = 123, area = 0x0, body = 0x0, filter = tmwa::magic::FOREACH_FILTER::PC}}, next = 0x0}'), + ('tmwa::magic::effect_t(tmwa::magic::EffectFor{42, tmwa::dumb_ptr<tmwa::magic::expr_t>(), tmwa::dumb_ptr<tmwa::magic::expr_t>(), tmwa::dumb_ptr<tmwa::magic::effect_t>()}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectFor) = {id = 42, start = 0x0, stop = 0x0, body = 0x0}}, next = 0x0}'), + ('tmwa::magic::effect_t(tmwa::magic::EffectIf{tmwa::dumb_ptr<tmwa::magic::expr_t>(), tmwa::dumb_ptr<tmwa::magic::effect_t>(), tmwa::dumb_ptr<tmwa::magic::effect_t>()}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectIf) = {cond = 0x0, true_branch = 0x0, false_branch = 0x0}}, next = 0x0}'), + ('tmwa::magic::effect_t(tmwa::magic::EffectSleep{tmwa::dumb_ptr<tmwa::magic::expr_t>()}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectSleep) = {e_sleep = 0x0}}, next = 0x0}'), + ('tmwa::magic::effect_t(tmwa::magic::EffectScript{tmwa::dumb_ptr<const tmwa::ScriptBuffer>()}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectScript) = {e_script = 0x0}}, next = 0x0}'), + ('tmwa::magic::effect_t(tmwa::magic::EffectBreak{}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectBreak) = {<No data fields>}}, next = 0x0}'), + ('tmwa::magic::effect_t(tmwa::magic::EffectOp(), tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectOp) = {opp = (op_t *) nullptr, args_nr = 0, line_nr = 0, column = 0, args = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}}, next = 0x0}'), + ('tmwa::magic::effect_t(tmwa::magic::EffectEnd{}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectEnd) = {<No data fields>}}, next = 0x0}'), + ('tmwa::magic::effect_t(tmwa::magic::EffectCall{nullptr, tmwa::dumb_ptr<std::vector<tmwa::dumb_ptr<tmwa::magic::expr_t>>>(), tmwa::dumb_ptr<tmwa::magic::effect_t>()}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::EffectSkip, tmwa::magic::EffectAbort, tmwa::magic::EffectAssign, tmwa::magic::EffectForEach, tmwa::magic::EffectFor, tmwa::magic::EffectIf, tmwa::magic::EffectSleep, tmwa::magic::EffectScript, tmwa::magic::EffectBreak, tmwa::magic::EffectOp, tmwa::magic::EffectEnd, tmwa::magic::EffectCall>> = {(tmwa::magic::EffectCall) = {formalv = 0x0, actualvp = 0x0, body = 0x0}}, next = 0x0}'), + ] class spellguard_t(object): - ''' print a spellguard_t - ''' - __slots__ = ('_value') - name = 'tmwa::spellguard_t' enabled = True - def __init__(self, value): - self._value = value - - def to_string(self): - return None - - def children(self): - v = self._value - yield 'next', v['next'] - ty = v['ty'] - yield 'ty', ty - u = v['s'] - if ty == 0: - yield 's.s_condition', u['s_condition'] - elif ty == 1: - yield 's.s_components', u['s_components'] - elif ty == 2: - yield 's.s_catalysts', u['s_catalysts'] - elif ty == 3: - yield 's.s_alt', u['s_alt'] - elif ty == 4: - yield 's.s_mana', u['s_mana'] - elif ty == 5: - yield 's.s_casttime', u['s_casttime'] - elif ty == 6: - yield 's.s_effect', u['s_effect'] + tests = [ + ('tmwa::magic::spellguard_t(tmwa::magic::GuardCondition{tmwa::dumb_ptr<tmwa::magic::expr_t>()}, tmwa::dumb_ptr<tmwa::magic::spellguard_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::GuardCondition, tmwa::magic::GuardMana, tmwa::magic::GuardCastTime, tmwa::magic::GuardComponents, tmwa::magic::GuardCatalysts, tmwa::magic::GuardChoice, tmwa::magic::effect_set_t>> = {(tmwa::magic::GuardCondition) = {s_condition = 0x0}}, next = 0x0}'), + ('tmwa::magic::spellguard_t(tmwa::magic::GuardMana{tmwa::dumb_ptr<tmwa::magic::expr_t>()}, tmwa::dumb_ptr<tmwa::magic::spellguard_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::GuardCondition, tmwa::magic::GuardMana, tmwa::magic::GuardCastTime, tmwa::magic::GuardComponents, tmwa::magic::GuardCatalysts, tmwa::magic::GuardChoice, tmwa::magic::effect_set_t>> = {(tmwa::magic::GuardMana) = {s_mana = 0x0}}, next = 0x0}'), + ('tmwa::magic::spellguard_t(tmwa::magic::GuardCastTime{tmwa::dumb_ptr<tmwa::magic::expr_t>()}, tmwa::dumb_ptr<tmwa::magic::spellguard_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::GuardCondition, tmwa::magic::GuardMana, tmwa::magic::GuardCastTime, tmwa::magic::GuardComponents, tmwa::magic::GuardCatalysts, tmwa::magic::GuardChoice, tmwa::magic::effect_set_t>> = {(tmwa::magic::GuardCastTime) = {s_casttime = 0x0}}, next = 0x0}'), + ('tmwa::magic::spellguard_t(tmwa::magic::GuardComponents{tmwa::dumb_ptr<tmwa::magic::component_t>()}, tmwa::dumb_ptr<tmwa::magic::spellguard_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::GuardCondition, tmwa::magic::GuardMana, tmwa::magic::GuardCastTime, tmwa::magic::GuardComponents, tmwa::magic::GuardCatalysts, tmwa::magic::GuardChoice, tmwa::magic::effect_set_t>> = {(tmwa::magic::GuardComponents) = {s_components = 0x0}}, next = 0x0}'), + ('tmwa::magic::spellguard_t(tmwa::magic::GuardCatalysts{tmwa::dumb_ptr<tmwa::magic::component_t>()}, tmwa::dumb_ptr<tmwa::magic::spellguard_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::GuardCondition, tmwa::magic::GuardMana, tmwa::magic::GuardCastTime, tmwa::magic::GuardComponents, tmwa::magic::GuardCatalysts, tmwa::magic::GuardChoice, tmwa::magic::effect_set_t>> = {(tmwa::magic::GuardCatalysts) = {s_catalysts = 0x0}}, next = 0x0}'), + ('tmwa::magic::spellguard_t(tmwa::magic::GuardChoice{tmwa::dumb_ptr<tmwa::magic::spellguard_t>()}, tmwa::dumb_ptr<tmwa::magic::spellguard_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::GuardCondition, tmwa::magic::GuardMana, tmwa::magic::GuardCastTime, tmwa::magic::GuardComponents, tmwa::magic::GuardCatalysts, tmwa::magic::GuardChoice, tmwa::magic::effect_set_t>> = {(tmwa::magic::GuardChoice) = {s_alt = 0x0}}, next = 0x0}'), + ('tmwa::magic::spellguard_t(tmwa::magic::effect_set_t{tmwa::dumb_ptr<tmwa::magic::effect_t>(), tmwa::dumb_ptr<tmwa::magic::effect_t>(), tmwa::dumb_ptr<tmwa::magic::effect_t>()}, tmwa::dumb_ptr<tmwa::magic::spellguard_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::GuardCondition, tmwa::magic::GuardMana, tmwa::magic::GuardCastTime, tmwa::magic::GuardComponents, tmwa::magic::GuardCatalysts, tmwa::magic::GuardChoice, tmwa::magic::effect_set_t>> = {(tmwa::magic::effect_set_t) = {effect = 0x0, at_trigger = 0x0, at_end = 0x0}}, next = 0x0}'), + ] class cont_activation_record_t(object): - ''' print a cont_activation_record_t - ''' - __slots__ = ('_value') - name = 'tmwa::cont_activation_record_t' enabled = True - def __init__(self, value): - self._value = value - - def to_string(self): - return None - - def children(self): - v = self._value - yield 'return_location', v['return_location'] - ty = v['ty'] - yield 'ty', ty - u = v['c'] - if ty == 0: - yield 'c.c_foreach', u['c_foreach'] - elif ty == 1: - yield 'c.c_for', u['c_for'] - elif ty == 2: - yield 'c.c_proc', u['c_proc'] + tests = [ + ('tmwa::magic::cont_activation_record_t(tmwa::magic::CarForEach{42, true, tmwa::dumb_ptr<tmwa::magic::effect_t>(), tmwa::dumb_ptr<std::vector<tmwa::BlockId>>(), 123}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::CarForEach, tmwa::magic::CarFor, tmwa::magic::CarProc>> = {(tmwa::magic::CarForEach) = {id = 42, ty_is_spell_not_entity = true, body = 0x0, entities_vp = 0x0, index = 123}}, return_location = 0x0}'), + ('tmwa::magic::cont_activation_record_t(tmwa::magic::CarFor{42, tmwa::dumb_ptr<tmwa::magic::effect_t>(), 123, 456}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::CarForEach, tmwa::magic::CarFor, tmwa::magic::CarProc>> = {(tmwa::magic::CarFor) = {id = 42, body = 0x0, current = 123, stop = 456}}, return_location = 0x0}'), + ('tmwa::magic::cont_activation_record_t(tmwa::magic::CarProc{123, nullptr, tmwa::dumb_ptr<tmwa::magic::val_t[]>()}, tmwa::dumb_ptr<tmwa::magic::effect_t>())', + '{<tmwa::sexpr::Variant<tmwa::magic::CarForEach, tmwa::magic::CarFor, tmwa::magic::CarProc>> = {(tmwa::magic::CarProc) = {args_nr = 123, formalap = 0x0, old_actualpa = 0x0 = {sz = 0}}}, return_location = 0x0}'), + ] diff --git a/src/map/magic-stmt.hpp b/src/map/magic-stmt.hpp index 28af140..0385858 100644 --- a/src/map/magic-stmt.hpp +++ b/src/map/magic-stmt.hpp @@ -36,8 +36,8 @@ namespace magic { struct op_t { - ZString name; - ZString signature; + LString name; + LString signature; int (*op)(dumb_ptr<env_t> env, Slice<val_t> arga); }; diff --git a/src/map/magic-stmt.py b/src/map/magic-stmt.py new file mode 100644 index 0000000..6e34bb0 --- /dev/null +++ b/src/map/magic-stmt.py @@ -0,0 +1,31 @@ +class op_t(object): + __slots__ = ('_value') + + name = 'tmwa::magic::op_t' + depth = 1 + enabled = True + + def __init__(self, value): + if not value: + value = None + self._value = value + + def to_string(self): + value = self._value + if value is None: + return '(op_t *) nullptr' + return '(op_t *)' + + def children(self): + value = self._value + if value is None: + return + value = value.dereference() + yield '->name', value['name'] + yield '->signature', value['signature'] + yield '->op', value['op'] + + tests = [ + ('static_cast<tmwa::magic::op_t *>(nullptr)', '(op_t *) nullptr'), + ('new tmwa::magic::op_t{"name"_s, "sig"_s, nullptr}', '(op_t *) = {->name = "name", ->signature = "sig", ->op = 0x0}'), + ] diff --git a/src/map/main.cpp b/src/map/main.cpp index 8e8e9d5..c16f642 100644 --- a/src/map/main.cpp +++ b/src/map/main.cpp @@ -1,6 +1,6 @@ -// map/main.cpp - dummy file to make Make dependencies work +// map/main.cpp - entry point to tmwa-map server // -// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com> +// Copyright © 2013-2014 Ben Longbons <b.r.longbons@gmail.com> // // This file is part of The Mana World (Athena server) // @@ -17,6 +17,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. +#include "../mmo/core.hpp" + #include "map.hpp" #include "../poison.hpp" @@ -25,3 +27,8 @@ namespace tmwa { } // namespace tmwa + +int main(int argc, char **argv) +{ + return tmwa_main(argc, argv); +} diff --git a/src/map/map.hpp b/src/map/map.hpp index 55f4823..d88ff54 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -511,7 +511,7 @@ struct BlockLists struct map_abstract { MapName name_; - // gat is nullptr for map_remote and non-nullptr or map_local + // gat is nullptr for map_remote and non-nullptr for map_local std::unique_ptr<MapCell[]> gat; virtual ~map_abstract() {} diff --git a/src/map/map.py b/src/map/map.py new file mode 100644 index 0000000..dc70782 --- /dev/null +++ b/src/map/map.py @@ -0,0 +1,125 @@ +class map_local(object): + __slots__ = ('_value') + + name = 'tmwa::map_local' + depth = 1 + enabled = True + + def __init__(self, value): + if not value: + value = None + self._value = value + + def to_string(self): + value = self._value + if value is None: + return '(map_local *) nullptr' + return '(map_local *)' + + def children(self): + value = self._value + if value is None: + return + value = value.dereference() + yield '->name', value['name_'] + yield '->xs', value['xs'] + yield '->ys', value['ys'] + + tests = [ + ('static_cast<tmwa::map_local *>(nullptr)', '(map_local *) nullptr'), + ('fake_map_local("map"_s, 42, 404)', '(map_local *) = {->name = "map", ->xs = 42, ->ys = 404}'), + ] + +class map_remote(object): + __slots__ = ('_value') + + name = 'tmwa::map_remote' + depth = 1 + enabled = True + + def __init__(self, value): + if not value: + value = None + self._value = value + + def to_string(self): + value = self._value + if value is None: + return '(map_remote *) nullptr' + return '(map_remote *)' + + def children(self): + value = self._value + if value is None: + return + value = value.dereference() + yield '->name', value['name_'] + yield '->ip', value['ip'] + yield '->port', value['port'] + + tests = [ + ('static_cast<tmwa::map_remote *>(nullptr)', '(map_remote *) nullptr'), + ('fake_map_remote("map"_s, tmwa::IP4Address({8, 8, 8, 8}), 6667)', '(map_remote *) = {->name = "map", ->ip = 8.8.8.8, ->port = 6667}'), + ] + +class map_abstract(object): + __slots__ = ('_value') + + name = 'tmwa::map_abstract' + depth = 1 + enabled = True + + def __init__(self, value): + if not value: + value = None + self._value = value + + def to_string(self): + value = self._value + if value is None: + return '(map_abstract *) nullptr' + gat = value.dereference()['gat'] + gat = gat.address.cast(gdb.lookup_type('tmwa::map_abstract').pointer().pointer()).dereference() + if gat: + return value.cast(gdb.lookup_type('tmwa::map_local').pointer()) + else: + return value.cast(gdb.lookup_type('tmwa::map_remote').pointer()) + + tests = [ + ('static_cast<tmwa::map_abstract *>(nullptr)', '(map_abstract *) nullptr'), + ] + [ + ('static_cast<tmwa::map_abstract *>(%s); value->gat.reset(new tmwa::MapCell[1])' % expr, expected) + for (expr, expected) in map_local.tests[1:] + ] + [ + ('static_cast<tmwa::map_abstract *>(%s)' % expr, expected) + for (expr, expected) in map_remote.tests[1:] + ] + + test_extra = ''' + inline + tmwa::map_local *fake_map_local(tmwa::ZString name, int xs, int ys) + { + auto *p = new tmwa::map_local{}; + p->name_ = tmwa::stringish<tmwa::MapName>(name); + p->xs = xs; + p->ys = ys; + return p; + } + + inline + tmwa::map_remote *fake_map_remote(tmwa::ZString name, tmwa::IP4Address ip, uint16_t port) + { + auto *p = new tmwa::map_remote{}; + p->name_ = tmwa::stringish<tmwa::MapName>(name); + p->ip = ip; + p->port = port; + return p; + } + + void fake_delete(tmwa::map_abstract *); + void fake_delete(tmwa::map_abstract *map) + { + delete map; + } + + ''' diff --git a/src/map/mapflag.py b/src/map/mapflag.py index fec8c05..fe5b016 100644 --- a/src/map/mapflag.py +++ b/src/map/mapflag.py @@ -1,6 +1,4 @@ class MapFlags(object): - ''' print a set of map flags - ''' __slots__ = ('_value') name = 'tmwa::MapFlags' enabled = True @@ -11,29 +9,38 @@ class MapFlags(object): def to_string(self): i = int(self._value) s = [] - for n, v in [ - ('ALIAS', 21), - ('NOMEMO', 0), + for n, v in MapFlags.junk: + v = 1 << v + if i & v: + i -= v + s.append(n) + if i or not s: + s.append('%#08x' % i) + return 'MapFlags(%s)' % (' | '.join(s)) + + junk = [ + #('ALIAS', 21), + #('NOMEMO', 0), ('NOTELEPORT', 1), ('NORETURN', 22), ('MONSTER_NOTELEPORT', 23), ('NOSAVE', 2), - ('NOBRANCH', 3), + #('NOBRANCH', 3), ('NOPENALTY', 4), ('PVP', 6), ('PVP_NOPARTY', 7), - ('PVP_NOGUILD', 8), - ('PVP_NIGHTMAREDROP', 24), + #('PVP_NOGUILD', 8), + #('PVP_NIGHTMAREDROP', 24), ('PVP_NOCALCRANK', 25), - ('GVG', 9), - ('GVG_NOPARTY', 10), - ('NOZENYPENALTY', 5), - ('NOTRADE', 11), - ('NOSKILL', 12), + #('GVG', 9), + #('GVG_NOPARTY', 10), + #('NOZENYPENALTY', 5), + #('NOTRADE', 11), + #('NOSKILL', 12), ('NOWARP', 13), ('NOWARPTO', 26), ('NOPVP', 14), - ('NOICEWALL', 15), + #('NOICEWALL', 15), ('SNOW', 16), ('FOG', 17), ('SAKURA', 18), @@ -43,11 +50,14 @@ class MapFlags(object): ('TOWN', 28), ('OUTSIDE', 29), ('RESAVE', 30), - ]: - v = 1 << v - if i & v: - i -= v - s.append(n) - if i or not s: - s.append('%#08x' % i) - return 'MapFlags(%s)' % (' | '.join(s)) + ] + tests = [ + ('reinterpret_cast<const tmwa::MapFlags&>(static_cast<const unsigned int&>(0x80000000))', 'MapFlags(0x80000000)'), + ('reinterpret_cast<const tmwa::MapFlags&>(static_cast<const unsigned int&>(0xf0000000))', 'MapFlags(TOWN | OUTSIDE | RESAVE | 0x80000000)'), + ] + [ + ('tmwa::MapFlags(); value.set(tmwa::MapFlag::%s, true)' % n, 'MapFlags(%s)' % n) + for (n, _) in junk + ] + [ + ('reinterpret_cast<const tmwa::MapFlags&>(static_cast<const unsigned int&>(1 << %d))' % i, 'MapFlags(%s)' % n) + for (n, i) in junk + ] diff --git a/src/map/script.py b/src/map/script.py index dcde08d..e3029d5 100644 --- a/src/map/script.py +++ b/src/map/script.py @@ -1,59 +1,21 @@ -class ByteCode: - ''' print a ByteCode - (workaround for gcc bug 58150) - ''' - __slots__ = ('_value') - name = 'tmwa::ByteCode' - enabled = True - - def __init__(self, value): - self._value = value - - def to_string(self): - val = int(self._value) - try: - return 'ByteCode::' + self.types[val] - except IndexError: - return 'ByteCode(%x)' % val - - types = [ - 'NOP', 'POS', 'INT', 'PARAM', 'FUNC', 'STR', 'CONSTSTR', 'ARG', - 'VARIABLE', 'EOL', 'RETINFO', - - 'LOR', 'LAND', 'LE', 'LT', 'GE', 'GT', 'EQ', 'NE', - 'XOR', 'OR', 'AND', 'ADD', 'SUB', 'MUL', 'DIV', 'MOD', - 'NEG', 'LNOT', 'NOT', 'R_SHIFT', 'L_SHIFT', - - 'FUNC_REF', - ] -for i, n in enumerate(ByteCode.types): - setattr(ByteCode, n, i) -del i, n - class script_data(object): - ''' print a script_data - ''' - __slots__ = ('_value') - name = 'tmwa::script_data' enabled = True - def __init__(self, value): - self._value = value - - def children(self): - v = self._value - t = v['type'] - yield 'type', ByteCode(t).to_string() # why does this not work? - v = v['u'] - t = int(t) - if t == ByteCode.PARAM: - yield 'reg', v['reg'] - elif t == ByteCode.RETINFO: - yield 'script', v['script'] - elif t in (ByteCode.STR, ByteCode.CONSTSTR): - yield 'str', v['str'] - else: - yield 'numi', v['numi'] - - def to_string(self): - return None + tests = [ + ('tmwa::script_data(tmwa::ScriptDataPos{42})', + '{<tmwa::sexpr::Variant<tmwa::ScriptDataPos, tmwa::ScriptDataInt, tmwa::ScriptDataParam, tmwa::ScriptDataStr, tmwa::ScriptDataArg, tmwa::ScriptDataVariable, tmwa::ScriptDataRetInfo, tmwa::ScriptDataFuncRef>> = {(tmwa::ScriptDataPos) = {numi = 42}}, <No data fields>}'), + ('tmwa::script_data(tmwa::ScriptDataInt{123})', + '{<tmwa::sexpr::Variant<tmwa::ScriptDataPos, tmwa::ScriptDataInt, tmwa::ScriptDataParam, tmwa::ScriptDataStr, tmwa::ScriptDataArg, tmwa::ScriptDataVariable, tmwa::ScriptDataRetInfo, tmwa::ScriptDataFuncRef>> = {(tmwa::ScriptDataInt) = {numi = 123}}, <No data fields>}'), + ('tmwa::script_data(tmwa::ScriptDataParam{tmwa::SIR()})', + '{<tmwa::sexpr::Variant<tmwa::ScriptDataPos, tmwa::ScriptDataInt, tmwa::ScriptDataParam, tmwa::ScriptDataStr, tmwa::ScriptDataArg, tmwa::ScriptDataVariable, tmwa::ScriptDataRetInfo, tmwa::ScriptDataFuncRef>> = {(tmwa::ScriptDataParam) = {reg = {impl = 0}}}, <No data fields>}'), + ('tmwa::script_data(tmwa::ScriptDataStr{"Hello"_s})', + '{<tmwa::sexpr::Variant<tmwa::ScriptDataPos, tmwa::ScriptDataInt, tmwa::ScriptDataParam, tmwa::ScriptDataStr, tmwa::ScriptDataArg, tmwa::ScriptDataVariable, tmwa::ScriptDataRetInfo, tmwa::ScriptDataFuncRef>> = {(tmwa::ScriptDataStr) = {str = "Hello"}}, <No data fields>}'), + ('tmwa::script_data(tmwa::ScriptDataArg{0})', + '{<tmwa::sexpr::Variant<tmwa::ScriptDataPos, tmwa::ScriptDataInt, tmwa::ScriptDataParam, tmwa::ScriptDataStr, tmwa::ScriptDataArg, tmwa::ScriptDataVariable, tmwa::ScriptDataRetInfo, tmwa::ScriptDataFuncRef>> = {(tmwa::ScriptDataArg) = {numi = 0}}, <No data fields>}'), + ('tmwa::script_data(tmwa::ScriptDataVariable{tmwa::SIR()})', + '{<tmwa::sexpr::Variant<tmwa::ScriptDataPos, tmwa::ScriptDataInt, tmwa::ScriptDataParam, tmwa::ScriptDataStr, tmwa::ScriptDataArg, tmwa::ScriptDataVariable, tmwa::ScriptDataRetInfo, tmwa::ScriptDataFuncRef>> = {(tmwa::ScriptDataVariable) = {reg = {impl = 0}}}, <No data fields>}'), + ('tmwa::script_data(tmwa::ScriptDataRetInfo{static_cast<const tmwa::ScriptBuffer *>(nullptr)})', + '{<tmwa::sexpr::Variant<tmwa::ScriptDataPos, tmwa::ScriptDataInt, tmwa::ScriptDataParam, tmwa::ScriptDataStr, tmwa::ScriptDataArg, tmwa::ScriptDataVariable, tmwa::ScriptDataRetInfo, tmwa::ScriptDataFuncRef>> = {(tmwa::ScriptDataRetInfo) = {script = 0x0}}, <No data fields>}'), + ('tmwa::script_data(tmwa::ScriptDataFuncRef{404})', + '{<tmwa::sexpr::Variant<tmwa::ScriptDataPos, tmwa::ScriptDataInt, tmwa::ScriptDataParam, tmwa::ScriptDataStr, tmwa::ScriptDataArg, tmwa::ScriptDataVariable, tmwa::ScriptDataRetInfo, tmwa::ScriptDataFuncRef>> = {(tmwa::ScriptDataFuncRef) = {numi = 404}}, <No data fields>}'), + ] diff --git a/src/mmo/core.cpp b/src/mmo/core.cpp index f1a8d07..ff12f17 100644 --- a/src/mmo/core.cpp +++ b/src/mmo/core.cpp @@ -106,7 +106,7 @@ void sig_proc(int) */ } // namespace tmwa -int main(int argc, char **argv) +int tmwa_main(int argc, char **argv) { using namespace tmwa; @@ -156,4 +156,6 @@ int main(int argc, char **argv) do_sendrecv(next); do_parsepacket(); } + + return 0; } diff --git a/src/mmo/core.hpp b/src/mmo/core.hpp index 5b2dbbb..259dd90 100644 --- a/src/mmo/core.hpp +++ b/src/mmo/core.hpp @@ -43,3 +43,7 @@ extern int do_init(Slice<ZString>); /// or when if we manage to exit() gracefully. extern void term_func(void); } // namespace tmwa + +/// grumble grumble stupid intertwined includes mumble mumble +__attribute__((warn_unused_result)) +extern int tmwa_main(int argc, char **argv); diff --git a/src/mmo/ids.py b/src/mmo/ids.py new file mode 100644 index 0000000..2d26215 --- /dev/null +++ b/src/mmo/ids.py @@ -0,0 +1,30 @@ +for s in [ + 'Species', + 'AccountId', + 'CharId', + 'PartyId', + 'ItemNameId', + 'BlockId', +]: + class OtherId(object): + __slots__ = ('_value') + name = 'tmwa::%s' % s + enabled = True + + def __init__(self, value): + self._value = value + + def to_string(self): + value = self._value + fields = value.type.fields() + field0 = fields[-1] + return '%s' % (value[field0]) + + tests = [ + ('tmwa::wrap<tmwa::%s>(123)' % s, '123'), + ] + globals()[s] = OtherId + del OtherId + +class GmLevel(object): + pass diff --git a/src/mmo/strs.py b/src/mmo/strs.py new file mode 100644 index 0000000..3e39ef4 --- /dev/null +++ b/src/mmo/strs.py @@ -0,0 +1,35 @@ +for s in [ + 'AccountName', + 'AccountPass', + 'AccountCrypt', + 'AccountEmail', + 'ServerName', + 'PartyName', + 'VarName', + 'MapName', + 'CharName', +]: + class OtherString(object): + __slots__ = ('_value') + name = 'tmwa::%s' % s + enabled = True + + def __init__(self, value): + self._value = value + + def to_string(self): + value = self._value + fields = value.type.fields() + field0 = fields[-1] + return '%s' % value[field0] + + test_extra = ''' + #include "../strings/fwd.hpp" + using tmwa::operator "" _s; + ''' + + tests = [ + ('tmwa::stringish<tmwa::%s>("Hello"_s)' % s, '"Hello"'), + ] + globals()[s] = OtherString + del OtherString diff --git a/src/net/ip.py b/src/net/ip.py index bcf90a2..c7e5ec7 100644 --- a/src/net/ip.py +++ b/src/net/ip.py @@ -1,6 +1,4 @@ class IP4Address(object): - ''' print an IP4Address - ''' __slots__ = ('_value') name = 'tmwa::IP4Address' enabled = True @@ -12,3 +10,7 @@ class IP4Address(object): addr = self._value['_addr'] addr = tuple(int(addr[i]) for i in range(4)) return '%d.%d.%d.%d' % addr + + tests = [ + ('tmwa::IP4Address({1,2,3,4})', '1.2.3.4'), + ] diff --git a/src/proto2/any-user.hpp b/src/proto2/any-user.hpp deleted file mode 100644 index aeb703b..0000000 --- a/src/proto2/any-user.hpp +++ /dev/null @@ -1,214 +0,0 @@ -#pragma once -// any-user.hpp - TMWA network protocol: any/user -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "fwd.hpp" - -#include "types.hpp" - -namespace tmwa -{ -// This is a public protocol, and changes require client cooperation - -template<> -struct Packet_Fixed<0x0081> -{ - static const uint16_t PACKET_ID = 0x0081; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t error_code = {}; -}; - -template<> -struct Packet_Fixed<0x7530> -{ - static const uint16_t PACKET_ID = 0x7530; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x7531> -{ - static const uint16_t PACKET_ID = 0x7531; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - Version version = {}; -}; - -template<> -struct Packet_Fixed<0x7532> -{ - static const uint16_t PACKET_ID = 0x7532; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Payload<0x8000> -{ - static const uint16_t PACKET_ID = 0x8000; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; - - -template<> -struct NetPacket_Fixed<0x0081> -{ - Little16 magic_packet_id; - Byte error_code; -}; -static_assert(offsetof(NetPacket_Fixed<0x0081>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0081>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0081>, error_code) == 2, "offsetof(NetPacket_Fixed<0x0081>, error_code) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x0081>) == 3, "sizeof(NetPacket_Fixed<0x0081>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x0081>) == 1, "alignof(NetPacket_Fixed<0x0081>) == 1"); - -template<> -struct NetPacket_Fixed<0x7530> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x7530>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7530>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x7530>) == 2, "sizeof(NetPacket_Fixed<0x7530>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x7530>) == 1, "alignof(NetPacket_Fixed<0x7530>) == 1"); - -template<> -struct NetPacket_Fixed<0x7531> -{ - Little16 magic_packet_id; - NetVersion version; -}; -static_assert(offsetof(NetPacket_Fixed<0x7531>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7531>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7531>, version) == 2, "offsetof(NetPacket_Fixed<0x7531>, version) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x7531>) == 10, "sizeof(NetPacket_Fixed<0x7531>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x7531>) == 1, "alignof(NetPacket_Fixed<0x7531>) == 1"); - -template<> -struct NetPacket_Fixed<0x7532> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x7532>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7532>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x7532>) == 2, "sizeof(NetPacket_Fixed<0x7532>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x7532>) == 1, "alignof(NetPacket_Fixed<0x7532>) == 1"); - -template<> -struct NetPacket_Payload<0x8000> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Payload<0x8000>, magic_packet_id) == 0, "offsetof(NetPacket_Payload<0x8000>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Payload<0x8000>, magic_packet_length) == 2, "offsetof(NetPacket_Payload<0x8000>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Payload<0x8000>) == 4, "sizeof(NetPacket_Payload<0x8000>) == 4"); -static_assert(alignof(NetPacket_Payload<0x8000>) == 1, "alignof(NetPacket_Payload<0x8000>) == 1"); - - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0081> *network, Packet_Fixed<0x0081> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->error_code, native.error_code); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0081> *native, NetPacket_Fixed<0x0081> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->error_code, network.error_code); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7530> *network, Packet_Fixed<0x7530> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7530> *native, NetPacket_Fixed<0x7530> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7531> *network, Packet_Fixed<0x7531> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->version, native.version); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7531> *native, NetPacket_Fixed<0x7531> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->version, network.version); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7532> *network, Packet_Fixed<0x7532> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7532> *native, NetPacket_Fixed<0x7532> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Payload<0x8000> *network, Packet_Payload<0x8000> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Payload<0x8000> *native, NetPacket_Payload<0x8000> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} - -} // namespace tmwa diff --git a/src/proto2/any-user_test.cpp b/src/proto2/any-user_test.cpp deleted file mode 100644 index 3cf15bf..0000000 --- a/src/proto2/any-user_test.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "any-user.hpp" -// any-user_test.cpp - TMWA network protocol: any/user -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "../poison.hpp" - -namespace tmwa -{ -} // namespace tmwa diff --git a/src/proto2/char-map.hpp b/src/proto2/char-map.hpp deleted file mode 100644 index 8a23be6..0000000 --- a/src/proto2/char-map.hpp +++ /dev/null @@ -1,3498 +0,0 @@ -#pragma once -// char-map.hpp - TMWA network protocol: char/map -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "fwd.hpp" - -#include "types.hpp" - -namespace tmwa -{ -// This is an internal protocol, and can be changed without notice - -template<> -struct Packet_Fixed<0x2af7> -{ - static const uint16_t PACKET_ID = 0x2af7; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x2af8> -{ - static const uint16_t PACKET_ID = 0x2af8; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - AccountPass account_pass = {}; - uint32_t unused = {}; - IP4Address ip = {}; - uint16_t port = {}; -}; - -template<> -struct Packet_Fixed<0x2af9> -{ - static const uint16_t PACKET_ID = 0x2af9; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t code = {}; -}; - -template<> -struct Packet_Head<0x2afa> -{ - static const uint16_t PACKET_ID = 0x2afa; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x2afa> -{ - static const uint16_t PACKET_ID = 0x2afa; - - MapName map_name = {}; -}; - -template<> -struct Packet_Fixed<0x2afa> -{ - static const uint16_t PACKET_ID = 0x2afa; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - ItemNameId source_item_id = {}; - ItemNameId dest_item_id = {}; -}; - -template<> -struct Packet_Fixed<0x2afb> -{ - static const uint16_t PACKET_ID = 0x2afb; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t unknown = {}; - CharName whisper_name = {}; -}; - -template<> -struct Packet_Fixed<0x2afc> -{ - static const uint16_t PACKET_ID = 0x2afc; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - CharId char_id = {}; - uint32_t login_id1 = {}; - uint32_t login_id2 = {}; - IP4Address ip = {}; -}; - -template<> -struct Packet_Payload<0x2afd> -{ - static const uint16_t PACKET_ID = 0x2afd; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; - uint32_t login_id2 = {}; - TimeT connect_until = {}; - uint16_t packet_tmw_version = {}; - CharKey char_key = {}; - CharData char_data = {}; -}; - -template<> -struct Packet_Fixed<0x2afe> -{ - static const uint16_t PACKET_ID = 0x2afe; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Head<0x2aff> -{ - static const uint16_t PACKET_ID = 0x2aff; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - uint16_t users = {}; -}; -template<> -struct Packet_Repeat<0x2aff> -{ - static const uint16_t PACKET_ID = 0x2aff; - - CharId char_id = {}; -}; - -template<> -struct Packet_Fixed<0x2b00> -{ - static const uint16_t PACKET_ID = 0x2b00; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint32_t users = {}; -}; - -template<> -struct Packet_Payload<0x2b01> -{ - static const uint16_t PACKET_ID = 0x2b01; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; - CharId char_id = {}; - CharKey char_key = {}; - CharData char_data = {}; -}; - -template<> -struct Packet_Fixed<0x2b02> -{ - static const uint16_t PACKET_ID = 0x2b02; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint32_t login_id1 = {}; - uint32_t login_id2 = {}; - IP4Address ip = {}; -}; - -template<> -struct Packet_Fixed<0x2b03> -{ - static const uint16_t PACKET_ID = 0x2b03; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint8_t unknown = {}; -}; - -template<> -struct Packet_Head<0x2b04> -{ - static const uint16_t PACKET_ID = 0x2b04; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - IP4Address ip = {}; - uint16_t port = {}; -}; -template<> -struct Packet_Repeat<0x2b04> -{ - static const uint16_t PACKET_ID = 0x2b04; - - MapName map_name = {}; -}; - -template<> -struct Packet_Fixed<0x2b05> -{ - static const uint16_t PACKET_ID = 0x2b05; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint32_t login_id1 = {}; - uint32_t login_id2 = {}; - CharId char_id = {}; - MapName map_name = {}; - uint16_t x = {}; - uint16_t y = {}; - IP4Address map_ip = {}; - uint16_t map_port = {}; - SEX sex = {}; - IP4Address client_ip = {}; -}; - -template<> -struct Packet_Fixed<0x2b06> -{ - static const uint16_t PACKET_ID = 0x2b06; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint32_t error = {}; - uint32_t unknown = {}; - CharId char_id = {}; - MapName map_name = {}; - uint16_t x = {}; - uint16_t y = {}; - IP4Address map_ip = {}; - uint16_t map_port = {}; -}; - -template<> -struct Packet_Head<0x2b0a> -{ - static const uint16_t PACKET_ID = 0x2b0a; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; -}; -template<> -struct Packet_Repeat<0x2b0a> -{ - static const uint16_t PACKET_ID = 0x2b0a; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x2b0b> -{ - static const uint16_t PACKET_ID = 0x2b0b; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - GmLevel gm_level = {}; -}; - -template<> -struct Packet_Fixed<0x2b0c> -{ - static const uint16_t PACKET_ID = 0x2b0c; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountEmail old_email = {}; - AccountEmail new_email = {}; -}; - -template<> -struct Packet_Fixed<0x2b0d> -{ - static const uint16_t PACKET_ID = 0x2b0d; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - SEX sex = {}; -}; - -template<> -struct Packet_Fixed<0x2b0e> -{ - static const uint16_t PACKET_ID = 0x2b0e; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - CharName char_name = {}; - uint16_t operation = {}; - HumanTimeDiff ban_add = {}; -}; - -template<> -struct Packet_Fixed<0x2b0f> -{ - static const uint16_t PACKET_ID = 0x2b0f; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - CharName char_name = {}; - uint16_t operation = {}; - uint16_t error = {}; -}; - -template<> -struct Packet_Head<0x2b10> -{ - static const uint16_t PACKET_ID = 0x2b10; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; -}; -template<> -struct Packet_Repeat<0x2b10> -{ - static const uint16_t PACKET_ID = 0x2b10; - - VarName name = {}; - uint32_t value = {}; -}; - -template<> -struct Packet_Head<0x2b11> -{ - static const uint16_t PACKET_ID = 0x2b11; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; -}; -template<> -struct Packet_Repeat<0x2b11> -{ - static const uint16_t PACKET_ID = 0x2b11; - - VarName name = {}; - uint32_t value = {}; -}; - -template<> -struct Packet_Fixed<0x2b12> -{ - static const uint16_t PACKET_ID = 0x2b12; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - CharId char_id = {}; - CharId partner_id = {}; -}; - -template<> -struct Packet_Fixed<0x2b13> -{ - static const uint16_t PACKET_ID = 0x2b13; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Fixed<0x2b14> -{ - static const uint16_t PACKET_ID = 0x2b14; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint8_t ban_not_status = {}; - TimeT status_or_ban_until = {}; -}; - -template<> -struct Packet_Head<0x2b15> -{ - static const uint16_t PACKET_ID = 0x2b15; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x2b15> -{ - static const uint16_t PACKET_ID = 0x2b15; - - AccountId account_id = {}; - GmLevel gm_level = {}; -}; - -template<> -struct Packet_Fixed<0x2b16> -{ - static const uint16_t PACKET_ID = 0x2b16; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - CharId char_id = {}; -}; - -template<> -struct Packet_Head<0x3000> -{ - static const uint16_t PACKET_ID = 0x3000; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x3000> -{ - static const uint16_t PACKET_ID = 0x3000; - - uint8_t c = {}; -}; - -template<> -struct Packet_Head<0x3001> -{ - static const uint16_t PACKET_ID = 0x3001; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - CharName from_char_name = {}; - CharName to_char_name = {}; -}; -template<> -struct Packet_Repeat<0x3001> -{ - static const uint16_t PACKET_ID = 0x3001; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x3002> -{ - static const uint16_t PACKET_ID = 0x3002; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - CharId char_id = {}; - uint8_t flag = {}; -}; - -template<> -struct Packet_Head<0x3003> -{ - static const uint16_t PACKET_ID = 0x3003; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - CharName char_name = {}; - GmLevel min_gm_level = {}; -}; -template<> -struct Packet_Repeat<0x3003> -{ - static const uint16_t PACKET_ID = 0x3003; - - uint8_t c = {}; -}; - -template<> -struct Packet_Head<0x3004> -{ - static const uint16_t PACKET_ID = 0x3004; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; -}; -template<> -struct Packet_Repeat<0x3004> -{ - static const uint16_t PACKET_ID = 0x3004; - - VarName name = {}; - uint32_t value = {}; -}; - -template<> -struct Packet_Fixed<0x3005> -{ - static const uint16_t PACKET_ID = 0x3005; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Fixed<0x3010> -{ - static const uint16_t PACKET_ID = 0x3010; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Payload<0x3011> -{ - static const uint16_t PACKET_ID = 0x3011; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; - Storage storage = {}; -}; - -template<> -struct Packet_Fixed<0x3020> -{ - static const uint16_t PACKET_ID = 0x3020; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - PartyName party_name = {}; - CharName char_name = {}; - MapName map_name = {}; - uint16_t level = {}; -}; - -template<> -struct Packet_Fixed<0x3021> -{ - static const uint16_t PACKET_ID = 0x3021; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; -}; - -template<> -struct Packet_Fixed<0x3022> -{ - static const uint16_t PACKET_ID = 0x3022; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; - AccountId account_id = {}; - CharName char_name = {}; - MapName map_name = {}; - uint16_t level = {}; -}; - -template<> -struct Packet_Fixed<0x3023> -{ - static const uint16_t PACKET_ID = 0x3023; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; - AccountId account_id = {}; - uint16_t exp = {}; - uint16_t item = {}; -}; - -template<> -struct Packet_Fixed<0x3024> -{ - static const uint16_t PACKET_ID = 0x3024; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; - AccountId account_id = {}; -}; - -template<> -struct Packet_Fixed<0x3025> -{ - static const uint16_t PACKET_ID = 0x3025; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; - AccountId account_id = {}; - MapName map_name = {}; - uint8_t online = {}; - uint16_t level = {}; -}; - -template<> -struct Packet_Head<0x3027> -{ - static const uint16_t PACKET_ID = 0x3027; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - PartyId party_id = {}; - AccountId account_id = {}; -}; -template<> -struct Packet_Repeat<0x3027> -{ - static const uint16_t PACKET_ID = 0x3027; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x3028> -{ - static const uint16_t PACKET_ID = 0x3028; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; - AccountId account_id = {}; - CharName char_name = {}; -}; - -template<> -struct Packet_Head<0x3800> -{ - static const uint16_t PACKET_ID = 0x3800; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x3800> -{ - static const uint16_t PACKET_ID = 0x3800; - - uint8_t c = {}; -}; - -template<> -struct Packet_Head<0x3801> -{ - static const uint16_t PACKET_ID = 0x3801; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - CharId whisper_id = {}; - CharName src_char_name = {}; - CharName dst_char_name = {}; -}; -template<> -struct Packet_Repeat<0x3801> -{ - static const uint16_t PACKET_ID = 0x3801; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x3802> -{ - static const uint16_t PACKET_ID = 0x3802; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - CharName sender_char_name = {}; - uint8_t flag = {}; -}; - -template<> -struct Packet_Head<0x3803> -{ - static const uint16_t PACKET_ID = 0x3803; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - CharName char_name = {}; - GmLevel min_gm_level = {}; -}; -template<> -struct Packet_Repeat<0x3803> -{ - static const uint16_t PACKET_ID = 0x3803; - - uint8_t c = {}; -}; - -template<> -struct Packet_Head<0x3804> -{ - static const uint16_t PACKET_ID = 0x3804; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; -}; -template<> -struct Packet_Repeat<0x3804> -{ - static const uint16_t PACKET_ID = 0x3804; - - VarName name = {}; - uint32_t value = {}; -}; - -template<> -struct Packet_Payload<0x3810> -{ - static const uint16_t PACKET_ID = 0x3810; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; - Storage storage = {}; -}; - -template<> -struct Packet_Fixed<0x3811> -{ - static const uint16_t PACKET_ID = 0x3811; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint8_t unknown = {}; -}; - -template<> -struct Packet_Fixed<0x3820> -{ - static const uint16_t PACKET_ID = 0x3820; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint8_t error = {}; - PartyId party_id = {}; - PartyName party_name = {}; -}; - -template<> -struct Packet_Head<0x3821> -{ - static const uint16_t PACKET_ID = 0x3821; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - PartyId party_id = {}; -}; -template<> -struct Packet_Option<0x3821> -{ - static const uint16_t PACKET_ID = 0x3821; - - PartyMost party_most = {}; -}; - -template<> -struct Packet_Fixed<0x3822> -{ - static const uint16_t PACKET_ID = 0x3822; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; - AccountId account_id = {}; - uint8_t flag = {}; -}; - -template<> -struct Packet_Fixed<0x3823> -{ - static const uint16_t PACKET_ID = 0x3823; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; - AccountId account_id = {}; - uint16_t exp = {}; - uint16_t item = {}; - uint8_t flag = {}; -}; - -template<> -struct Packet_Fixed<0x3824> -{ - static const uint16_t PACKET_ID = 0x3824; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; - AccountId account_id = {}; - CharName char_name = {}; -}; - -template<> -struct Packet_Fixed<0x3825> -{ - static const uint16_t PACKET_ID = 0x3825; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; - AccountId account_id = {}; - MapName map_name = {}; - uint8_t online = {}; - uint16_t level = {}; -}; - -template<> -struct Packet_Fixed<0x3826> -{ - static const uint16_t PACKET_ID = 0x3826; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyId party_id = {}; - uint8_t flag = {}; -}; - -template<> -struct Packet_Head<0x3827> -{ - static const uint16_t PACKET_ID = 0x3827; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - PartyId party_id = {}; - AccountId account_id = {}; -}; -template<> -struct Packet_Repeat<0x3827> -{ - static const uint16_t PACKET_ID = 0x3827; - - uint8_t c = {}; -}; - - -template<> -struct NetPacket_Fixed<0x2af7> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x2af7>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2af7>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x2af7>) == 2, "sizeof(NetPacket_Fixed<0x2af7>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x2af7>) == 1, "alignof(NetPacket_Fixed<0x2af7>) == 1"); - -template<> -struct NetPacket_Fixed<0x2af8> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - NetString<sizeof(AccountPass)> account_pass; - Little32 unused; - IP4Address ip; - Little16 port; -}; -static_assert(offsetof(NetPacket_Fixed<0x2af8>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2af8>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2af8>, account_name) == 2, "offsetof(NetPacket_Fixed<0x2af8>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2af8>, account_pass) == 26, "offsetof(NetPacket_Fixed<0x2af8>, account_pass) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x2af8>, unused) == 50, "offsetof(NetPacket_Fixed<0x2af8>, unused) == 50"); -static_assert(offsetof(NetPacket_Fixed<0x2af8>, ip) == 54, "offsetof(NetPacket_Fixed<0x2af8>, ip) == 54"); -static_assert(offsetof(NetPacket_Fixed<0x2af8>, port) == 58, "offsetof(NetPacket_Fixed<0x2af8>, port) == 58"); -static_assert(sizeof(NetPacket_Fixed<0x2af8>) == 60, "sizeof(NetPacket_Fixed<0x2af8>) == 60"); -static_assert(alignof(NetPacket_Fixed<0x2af8>) == 1, "alignof(NetPacket_Fixed<0x2af8>) == 1"); - -template<> -struct NetPacket_Fixed<0x2af9> -{ - Little16 magic_packet_id; - Byte code; -}; -static_assert(offsetof(NetPacket_Fixed<0x2af9>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2af9>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2af9>, code) == 2, "offsetof(NetPacket_Fixed<0x2af9>, code) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x2af9>) == 3, "sizeof(NetPacket_Fixed<0x2af9>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x2af9>) == 1, "alignof(NetPacket_Fixed<0x2af9>) == 1"); - -template<> -struct NetPacket_Head<0x2afa> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x2afa>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2afa>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2afa>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x2afa>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x2afa>) == 4, "sizeof(NetPacket_Head<0x2afa>) == 4"); -static_assert(alignof(NetPacket_Head<0x2afa>) == 1, "alignof(NetPacket_Head<0x2afa>) == 1"); -template<> -struct NetPacket_Repeat<0x2afa> -{ - NetString<sizeof(MapName)> map_name; -}; -static_assert(offsetof(NetPacket_Repeat<0x2afa>, map_name) == 0, "offsetof(NetPacket_Repeat<0x2afa>, map_name) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x2afa>) == 16, "sizeof(NetPacket_Repeat<0x2afa>) == 16"); -static_assert(alignof(NetPacket_Repeat<0x2afa>) == 1, "alignof(NetPacket_Repeat<0x2afa>) == 1"); - -template<> -struct NetPacket_Fixed<0x2afa> -{ - Little16 magic_packet_id; - Little32 source_item_id; - Little32 dest_item_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x2afa>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2afa>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2afa>, source_item_id) == 2, "offsetof(NetPacket_Fixed<0x2afa>, source_item_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2afa>, dest_item_id) == 6, "offsetof(NetPacket_Fixed<0x2afa>, dest_item_id) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x2afa>) == 10, "sizeof(NetPacket_Fixed<0x2afa>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x2afa>) == 1, "alignof(NetPacket_Fixed<0x2afa>) == 1"); - -template<> -struct NetPacket_Fixed<0x2afb> -{ - Little16 magic_packet_id; - Byte unknown; - NetString<sizeof(CharName)> whisper_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x2afb>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2afb>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2afb>, unknown) == 2, "offsetof(NetPacket_Fixed<0x2afb>, unknown) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2afb>, whisper_name) == 3, "offsetof(NetPacket_Fixed<0x2afb>, whisper_name) == 3"); -static_assert(sizeof(NetPacket_Fixed<0x2afb>) == 27, "sizeof(NetPacket_Fixed<0x2afb>) == 27"); -static_assert(alignof(NetPacket_Fixed<0x2afb>) == 1, "alignof(NetPacket_Fixed<0x2afb>) == 1"); - -template<> -struct NetPacket_Fixed<0x2afc> -{ - Little16 magic_packet_id; - Little32 account_id; - Little32 char_id; - Little32 login_id1; - Little32 login_id2; - IP4Address ip; -}; -static_assert(offsetof(NetPacket_Fixed<0x2afc>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2afc>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2afc>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2afc>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2afc>, char_id) == 6, "offsetof(NetPacket_Fixed<0x2afc>, char_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2afc>, login_id1) == 10, "offsetof(NetPacket_Fixed<0x2afc>, login_id1) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x2afc>, login_id2) == 14, "offsetof(NetPacket_Fixed<0x2afc>, login_id2) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x2afc>, ip) == 18, "offsetof(NetPacket_Fixed<0x2afc>, ip) == 18"); -static_assert(sizeof(NetPacket_Fixed<0x2afc>) == 22, "sizeof(NetPacket_Fixed<0x2afc>) == 22"); -static_assert(alignof(NetPacket_Fixed<0x2afc>) == 1, "alignof(NetPacket_Fixed<0x2afc>) == 1"); - -template<> -struct NetPacket_Payload<0x2afd> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; - Little32 login_id2; - Little32 connect_until; - Little16 packet_tmw_version; - NetCharKey char_key; - NetCharData char_data; -}; -static_assert(offsetof(NetPacket_Payload<0x2afd>, magic_packet_id) == 0, "offsetof(NetPacket_Payload<0x2afd>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Payload<0x2afd>, magic_packet_length) == 2, "offsetof(NetPacket_Payload<0x2afd>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Payload<0x2afd>, account_id) == 4, "offsetof(NetPacket_Payload<0x2afd>, account_id) == 4"); -static_assert(offsetof(NetPacket_Payload<0x2afd>, login_id2) == 8, "offsetof(NetPacket_Payload<0x2afd>, login_id2) == 8"); -static_assert(offsetof(NetPacket_Payload<0x2afd>, connect_until) == 12, "offsetof(NetPacket_Payload<0x2afd>, connect_until) == 12"); -static_assert(offsetof(NetPacket_Payload<0x2afd>, packet_tmw_version) == 16, "offsetof(NetPacket_Payload<0x2afd>, packet_tmw_version) == 16"); -static_assert(offsetof(NetPacket_Payload<0x2afd>, char_key) == 18, "offsetof(NetPacket_Payload<0x2afd>, char_key) == 18"); -static_assert(alignof(NetPacket_Payload<0x2afd>) == 1, "alignof(NetPacket_Payload<0x2afd>) == 1"); - -template<> -struct NetPacket_Fixed<0x2afe> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x2afe>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2afe>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2afe>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2afe>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x2afe>) == 6, "sizeof(NetPacket_Fixed<0x2afe>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x2afe>) == 1, "alignof(NetPacket_Fixed<0x2afe>) == 1"); - -template<> -struct NetPacket_Head<0x2aff> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little16 users; -}; -static_assert(offsetof(NetPacket_Head<0x2aff>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2aff>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2aff>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x2aff>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x2aff>, users) == 4, "offsetof(NetPacket_Head<0x2aff>, users) == 4"); -static_assert(sizeof(NetPacket_Head<0x2aff>) == 6, "sizeof(NetPacket_Head<0x2aff>) == 6"); -static_assert(alignof(NetPacket_Head<0x2aff>) == 1, "alignof(NetPacket_Head<0x2aff>) == 1"); -template<> -struct NetPacket_Repeat<0x2aff> -{ - Little32 char_id; -}; -static_assert(offsetof(NetPacket_Repeat<0x2aff>, char_id) == 0, "offsetof(NetPacket_Repeat<0x2aff>, char_id) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x2aff>) == 4, "sizeof(NetPacket_Repeat<0x2aff>) == 4"); -static_assert(alignof(NetPacket_Repeat<0x2aff>) == 1, "alignof(NetPacket_Repeat<0x2aff>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b00> -{ - Little16 magic_packet_id; - Little32 users; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b00>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b00>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b00>, users) == 2, "offsetof(NetPacket_Fixed<0x2b00>, users) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x2b00>) == 6, "sizeof(NetPacket_Fixed<0x2b00>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x2b00>) == 1, "alignof(NetPacket_Fixed<0x2b00>) == 1"); - -template<> -struct NetPacket_Payload<0x2b01> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; - Little32 char_id; - NetCharKey char_key; - NetCharData char_data; -}; -static_assert(offsetof(NetPacket_Payload<0x2b01>, magic_packet_id) == 0, "offsetof(NetPacket_Payload<0x2b01>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Payload<0x2b01>, magic_packet_length) == 2, "offsetof(NetPacket_Payload<0x2b01>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Payload<0x2b01>, account_id) == 4, "offsetof(NetPacket_Payload<0x2b01>, account_id) == 4"); -static_assert(offsetof(NetPacket_Payload<0x2b01>, char_id) == 8, "offsetof(NetPacket_Payload<0x2b01>, char_id) == 8"); -static_assert(offsetof(NetPacket_Payload<0x2b01>, char_key) == 12, "offsetof(NetPacket_Payload<0x2b01>, char_key) == 12"); -static_assert(alignof(NetPacket_Payload<0x2b01>) == 1, "alignof(NetPacket_Payload<0x2b01>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b02> -{ - Little16 magic_packet_id; - Little32 account_id; - Little32 login_id1; - Little32 login_id2; - IP4Address ip; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b02>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b02>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b02>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2b02>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2b02>, login_id1) == 6, "offsetof(NetPacket_Fixed<0x2b02>, login_id1) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2b02>, login_id2) == 10, "offsetof(NetPacket_Fixed<0x2b02>, login_id2) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x2b02>, ip) == 14, "offsetof(NetPacket_Fixed<0x2b02>, ip) == 14"); -static_assert(sizeof(NetPacket_Fixed<0x2b02>) == 18, "sizeof(NetPacket_Fixed<0x2b02>) == 18"); -static_assert(alignof(NetPacket_Fixed<0x2b02>) == 1, "alignof(NetPacket_Fixed<0x2b02>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b03> -{ - Little16 magic_packet_id; - Little32 account_id; - Byte unknown; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b03>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b03>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b03>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2b03>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2b03>, unknown) == 6, "offsetof(NetPacket_Fixed<0x2b03>, unknown) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x2b03>) == 7, "sizeof(NetPacket_Fixed<0x2b03>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x2b03>) == 1, "alignof(NetPacket_Fixed<0x2b03>) == 1"); - -template<> -struct NetPacket_Head<0x2b04> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - IP4Address ip; - Little16 port; -}; -static_assert(offsetof(NetPacket_Head<0x2b04>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2b04>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2b04>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x2b04>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x2b04>, ip) == 4, "offsetof(NetPacket_Head<0x2b04>, ip) == 4"); -static_assert(offsetof(NetPacket_Head<0x2b04>, port) == 8, "offsetof(NetPacket_Head<0x2b04>, port) == 8"); -static_assert(sizeof(NetPacket_Head<0x2b04>) == 10, "sizeof(NetPacket_Head<0x2b04>) == 10"); -static_assert(alignof(NetPacket_Head<0x2b04>) == 1, "alignof(NetPacket_Head<0x2b04>) == 1"); -template<> -struct NetPacket_Repeat<0x2b04> -{ - NetString<sizeof(MapName)> map_name; -}; -static_assert(offsetof(NetPacket_Repeat<0x2b04>, map_name) == 0, "offsetof(NetPacket_Repeat<0x2b04>, map_name) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x2b04>) == 16, "sizeof(NetPacket_Repeat<0x2b04>) == 16"); -static_assert(alignof(NetPacket_Repeat<0x2b04>) == 1, "alignof(NetPacket_Repeat<0x2b04>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b05> -{ - Little16 magic_packet_id; - Little32 account_id; - Little32 login_id1; - Little32 login_id2; - Little32 char_id; - NetString<sizeof(MapName)> map_name; - Little16 x; - Little16 y; - IP4Address map_ip; - Little16 map_port; - Byte sex; - IP4Address client_ip; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b05>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b05>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b05>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2b05>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2b05>, login_id1) == 6, "offsetof(NetPacket_Fixed<0x2b05>, login_id1) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2b05>, login_id2) == 10, "offsetof(NetPacket_Fixed<0x2b05>, login_id2) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x2b05>, char_id) == 14, "offsetof(NetPacket_Fixed<0x2b05>, char_id) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x2b05>, map_name) == 18, "offsetof(NetPacket_Fixed<0x2b05>, map_name) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x2b05>, x) == 34, "offsetof(NetPacket_Fixed<0x2b05>, x) == 34"); -static_assert(offsetof(NetPacket_Fixed<0x2b05>, y) == 36, "offsetof(NetPacket_Fixed<0x2b05>, y) == 36"); -static_assert(offsetof(NetPacket_Fixed<0x2b05>, map_ip) == 38, "offsetof(NetPacket_Fixed<0x2b05>, map_ip) == 38"); -static_assert(offsetof(NetPacket_Fixed<0x2b05>, map_port) == 42, "offsetof(NetPacket_Fixed<0x2b05>, map_port) == 42"); -static_assert(offsetof(NetPacket_Fixed<0x2b05>, sex) == 44, "offsetof(NetPacket_Fixed<0x2b05>, sex) == 44"); -static_assert(offsetof(NetPacket_Fixed<0x2b05>, client_ip) == 45, "offsetof(NetPacket_Fixed<0x2b05>, client_ip) == 45"); -static_assert(sizeof(NetPacket_Fixed<0x2b05>) == 49, "sizeof(NetPacket_Fixed<0x2b05>) == 49"); -static_assert(alignof(NetPacket_Fixed<0x2b05>) == 1, "alignof(NetPacket_Fixed<0x2b05>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b06> -{ - Little16 magic_packet_id; - Little32 account_id; - Little32 error; - Little32 unknown; - Little32 char_id; - NetString<sizeof(MapName)> map_name; - Little16 x; - Little16 y; - IP4Address map_ip; - Little16 map_port; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b06>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b06>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b06>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2b06>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2b06>, error) == 6, "offsetof(NetPacket_Fixed<0x2b06>, error) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2b06>, unknown) == 10, "offsetof(NetPacket_Fixed<0x2b06>, unknown) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x2b06>, char_id) == 14, "offsetof(NetPacket_Fixed<0x2b06>, char_id) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x2b06>, map_name) == 18, "offsetof(NetPacket_Fixed<0x2b06>, map_name) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x2b06>, x) == 34, "offsetof(NetPacket_Fixed<0x2b06>, x) == 34"); -static_assert(offsetof(NetPacket_Fixed<0x2b06>, y) == 36, "offsetof(NetPacket_Fixed<0x2b06>, y) == 36"); -static_assert(offsetof(NetPacket_Fixed<0x2b06>, map_ip) == 38, "offsetof(NetPacket_Fixed<0x2b06>, map_ip) == 38"); -static_assert(offsetof(NetPacket_Fixed<0x2b06>, map_port) == 42, "offsetof(NetPacket_Fixed<0x2b06>, map_port) == 42"); -static_assert(sizeof(NetPacket_Fixed<0x2b06>) == 44, "sizeof(NetPacket_Fixed<0x2b06>) == 44"); -static_assert(alignof(NetPacket_Fixed<0x2b06>) == 1, "alignof(NetPacket_Fixed<0x2b06>) == 1"); - -template<> -struct NetPacket_Head<0x2b0a> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Head<0x2b0a>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2b0a>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2b0a>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x2b0a>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x2b0a>, account_id) == 4, "offsetof(NetPacket_Head<0x2b0a>, account_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x2b0a>) == 8, "sizeof(NetPacket_Head<0x2b0a>) == 8"); -static_assert(alignof(NetPacket_Head<0x2b0a>) == 1, "alignof(NetPacket_Head<0x2b0a>) == 1"); -template<> -struct NetPacket_Repeat<0x2b0a> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x2b0a>, c) == 0, "offsetof(NetPacket_Repeat<0x2b0a>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x2b0a>) == 1, "sizeof(NetPacket_Repeat<0x2b0a>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x2b0a>) == 1, "alignof(NetPacket_Repeat<0x2b0a>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b0b> -{ - Little16 magic_packet_id; - Little32 account_id; - Little32 gm_level; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b0b>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b0b>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b0b>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2b0b>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2b0b>, gm_level) == 6, "offsetof(NetPacket_Fixed<0x2b0b>, gm_level) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x2b0b>) == 10, "sizeof(NetPacket_Fixed<0x2b0b>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x2b0b>) == 1, "alignof(NetPacket_Fixed<0x2b0b>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b0c> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountEmail)> old_email; - NetString<sizeof(AccountEmail)> new_email; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b0c>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b0c>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b0c>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2b0c>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2b0c>, old_email) == 6, "offsetof(NetPacket_Fixed<0x2b0c>, old_email) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2b0c>, new_email) == 46, "offsetof(NetPacket_Fixed<0x2b0c>, new_email) == 46"); -static_assert(sizeof(NetPacket_Fixed<0x2b0c>) == 86, "sizeof(NetPacket_Fixed<0x2b0c>) == 86"); -static_assert(alignof(NetPacket_Fixed<0x2b0c>) == 1, "alignof(NetPacket_Fixed<0x2b0c>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b0d> -{ - Little16 magic_packet_id; - Little32 account_id; - Byte sex; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b0d>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b0d>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b0d>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2b0d>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2b0d>, sex) == 6, "offsetof(NetPacket_Fixed<0x2b0d>, sex) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x2b0d>) == 7, "sizeof(NetPacket_Fixed<0x2b0d>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x2b0d>) == 1, "alignof(NetPacket_Fixed<0x2b0d>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b0e> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(CharName)> char_name; - Little16 operation; - NetHumanTimeDiff ban_add; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b0e>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b0e>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b0e>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2b0e>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2b0e>, char_name) == 6, "offsetof(NetPacket_Fixed<0x2b0e>, char_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2b0e>, operation) == 30, "offsetof(NetPacket_Fixed<0x2b0e>, operation) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x2b0e>, ban_add) == 32, "offsetof(NetPacket_Fixed<0x2b0e>, ban_add) == 32"); -static_assert(sizeof(NetPacket_Fixed<0x2b0e>) == 44, "sizeof(NetPacket_Fixed<0x2b0e>) == 44"); -static_assert(alignof(NetPacket_Fixed<0x2b0e>) == 1, "alignof(NetPacket_Fixed<0x2b0e>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b0f> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(CharName)> char_name; - Little16 operation; - Little16 error; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b0f>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b0f>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b0f>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2b0f>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2b0f>, char_name) == 6, "offsetof(NetPacket_Fixed<0x2b0f>, char_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2b0f>, operation) == 30, "offsetof(NetPacket_Fixed<0x2b0f>, operation) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x2b0f>, error) == 32, "offsetof(NetPacket_Fixed<0x2b0f>, error) == 32"); -static_assert(sizeof(NetPacket_Fixed<0x2b0f>) == 34, "sizeof(NetPacket_Fixed<0x2b0f>) == 34"); -static_assert(alignof(NetPacket_Fixed<0x2b0f>) == 1, "alignof(NetPacket_Fixed<0x2b0f>) == 1"); - -template<> -struct NetPacket_Head<0x2b10> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Head<0x2b10>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2b10>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2b10>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x2b10>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x2b10>, account_id) == 4, "offsetof(NetPacket_Head<0x2b10>, account_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x2b10>) == 8, "sizeof(NetPacket_Head<0x2b10>) == 8"); -static_assert(alignof(NetPacket_Head<0x2b10>) == 1, "alignof(NetPacket_Head<0x2b10>) == 1"); -template<> -struct NetPacket_Repeat<0x2b10> -{ - NetString<sizeof(VarName)> name; - Little32 value; -}; -static_assert(offsetof(NetPacket_Repeat<0x2b10>, name) == 0, "offsetof(NetPacket_Repeat<0x2b10>, name) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x2b10>, value) == 32, "offsetof(NetPacket_Repeat<0x2b10>, value) == 32"); -static_assert(sizeof(NetPacket_Repeat<0x2b10>) == 36, "sizeof(NetPacket_Repeat<0x2b10>) == 36"); -static_assert(alignof(NetPacket_Repeat<0x2b10>) == 1, "alignof(NetPacket_Repeat<0x2b10>) == 1"); - -template<> -struct NetPacket_Head<0x2b11> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Head<0x2b11>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2b11>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2b11>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x2b11>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x2b11>, account_id) == 4, "offsetof(NetPacket_Head<0x2b11>, account_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x2b11>) == 8, "sizeof(NetPacket_Head<0x2b11>) == 8"); -static_assert(alignof(NetPacket_Head<0x2b11>) == 1, "alignof(NetPacket_Head<0x2b11>) == 1"); -template<> -struct NetPacket_Repeat<0x2b11> -{ - NetString<sizeof(VarName)> name; - Little32 value; -}; -static_assert(offsetof(NetPacket_Repeat<0x2b11>, name) == 0, "offsetof(NetPacket_Repeat<0x2b11>, name) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x2b11>, value) == 32, "offsetof(NetPacket_Repeat<0x2b11>, value) == 32"); -static_assert(sizeof(NetPacket_Repeat<0x2b11>) == 36, "sizeof(NetPacket_Repeat<0x2b11>) == 36"); -static_assert(alignof(NetPacket_Repeat<0x2b11>) == 1, "alignof(NetPacket_Repeat<0x2b11>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b12> -{ - Little16 magic_packet_id; - Little32 char_id; - Little32 partner_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b12>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b12>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b12>, char_id) == 2, "offsetof(NetPacket_Fixed<0x2b12>, char_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2b12>, partner_id) == 6, "offsetof(NetPacket_Fixed<0x2b12>, partner_id) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x2b12>) == 10, "sizeof(NetPacket_Fixed<0x2b12>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x2b12>) == 1, "alignof(NetPacket_Fixed<0x2b12>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b13> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b13>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b13>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b13>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2b13>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x2b13>) == 6, "sizeof(NetPacket_Fixed<0x2b13>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x2b13>) == 1, "alignof(NetPacket_Fixed<0x2b13>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b14> -{ - Little16 magic_packet_id; - Little32 account_id; - Byte ban_not_status; - Little32 status_or_ban_until; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b14>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b14>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b14>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2b14>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2b14>, ban_not_status) == 6, "offsetof(NetPacket_Fixed<0x2b14>, ban_not_status) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2b14>, status_or_ban_until) == 7, "offsetof(NetPacket_Fixed<0x2b14>, status_or_ban_until) == 7"); -static_assert(sizeof(NetPacket_Fixed<0x2b14>) == 11, "sizeof(NetPacket_Fixed<0x2b14>) == 11"); -static_assert(alignof(NetPacket_Fixed<0x2b14>) == 1, "alignof(NetPacket_Fixed<0x2b14>) == 1"); - -template<> -struct NetPacket_Head<0x2b15> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x2b15>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2b15>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2b15>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x2b15>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x2b15>) == 4, "sizeof(NetPacket_Head<0x2b15>) == 4"); -static_assert(alignof(NetPacket_Head<0x2b15>) == 1, "alignof(NetPacket_Head<0x2b15>) == 1"); -template<> -struct NetPacket_Repeat<0x2b15> -{ - Little32 account_id; - Byte gm_level; -}; -static_assert(offsetof(NetPacket_Repeat<0x2b15>, account_id) == 0, "offsetof(NetPacket_Repeat<0x2b15>, account_id) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x2b15>, gm_level) == 4, "offsetof(NetPacket_Repeat<0x2b15>, gm_level) == 4"); -static_assert(sizeof(NetPacket_Repeat<0x2b15>) == 5, "sizeof(NetPacket_Repeat<0x2b15>) == 5"); -static_assert(alignof(NetPacket_Repeat<0x2b15>) == 1, "alignof(NetPacket_Repeat<0x2b15>) == 1"); - -template<> -struct NetPacket_Fixed<0x2b16> -{ - Little16 magic_packet_id; - Little32 char_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x2b16>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2b16>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2b16>, char_id) == 2, "offsetof(NetPacket_Fixed<0x2b16>, char_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x2b16>) == 6, "sizeof(NetPacket_Fixed<0x2b16>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x2b16>) == 1, "alignof(NetPacket_Fixed<0x2b16>) == 1"); - -template<> -struct NetPacket_Head<0x3000> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x3000>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x3000>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x3000>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x3000>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x3000>) == 4, "sizeof(NetPacket_Head<0x3000>) == 4"); -static_assert(alignof(NetPacket_Head<0x3000>) == 1, "alignof(NetPacket_Head<0x3000>) == 1"); -template<> -struct NetPacket_Repeat<0x3000> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x3000>, c) == 0, "offsetof(NetPacket_Repeat<0x3000>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x3000>) == 1, "sizeof(NetPacket_Repeat<0x3000>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x3000>) == 1, "alignof(NetPacket_Repeat<0x3000>) == 1"); - -template<> -struct NetPacket_Head<0x3001> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - NetString<sizeof(CharName)> from_char_name; - NetString<sizeof(CharName)> to_char_name; -}; -static_assert(offsetof(NetPacket_Head<0x3001>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x3001>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x3001>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x3001>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x3001>, from_char_name) == 4, "offsetof(NetPacket_Head<0x3001>, from_char_name) == 4"); -static_assert(offsetof(NetPacket_Head<0x3001>, to_char_name) == 28, "offsetof(NetPacket_Head<0x3001>, to_char_name) == 28"); -static_assert(sizeof(NetPacket_Head<0x3001>) == 52, "sizeof(NetPacket_Head<0x3001>) == 52"); -static_assert(alignof(NetPacket_Head<0x3001>) == 1, "alignof(NetPacket_Head<0x3001>) == 1"); -template<> -struct NetPacket_Repeat<0x3001> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x3001>, c) == 0, "offsetof(NetPacket_Repeat<0x3001>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x3001>) == 1, "sizeof(NetPacket_Repeat<0x3001>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x3001>) == 1, "alignof(NetPacket_Repeat<0x3001>) == 1"); - -template<> -struct NetPacket_Fixed<0x3002> -{ - Little16 magic_packet_id; - Little32 char_id; - Byte flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x3002>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3002>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3002>, char_id) == 2, "offsetof(NetPacket_Fixed<0x3002>, char_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3002>, flag) == 6, "offsetof(NetPacket_Fixed<0x3002>, flag) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x3002>) == 7, "sizeof(NetPacket_Fixed<0x3002>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x3002>) == 1, "alignof(NetPacket_Fixed<0x3002>) == 1"); - -template<> -struct NetPacket_Head<0x3003> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - NetString<sizeof(CharName)> char_name; - Little16 min_gm_level; -}; -static_assert(offsetof(NetPacket_Head<0x3003>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x3003>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x3003>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x3003>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x3003>, char_name) == 4, "offsetof(NetPacket_Head<0x3003>, char_name) == 4"); -static_assert(offsetof(NetPacket_Head<0x3003>, min_gm_level) == 28, "offsetof(NetPacket_Head<0x3003>, min_gm_level) == 28"); -static_assert(sizeof(NetPacket_Head<0x3003>) == 30, "sizeof(NetPacket_Head<0x3003>) == 30"); -static_assert(alignof(NetPacket_Head<0x3003>) == 1, "alignof(NetPacket_Head<0x3003>) == 1"); -template<> -struct NetPacket_Repeat<0x3003> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x3003>, c) == 0, "offsetof(NetPacket_Repeat<0x3003>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x3003>) == 1, "sizeof(NetPacket_Repeat<0x3003>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x3003>) == 1, "alignof(NetPacket_Repeat<0x3003>) == 1"); - -template<> -struct NetPacket_Head<0x3004> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Head<0x3004>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x3004>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x3004>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x3004>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x3004>, account_id) == 4, "offsetof(NetPacket_Head<0x3004>, account_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x3004>) == 8, "sizeof(NetPacket_Head<0x3004>) == 8"); -static_assert(alignof(NetPacket_Head<0x3004>) == 1, "alignof(NetPacket_Head<0x3004>) == 1"); -template<> -struct NetPacket_Repeat<0x3004> -{ - NetString<sizeof(VarName)> name; - Little32 value; -}; -static_assert(offsetof(NetPacket_Repeat<0x3004>, name) == 0, "offsetof(NetPacket_Repeat<0x3004>, name) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x3004>, value) == 32, "offsetof(NetPacket_Repeat<0x3004>, value) == 32"); -static_assert(sizeof(NetPacket_Repeat<0x3004>) == 36, "sizeof(NetPacket_Repeat<0x3004>) == 36"); -static_assert(alignof(NetPacket_Repeat<0x3004>) == 1, "alignof(NetPacket_Repeat<0x3004>) == 1"); - -template<> -struct NetPacket_Fixed<0x3005> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x3005>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3005>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3005>, account_id) == 2, "offsetof(NetPacket_Fixed<0x3005>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x3005>) == 6, "sizeof(NetPacket_Fixed<0x3005>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x3005>) == 1, "alignof(NetPacket_Fixed<0x3005>) == 1"); - -template<> -struct NetPacket_Fixed<0x3010> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x3010>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3010>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3010>, account_id) == 2, "offsetof(NetPacket_Fixed<0x3010>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x3010>) == 6, "sizeof(NetPacket_Fixed<0x3010>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x3010>) == 1, "alignof(NetPacket_Fixed<0x3010>) == 1"); - -template<> -struct NetPacket_Payload<0x3011> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; - NetStorage storage; -}; -static_assert(offsetof(NetPacket_Payload<0x3011>, magic_packet_id) == 0, "offsetof(NetPacket_Payload<0x3011>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Payload<0x3011>, magic_packet_length) == 2, "offsetof(NetPacket_Payload<0x3011>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Payload<0x3011>, account_id) == 4, "offsetof(NetPacket_Payload<0x3011>, account_id) == 4"); -static_assert(offsetof(NetPacket_Payload<0x3011>, storage) == 8, "offsetof(NetPacket_Payload<0x3011>, storage) == 8"); -static_assert(alignof(NetPacket_Payload<0x3011>) == 1, "alignof(NetPacket_Payload<0x3011>) == 1"); - -template<> -struct NetPacket_Fixed<0x3020> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(PartyName)> party_name; - NetString<sizeof(CharName)> char_name; - NetString<sizeof(MapName)> map_name; - Little16 level; -}; -static_assert(offsetof(NetPacket_Fixed<0x3020>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3020>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3020>, account_id) == 2, "offsetof(NetPacket_Fixed<0x3020>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3020>, party_name) == 6, "offsetof(NetPacket_Fixed<0x3020>, party_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x3020>, char_name) == 30, "offsetof(NetPacket_Fixed<0x3020>, char_name) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x3020>, map_name) == 54, "offsetof(NetPacket_Fixed<0x3020>, map_name) == 54"); -static_assert(offsetof(NetPacket_Fixed<0x3020>, level) == 70, "offsetof(NetPacket_Fixed<0x3020>, level) == 70"); -static_assert(sizeof(NetPacket_Fixed<0x3020>) == 72, "sizeof(NetPacket_Fixed<0x3020>) == 72"); -static_assert(alignof(NetPacket_Fixed<0x3020>) == 1, "alignof(NetPacket_Fixed<0x3020>) == 1"); - -template<> -struct NetPacket_Fixed<0x3021> -{ - Little16 magic_packet_id; - Little32 party_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x3021>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3021>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3021>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3021>, party_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x3021>) == 6, "sizeof(NetPacket_Fixed<0x3021>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x3021>) == 1, "alignof(NetPacket_Fixed<0x3021>) == 1"); - -template<> -struct NetPacket_Fixed<0x3022> -{ - Little16 magic_packet_id; - Little32 party_id; - Little32 account_id; - NetString<sizeof(CharName)> char_name; - NetString<sizeof(MapName)> map_name; - Little16 level; -}; -static_assert(offsetof(NetPacket_Fixed<0x3022>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3022>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3022>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3022>, party_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3022>, account_id) == 6, "offsetof(NetPacket_Fixed<0x3022>, account_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x3022>, char_name) == 10, "offsetof(NetPacket_Fixed<0x3022>, char_name) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x3022>, map_name) == 34, "offsetof(NetPacket_Fixed<0x3022>, map_name) == 34"); -static_assert(offsetof(NetPacket_Fixed<0x3022>, level) == 50, "offsetof(NetPacket_Fixed<0x3022>, level) == 50"); -static_assert(sizeof(NetPacket_Fixed<0x3022>) == 52, "sizeof(NetPacket_Fixed<0x3022>) == 52"); -static_assert(alignof(NetPacket_Fixed<0x3022>) == 1, "alignof(NetPacket_Fixed<0x3022>) == 1"); - -template<> -struct NetPacket_Fixed<0x3023> -{ - Little16 magic_packet_id; - Little32 party_id; - Little32 account_id; - Little16 exp; - Little16 item; -}; -static_assert(offsetof(NetPacket_Fixed<0x3023>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3023>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3023>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3023>, party_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3023>, account_id) == 6, "offsetof(NetPacket_Fixed<0x3023>, account_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x3023>, exp) == 10, "offsetof(NetPacket_Fixed<0x3023>, exp) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x3023>, item) == 12, "offsetof(NetPacket_Fixed<0x3023>, item) == 12"); -static_assert(sizeof(NetPacket_Fixed<0x3023>) == 14, "sizeof(NetPacket_Fixed<0x3023>) == 14"); -static_assert(alignof(NetPacket_Fixed<0x3023>) == 1, "alignof(NetPacket_Fixed<0x3023>) == 1"); - -template<> -struct NetPacket_Fixed<0x3024> -{ - Little16 magic_packet_id; - Little32 party_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x3024>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3024>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3024>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3024>, party_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3024>, account_id) == 6, "offsetof(NetPacket_Fixed<0x3024>, account_id) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x3024>) == 10, "sizeof(NetPacket_Fixed<0x3024>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x3024>) == 1, "alignof(NetPacket_Fixed<0x3024>) == 1"); - -template<> -struct NetPacket_Fixed<0x3025> -{ - Little16 magic_packet_id; - Little32 party_id; - Little32 account_id; - NetString<sizeof(MapName)> map_name; - Byte online; - Little16 level; -}; -static_assert(offsetof(NetPacket_Fixed<0x3025>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3025>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3025>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3025>, party_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3025>, account_id) == 6, "offsetof(NetPacket_Fixed<0x3025>, account_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x3025>, map_name) == 10, "offsetof(NetPacket_Fixed<0x3025>, map_name) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x3025>, online) == 26, "offsetof(NetPacket_Fixed<0x3025>, online) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x3025>, level) == 27, "offsetof(NetPacket_Fixed<0x3025>, level) == 27"); -static_assert(sizeof(NetPacket_Fixed<0x3025>) == 29, "sizeof(NetPacket_Fixed<0x3025>) == 29"); -static_assert(alignof(NetPacket_Fixed<0x3025>) == 1, "alignof(NetPacket_Fixed<0x3025>) == 1"); - -template<> -struct NetPacket_Head<0x3027> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 party_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Head<0x3027>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x3027>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x3027>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x3027>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x3027>, party_id) == 4, "offsetof(NetPacket_Head<0x3027>, party_id) == 4"); -static_assert(offsetof(NetPacket_Head<0x3027>, account_id) == 8, "offsetof(NetPacket_Head<0x3027>, account_id) == 8"); -static_assert(sizeof(NetPacket_Head<0x3027>) == 12, "sizeof(NetPacket_Head<0x3027>) == 12"); -static_assert(alignof(NetPacket_Head<0x3027>) == 1, "alignof(NetPacket_Head<0x3027>) == 1"); -template<> -struct NetPacket_Repeat<0x3027> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x3027>, c) == 0, "offsetof(NetPacket_Repeat<0x3027>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x3027>) == 1, "sizeof(NetPacket_Repeat<0x3027>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x3027>) == 1, "alignof(NetPacket_Repeat<0x3027>) == 1"); - -template<> -struct NetPacket_Fixed<0x3028> -{ - Little16 magic_packet_id; - Little32 party_id; - Little32 account_id; - NetString<sizeof(CharName)> char_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x3028>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3028>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3028>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3028>, party_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3028>, account_id) == 6, "offsetof(NetPacket_Fixed<0x3028>, account_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x3028>, char_name) == 10, "offsetof(NetPacket_Fixed<0x3028>, char_name) == 10"); -static_assert(sizeof(NetPacket_Fixed<0x3028>) == 34, "sizeof(NetPacket_Fixed<0x3028>) == 34"); -static_assert(alignof(NetPacket_Fixed<0x3028>) == 1, "alignof(NetPacket_Fixed<0x3028>) == 1"); - -template<> -struct NetPacket_Head<0x3800> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x3800>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x3800>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x3800>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x3800>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x3800>) == 4, "sizeof(NetPacket_Head<0x3800>) == 4"); -static_assert(alignof(NetPacket_Head<0x3800>) == 1, "alignof(NetPacket_Head<0x3800>) == 1"); -template<> -struct NetPacket_Repeat<0x3800> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x3800>, c) == 0, "offsetof(NetPacket_Repeat<0x3800>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x3800>) == 1, "sizeof(NetPacket_Repeat<0x3800>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x3800>) == 1, "alignof(NetPacket_Repeat<0x3800>) == 1"); - -template<> -struct NetPacket_Head<0x3801> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 whisper_id; - NetString<sizeof(CharName)> src_char_name; - NetString<sizeof(CharName)> dst_char_name; -}; -static_assert(offsetof(NetPacket_Head<0x3801>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x3801>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x3801>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x3801>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x3801>, whisper_id) == 4, "offsetof(NetPacket_Head<0x3801>, whisper_id) == 4"); -static_assert(offsetof(NetPacket_Head<0x3801>, src_char_name) == 8, "offsetof(NetPacket_Head<0x3801>, src_char_name) == 8"); -static_assert(offsetof(NetPacket_Head<0x3801>, dst_char_name) == 32, "offsetof(NetPacket_Head<0x3801>, dst_char_name) == 32"); -static_assert(sizeof(NetPacket_Head<0x3801>) == 56, "sizeof(NetPacket_Head<0x3801>) == 56"); -static_assert(alignof(NetPacket_Head<0x3801>) == 1, "alignof(NetPacket_Head<0x3801>) == 1"); -template<> -struct NetPacket_Repeat<0x3801> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x3801>, c) == 0, "offsetof(NetPacket_Repeat<0x3801>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x3801>) == 1, "sizeof(NetPacket_Repeat<0x3801>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x3801>) == 1, "alignof(NetPacket_Repeat<0x3801>) == 1"); - -template<> -struct NetPacket_Fixed<0x3802> -{ - Little16 magic_packet_id; - NetString<sizeof(CharName)> sender_char_name; - Byte flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x3802>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3802>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3802>, sender_char_name) == 2, "offsetof(NetPacket_Fixed<0x3802>, sender_char_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3802>, flag) == 26, "offsetof(NetPacket_Fixed<0x3802>, flag) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x3802>) == 27, "sizeof(NetPacket_Fixed<0x3802>) == 27"); -static_assert(alignof(NetPacket_Fixed<0x3802>) == 1, "alignof(NetPacket_Fixed<0x3802>) == 1"); - -template<> -struct NetPacket_Head<0x3803> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - NetString<sizeof(CharName)> char_name; - Little16 min_gm_level; -}; -static_assert(offsetof(NetPacket_Head<0x3803>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x3803>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x3803>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x3803>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x3803>, char_name) == 4, "offsetof(NetPacket_Head<0x3803>, char_name) == 4"); -static_assert(offsetof(NetPacket_Head<0x3803>, min_gm_level) == 28, "offsetof(NetPacket_Head<0x3803>, min_gm_level) == 28"); -static_assert(sizeof(NetPacket_Head<0x3803>) == 30, "sizeof(NetPacket_Head<0x3803>) == 30"); -static_assert(alignof(NetPacket_Head<0x3803>) == 1, "alignof(NetPacket_Head<0x3803>) == 1"); -template<> -struct NetPacket_Repeat<0x3803> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x3803>, c) == 0, "offsetof(NetPacket_Repeat<0x3803>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x3803>) == 1, "sizeof(NetPacket_Repeat<0x3803>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x3803>) == 1, "alignof(NetPacket_Repeat<0x3803>) == 1"); - -template<> -struct NetPacket_Head<0x3804> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Head<0x3804>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x3804>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x3804>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x3804>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x3804>, account_id) == 4, "offsetof(NetPacket_Head<0x3804>, account_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x3804>) == 8, "sizeof(NetPacket_Head<0x3804>) == 8"); -static_assert(alignof(NetPacket_Head<0x3804>) == 1, "alignof(NetPacket_Head<0x3804>) == 1"); -template<> -struct NetPacket_Repeat<0x3804> -{ - NetString<sizeof(VarName)> name; - Little32 value; -}; -static_assert(offsetof(NetPacket_Repeat<0x3804>, name) == 0, "offsetof(NetPacket_Repeat<0x3804>, name) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x3804>, value) == 32, "offsetof(NetPacket_Repeat<0x3804>, value) == 32"); -static_assert(sizeof(NetPacket_Repeat<0x3804>) == 36, "sizeof(NetPacket_Repeat<0x3804>) == 36"); -static_assert(alignof(NetPacket_Repeat<0x3804>) == 1, "alignof(NetPacket_Repeat<0x3804>) == 1"); - -template<> -struct NetPacket_Payload<0x3810> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; - NetStorage storage; -}; -static_assert(offsetof(NetPacket_Payload<0x3810>, magic_packet_id) == 0, "offsetof(NetPacket_Payload<0x3810>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Payload<0x3810>, magic_packet_length) == 2, "offsetof(NetPacket_Payload<0x3810>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Payload<0x3810>, account_id) == 4, "offsetof(NetPacket_Payload<0x3810>, account_id) == 4"); -static_assert(offsetof(NetPacket_Payload<0x3810>, storage) == 8, "offsetof(NetPacket_Payload<0x3810>, storage) == 8"); -static_assert(alignof(NetPacket_Payload<0x3810>) == 1, "alignof(NetPacket_Payload<0x3810>) == 1"); - -template<> -struct NetPacket_Fixed<0x3811> -{ - Little16 magic_packet_id; - Little32 account_id; - Byte unknown; -}; -static_assert(offsetof(NetPacket_Fixed<0x3811>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3811>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3811>, account_id) == 2, "offsetof(NetPacket_Fixed<0x3811>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3811>, unknown) == 6, "offsetof(NetPacket_Fixed<0x3811>, unknown) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x3811>) == 7, "sizeof(NetPacket_Fixed<0x3811>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x3811>) == 1, "alignof(NetPacket_Fixed<0x3811>) == 1"); - -template<> -struct NetPacket_Fixed<0x3820> -{ - Little16 magic_packet_id; - Little32 account_id; - Byte error; - Little32 party_id; - NetString<sizeof(PartyName)> party_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x3820>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3820>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3820>, account_id) == 2, "offsetof(NetPacket_Fixed<0x3820>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3820>, error) == 6, "offsetof(NetPacket_Fixed<0x3820>, error) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x3820>, party_id) == 7, "offsetof(NetPacket_Fixed<0x3820>, party_id) == 7"); -static_assert(offsetof(NetPacket_Fixed<0x3820>, party_name) == 11, "offsetof(NetPacket_Fixed<0x3820>, party_name) == 11"); -static_assert(sizeof(NetPacket_Fixed<0x3820>) == 35, "sizeof(NetPacket_Fixed<0x3820>) == 35"); -static_assert(alignof(NetPacket_Fixed<0x3820>) == 1, "alignof(NetPacket_Fixed<0x3820>) == 1"); - -template<> -struct NetPacket_Head<0x3821> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 party_id; -}; -static_assert(offsetof(NetPacket_Head<0x3821>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x3821>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x3821>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x3821>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x3821>, party_id) == 4, "offsetof(NetPacket_Head<0x3821>, party_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x3821>) == 8, "sizeof(NetPacket_Head<0x3821>) == 8"); -static_assert(alignof(NetPacket_Head<0x3821>) == 1, "alignof(NetPacket_Head<0x3821>) == 1"); -template<> -struct NetPacket_Option<0x3821> -{ - NetPartyMost party_most; -}; -static_assert(offsetof(NetPacket_Option<0x3821>, party_most) == 0, "offsetof(NetPacket_Option<0x3821>, party_most) == 0"); -static_assert(alignof(NetPacket_Option<0x3821>) == 1, "alignof(NetPacket_Option<0x3821>) == 1"); - -template<> -struct NetPacket_Fixed<0x3822> -{ - Little16 magic_packet_id; - Little32 party_id; - Little32 account_id; - Byte flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x3822>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3822>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3822>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3822>, party_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3822>, account_id) == 6, "offsetof(NetPacket_Fixed<0x3822>, account_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x3822>, flag) == 10, "offsetof(NetPacket_Fixed<0x3822>, flag) == 10"); -static_assert(sizeof(NetPacket_Fixed<0x3822>) == 11, "sizeof(NetPacket_Fixed<0x3822>) == 11"); -static_assert(alignof(NetPacket_Fixed<0x3822>) == 1, "alignof(NetPacket_Fixed<0x3822>) == 1"); - -template<> -struct NetPacket_Fixed<0x3823> -{ - Little16 magic_packet_id; - Little32 party_id; - Little32 account_id; - Little16 exp; - Little16 item; - Byte flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x3823>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3823>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3823>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3823>, party_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3823>, account_id) == 6, "offsetof(NetPacket_Fixed<0x3823>, account_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x3823>, exp) == 10, "offsetof(NetPacket_Fixed<0x3823>, exp) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x3823>, item) == 12, "offsetof(NetPacket_Fixed<0x3823>, item) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x3823>, flag) == 14, "offsetof(NetPacket_Fixed<0x3823>, flag) == 14"); -static_assert(sizeof(NetPacket_Fixed<0x3823>) == 15, "sizeof(NetPacket_Fixed<0x3823>) == 15"); -static_assert(alignof(NetPacket_Fixed<0x3823>) == 1, "alignof(NetPacket_Fixed<0x3823>) == 1"); - -template<> -struct NetPacket_Fixed<0x3824> -{ - Little16 magic_packet_id; - Little32 party_id; - Little32 account_id; - NetString<sizeof(CharName)> char_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x3824>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3824>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3824>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3824>, party_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3824>, account_id) == 6, "offsetof(NetPacket_Fixed<0x3824>, account_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x3824>, char_name) == 10, "offsetof(NetPacket_Fixed<0x3824>, char_name) == 10"); -static_assert(sizeof(NetPacket_Fixed<0x3824>) == 34, "sizeof(NetPacket_Fixed<0x3824>) == 34"); -static_assert(alignof(NetPacket_Fixed<0x3824>) == 1, "alignof(NetPacket_Fixed<0x3824>) == 1"); - -template<> -struct NetPacket_Fixed<0x3825> -{ - Little16 magic_packet_id; - Little32 party_id; - Little32 account_id; - NetString<sizeof(MapName)> map_name; - Byte online; - Little16 level; -}; -static_assert(offsetof(NetPacket_Fixed<0x3825>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3825>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3825>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3825>, party_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3825>, account_id) == 6, "offsetof(NetPacket_Fixed<0x3825>, account_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x3825>, map_name) == 10, "offsetof(NetPacket_Fixed<0x3825>, map_name) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x3825>, online) == 26, "offsetof(NetPacket_Fixed<0x3825>, online) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x3825>, level) == 27, "offsetof(NetPacket_Fixed<0x3825>, level) == 27"); -static_assert(sizeof(NetPacket_Fixed<0x3825>) == 29, "sizeof(NetPacket_Fixed<0x3825>) == 29"); -static_assert(alignof(NetPacket_Fixed<0x3825>) == 1, "alignof(NetPacket_Fixed<0x3825>) == 1"); - -template<> -struct NetPacket_Fixed<0x3826> -{ - Little16 magic_packet_id; - Little32 party_id; - Byte flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x3826>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x3826>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x3826>, party_id) == 2, "offsetof(NetPacket_Fixed<0x3826>, party_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x3826>, flag) == 6, "offsetof(NetPacket_Fixed<0x3826>, flag) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x3826>) == 7, "sizeof(NetPacket_Fixed<0x3826>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x3826>) == 1, "alignof(NetPacket_Fixed<0x3826>) == 1"); - -template<> -struct NetPacket_Head<0x3827> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 party_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Head<0x3827>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x3827>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x3827>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x3827>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x3827>, party_id) == 4, "offsetof(NetPacket_Head<0x3827>, party_id) == 4"); -static_assert(offsetof(NetPacket_Head<0x3827>, account_id) == 8, "offsetof(NetPacket_Head<0x3827>, account_id) == 8"); -static_assert(sizeof(NetPacket_Head<0x3827>) == 12, "sizeof(NetPacket_Head<0x3827>) == 12"); -static_assert(alignof(NetPacket_Head<0x3827>) == 1, "alignof(NetPacket_Head<0x3827>) == 1"); -template<> -struct NetPacket_Repeat<0x3827> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x3827>, c) == 0, "offsetof(NetPacket_Repeat<0x3827>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x3827>) == 1, "sizeof(NetPacket_Repeat<0x3827>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x3827>) == 1, "alignof(NetPacket_Repeat<0x3827>) == 1"); - - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2af7> *network, Packet_Fixed<0x2af7> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2af7> *native, NetPacket_Fixed<0x2af7> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2af8> *network, Packet_Fixed<0x2af8> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->account_pass, native.account_pass); - rv &= native_to_network(&network->unused, native.unused); - rv &= native_to_network(&network->ip, native.ip); - rv &= native_to_network(&network->port, native.port); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2af8> *native, NetPacket_Fixed<0x2af8> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->account_pass, network.account_pass); - rv &= network_to_native(&native->unused, network.unused); - rv &= network_to_native(&native->ip, network.ip); - rv &= network_to_native(&native->port, network.port); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2af9> *network, Packet_Fixed<0x2af9> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->code, native.code); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2af9> *native, NetPacket_Fixed<0x2af9> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->code, network.code); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2afa> *network, Packet_Head<0x2afa> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2afa> *native, NetPacket_Head<0x2afa> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2afa> *network, Packet_Repeat<0x2afa> native) -{ - bool rv = true; - rv &= native_to_network(&network->map_name, native.map_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2afa> *native, NetPacket_Repeat<0x2afa> network) -{ - bool rv = true; - rv &= network_to_native(&native->map_name, network.map_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2afa> *network, Packet_Fixed<0x2afa> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->source_item_id, native.source_item_id); - rv &= native_to_network(&network->dest_item_id, native.dest_item_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2afa> *native, NetPacket_Fixed<0x2afa> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->source_item_id, network.source_item_id); - rv &= network_to_native(&native->dest_item_id, network.dest_item_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2afb> *network, Packet_Fixed<0x2afb> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->unknown, native.unknown); - rv &= native_to_network(&network->whisper_name, native.whisper_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2afb> *native, NetPacket_Fixed<0x2afb> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->unknown, network.unknown); - rv &= network_to_native(&native->whisper_name, network.whisper_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2afc> *network, Packet_Fixed<0x2afc> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->char_id, native.char_id); - rv &= native_to_network(&network->login_id1, native.login_id1); - rv &= native_to_network(&network->login_id2, native.login_id2); - rv &= native_to_network(&network->ip, native.ip); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2afc> *native, NetPacket_Fixed<0x2afc> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->char_id, network.char_id); - rv &= network_to_native(&native->login_id1, network.login_id1); - rv &= network_to_native(&native->login_id2, network.login_id2); - rv &= network_to_native(&native->ip, network.ip); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Payload<0x2afd> *network, Packet_Payload<0x2afd> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->login_id2, native.login_id2); - rv &= native_to_network(&network->connect_until, native.connect_until); - rv &= native_to_network(&network->packet_tmw_version, native.packet_tmw_version); - rv &= native_to_network(&network->char_key, native.char_key); - rv &= native_to_network(&network->char_data, native.char_data); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Payload<0x2afd> *native, NetPacket_Payload<0x2afd> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->login_id2, network.login_id2); - rv &= network_to_native(&native->connect_until, network.connect_until); - rv &= network_to_native(&native->packet_tmw_version, network.packet_tmw_version); - rv &= network_to_native(&native->char_key, network.char_key); - rv &= network_to_native(&native->char_data, network.char_data); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2afe> *network, Packet_Fixed<0x2afe> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2afe> *native, NetPacket_Fixed<0x2afe> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2aff> *network, Packet_Head<0x2aff> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->users, native.users); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2aff> *native, NetPacket_Head<0x2aff> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->users, network.users); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2aff> *network, Packet_Repeat<0x2aff> native) -{ - bool rv = true; - rv &= native_to_network(&network->char_id, native.char_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2aff> *native, NetPacket_Repeat<0x2aff> network) -{ - bool rv = true; - rv &= network_to_native(&native->char_id, network.char_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b00> *network, Packet_Fixed<0x2b00> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->users, native.users); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b00> *native, NetPacket_Fixed<0x2b00> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->users, network.users); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Payload<0x2b01> *network, Packet_Payload<0x2b01> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->char_id, native.char_id); - rv &= native_to_network(&network->char_key, native.char_key); - rv &= native_to_network(&network->char_data, native.char_data); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Payload<0x2b01> *native, NetPacket_Payload<0x2b01> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->char_id, network.char_id); - rv &= network_to_native(&native->char_key, network.char_key); - rv &= network_to_native(&native->char_data, network.char_data); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b02> *network, Packet_Fixed<0x2b02> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->login_id1, native.login_id1); - rv &= native_to_network(&network->login_id2, native.login_id2); - rv &= native_to_network(&network->ip, native.ip); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b02> *native, NetPacket_Fixed<0x2b02> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->login_id1, network.login_id1); - rv &= network_to_native(&native->login_id2, network.login_id2); - rv &= network_to_native(&native->ip, network.ip); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b03> *network, Packet_Fixed<0x2b03> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->unknown, native.unknown); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b03> *native, NetPacket_Fixed<0x2b03> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->unknown, network.unknown); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2b04> *network, Packet_Head<0x2b04> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->ip, native.ip); - rv &= native_to_network(&network->port, native.port); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2b04> *native, NetPacket_Head<0x2b04> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->ip, network.ip); - rv &= network_to_native(&native->port, network.port); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2b04> *network, Packet_Repeat<0x2b04> native) -{ - bool rv = true; - rv &= native_to_network(&network->map_name, native.map_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2b04> *native, NetPacket_Repeat<0x2b04> network) -{ - bool rv = true; - rv &= network_to_native(&native->map_name, network.map_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b05> *network, Packet_Fixed<0x2b05> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->login_id1, native.login_id1); - rv &= native_to_network(&network->login_id2, native.login_id2); - rv &= native_to_network(&network->char_id, native.char_id); - rv &= native_to_network(&network->map_name, native.map_name); - rv &= native_to_network(&network->x, native.x); - rv &= native_to_network(&network->y, native.y); - rv &= native_to_network(&network->map_ip, native.map_ip); - rv &= native_to_network(&network->map_port, native.map_port); - rv &= native_to_network(&network->sex, native.sex); - rv &= native_to_network(&network->client_ip, native.client_ip); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b05> *native, NetPacket_Fixed<0x2b05> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->login_id1, network.login_id1); - rv &= network_to_native(&native->login_id2, network.login_id2); - rv &= network_to_native(&native->char_id, network.char_id); - rv &= network_to_native(&native->map_name, network.map_name); - rv &= network_to_native(&native->x, network.x); - rv &= network_to_native(&native->y, network.y); - rv &= network_to_native(&native->map_ip, network.map_ip); - rv &= network_to_native(&native->map_port, network.map_port); - rv &= network_to_native(&native->sex, network.sex); - rv &= network_to_native(&native->client_ip, network.client_ip); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b06> *network, Packet_Fixed<0x2b06> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->error, native.error); - rv &= native_to_network(&network->unknown, native.unknown); - rv &= native_to_network(&network->char_id, native.char_id); - rv &= native_to_network(&network->map_name, native.map_name); - rv &= native_to_network(&network->x, native.x); - rv &= native_to_network(&network->y, native.y); - rv &= native_to_network(&network->map_ip, native.map_ip); - rv &= native_to_network(&network->map_port, native.map_port); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b06> *native, NetPacket_Fixed<0x2b06> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->error, network.error); - rv &= network_to_native(&native->unknown, network.unknown); - rv &= network_to_native(&native->char_id, network.char_id); - rv &= network_to_native(&native->map_name, network.map_name); - rv &= network_to_native(&native->x, network.x); - rv &= network_to_native(&native->y, network.y); - rv &= network_to_native(&native->map_ip, network.map_ip); - rv &= network_to_native(&native->map_port, network.map_port); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2b0a> *network, Packet_Head<0x2b0a> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2b0a> *native, NetPacket_Head<0x2b0a> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2b0a> *network, Packet_Repeat<0x2b0a> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2b0a> *native, NetPacket_Repeat<0x2b0a> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b0b> *network, Packet_Fixed<0x2b0b> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->gm_level, native.gm_level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b0b> *native, NetPacket_Fixed<0x2b0b> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->gm_level, network.gm_level); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b0c> *network, Packet_Fixed<0x2b0c> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->old_email, native.old_email); - rv &= native_to_network(&network->new_email, native.new_email); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b0c> *native, NetPacket_Fixed<0x2b0c> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->old_email, network.old_email); - rv &= network_to_native(&native->new_email, network.new_email); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b0d> *network, Packet_Fixed<0x2b0d> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->sex, native.sex); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b0d> *native, NetPacket_Fixed<0x2b0d> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->sex, network.sex); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b0e> *network, Packet_Fixed<0x2b0e> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->char_name, native.char_name); - rv &= native_to_network(&network->operation, native.operation); - rv &= native_to_network(&network->ban_add, native.ban_add); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b0e> *native, NetPacket_Fixed<0x2b0e> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->char_name, network.char_name); - rv &= network_to_native(&native->operation, network.operation); - rv &= network_to_native(&native->ban_add, network.ban_add); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b0f> *network, Packet_Fixed<0x2b0f> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->char_name, native.char_name); - rv &= native_to_network(&network->operation, native.operation); - rv &= native_to_network(&network->error, native.error); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b0f> *native, NetPacket_Fixed<0x2b0f> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->char_name, network.char_name); - rv &= network_to_native(&native->operation, network.operation); - rv &= network_to_native(&native->error, network.error); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2b10> *network, Packet_Head<0x2b10> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2b10> *native, NetPacket_Head<0x2b10> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2b10> *network, Packet_Repeat<0x2b10> native) -{ - bool rv = true; - rv &= native_to_network(&network->name, native.name); - rv &= native_to_network(&network->value, native.value); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2b10> *native, NetPacket_Repeat<0x2b10> network) -{ - bool rv = true; - rv &= network_to_native(&native->name, network.name); - rv &= network_to_native(&native->value, network.value); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2b11> *network, Packet_Head<0x2b11> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2b11> *native, NetPacket_Head<0x2b11> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2b11> *network, Packet_Repeat<0x2b11> native) -{ - bool rv = true; - rv &= native_to_network(&network->name, native.name); - rv &= native_to_network(&network->value, native.value); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2b11> *native, NetPacket_Repeat<0x2b11> network) -{ - bool rv = true; - rv &= network_to_native(&native->name, network.name); - rv &= network_to_native(&native->value, network.value); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b12> *network, Packet_Fixed<0x2b12> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->char_id, native.char_id); - rv &= native_to_network(&network->partner_id, native.partner_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b12> *native, NetPacket_Fixed<0x2b12> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->char_id, network.char_id); - rv &= network_to_native(&native->partner_id, network.partner_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b13> *network, Packet_Fixed<0x2b13> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b13> *native, NetPacket_Fixed<0x2b13> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b14> *network, Packet_Fixed<0x2b14> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->ban_not_status, native.ban_not_status); - rv &= native_to_network(&network->status_or_ban_until, native.status_or_ban_until); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b14> *native, NetPacket_Fixed<0x2b14> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->ban_not_status, network.ban_not_status); - rv &= network_to_native(&native->status_or_ban_until, network.status_or_ban_until); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2b15> *network, Packet_Head<0x2b15> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2b15> *native, NetPacket_Head<0x2b15> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2b15> *network, Packet_Repeat<0x2b15> native) -{ - bool rv = true; - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->gm_level, native.gm_level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2b15> *native, NetPacket_Repeat<0x2b15> network) -{ - bool rv = true; - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->gm_level, network.gm_level); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2b16> *network, Packet_Fixed<0x2b16> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->char_id, native.char_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2b16> *native, NetPacket_Fixed<0x2b16> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->char_id, network.char_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x3000> *network, Packet_Head<0x3000> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x3000> *native, NetPacket_Head<0x3000> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x3000> *network, Packet_Repeat<0x3000> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x3000> *native, NetPacket_Repeat<0x3000> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x3001> *network, Packet_Head<0x3001> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->from_char_name, native.from_char_name); - rv &= native_to_network(&network->to_char_name, native.to_char_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x3001> *native, NetPacket_Head<0x3001> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->from_char_name, network.from_char_name); - rv &= network_to_native(&native->to_char_name, network.to_char_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x3001> *network, Packet_Repeat<0x3001> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x3001> *native, NetPacket_Repeat<0x3001> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3002> *network, Packet_Fixed<0x3002> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->char_id, native.char_id); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3002> *native, NetPacket_Fixed<0x3002> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->char_id, network.char_id); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x3003> *network, Packet_Head<0x3003> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->char_name, native.char_name); - rv &= native_to_network(&network->min_gm_level, native.min_gm_level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x3003> *native, NetPacket_Head<0x3003> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->char_name, network.char_name); - rv &= network_to_native(&native->min_gm_level, network.min_gm_level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x3003> *network, Packet_Repeat<0x3003> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x3003> *native, NetPacket_Repeat<0x3003> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x3004> *network, Packet_Head<0x3004> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x3004> *native, NetPacket_Head<0x3004> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x3004> *network, Packet_Repeat<0x3004> native) -{ - bool rv = true; - rv &= native_to_network(&network->name, native.name); - rv &= native_to_network(&network->value, native.value); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x3004> *native, NetPacket_Repeat<0x3004> network) -{ - bool rv = true; - rv &= network_to_native(&native->name, network.name); - rv &= network_to_native(&native->value, network.value); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3005> *network, Packet_Fixed<0x3005> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3005> *native, NetPacket_Fixed<0x3005> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3010> *network, Packet_Fixed<0x3010> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3010> *native, NetPacket_Fixed<0x3010> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Payload<0x3011> *network, Packet_Payload<0x3011> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->storage, native.storage); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Payload<0x3011> *native, NetPacket_Payload<0x3011> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->storage, network.storage); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3020> *network, Packet_Fixed<0x3020> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->party_name, native.party_name); - rv &= native_to_network(&network->char_name, native.char_name); - rv &= native_to_network(&network->map_name, native.map_name); - rv &= native_to_network(&network->level, native.level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3020> *native, NetPacket_Fixed<0x3020> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->party_name, network.party_name); - rv &= network_to_native(&native->char_name, network.char_name); - rv &= network_to_native(&native->map_name, network.map_name); - rv &= network_to_native(&native->level, network.level); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3021> *network, Packet_Fixed<0x3021> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3021> *native, NetPacket_Fixed<0x3021> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3022> *network, Packet_Fixed<0x3022> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->char_name, native.char_name); - rv &= native_to_network(&network->map_name, native.map_name); - rv &= native_to_network(&network->level, native.level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3022> *native, NetPacket_Fixed<0x3022> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->char_name, network.char_name); - rv &= network_to_native(&native->map_name, network.map_name); - rv &= network_to_native(&native->level, network.level); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3023> *network, Packet_Fixed<0x3023> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->exp, native.exp); - rv &= native_to_network(&network->item, native.item); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3023> *native, NetPacket_Fixed<0x3023> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->exp, network.exp); - rv &= network_to_native(&native->item, network.item); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3024> *network, Packet_Fixed<0x3024> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3024> *native, NetPacket_Fixed<0x3024> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3025> *network, Packet_Fixed<0x3025> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->map_name, native.map_name); - rv &= native_to_network(&network->online, native.online); - rv &= native_to_network(&network->level, native.level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3025> *native, NetPacket_Fixed<0x3025> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->map_name, network.map_name); - rv &= network_to_native(&native->online, network.online); - rv &= network_to_native(&native->level, network.level); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x3027> *network, Packet_Head<0x3027> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x3027> *native, NetPacket_Head<0x3027> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x3027> *network, Packet_Repeat<0x3027> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x3027> *native, NetPacket_Repeat<0x3027> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3028> *network, Packet_Fixed<0x3028> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->char_name, native.char_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3028> *native, NetPacket_Fixed<0x3028> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->char_name, network.char_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x3800> *network, Packet_Head<0x3800> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x3800> *native, NetPacket_Head<0x3800> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x3800> *network, Packet_Repeat<0x3800> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x3800> *native, NetPacket_Repeat<0x3800> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x3801> *network, Packet_Head<0x3801> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->whisper_id, native.whisper_id); - rv &= native_to_network(&network->src_char_name, native.src_char_name); - rv &= native_to_network(&network->dst_char_name, native.dst_char_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x3801> *native, NetPacket_Head<0x3801> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->whisper_id, network.whisper_id); - rv &= network_to_native(&native->src_char_name, network.src_char_name); - rv &= network_to_native(&native->dst_char_name, network.dst_char_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x3801> *network, Packet_Repeat<0x3801> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x3801> *native, NetPacket_Repeat<0x3801> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3802> *network, Packet_Fixed<0x3802> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->sender_char_name, native.sender_char_name); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3802> *native, NetPacket_Fixed<0x3802> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->sender_char_name, network.sender_char_name); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x3803> *network, Packet_Head<0x3803> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->char_name, native.char_name); - rv &= native_to_network(&network->min_gm_level, native.min_gm_level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x3803> *native, NetPacket_Head<0x3803> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->char_name, network.char_name); - rv &= network_to_native(&native->min_gm_level, network.min_gm_level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x3803> *network, Packet_Repeat<0x3803> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x3803> *native, NetPacket_Repeat<0x3803> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x3804> *network, Packet_Head<0x3804> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x3804> *native, NetPacket_Head<0x3804> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x3804> *network, Packet_Repeat<0x3804> native) -{ - bool rv = true; - rv &= native_to_network(&network->name, native.name); - rv &= native_to_network(&network->value, native.value); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x3804> *native, NetPacket_Repeat<0x3804> network) -{ - bool rv = true; - rv &= network_to_native(&native->name, network.name); - rv &= network_to_native(&native->value, network.value); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Payload<0x3810> *network, Packet_Payload<0x3810> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->storage, native.storage); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Payload<0x3810> *native, NetPacket_Payload<0x3810> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->storage, network.storage); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3811> *network, Packet_Fixed<0x3811> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->unknown, native.unknown); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3811> *native, NetPacket_Fixed<0x3811> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->unknown, network.unknown); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3820> *network, Packet_Fixed<0x3820> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->error, native.error); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->party_name, native.party_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3820> *native, NetPacket_Fixed<0x3820> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->error, network.error); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->party_name, network.party_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x3821> *network, Packet_Head<0x3821> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->party_id, native.party_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x3821> *native, NetPacket_Head<0x3821> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->party_id, network.party_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Option<0x3821> *network, Packet_Option<0x3821> native) -{ - bool rv = true; - rv &= native_to_network(&network->party_most, native.party_most); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Option<0x3821> *native, NetPacket_Option<0x3821> network) -{ - bool rv = true; - rv &= network_to_native(&native->party_most, network.party_most); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3822> *network, Packet_Fixed<0x3822> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3822> *native, NetPacket_Fixed<0x3822> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3823> *network, Packet_Fixed<0x3823> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->exp, native.exp); - rv &= native_to_network(&network->item, native.item); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3823> *native, NetPacket_Fixed<0x3823> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->exp, network.exp); - rv &= network_to_native(&native->item, network.item); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3824> *network, Packet_Fixed<0x3824> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->char_name, native.char_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3824> *native, NetPacket_Fixed<0x3824> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->char_name, network.char_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3825> *network, Packet_Fixed<0x3825> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->map_name, native.map_name); - rv &= native_to_network(&network->online, native.online); - rv &= native_to_network(&network->level, native.level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3825> *native, NetPacket_Fixed<0x3825> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->map_name, network.map_name); - rv &= network_to_native(&native->online, network.online); - rv &= network_to_native(&native->level, network.level); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x3826> *network, Packet_Fixed<0x3826> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x3826> *native, NetPacket_Fixed<0x3826> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x3827> *network, Packet_Head<0x3827> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x3827> *native, NetPacket_Head<0x3827> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x3827> *network, Packet_Repeat<0x3827> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x3827> *native, NetPacket_Repeat<0x3827> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -} // namespace tmwa diff --git a/src/proto2/char-map_test.cpp b/src/proto2/char-map_test.cpp deleted file mode 100644 index b4ba642..0000000 --- a/src/proto2/char-map_test.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "char-map.hpp" -// char-map_test.cpp - TMWA network protocol: char/map -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "../poison.hpp" - -namespace tmwa -{ -} // namespace tmwa diff --git a/src/proto2/char-user.hpp b/src/proto2/char-user.hpp deleted file mode 100644 index ed58d69..0000000 --- a/src/proto2/char-user.hpp +++ /dev/null @@ -1,622 +0,0 @@ -#pragma once -// char-user.hpp - TMWA network protocol: char/user -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "fwd.hpp" - -#include "types.hpp" - -namespace tmwa -{ -// This is a public protocol, and changes require client cooperation - -template<> -struct Packet_Fixed<0x0061> -{ - static const uint16_t PACKET_ID = 0x0061; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountPass old_pass = {}; - AccountPass new_pass = {}; -}; - -template<> -struct Packet_Fixed<0x0062> -{ - static const uint16_t PACKET_ID = 0x0062; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t status = {}; -}; - -template<> -struct Packet_Fixed<0x0065> -{ - static const uint16_t PACKET_ID = 0x0065; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint32_t login_id1 = {}; - uint32_t login_id2 = {}; - uint16_t packet_tmw_version = {}; - SEX sex = {}; -}; - -template<> -struct Packet_Fixed<0x0066> -{ - static const uint16_t PACKET_ID = 0x0066; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t code = {}; -}; - -template<> -struct Packet_Fixed<0x0067> -{ - static const uint16_t PACKET_ID = 0x0067; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - CharName char_name = {}; - Stats6 stats = {}; - uint8_t slot = {}; - uint16_t hair_color = {}; - uint16_t hair_style = {}; -}; - -template<> -struct Packet_Fixed<0x0068> -{ - static const uint16_t PACKET_ID = 0x0068; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - CharId char_id = {}; - AccountEmail email = {}; -}; - -template<> -struct Packet_Head<0x006b> -{ - static const uint16_t PACKET_ID = 0x006b; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - VString<19> unused = {}; -}; -template<> -struct Packet_Repeat<0x006b> -{ - static const uint16_t PACKET_ID = 0x006b; - - CharSelect char_select = {}; -}; - -template<> -struct Packet_Fixed<0x006c> -{ - static const uint16_t PACKET_ID = 0x006c; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t code = {}; -}; - -template<> -struct Packet_Fixed<0x006d> -{ - static const uint16_t PACKET_ID = 0x006d; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - CharSelect char_select = {}; -}; - -template<> -struct Packet_Fixed<0x006e> -{ - static const uint16_t PACKET_ID = 0x006e; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t code = {}; -}; - -template<> -struct Packet_Fixed<0x006f> -{ - static const uint16_t PACKET_ID = 0x006f; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x0070> -{ - static const uint16_t PACKET_ID = 0x0070; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t code = {}; -}; - -template<> -struct Packet_Fixed<0x0071> -{ - static const uint16_t PACKET_ID = 0x0071; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - CharId char_id = {}; - MapName map_name = {}; - IP4Address ip = {}; - uint16_t port = {}; -}; - - -template<> -struct NetPacket_Fixed<0x0061> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountPass)> old_pass; - NetString<sizeof(AccountPass)> new_pass; -}; -static_assert(offsetof(NetPacket_Fixed<0x0061>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0061>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0061>, old_pass) == 2, "offsetof(NetPacket_Fixed<0x0061>, old_pass) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0061>, new_pass) == 26, "offsetof(NetPacket_Fixed<0x0061>, new_pass) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x0061>) == 50, "sizeof(NetPacket_Fixed<0x0061>) == 50"); -static_assert(alignof(NetPacket_Fixed<0x0061>) == 1, "alignof(NetPacket_Fixed<0x0061>) == 1"); - -template<> -struct NetPacket_Fixed<0x0062> -{ - Little16 magic_packet_id; - Byte status; -}; -static_assert(offsetof(NetPacket_Fixed<0x0062>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0062>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0062>, status) == 2, "offsetof(NetPacket_Fixed<0x0062>, status) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x0062>) == 3, "sizeof(NetPacket_Fixed<0x0062>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x0062>) == 1, "alignof(NetPacket_Fixed<0x0062>) == 1"); - -template<> -struct NetPacket_Fixed<0x0065> -{ - Little16 magic_packet_id; - Little32 account_id; - Little32 login_id1; - Little32 login_id2; - Little16 packet_tmw_version; - Byte sex; -}; -static_assert(offsetof(NetPacket_Fixed<0x0065>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0065>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0065>, account_id) == 2, "offsetof(NetPacket_Fixed<0x0065>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0065>, login_id1) == 6, "offsetof(NetPacket_Fixed<0x0065>, login_id1) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0065>, login_id2) == 10, "offsetof(NetPacket_Fixed<0x0065>, login_id2) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x0065>, packet_tmw_version) == 14, "offsetof(NetPacket_Fixed<0x0065>, packet_tmw_version) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x0065>, sex) == 16, "offsetof(NetPacket_Fixed<0x0065>, sex) == 16"); -static_assert(sizeof(NetPacket_Fixed<0x0065>) == 17, "sizeof(NetPacket_Fixed<0x0065>) == 17"); -static_assert(alignof(NetPacket_Fixed<0x0065>) == 1, "alignof(NetPacket_Fixed<0x0065>) == 1"); - -template<> -struct NetPacket_Fixed<0x0066> -{ - Little16 magic_packet_id; - Byte code; -}; -static_assert(offsetof(NetPacket_Fixed<0x0066>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0066>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0066>, code) == 2, "offsetof(NetPacket_Fixed<0x0066>, code) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x0066>) == 3, "sizeof(NetPacket_Fixed<0x0066>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x0066>) == 1, "alignof(NetPacket_Fixed<0x0066>) == 1"); - -template<> -struct NetPacket_Fixed<0x0067> -{ - Little16 magic_packet_id; - NetString<sizeof(CharName)> char_name; - NetStats6 stats; - Byte slot; - Little16 hair_color; - Little16 hair_style; -}; -static_assert(offsetof(NetPacket_Fixed<0x0067>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0067>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0067>, char_name) == 2, "offsetof(NetPacket_Fixed<0x0067>, char_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0067>, stats) == 26, "offsetof(NetPacket_Fixed<0x0067>, stats) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x0067>, slot) == 32, "offsetof(NetPacket_Fixed<0x0067>, slot) == 32"); -static_assert(offsetof(NetPacket_Fixed<0x0067>, hair_color) == 33, "offsetof(NetPacket_Fixed<0x0067>, hair_color) == 33"); -static_assert(offsetof(NetPacket_Fixed<0x0067>, hair_style) == 35, "offsetof(NetPacket_Fixed<0x0067>, hair_style) == 35"); -static_assert(sizeof(NetPacket_Fixed<0x0067>) == 37, "sizeof(NetPacket_Fixed<0x0067>) == 37"); -static_assert(alignof(NetPacket_Fixed<0x0067>) == 1, "alignof(NetPacket_Fixed<0x0067>) == 1"); - -template<> -struct NetPacket_Fixed<0x0068> -{ - Little16 magic_packet_id; - Little32 char_id; - NetString<sizeof(AccountEmail)> email; -}; -static_assert(offsetof(NetPacket_Fixed<0x0068>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0068>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0068>, char_id) == 2, "offsetof(NetPacket_Fixed<0x0068>, char_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0068>, email) == 6, "offsetof(NetPacket_Fixed<0x0068>, email) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x0068>) == 46, "sizeof(NetPacket_Fixed<0x0068>) == 46"); -static_assert(alignof(NetPacket_Fixed<0x0068>) == 1, "alignof(NetPacket_Fixed<0x0068>) == 1"); - -template<> -struct NetPacket_Head<0x006b> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - NetString<sizeof(VString<19>)> unused; -}; -static_assert(offsetof(NetPacket_Head<0x006b>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x006b>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x006b>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x006b>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x006b>, unused) == 4, "offsetof(NetPacket_Head<0x006b>, unused) == 4"); -static_assert(sizeof(NetPacket_Head<0x006b>) == 24, "sizeof(NetPacket_Head<0x006b>) == 24"); -static_assert(alignof(NetPacket_Head<0x006b>) == 1, "alignof(NetPacket_Head<0x006b>) == 1"); -template<> -struct NetPacket_Repeat<0x006b> -{ - NetCharSelect char_select; -}; -static_assert(offsetof(NetPacket_Repeat<0x006b>, char_select) == 0, "offsetof(NetPacket_Repeat<0x006b>, char_select) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x006b>) == 106, "sizeof(NetPacket_Repeat<0x006b>) == 106"); -static_assert(alignof(NetPacket_Repeat<0x006b>) == 1, "alignof(NetPacket_Repeat<0x006b>) == 1"); - -template<> -struct NetPacket_Fixed<0x006c> -{ - Little16 magic_packet_id; - Byte code; -}; -static_assert(offsetof(NetPacket_Fixed<0x006c>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x006c>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x006c>, code) == 2, "offsetof(NetPacket_Fixed<0x006c>, code) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x006c>) == 3, "sizeof(NetPacket_Fixed<0x006c>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x006c>) == 1, "alignof(NetPacket_Fixed<0x006c>) == 1"); - -template<> -struct NetPacket_Fixed<0x006d> -{ - Little16 magic_packet_id; - NetCharSelect char_select; -}; -static_assert(offsetof(NetPacket_Fixed<0x006d>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x006d>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x006d>, char_select) == 2, "offsetof(NetPacket_Fixed<0x006d>, char_select) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x006d>) == 108, "sizeof(NetPacket_Fixed<0x006d>) == 108"); -static_assert(alignof(NetPacket_Fixed<0x006d>) == 1, "alignof(NetPacket_Fixed<0x006d>) == 1"); - -template<> -struct NetPacket_Fixed<0x006e> -{ - Little16 magic_packet_id; - Byte code; -}; -static_assert(offsetof(NetPacket_Fixed<0x006e>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x006e>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x006e>, code) == 2, "offsetof(NetPacket_Fixed<0x006e>, code) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x006e>) == 3, "sizeof(NetPacket_Fixed<0x006e>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x006e>) == 1, "alignof(NetPacket_Fixed<0x006e>) == 1"); - -template<> -struct NetPacket_Fixed<0x006f> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x006f>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x006f>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x006f>) == 2, "sizeof(NetPacket_Fixed<0x006f>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x006f>) == 1, "alignof(NetPacket_Fixed<0x006f>) == 1"); - -template<> -struct NetPacket_Fixed<0x0070> -{ - Little16 magic_packet_id; - Byte code; -}; -static_assert(offsetof(NetPacket_Fixed<0x0070>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0070>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0070>, code) == 2, "offsetof(NetPacket_Fixed<0x0070>, code) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x0070>) == 3, "sizeof(NetPacket_Fixed<0x0070>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x0070>) == 1, "alignof(NetPacket_Fixed<0x0070>) == 1"); - -template<> -struct NetPacket_Fixed<0x0071> -{ - Little16 magic_packet_id; - Little32 char_id; - NetString<sizeof(MapName)> map_name; - IP4Address ip; - Little16 port; -}; -static_assert(offsetof(NetPacket_Fixed<0x0071>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0071>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0071>, char_id) == 2, "offsetof(NetPacket_Fixed<0x0071>, char_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0071>, map_name) == 6, "offsetof(NetPacket_Fixed<0x0071>, map_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0071>, ip) == 22, "offsetof(NetPacket_Fixed<0x0071>, ip) == 22"); -static_assert(offsetof(NetPacket_Fixed<0x0071>, port) == 26, "offsetof(NetPacket_Fixed<0x0071>, port) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x0071>) == 28, "sizeof(NetPacket_Fixed<0x0071>) == 28"); -static_assert(alignof(NetPacket_Fixed<0x0071>) == 1, "alignof(NetPacket_Fixed<0x0071>) == 1"); - - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0061> *network, Packet_Fixed<0x0061> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->old_pass, native.old_pass); - rv &= native_to_network(&network->new_pass, native.new_pass); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0061> *native, NetPacket_Fixed<0x0061> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->old_pass, network.old_pass); - rv &= network_to_native(&native->new_pass, network.new_pass); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0062> *network, Packet_Fixed<0x0062> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->status, native.status); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0062> *native, NetPacket_Fixed<0x0062> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->status, network.status); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0065> *network, Packet_Fixed<0x0065> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->login_id1, native.login_id1); - rv &= native_to_network(&network->login_id2, native.login_id2); - rv &= native_to_network(&network->packet_tmw_version, native.packet_tmw_version); - rv &= native_to_network(&network->sex, native.sex); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0065> *native, NetPacket_Fixed<0x0065> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->login_id1, network.login_id1); - rv &= network_to_native(&native->login_id2, network.login_id2); - rv &= network_to_native(&native->packet_tmw_version, network.packet_tmw_version); - rv &= network_to_native(&native->sex, network.sex); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0066> *network, Packet_Fixed<0x0066> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->code, native.code); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0066> *native, NetPacket_Fixed<0x0066> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->code, network.code); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0067> *network, Packet_Fixed<0x0067> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->char_name, native.char_name); - rv &= native_to_network(&network->stats, native.stats); - rv &= native_to_network(&network->slot, native.slot); - rv &= native_to_network(&network->hair_color, native.hair_color); - rv &= native_to_network(&network->hair_style, native.hair_style); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0067> *native, NetPacket_Fixed<0x0067> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->char_name, network.char_name); - rv &= network_to_native(&native->stats, network.stats); - rv &= network_to_native(&native->slot, network.slot); - rv &= network_to_native(&native->hair_color, network.hair_color); - rv &= network_to_native(&native->hair_style, network.hair_style); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0068> *network, Packet_Fixed<0x0068> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->char_id, native.char_id); - rv &= native_to_network(&network->email, native.email); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0068> *native, NetPacket_Fixed<0x0068> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->char_id, network.char_id); - rv &= network_to_native(&native->email, network.email); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x006b> *network, Packet_Head<0x006b> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->unused, native.unused); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x006b> *native, NetPacket_Head<0x006b> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->unused, network.unused); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x006b> *network, Packet_Repeat<0x006b> native) -{ - bool rv = true; - rv &= native_to_network(&network->char_select, native.char_select); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x006b> *native, NetPacket_Repeat<0x006b> network) -{ - bool rv = true; - rv &= network_to_native(&native->char_select, network.char_select); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x006c> *network, Packet_Fixed<0x006c> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->code, native.code); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x006c> *native, NetPacket_Fixed<0x006c> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->code, network.code); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x006d> *network, Packet_Fixed<0x006d> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->char_select, native.char_select); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x006d> *native, NetPacket_Fixed<0x006d> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->char_select, network.char_select); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x006e> *network, Packet_Fixed<0x006e> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->code, native.code); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x006e> *native, NetPacket_Fixed<0x006e> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->code, network.code); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x006f> *network, Packet_Fixed<0x006f> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x006f> *native, NetPacket_Fixed<0x006f> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0070> *network, Packet_Fixed<0x0070> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->code, native.code); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0070> *native, NetPacket_Fixed<0x0070> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->code, network.code); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0071> *network, Packet_Fixed<0x0071> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->char_id, native.char_id); - rv &= native_to_network(&network->map_name, native.map_name); - rv &= native_to_network(&network->ip, native.ip); - rv &= native_to_network(&network->port, native.port); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0071> *native, NetPacket_Fixed<0x0071> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->char_id, network.char_id); - rv &= network_to_native(&native->map_name, network.map_name); - rv &= network_to_native(&native->ip, network.ip); - rv &= network_to_native(&native->port, network.port); - return rv; -} - -} // namespace tmwa diff --git a/src/proto2/char-user_test.cpp b/src/proto2/char-user_test.cpp deleted file mode 100644 index ade1843..0000000 --- a/src/proto2/char-user_test.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "char-user.hpp" -// char-user_test.cpp - TMWA network protocol: char/user -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "../poison.hpp" - -namespace tmwa -{ -} // namespace tmwa diff --git a/src/proto2/fwd.hpp b/src/proto2/fwd.hpp deleted file mode 100644 index e1e0161..0000000 --- a/src/proto2/fwd.hpp +++ /dev/null @@ -1,1713 +0,0 @@ -#pragma once -// proto2/fwd.hpp - Forward declarations of network packets -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../sanity.hpp" - -#include <cstdint> - -namespace tmwa -{ -template<uint16_t PACKET_ID> class Packet_Fixed; -template<uint16_t PACKET_ID> class NetPacket_Fixed; -template<uint16_t PACKET_ID> class Packet_Payload; -template<uint16_t PACKET_ID> class NetPacket_Payload; -template<uint16_t PACKET_ID> class Packet_Head; -template<uint16_t PACKET_ID> class NetPacket_Head; -template<uint16_t PACKET_ID> class Packet_Repeat; -template<uint16_t PACKET_ID> class NetPacket_Repeat; -template<uint16_t PACKET_ID> class Packet_Option; -template<uint16_t PACKET_ID> class NetPacket_Option; - -template<> -struct Packet_Fixed<0x2709>; -template<> -struct NetPacket_Fixed<0x2709>; - -template<> -struct Packet_Fixed<0x2710>; -template<> -struct NetPacket_Fixed<0x2710>; - -template<> -struct Packet_Fixed<0x2711>; -template<> -struct NetPacket_Fixed<0x2711>; - -template<> -struct Packet_Fixed<0x2712>; -template<> -struct NetPacket_Fixed<0x2712>; - -template<> -struct Packet_Fixed<0x2713>; -template<> -struct NetPacket_Fixed<0x2713>; - -template<> -struct Packet_Fixed<0x2714>; -template<> -struct NetPacket_Fixed<0x2714>; - -template<> -struct Packet_Fixed<0x2716>; -template<> -struct NetPacket_Fixed<0x2716>; - -template<> -struct Packet_Fixed<0x2717>; -template<> -struct NetPacket_Fixed<0x2717>; - -template<> -struct Packet_Head<0x2720>; -template<> -struct NetPacket_Head<0x2720>; -template<> -struct Packet_Repeat<0x2720>; -template<> -struct NetPacket_Repeat<0x2720>; - -template<> -struct Packet_Fixed<0x2721>; -template<> -struct NetPacket_Fixed<0x2721>; - -template<> -struct Packet_Fixed<0x2722>; -template<> -struct NetPacket_Fixed<0x2722>; - -template<> -struct Packet_Fixed<0x2723>; -template<> -struct NetPacket_Fixed<0x2723>; - -template<> -struct Packet_Fixed<0x2724>; -template<> -struct NetPacket_Fixed<0x2724>; - -template<> -struct Packet_Fixed<0x2725>; -template<> -struct NetPacket_Fixed<0x2725>; - -template<> -struct Packet_Fixed<0x2727>; -template<> -struct NetPacket_Fixed<0x2727>; - -template<> -struct Packet_Head<0x2728>; -template<> -struct NetPacket_Head<0x2728>; -template<> -struct Packet_Repeat<0x2728>; -template<> -struct NetPacket_Repeat<0x2728>; - -template<> -struct Packet_Head<0x2729>; -template<> -struct NetPacket_Head<0x2729>; -template<> -struct Packet_Repeat<0x2729>; -template<> -struct NetPacket_Repeat<0x2729>; - -template<> -struct Packet_Fixed<0x272a>; -template<> -struct NetPacket_Fixed<0x272a>; - -template<> -struct Packet_Fixed<0x2730>; -template<> -struct NetPacket_Fixed<0x2730>; - -template<> -struct Packet_Fixed<0x2731>; -template<> -struct NetPacket_Fixed<0x2731>; - -template<> -struct Packet_Head<0x2732>; -template<> -struct NetPacket_Head<0x2732>; -template<> -struct Packet_Repeat<0x2732>; -template<> -struct NetPacket_Repeat<0x2732>; - -template<> -struct Packet_Fixed<0x2740>; -template<> -struct NetPacket_Fixed<0x2740>; - -template<> -struct Packet_Fixed<0x2741>; -template<> -struct NetPacket_Fixed<0x2741>; - - -template<> -struct Packet_Head<0x2726>; -template<> -struct NetPacket_Head<0x2726>; -template<> -struct Packet_Repeat<0x2726>; -template<> -struct NetPacket_Repeat<0x2726>; - -template<> -struct Packet_Fixed<0x7918>; -template<> -struct NetPacket_Fixed<0x7918>; - -template<> -struct Packet_Fixed<0x7919>; -template<> -struct NetPacket_Fixed<0x7919>; - -template<> -struct Packet_Fixed<0x7920>; -template<> -struct NetPacket_Fixed<0x7920>; - -template<> -struct Packet_Head<0x7921>; -template<> -struct NetPacket_Head<0x7921>; -template<> -struct Packet_Repeat<0x7921>; -template<> -struct NetPacket_Repeat<0x7921>; - -template<> -struct Packet_Fixed<0x7924>; -template<> -struct NetPacket_Fixed<0x7924>; - -template<> -struct Packet_Fixed<0x7925>; -template<> -struct NetPacket_Fixed<0x7925>; - -template<> -struct Packet_Fixed<0x7930>; -template<> -struct NetPacket_Fixed<0x7930>; - -template<> -struct Packet_Fixed<0x7931>; -template<> -struct NetPacket_Fixed<0x7931>; - -template<> -struct Packet_Fixed<0x7932>; -template<> -struct NetPacket_Fixed<0x7932>; - -template<> -struct Packet_Fixed<0x7933>; -template<> -struct NetPacket_Fixed<0x7933>; - -template<> -struct Packet_Fixed<0x7934>; -template<> -struct NetPacket_Fixed<0x7934>; - -template<> -struct Packet_Fixed<0x7935>; -template<> -struct NetPacket_Fixed<0x7935>; - -template<> -struct Packet_Fixed<0x7936>; -template<> -struct NetPacket_Fixed<0x7936>; - -template<> -struct Packet_Fixed<0x7937>; -template<> -struct NetPacket_Fixed<0x7937>; - -template<> -struct Packet_Fixed<0x7938>; -template<> -struct NetPacket_Fixed<0x7938>; - -template<> -struct Packet_Head<0x7939>; -template<> -struct NetPacket_Head<0x7939>; -template<> -struct Packet_Repeat<0x7939>; -template<> -struct NetPacket_Repeat<0x7939>; - -template<> -struct Packet_Fixed<0x793a>; -template<> -struct NetPacket_Fixed<0x793a>; - -template<> -struct Packet_Fixed<0x793b>; -template<> -struct NetPacket_Fixed<0x793b>; - -template<> -struct Packet_Fixed<0x793c>; -template<> -struct NetPacket_Fixed<0x793c>; - -template<> -struct Packet_Fixed<0x793d>; -template<> -struct NetPacket_Fixed<0x793d>; - -template<> -struct Packet_Fixed<0x793e>; -template<> -struct NetPacket_Fixed<0x793e>; - -template<> -struct Packet_Fixed<0x793f>; -template<> -struct NetPacket_Fixed<0x793f>; - -template<> -struct Packet_Fixed<0x7940>; -template<> -struct NetPacket_Fixed<0x7940>; - -template<> -struct Packet_Fixed<0x7941>; -template<> -struct NetPacket_Fixed<0x7941>; - -template<> -struct Packet_Head<0x7942>; -template<> -struct NetPacket_Head<0x7942>; -template<> -struct Packet_Repeat<0x7942>; -template<> -struct NetPacket_Repeat<0x7942>; - -template<> -struct Packet_Fixed<0x7943>; -template<> -struct NetPacket_Fixed<0x7943>; - -template<> -struct Packet_Fixed<0x7944>; -template<> -struct NetPacket_Fixed<0x7944>; - -template<> -struct Packet_Fixed<0x7945>; -template<> -struct NetPacket_Fixed<0x7945>; - -template<> -struct Packet_Fixed<0x7946>; -template<> -struct NetPacket_Fixed<0x7946>; - -template<> -struct Packet_Fixed<0x7947>; -template<> -struct NetPacket_Fixed<0x7947>; - -template<> -struct Packet_Fixed<0x7948>; -template<> -struct NetPacket_Fixed<0x7948>; - -template<> -struct Packet_Fixed<0x7949>; -template<> -struct NetPacket_Fixed<0x7949>; - -template<> -struct Packet_Fixed<0x794a>; -template<> -struct NetPacket_Fixed<0x794a>; - -template<> -struct Packet_Fixed<0x794b>; -template<> -struct NetPacket_Fixed<0x794b>; - -template<> -struct Packet_Fixed<0x794c>; -template<> -struct NetPacket_Fixed<0x794c>; - -template<> -struct Packet_Fixed<0x794d>; -template<> -struct NetPacket_Fixed<0x794d>; - -template<> -struct Packet_Head<0x794e>; -template<> -struct NetPacket_Head<0x794e>; -template<> -struct Packet_Repeat<0x794e>; -template<> -struct NetPacket_Repeat<0x794e>; - -template<> -struct Packet_Fixed<0x794f>; -template<> -struct NetPacket_Fixed<0x794f>; - -template<> -struct Packet_Fixed<0x7950>; -template<> -struct NetPacket_Fixed<0x7950>; - -template<> -struct Packet_Fixed<0x7951>; -template<> -struct NetPacket_Fixed<0x7951>; - -template<> -struct Packet_Fixed<0x7952>; -template<> -struct NetPacket_Fixed<0x7952>; - -template<> -struct Packet_Head<0x7953>; -template<> -struct NetPacket_Head<0x7953>; -template<> -struct Packet_Repeat<0x7953>; -template<> -struct NetPacket_Repeat<0x7953>; - -template<> -struct Packet_Fixed<0x7954>; -template<> -struct NetPacket_Fixed<0x7954>; - -template<> -struct Packet_Fixed<0x7955>; -template<> -struct NetPacket_Fixed<0x7955>; - - -template<> -struct Packet_Head<0x0063>; -template<> -struct NetPacket_Head<0x0063>; -template<> -struct Packet_Repeat<0x0063>; -template<> -struct NetPacket_Repeat<0x0063>; - -template<> -struct Packet_Fixed<0x0064>; -template<> -struct NetPacket_Fixed<0x0064>; - -template<> -struct Packet_Head<0x0069>; -template<> -struct NetPacket_Head<0x0069>; -template<> -struct Packet_Repeat<0x0069>; -template<> -struct NetPacket_Repeat<0x0069>; - -template<> -struct Packet_Fixed<0x006a>; -template<> -struct NetPacket_Fixed<0x006a>; - - -template<> -struct Packet_Fixed<0x2af7>; -template<> -struct NetPacket_Fixed<0x2af7>; - -template<> -struct Packet_Fixed<0x2af8>; -template<> -struct NetPacket_Fixed<0x2af8>; - -template<> -struct Packet_Fixed<0x2af9>; -template<> -struct NetPacket_Fixed<0x2af9>; - -template<> -struct Packet_Head<0x2afa>; -template<> -struct NetPacket_Head<0x2afa>; -template<> -struct Packet_Repeat<0x2afa>; -template<> -struct NetPacket_Repeat<0x2afa>; - -template<> -struct Packet_Fixed<0x2afa>; -template<> -struct NetPacket_Fixed<0x2afa>; - -template<> -struct Packet_Fixed<0x2afb>; -template<> -struct NetPacket_Fixed<0x2afb>; - -template<> -struct Packet_Fixed<0x2afc>; -template<> -struct NetPacket_Fixed<0x2afc>; - -template<> -struct Packet_Payload<0x2afd>; -template<> -struct NetPacket_Payload<0x2afd>; - -template<> -struct Packet_Fixed<0x2afe>; -template<> -struct NetPacket_Fixed<0x2afe>; - -template<> -struct Packet_Head<0x2aff>; -template<> -struct NetPacket_Head<0x2aff>; -template<> -struct Packet_Repeat<0x2aff>; -template<> -struct NetPacket_Repeat<0x2aff>; - -template<> -struct Packet_Fixed<0x2b00>; -template<> -struct NetPacket_Fixed<0x2b00>; - -template<> -struct Packet_Payload<0x2b01>; -template<> -struct NetPacket_Payload<0x2b01>; - -template<> -struct Packet_Fixed<0x2b02>; -template<> -struct NetPacket_Fixed<0x2b02>; - -template<> -struct Packet_Fixed<0x2b03>; -template<> -struct NetPacket_Fixed<0x2b03>; - -template<> -struct Packet_Head<0x2b04>; -template<> -struct NetPacket_Head<0x2b04>; -template<> -struct Packet_Repeat<0x2b04>; -template<> -struct NetPacket_Repeat<0x2b04>; - -template<> -struct Packet_Fixed<0x2b05>; -template<> -struct NetPacket_Fixed<0x2b05>; - -template<> -struct Packet_Fixed<0x2b06>; -template<> -struct NetPacket_Fixed<0x2b06>; - -template<> -struct Packet_Head<0x2b0a>; -template<> -struct NetPacket_Head<0x2b0a>; -template<> -struct Packet_Repeat<0x2b0a>; -template<> -struct NetPacket_Repeat<0x2b0a>; - -template<> -struct Packet_Fixed<0x2b0b>; -template<> -struct NetPacket_Fixed<0x2b0b>; - -template<> -struct Packet_Fixed<0x2b0c>; -template<> -struct NetPacket_Fixed<0x2b0c>; - -template<> -struct Packet_Fixed<0x2b0d>; -template<> -struct NetPacket_Fixed<0x2b0d>; - -template<> -struct Packet_Fixed<0x2b0e>; -template<> -struct NetPacket_Fixed<0x2b0e>; - -template<> -struct Packet_Fixed<0x2b0f>; -template<> -struct NetPacket_Fixed<0x2b0f>; - -template<> -struct Packet_Head<0x2b10>; -template<> -struct NetPacket_Head<0x2b10>; -template<> -struct Packet_Repeat<0x2b10>; -template<> -struct NetPacket_Repeat<0x2b10>; - -template<> -struct Packet_Head<0x2b11>; -template<> -struct NetPacket_Head<0x2b11>; -template<> -struct Packet_Repeat<0x2b11>; -template<> -struct NetPacket_Repeat<0x2b11>; - -template<> -struct Packet_Fixed<0x2b12>; -template<> -struct NetPacket_Fixed<0x2b12>; - -template<> -struct Packet_Fixed<0x2b13>; -template<> -struct NetPacket_Fixed<0x2b13>; - -template<> -struct Packet_Fixed<0x2b14>; -template<> -struct NetPacket_Fixed<0x2b14>; - -template<> -struct Packet_Head<0x2b15>; -template<> -struct NetPacket_Head<0x2b15>; -template<> -struct Packet_Repeat<0x2b15>; -template<> -struct NetPacket_Repeat<0x2b15>; - -template<> -struct Packet_Fixed<0x2b16>; -template<> -struct NetPacket_Fixed<0x2b16>; - -template<> -struct Packet_Head<0x3000>; -template<> -struct NetPacket_Head<0x3000>; -template<> -struct Packet_Repeat<0x3000>; -template<> -struct NetPacket_Repeat<0x3000>; - -template<> -struct Packet_Head<0x3001>; -template<> -struct NetPacket_Head<0x3001>; -template<> -struct Packet_Repeat<0x3001>; -template<> -struct NetPacket_Repeat<0x3001>; - -template<> -struct Packet_Fixed<0x3002>; -template<> -struct NetPacket_Fixed<0x3002>; - -template<> -struct Packet_Head<0x3003>; -template<> -struct NetPacket_Head<0x3003>; -template<> -struct Packet_Repeat<0x3003>; -template<> -struct NetPacket_Repeat<0x3003>; - -template<> -struct Packet_Head<0x3004>; -template<> -struct NetPacket_Head<0x3004>; -template<> -struct Packet_Repeat<0x3004>; -template<> -struct NetPacket_Repeat<0x3004>; - -template<> -struct Packet_Fixed<0x3005>; -template<> -struct NetPacket_Fixed<0x3005>; - -template<> -struct Packet_Fixed<0x3010>; -template<> -struct NetPacket_Fixed<0x3010>; - -template<> -struct Packet_Payload<0x3011>; -template<> -struct NetPacket_Payload<0x3011>; - -template<> -struct Packet_Fixed<0x3020>; -template<> -struct NetPacket_Fixed<0x3020>; - -template<> -struct Packet_Fixed<0x3021>; -template<> -struct NetPacket_Fixed<0x3021>; - -template<> -struct Packet_Fixed<0x3022>; -template<> -struct NetPacket_Fixed<0x3022>; - -template<> -struct Packet_Fixed<0x3023>; -template<> -struct NetPacket_Fixed<0x3023>; - -template<> -struct Packet_Fixed<0x3024>; -template<> -struct NetPacket_Fixed<0x3024>; - -template<> -struct Packet_Fixed<0x3025>; -template<> -struct NetPacket_Fixed<0x3025>; - -template<> -struct Packet_Head<0x3027>; -template<> -struct NetPacket_Head<0x3027>; -template<> -struct Packet_Repeat<0x3027>; -template<> -struct NetPacket_Repeat<0x3027>; - -template<> -struct Packet_Fixed<0x3028>; -template<> -struct NetPacket_Fixed<0x3028>; - -template<> -struct Packet_Head<0x3800>; -template<> -struct NetPacket_Head<0x3800>; -template<> -struct Packet_Repeat<0x3800>; -template<> -struct NetPacket_Repeat<0x3800>; - -template<> -struct Packet_Head<0x3801>; -template<> -struct NetPacket_Head<0x3801>; -template<> -struct Packet_Repeat<0x3801>; -template<> -struct NetPacket_Repeat<0x3801>; - -template<> -struct Packet_Fixed<0x3802>; -template<> -struct NetPacket_Fixed<0x3802>; - -template<> -struct Packet_Head<0x3803>; -template<> -struct NetPacket_Head<0x3803>; -template<> -struct Packet_Repeat<0x3803>; -template<> -struct NetPacket_Repeat<0x3803>; - -template<> -struct Packet_Head<0x3804>; -template<> -struct NetPacket_Head<0x3804>; -template<> -struct Packet_Repeat<0x3804>; -template<> -struct NetPacket_Repeat<0x3804>; - -template<> -struct Packet_Payload<0x3810>; -template<> -struct NetPacket_Payload<0x3810>; - -template<> -struct Packet_Fixed<0x3811>; -template<> -struct NetPacket_Fixed<0x3811>; - -template<> -struct Packet_Fixed<0x3820>; -template<> -struct NetPacket_Fixed<0x3820>; - -template<> -struct Packet_Head<0x3821>; -template<> -struct NetPacket_Head<0x3821>; -template<> -struct Packet_Option<0x3821>; -template<> -struct NetPacket_Option<0x3821>; - -template<> -struct Packet_Fixed<0x3822>; -template<> -struct NetPacket_Fixed<0x3822>; - -template<> -struct Packet_Fixed<0x3823>; -template<> -struct NetPacket_Fixed<0x3823>; - -template<> -struct Packet_Fixed<0x3824>; -template<> -struct NetPacket_Fixed<0x3824>; - -template<> -struct Packet_Fixed<0x3825>; -template<> -struct NetPacket_Fixed<0x3825>; - -template<> -struct Packet_Fixed<0x3826>; -template<> -struct NetPacket_Fixed<0x3826>; - -template<> -struct Packet_Head<0x3827>; -template<> -struct NetPacket_Head<0x3827>; -template<> -struct Packet_Repeat<0x3827>; -template<> -struct NetPacket_Repeat<0x3827>; - - -template<> -struct Packet_Fixed<0x0061>; -template<> -struct NetPacket_Fixed<0x0061>; - -template<> -struct Packet_Fixed<0x0062>; -template<> -struct NetPacket_Fixed<0x0062>; - -template<> -struct Packet_Fixed<0x0065>; -template<> -struct NetPacket_Fixed<0x0065>; - -template<> -struct Packet_Fixed<0x0066>; -template<> -struct NetPacket_Fixed<0x0066>; - -template<> -struct Packet_Fixed<0x0067>; -template<> -struct NetPacket_Fixed<0x0067>; - -template<> -struct Packet_Fixed<0x0068>; -template<> -struct NetPacket_Fixed<0x0068>; - -template<> -struct Packet_Head<0x006b>; -template<> -struct NetPacket_Head<0x006b>; -template<> -struct Packet_Repeat<0x006b>; -template<> -struct NetPacket_Repeat<0x006b>; - -template<> -struct Packet_Fixed<0x006c>; -template<> -struct NetPacket_Fixed<0x006c>; - -template<> -struct Packet_Fixed<0x006d>; -template<> -struct NetPacket_Fixed<0x006d>; - -template<> -struct Packet_Fixed<0x006e>; -template<> -struct NetPacket_Fixed<0x006e>; - -template<> -struct Packet_Fixed<0x006f>; -template<> -struct NetPacket_Fixed<0x006f>; - -template<> -struct Packet_Fixed<0x0070>; -template<> -struct NetPacket_Fixed<0x0070>; - -template<> -struct Packet_Fixed<0x0071>; -template<> -struct NetPacket_Fixed<0x0071>; - - -template<> -struct Packet_Fixed<0x0072>; -template<> -struct NetPacket_Fixed<0x0072>; - -template<> -struct Packet_Fixed<0x0073>; -template<> -struct NetPacket_Fixed<0x0073>; - -template<> -struct Packet_Fixed<0x0078>; -template<> -struct NetPacket_Fixed<0x0078>; - -template<> -struct Packet_Fixed<0x007b>; -template<> -struct NetPacket_Fixed<0x007b>; - -template<> -struct Packet_Fixed<0x007c>; -template<> -struct NetPacket_Fixed<0x007c>; - -template<> -struct Packet_Fixed<0x007d>; -template<> -struct NetPacket_Fixed<0x007d>; - -template<> -struct Packet_Fixed<0x007e>; -template<> -struct NetPacket_Fixed<0x007e>; - -template<> -struct Packet_Fixed<0x007f>; -template<> -struct NetPacket_Fixed<0x007f>; - -template<> -struct Packet_Fixed<0x0080>; -template<> -struct NetPacket_Fixed<0x0080>; - -template<> -struct Packet_Fixed<0x0085>; -template<> -struct NetPacket_Fixed<0x0085>; - -template<> -struct Packet_Fixed<0x0087>; -template<> -struct NetPacket_Fixed<0x0087>; - -template<> -struct Packet_Fixed<0x0088>; -template<> -struct NetPacket_Fixed<0x0088>; - -template<> -struct Packet_Fixed<0x0089>; -template<> -struct NetPacket_Fixed<0x0089>; - -template<> -struct Packet_Fixed<0x008a>; -template<> -struct NetPacket_Fixed<0x008a>; - -template<> -struct Packet_Head<0x008c>; -template<> -struct NetPacket_Head<0x008c>; -template<> -struct Packet_Repeat<0x008c>; -template<> -struct NetPacket_Repeat<0x008c>; - -template<> -struct Packet_Head<0x008d>; -template<> -struct NetPacket_Head<0x008d>; -template<> -struct Packet_Repeat<0x008d>; -template<> -struct NetPacket_Repeat<0x008d>; - -template<> -struct Packet_Head<0x008e>; -template<> -struct NetPacket_Head<0x008e>; -template<> -struct Packet_Repeat<0x008e>; -template<> -struct NetPacket_Repeat<0x008e>; - -template<> -struct Packet_Fixed<0x0090>; -template<> -struct NetPacket_Fixed<0x0090>; - -template<> -struct Packet_Fixed<0x0091>; -template<> -struct NetPacket_Fixed<0x0091>; - -template<> -struct Packet_Fixed<0x0092>; -template<> -struct NetPacket_Fixed<0x0092>; - -template<> -struct Packet_Fixed<0x0094>; -template<> -struct NetPacket_Fixed<0x0094>; - -template<> -struct Packet_Fixed<0x0095>; -template<> -struct NetPacket_Fixed<0x0095>; - -template<> -struct Packet_Head<0x0096>; -template<> -struct NetPacket_Head<0x0096>; -template<> -struct Packet_Repeat<0x0096>; -template<> -struct NetPacket_Repeat<0x0096>; - -template<> -struct Packet_Head<0x0097>; -template<> -struct NetPacket_Head<0x0097>; -template<> -struct Packet_Repeat<0x0097>; -template<> -struct NetPacket_Repeat<0x0097>; - -template<> -struct Packet_Fixed<0x0098>; -template<> -struct NetPacket_Fixed<0x0098>; - -template<> -struct Packet_Head<0x009a>; -template<> -struct NetPacket_Head<0x009a>; -template<> -struct Packet_Repeat<0x009a>; -template<> -struct NetPacket_Repeat<0x009a>; - -template<> -struct Packet_Fixed<0x009b>; -template<> -struct NetPacket_Fixed<0x009b>; - -template<> -struct Packet_Fixed<0x009c>; -template<> -struct NetPacket_Fixed<0x009c>; - -template<> -struct Packet_Fixed<0x009d>; -template<> -struct NetPacket_Fixed<0x009d>; - -template<> -struct Packet_Fixed<0x009e>; -template<> -struct NetPacket_Fixed<0x009e>; - -template<> -struct Packet_Fixed<0x009f>; -template<> -struct NetPacket_Fixed<0x009f>; - -template<> -struct Packet_Fixed<0x00a0>; -template<> -struct NetPacket_Fixed<0x00a0>; - -template<> -struct Packet_Fixed<0x00a1>; -template<> -struct NetPacket_Fixed<0x00a1>; - -template<> -struct Packet_Fixed<0x00a2>; -template<> -struct NetPacket_Fixed<0x00a2>; - -template<> -struct Packet_Head<0x00a4>; -template<> -struct NetPacket_Head<0x00a4>; -template<> -struct Packet_Repeat<0x00a4>; -template<> -struct NetPacket_Repeat<0x00a4>; - -template<> -struct Packet_Head<0x00a6>; -template<> -struct NetPacket_Head<0x00a6>; -template<> -struct Packet_Repeat<0x00a6>; -template<> -struct NetPacket_Repeat<0x00a6>; - -template<> -struct Packet_Fixed<0x00a7>; -template<> -struct NetPacket_Fixed<0x00a7>; - -template<> -struct Packet_Fixed<0x00a8>; -template<> -struct NetPacket_Fixed<0x00a8>; - -template<> -struct Packet_Fixed<0x00a9>; -template<> -struct NetPacket_Fixed<0x00a9>; - -template<> -struct Packet_Fixed<0x00aa>; -template<> -struct NetPacket_Fixed<0x00aa>; - -template<> -struct Packet_Fixed<0x00ab>; -template<> -struct NetPacket_Fixed<0x00ab>; - -template<> -struct Packet_Fixed<0x00ac>; -template<> -struct NetPacket_Fixed<0x00ac>; - -template<> -struct Packet_Fixed<0x00af>; -template<> -struct NetPacket_Fixed<0x00af>; - -template<> -struct Packet_Fixed<0x00b0>; -template<> -struct NetPacket_Fixed<0x00b0>; - -template<> -struct Packet_Fixed<0x00b1>; -template<> -struct NetPacket_Fixed<0x00b1>; - -template<> -struct Packet_Fixed<0x00b2>; -template<> -struct NetPacket_Fixed<0x00b2>; - -template<> -struct Packet_Fixed<0x00b3>; -template<> -struct NetPacket_Fixed<0x00b3>; - -template<> -struct Packet_Head<0x00b4>; -template<> -struct NetPacket_Head<0x00b4>; -template<> -struct Packet_Repeat<0x00b4>; -template<> -struct NetPacket_Repeat<0x00b4>; - -template<> -struct Packet_Fixed<0x00b5>; -template<> -struct NetPacket_Fixed<0x00b5>; - -template<> -struct Packet_Fixed<0x00b6>; -template<> -struct NetPacket_Fixed<0x00b6>; - -template<> -struct Packet_Head<0x00b7>; -template<> -struct NetPacket_Head<0x00b7>; -template<> -struct Packet_Repeat<0x00b7>; -template<> -struct NetPacket_Repeat<0x00b7>; - -template<> -struct Packet_Fixed<0x00b8>; -template<> -struct NetPacket_Fixed<0x00b8>; - -template<> -struct Packet_Fixed<0x00b9>; -template<> -struct NetPacket_Fixed<0x00b9>; - -template<> -struct Packet_Fixed<0x00bb>; -template<> -struct NetPacket_Fixed<0x00bb>; - -template<> -struct Packet_Fixed<0x00bc>; -template<> -struct NetPacket_Fixed<0x00bc>; - -template<> -struct Packet_Fixed<0x00bd>; -template<> -struct NetPacket_Fixed<0x00bd>; - -template<> -struct Packet_Fixed<0x00be>; -template<> -struct NetPacket_Fixed<0x00be>; - -template<> -struct Packet_Fixed<0x00bf>; -template<> -struct NetPacket_Fixed<0x00bf>; - -template<> -struct Packet_Fixed<0x00c0>; -template<> -struct NetPacket_Fixed<0x00c0>; - -template<> -struct Packet_Fixed<0x00c1>; -template<> -struct NetPacket_Fixed<0x00c1>; - -template<> -struct Packet_Fixed<0x00c2>; -template<> -struct NetPacket_Fixed<0x00c2>; - -template<> -struct Packet_Fixed<0x00c4>; -template<> -struct NetPacket_Fixed<0x00c4>; - -template<> -struct Packet_Fixed<0x00c5>; -template<> -struct NetPacket_Fixed<0x00c5>; - -template<> -struct Packet_Head<0x00c6>; -template<> -struct NetPacket_Head<0x00c6>; -template<> -struct Packet_Repeat<0x00c6>; -template<> -struct NetPacket_Repeat<0x00c6>; - -template<> -struct Packet_Head<0x00c7>; -template<> -struct NetPacket_Head<0x00c7>; -template<> -struct Packet_Repeat<0x00c7>; -template<> -struct NetPacket_Repeat<0x00c7>; - -template<> -struct Packet_Head<0x00c8>; -template<> -struct NetPacket_Head<0x00c8>; -template<> -struct Packet_Repeat<0x00c8>; -template<> -struct NetPacket_Repeat<0x00c8>; - -template<> -struct Packet_Head<0x00c9>; -template<> -struct NetPacket_Head<0x00c9>; -template<> -struct Packet_Repeat<0x00c9>; -template<> -struct NetPacket_Repeat<0x00c9>; - -template<> -struct Packet_Fixed<0x00ca>; -template<> -struct NetPacket_Fixed<0x00ca>; - -template<> -struct Packet_Fixed<0x00cb>; -template<> -struct NetPacket_Fixed<0x00cb>; - -template<> -struct Packet_Fixed<0x00cd>; -template<> -struct NetPacket_Fixed<0x00cd>; - -template<> -struct Packet_Fixed<0x00e4>; -template<> -struct NetPacket_Fixed<0x00e4>; - -template<> -struct Packet_Fixed<0x00e5>; -template<> -struct NetPacket_Fixed<0x00e5>; - -template<> -struct Packet_Fixed<0x00e6>; -template<> -struct NetPacket_Fixed<0x00e6>; - -template<> -struct Packet_Fixed<0x00e7>; -template<> -struct NetPacket_Fixed<0x00e7>; - -template<> -struct Packet_Fixed<0x00e8>; -template<> -struct NetPacket_Fixed<0x00e8>; - -template<> -struct Packet_Fixed<0x00e9>; -template<> -struct NetPacket_Fixed<0x00e9>; - -template<> -struct Packet_Fixed<0x00eb>; -template<> -struct NetPacket_Fixed<0x00eb>; - -template<> -struct Packet_Fixed<0x00ec>; -template<> -struct NetPacket_Fixed<0x00ec>; - -template<> -struct Packet_Fixed<0x00ed>; -template<> -struct NetPacket_Fixed<0x00ed>; - -template<> -struct Packet_Fixed<0x00ee>; -template<> -struct NetPacket_Fixed<0x00ee>; - -template<> -struct Packet_Fixed<0x00ef>; -template<> -struct NetPacket_Fixed<0x00ef>; - -template<> -struct Packet_Fixed<0x00f0>; -template<> -struct NetPacket_Fixed<0x00f0>; - -template<> -struct Packet_Fixed<0x00f2>; -template<> -struct NetPacket_Fixed<0x00f2>; - -template<> -struct Packet_Fixed<0x00f3>; -template<> -struct NetPacket_Fixed<0x00f3>; - -template<> -struct Packet_Fixed<0x00f4>; -template<> -struct NetPacket_Fixed<0x00f4>; - -template<> -struct Packet_Fixed<0x00f5>; -template<> -struct NetPacket_Fixed<0x00f5>; - -template<> -struct Packet_Fixed<0x00f6>; -template<> -struct NetPacket_Fixed<0x00f6>; - -template<> -struct Packet_Fixed<0x00f7>; -template<> -struct NetPacket_Fixed<0x00f7>; - -template<> -struct Packet_Fixed<0x00f8>; -template<> -struct NetPacket_Fixed<0x00f8>; - -template<> -struct Packet_Fixed<0x00f9>; -template<> -struct NetPacket_Fixed<0x00f9>; - -template<> -struct Packet_Fixed<0x00fa>; -template<> -struct NetPacket_Fixed<0x00fa>; - -template<> -struct Packet_Head<0x00fb>; -template<> -struct NetPacket_Head<0x00fb>; -template<> -struct Packet_Repeat<0x00fb>; -template<> -struct NetPacket_Repeat<0x00fb>; - -template<> -struct Packet_Fixed<0x00fc>; -template<> -struct NetPacket_Fixed<0x00fc>; - -template<> -struct Packet_Fixed<0x00fd>; -template<> -struct NetPacket_Fixed<0x00fd>; - -template<> -struct Packet_Fixed<0x00fe>; -template<> -struct NetPacket_Fixed<0x00fe>; - -template<> -struct Packet_Fixed<0x00ff>; -template<> -struct NetPacket_Fixed<0x00ff>; - -template<> -struct Packet_Fixed<0x0100>; -template<> -struct NetPacket_Fixed<0x0100>; - -template<> -struct Packet_Fixed<0x0101>; -template<> -struct NetPacket_Fixed<0x0101>; - -template<> -struct Packet_Fixed<0x0102>; -template<> -struct NetPacket_Fixed<0x0102>; - -template<> -struct Packet_Fixed<0x0103>; -template<> -struct NetPacket_Fixed<0x0103>; - -template<> -struct Packet_Fixed<0x0105>; -template<> -struct NetPacket_Fixed<0x0105>; - -template<> -struct Packet_Fixed<0x0106>; -template<> -struct NetPacket_Fixed<0x0106>; - -template<> -struct Packet_Fixed<0x0107>; -template<> -struct NetPacket_Fixed<0x0107>; - -template<> -struct Packet_Head<0x0108>; -template<> -struct NetPacket_Head<0x0108>; -template<> -struct Packet_Repeat<0x0108>; -template<> -struct NetPacket_Repeat<0x0108>; - -template<> -struct Packet_Head<0x0109>; -template<> -struct NetPacket_Head<0x0109>; -template<> -struct Packet_Repeat<0x0109>; -template<> -struct NetPacket_Repeat<0x0109>; - -template<> -struct Packet_Fixed<0x010c>; -template<> -struct NetPacket_Fixed<0x010c>; - -template<> -struct Packet_Fixed<0x010e>; -template<> -struct NetPacket_Fixed<0x010e>; - -template<> -struct Packet_Head<0x010f>; -template<> -struct NetPacket_Head<0x010f>; -template<> -struct Packet_Repeat<0x010f>; -template<> -struct NetPacket_Repeat<0x010f>; - -template<> -struct Packet_Fixed<0x0110>; -template<> -struct NetPacket_Fixed<0x0110>; - -template<> -struct Packet_Fixed<0x0112>; -template<> -struct NetPacket_Fixed<0x0112>; - -template<> -struct Packet_Fixed<0x0118>; -template<> -struct NetPacket_Fixed<0x0118>; - -template<> -struct Packet_Fixed<0x0119>; -template<> -struct NetPacket_Fixed<0x0119>; - -template<> -struct Packet_Fixed<0x0139>; -template<> -struct NetPacket_Fixed<0x0139>; - -template<> -struct Packet_Fixed<0x013a>; -template<> -struct NetPacket_Fixed<0x013a>; - -template<> -struct Packet_Fixed<0x013b>; -template<> -struct NetPacket_Fixed<0x013b>; - -template<> -struct Packet_Fixed<0x013c>; -template<> -struct NetPacket_Fixed<0x013c>; - -template<> -struct Packet_Fixed<0x0141>; -template<> -struct NetPacket_Fixed<0x0141>; - -template<> -struct Packet_Fixed<0x0142>; -template<> -struct NetPacket_Fixed<0x0142>; - -template<> -struct Packet_Fixed<0x0143>; -template<> -struct NetPacket_Fixed<0x0143>; - -template<> -struct Packet_Fixed<0x0146>; -template<> -struct NetPacket_Fixed<0x0146>; - -template<> -struct Packet_Fixed<0x0147>; -template<> -struct NetPacket_Fixed<0x0147>; - -template<> -struct Packet_Fixed<0x0148>; -template<> -struct NetPacket_Fixed<0x0148>; - -template<> -struct Packet_Fixed<0x014d>; -template<> -struct NetPacket_Fixed<0x014d>; - -template<> -struct Packet_Fixed<0x018a>; -template<> -struct NetPacket_Fixed<0x018a>; - -template<> -struct Packet_Fixed<0x018b>; -template<> -struct NetPacket_Fixed<0x018b>; - -template<> -struct Packet_Fixed<0x0195>; -template<> -struct NetPacket_Fixed<0x0195>; - -template<> -struct Packet_Fixed<0x0196>; -template<> -struct NetPacket_Fixed<0x0196>; - -template<> -struct Packet_Fixed<0x019b>; -template<> -struct NetPacket_Fixed<0x019b>; - -template<> -struct Packet_Fixed<0x01b1>; -template<> -struct NetPacket_Fixed<0x01b1>; - -template<> -struct Packet_Fixed<0x01c8>; -template<> -struct NetPacket_Fixed<0x01c8>; - -template<> -struct Packet_Fixed<0x01d4>; -template<> -struct NetPacket_Fixed<0x01d4>; - -template<> -struct Packet_Head<0x01d5>; -template<> -struct NetPacket_Head<0x01d5>; -template<> -struct Packet_Repeat<0x01d5>; -template<> -struct NetPacket_Repeat<0x01d5>; - -template<> -struct Packet_Fixed<0x01d7>; -template<> -struct NetPacket_Fixed<0x01d7>; - -template<> -struct Packet_Fixed<0x01d8>; -template<> -struct NetPacket_Fixed<0x01d8>; - -template<> -struct Packet_Fixed<0x01d9>; -template<> -struct NetPacket_Fixed<0x01d9>; - -template<> -struct Packet_Fixed<0x01da>; -template<> -struct NetPacket_Fixed<0x01da>; - -template<> -struct Packet_Fixed<0x01de>; -template<> -struct NetPacket_Fixed<0x01de>; - -template<> -struct Packet_Head<0x01ee>; -template<> -struct NetPacket_Head<0x01ee>; -template<> -struct Packet_Repeat<0x01ee>; -template<> -struct NetPacket_Repeat<0x01ee>; - -template<> -struct Packet_Head<0x01f0>; -template<> -struct NetPacket_Head<0x01f0>; -template<> -struct Packet_Repeat<0x01f0>; -template<> -struct NetPacket_Repeat<0x01f0>; - -template<> -struct Packet_Fixed<0x020c>; -template<> -struct NetPacket_Fixed<0x020c>; - -template<> -struct Packet_Fixed<0x0212>; -template<> -struct NetPacket_Fixed<0x0212>; - - -template<> -struct Packet_Fixed<0x0081>; -template<> -struct NetPacket_Fixed<0x0081>; - -template<> -struct Packet_Fixed<0x7530>; -template<> -struct NetPacket_Fixed<0x7530>; - -template<> -struct Packet_Fixed<0x7531>; -template<> -struct NetPacket_Fixed<0x7531>; - -template<> -struct Packet_Fixed<0x7532>; -template<> -struct NetPacket_Fixed<0x7532>; - -template<> -struct Packet_Payload<0x8000>; -template<> -struct NetPacket_Payload<0x8000>; - - -} // namespace tmwa diff --git a/src/proto2/include_clif_t_test.cpp b/src/proto2/include_clif_t_test.cpp deleted file mode 100644 index f0125fe..0000000 --- a/src/proto2/include_clif_t_test.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "../map/clif.t.hpp" -// include_clif_t_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_Position1 = Position1; -using Test_NetPosition1 = NetPosition1; -using Test_Position2 = Position2; -using Test_NetPosition2 = NetPosition2; -using Test_BeingRemoveWhy = BeingRemoveWhy; -using Test_DIR = DIR; -using Test_Opt1 = Opt1; -using Test_Opt2 = Opt2; -using Test_Opt3 = Opt3; -using Test_ItemType = ItemType; -using Test_PickupFail = PickupFail; -using Test_DamageType = DamageType; -using Test_SP = SP; -using Test_LOOK = LOOK; -using Test_IOff2 = IOff2; -using Test_SOff1 = SOff1; -} // namespace tmwa diff --git a/src/proto2/include_consts_test.cpp b/src/proto2/include_consts_test.cpp deleted file mode 100644 index 634c0e9..0000000 --- a/src/proto2/include_consts_test.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "../mmo/consts.hpp" -// include_consts_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_PartyMember = PartyMember; -} // namespace tmwa diff --git a/src/proto2/include_cstdint_test.cpp b/src/proto2/include_cstdint_test.cpp deleted file mode 100644 index 85bab61..0000000 --- a/src/proto2/include_cstdint_test.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include <cstdint> -// include_cstdint_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_uint8_t = uint8_t; -using Test_uint16_t = uint16_t; -using Test_uint32_t = uint32_t; -using Test_uint64_t = uint64_t; -using Test_int8_t = int8_t; -using Test_int16_t = int16_t; -using Test_int32_t = int32_t; -using Test_int64_t = int64_t; -} // namespace tmwa diff --git a/src/proto2/include_enums_test.cpp b/src/proto2/include_enums_test.cpp deleted file mode 100644 index f409d28..0000000 --- a/src/proto2/include_enums_test.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "../mmo/enums.hpp" -// include_enums_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_SEX = SEX; -using Test_Option = Option; -using Test_EPOS = EPOS; -using Test_ItemLook = ItemLook; -} // namespace tmwa diff --git a/src/proto2/include_human_time_diff_test.cpp b/src/proto2/include_human_time_diff_test.cpp deleted file mode 100644 index 2e16c99..0000000 --- a/src/proto2/include_human_time_diff_test.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "../mmo/human_time_diff.hpp" -// include_human_time_diff_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_HumanTimeDiff = HumanTimeDiff; -} // namespace tmwa diff --git a/src/proto2/include_ids_test.cpp b/src/proto2/include_ids_test.cpp deleted file mode 100644 index 1c1eeca..0000000 --- a/src/proto2/include_ids_test.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "../mmo/ids.hpp" -// include_ids_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_Species = Species; -using Test_AccountId = AccountId; -using Test_CharId = CharId; -using Test_PartyId = PartyId; -using Test_ItemNameId = ItemNameId; -using Test_BlockId = BlockId; -using Test_GmLevel = GmLevel; -} // namespace tmwa diff --git a/src/proto2/include_ip_test.cpp b/src/proto2/include_ip_test.cpp deleted file mode 100644 index d380651..0000000 --- a/src/proto2/include_ip_test.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "../net/ip.hpp" -// include_ip_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_IP4Address = IP4Address; -} // namespace tmwa diff --git a/src/proto2/include_little_test.cpp b/src/proto2/include_little_test.cpp deleted file mode 100644 index 08a4fbd..0000000 --- a/src/proto2/include_little_test.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "../ints/little.hpp" -// include_little_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_Byte = Byte; -using Test_Little16 = Little16; -using Test_Little32 = Little32; -using Test_Little64 = Little64; -} // namespace tmwa diff --git a/src/proto2/include_login_t_test.cpp b/src/proto2/include_login_t_test.cpp deleted file mode 100644 index 808e02e..0000000 --- a/src/proto2/include_login_t_test.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "../login/login.t.hpp" -// include_login_t_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_VERSION_2 = VERSION_2; -} // namespace tmwa diff --git a/src/proto2/include_skill_t_test.cpp b/src/proto2/include_skill_t_test.cpp deleted file mode 100644 index 4bd944f..0000000 --- a/src/proto2/include_skill_t_test.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "../map/skill.t.hpp" -// include_skill_t_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_SkillID = SkillID; -using Test_StatusChange = StatusChange; -using Test_SkillFlags = SkillFlags; -} // namespace tmwa diff --git a/src/proto2/include_strs_test.cpp b/src/proto2/include_strs_test.cpp deleted file mode 100644 index 67b41f4..0000000 --- a/src/proto2/include_strs_test.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "../mmo/strs.hpp" -// include_strs_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_AccountName = AccountName; -using Test_AccountPass = AccountPass; -using Test_AccountEmail = AccountEmail; -using Test_ServerName = ServerName; -using Test_PartyName = PartyName; -using Test_VarName = VarName; -using Test_CharName = CharName; -using Test_MapName = MapName; -} // namespace tmwa diff --git a/src/proto2/include_timer_t_test.cpp b/src/proto2/include_timer_t_test.cpp deleted file mode 100644 index a936021..0000000 --- a/src/proto2/include_timer_t_test.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "../net/timer.t.hpp" -// include_timer_t_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_tick_t = tick_t; -using Test_interval_t = interval_t; -} // namespace tmwa diff --git a/src/proto2/include_utils_test.cpp b/src/proto2/include_utils_test.cpp deleted file mode 100644 index 5b6c92d..0000000 --- a/src/proto2/include_utils_test.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "../mmo/utils.hpp" -// include_utils_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_TimeT = TimeT; -using Test_timestamp_seconds_buffer = timestamp_seconds_buffer; -using Test_timestamp_milliseconds_buffer = timestamp_milliseconds_buffer; -} // namespace tmwa diff --git a/src/proto2/include_version_test.cpp b/src/proto2/include_version_test.cpp deleted file mode 100644 index 13856b9..0000000 --- a/src/proto2/include_version_test.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "../mmo/version.hpp" -// include_version_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_Version = Version; -} // namespace tmwa diff --git a/src/proto2/include_vstring_test.cpp b/src/proto2/include_vstring_test.cpp deleted file mode 100644 index 3570a29..0000000 --- a/src/proto2/include_vstring_test.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "../strings/vstring.hpp" -// include_vstring_test.cpp - testsuite for protocol includes -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "../poison.hpp" - -namespace tmwa -{ -using Test_VString_15_ = VString<15>; -using Test_VString_19_ = VString<19>; -using Test_VString_23_ = VString<23>; -using Test_VString_31_ = VString<31>; -using Test_VString_39_ = VString<39>; -} // namespace tmwa diff --git a/src/proto2/login-admin.hpp b/src/proto2/login-admin.hpp deleted file mode 100644 index 9d5fb5e..0000000 --- a/src/proto2/login-admin.hpp +++ /dev/null @@ -1,2218 +0,0 @@ -#pragma once -// login-admin.hpp - TMWA network protocol: login/admin -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "fwd.hpp" - -#include "types.hpp" - -namespace tmwa -{ -// This is an internal protocol, and can be changed without notice - -template<> -struct Packet_Head<0x2726> -{ - static const uint16_t PACKET_ID = 0x2726; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t unused = {}; - // TODO remove this - uint32_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x2726> -{ - static const uint16_t PACKET_ID = 0x2726; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x7918> -{ - static const uint16_t PACKET_ID = 0x7918; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t encryption_zero = {}; - AccountPass account_pass = {}; -}; - -template<> -struct Packet_Fixed<0x7919> -{ - static const uint16_t PACKET_ID = 0x7919; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t error = {}; -}; - -template<> -struct Packet_Fixed<0x7920> -{ - static const uint16_t PACKET_ID = 0x7920; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId start_account_id = {}; - AccountId end_account_id = {}; -}; - -template<> -struct Packet_Head<0x7921> -{ - static const uint16_t PACKET_ID = 0x7921; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x7921> -{ - static const uint16_t PACKET_ID = 0x7921; - - AccountId account_id = {}; - GmLevel gm_level = {}; - AccountName account_name = {}; - SEX sex = {}; - uint32_t login_count = {}; - uint32_t status = {}; -}; - -template<> -struct Packet_Fixed<0x7924> -{ - static const uint16_t PACKET_ID = 0x7924; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - ItemNameId source_item_id = {}; - ItemNameId dest_item_id = {}; -}; - -template<> -struct Packet_Fixed<0x7925> -{ - static const uint16_t PACKET_ID = 0x7925; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x7930> -{ - static const uint16_t PACKET_ID = 0x7930; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - AccountPass password = {}; - SEX sex = {}; - AccountEmail email = {}; -}; - -template<> -struct Packet_Fixed<0x7931> -{ - static const uint16_t PACKET_ID = 0x7931; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; -}; - -template<> -struct Packet_Fixed<0x7932> -{ - static const uint16_t PACKET_ID = 0x7932; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; -}; - -template<> -struct Packet_Fixed<0x7933> -{ - static const uint16_t PACKET_ID = 0x7933; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; -}; - -template<> -struct Packet_Fixed<0x7934> -{ - static const uint16_t PACKET_ID = 0x7934; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - AccountPass password = {}; -}; - -template<> -struct Packet_Fixed<0x7935> -{ - static const uint16_t PACKET_ID = 0x7935; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; -}; - -template<> -struct Packet_Fixed<0x7936> -{ - static const uint16_t PACKET_ID = 0x7936; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - uint32_t status = {}; - timestamp_seconds_buffer error_message = {}; -}; - -template<> -struct Packet_Fixed<0x7937> -{ - static const uint16_t PACKET_ID = 0x7937; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; - uint32_t status = {}; -}; - -template<> -struct Packet_Fixed<0x7938> -{ - static const uint16_t PACKET_ID = 0x7938; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Head<0x7939> -{ - static const uint16_t PACKET_ID = 0x7939; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x7939> -{ - static const uint16_t PACKET_ID = 0x7939; - - IP4Address ip = {}; - uint16_t port = {}; - ServerName name = {}; - uint16_t users = {}; - uint16_t maintenance = {}; - uint16_t is_new = {}; -}; - -template<> -struct Packet_Fixed<0x793a> -{ - static const uint16_t PACKET_ID = 0x793a; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - AccountPass password = {}; -}; - -template<> -struct Packet_Fixed<0x793b> -{ - static const uint16_t PACKET_ID = 0x793b; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; -}; - -template<> -struct Packet_Fixed<0x793c> -{ - static const uint16_t PACKET_ID = 0x793c; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - SEX sex = {}; -}; - -template<> -struct Packet_Fixed<0x793d> -{ - static const uint16_t PACKET_ID = 0x793d; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; -}; - -template<> -struct Packet_Fixed<0x793e> -{ - static const uint16_t PACKET_ID = 0x793e; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - GmLevel gm_level = {}; -}; - -template<> -struct Packet_Fixed<0x793f> -{ - static const uint16_t PACKET_ID = 0x793f; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; -}; - -template<> -struct Packet_Fixed<0x7940> -{ - static const uint16_t PACKET_ID = 0x7940; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - AccountEmail email = {}; -}; - -template<> -struct Packet_Fixed<0x7941> -{ - static const uint16_t PACKET_ID = 0x7941; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; -}; - -template<> -struct Packet_Head<0x7942> -{ - static const uint16_t PACKET_ID = 0x7942; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x7942> -{ - static const uint16_t PACKET_ID = 0x7942; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x7943> -{ - static const uint16_t PACKET_ID = 0x7943; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; -}; - -template<> -struct Packet_Fixed<0x7944> -{ - static const uint16_t PACKET_ID = 0x7944; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; -}; - -template<> -struct Packet_Fixed<0x7945> -{ - static const uint16_t PACKET_ID = 0x7945; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; -}; - -template<> -struct Packet_Fixed<0x7946> -{ - static const uint16_t PACKET_ID = 0x7946; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Fixed<0x7947> -{ - static const uint16_t PACKET_ID = 0x7947; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; -}; - -template<> -struct Packet_Fixed<0x7948> -{ - static const uint16_t PACKET_ID = 0x7948; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - TimeT valid_until = {}; -}; - -template<> -struct Packet_Fixed<0x7949> -{ - static const uint16_t PACKET_ID = 0x7949; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; - TimeT valid_until = {}; -}; - -template<> -struct Packet_Fixed<0x794a> -{ - static const uint16_t PACKET_ID = 0x794a; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - TimeT ban_until = {}; -}; - -template<> -struct Packet_Fixed<0x794b> -{ - static const uint16_t PACKET_ID = 0x794b; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; - TimeT ban_until = {}; -}; - -template<> -struct Packet_Fixed<0x794c> -{ - static const uint16_t PACKET_ID = 0x794c; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - HumanTimeDiff ban_add = {}; -}; - -template<> -struct Packet_Fixed<0x794d> -{ - static const uint16_t PACKET_ID = 0x794d; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; - TimeT ban_until = {}; -}; - -template<> -struct Packet_Head<0x794e> -{ - static const uint16_t PACKET_ID = 0x794e; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t unused = {}; - // TODO remove this - uint32_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x794e> -{ - static const uint16_t PACKET_ID = 0x794e; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x794f> -{ - static const uint16_t PACKET_ID = 0x794f; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t error = {}; -}; - -template<> -struct Packet_Fixed<0x7950> -{ - static const uint16_t PACKET_ID = 0x7950; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - HumanTimeDiff valid_add = {}; -}; - -template<> -struct Packet_Fixed<0x7951> -{ - static const uint16_t PACKET_ID = 0x7951; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountName account_name = {}; - TimeT valid_until = {}; -}; - -template<> -struct Packet_Fixed<0x7952> -{ - static const uint16_t PACKET_ID = 0x7952; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; -}; - -template<> -struct Packet_Head<0x7953> -{ - static const uint16_t PACKET_ID = 0x7953; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - GmLevel gm_level = {}; - AccountName account_name = {}; - SEX sex = {}; - uint32_t login_count = {}; - uint32_t state = {}; - timestamp_seconds_buffer error_message = {}; - timestamp_milliseconds_buffer last_login_string = {}; - VString<15> ip_string = {}; - AccountEmail email = {}; - TimeT connect_until = {}; - TimeT ban_until = {}; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x7953> -{ - static const uint16_t PACKET_ID = 0x7953; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x7954> -{ - static const uint16_t PACKET_ID = 0x7954; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Fixed<0x7955> -{ - static const uint16_t PACKET_ID = 0x7955; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - - -template<> -struct NetPacket_Head<0x2726> -{ - Little16 magic_packet_id; - Little16 unused; - SkewedLength<Little32, 8> magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x2726>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2726>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2726>, unused) == 2, "offsetof(NetPacket_Head<0x2726>, unused) == 2"); -static_assert(offsetof(NetPacket_Head<0x2726>, magic_packet_length) == 4, "offsetof(NetPacket_Head<0x2726>, magic_packet_length) == 4"); -static_assert(sizeof(NetPacket_Head<0x2726>) == 8, "sizeof(NetPacket_Head<0x2726>) == 8"); -static_assert(alignof(NetPacket_Head<0x2726>) == 1, "alignof(NetPacket_Head<0x2726>) == 1"); -template<> -struct NetPacket_Repeat<0x2726> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x2726>, c) == 0, "offsetof(NetPacket_Repeat<0x2726>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x2726>) == 1, "sizeof(NetPacket_Repeat<0x2726>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x2726>) == 1, "alignof(NetPacket_Repeat<0x2726>) == 1"); - -template<> -struct NetPacket_Fixed<0x7918> -{ - Little16 magic_packet_id; - Little16 encryption_zero; - NetString<sizeof(AccountPass)> account_pass; -}; -static_assert(offsetof(NetPacket_Fixed<0x7918>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7918>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7918>, encryption_zero) == 2, "offsetof(NetPacket_Fixed<0x7918>, encryption_zero) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7918>, account_pass) == 4, "offsetof(NetPacket_Fixed<0x7918>, account_pass) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x7918>) == 28, "sizeof(NetPacket_Fixed<0x7918>) == 28"); -static_assert(alignof(NetPacket_Fixed<0x7918>) == 1, "alignof(NetPacket_Fixed<0x7918>) == 1"); - -template<> -struct NetPacket_Fixed<0x7919> -{ - Little16 magic_packet_id; - Byte error; -}; -static_assert(offsetof(NetPacket_Fixed<0x7919>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7919>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7919>, error) == 2, "offsetof(NetPacket_Fixed<0x7919>, error) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x7919>) == 3, "sizeof(NetPacket_Fixed<0x7919>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x7919>) == 1, "alignof(NetPacket_Fixed<0x7919>) == 1"); - -template<> -struct NetPacket_Fixed<0x7920> -{ - Little16 magic_packet_id; - Little32 start_account_id; - Little32 end_account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x7920>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7920>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7920>, start_account_id) == 2, "offsetof(NetPacket_Fixed<0x7920>, start_account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7920>, end_account_id) == 6, "offsetof(NetPacket_Fixed<0x7920>, end_account_id) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x7920>) == 10, "sizeof(NetPacket_Fixed<0x7920>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x7920>) == 1, "alignof(NetPacket_Fixed<0x7920>) == 1"); - -template<> -struct NetPacket_Head<0x7921> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x7921>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x7921>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x7921>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x7921>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x7921>) == 4, "sizeof(NetPacket_Head<0x7921>) == 4"); -static_assert(alignof(NetPacket_Head<0x7921>) == 1, "alignof(NetPacket_Head<0x7921>) == 1"); -template<> -struct NetPacket_Repeat<0x7921> -{ - Little32 account_id; - Byte gm_level; - NetString<sizeof(AccountName)> account_name; - Byte sex; - Little32 login_count; - Little32 status; -}; -static_assert(offsetof(NetPacket_Repeat<0x7921>, account_id) == 0, "offsetof(NetPacket_Repeat<0x7921>, account_id) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x7921>, gm_level) == 4, "offsetof(NetPacket_Repeat<0x7921>, gm_level) == 4"); -static_assert(offsetof(NetPacket_Repeat<0x7921>, account_name) == 5, "offsetof(NetPacket_Repeat<0x7921>, account_name) == 5"); -static_assert(offsetof(NetPacket_Repeat<0x7921>, sex) == 29, "offsetof(NetPacket_Repeat<0x7921>, sex) == 29"); -static_assert(offsetof(NetPacket_Repeat<0x7921>, login_count) == 30, "offsetof(NetPacket_Repeat<0x7921>, login_count) == 30"); -static_assert(offsetof(NetPacket_Repeat<0x7921>, status) == 34, "offsetof(NetPacket_Repeat<0x7921>, status) == 34"); -static_assert(sizeof(NetPacket_Repeat<0x7921>) == 38, "sizeof(NetPacket_Repeat<0x7921>) == 38"); -static_assert(alignof(NetPacket_Repeat<0x7921>) == 1, "alignof(NetPacket_Repeat<0x7921>) == 1"); - -template<> -struct NetPacket_Fixed<0x7924> -{ - Little16 magic_packet_id; - Little32 source_item_id; - Little32 dest_item_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x7924>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7924>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7924>, source_item_id) == 2, "offsetof(NetPacket_Fixed<0x7924>, source_item_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7924>, dest_item_id) == 6, "offsetof(NetPacket_Fixed<0x7924>, dest_item_id) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x7924>) == 10, "sizeof(NetPacket_Fixed<0x7924>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x7924>) == 1, "alignof(NetPacket_Fixed<0x7924>) == 1"); - -template<> -struct NetPacket_Fixed<0x7925> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x7925>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7925>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x7925>) == 2, "sizeof(NetPacket_Fixed<0x7925>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x7925>) == 1, "alignof(NetPacket_Fixed<0x7925>) == 1"); - -template<> -struct NetPacket_Fixed<0x7930> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - NetString<sizeof(AccountPass)> password; - char sex; - NetString<sizeof(AccountEmail)> email; -}; -static_assert(offsetof(NetPacket_Fixed<0x7930>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7930>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7930>, account_name) == 2, "offsetof(NetPacket_Fixed<0x7930>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7930>, password) == 26, "offsetof(NetPacket_Fixed<0x7930>, password) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x7930>, sex) == 50, "offsetof(NetPacket_Fixed<0x7930>, sex) == 50"); -static_assert(offsetof(NetPacket_Fixed<0x7930>, email) == 51, "offsetof(NetPacket_Fixed<0x7930>, email) == 51"); -static_assert(sizeof(NetPacket_Fixed<0x7930>) == 91, "sizeof(NetPacket_Fixed<0x7930>) == 91"); -static_assert(alignof(NetPacket_Fixed<0x7930>) == 1, "alignof(NetPacket_Fixed<0x7930>) == 1"); - -template<> -struct NetPacket_Fixed<0x7931> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x7931>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7931>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7931>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7931>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7931>, account_name) == 6, "offsetof(NetPacket_Fixed<0x7931>, account_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x7931>) == 30, "sizeof(NetPacket_Fixed<0x7931>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x7931>) == 1, "alignof(NetPacket_Fixed<0x7931>) == 1"); - -template<> -struct NetPacket_Fixed<0x7932> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x7932>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7932>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7932>, account_name) == 2, "offsetof(NetPacket_Fixed<0x7932>, account_name) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x7932>) == 26, "sizeof(NetPacket_Fixed<0x7932>) == 26"); -static_assert(alignof(NetPacket_Fixed<0x7932>) == 1, "alignof(NetPacket_Fixed<0x7932>) == 1"); - -template<> -struct NetPacket_Fixed<0x7933> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x7933>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7933>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7933>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7933>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7933>, account_name) == 6, "offsetof(NetPacket_Fixed<0x7933>, account_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x7933>) == 30, "sizeof(NetPacket_Fixed<0x7933>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x7933>) == 1, "alignof(NetPacket_Fixed<0x7933>) == 1"); - -template<> -struct NetPacket_Fixed<0x7934> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - NetString<sizeof(AccountPass)> password; -}; -static_assert(offsetof(NetPacket_Fixed<0x7934>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7934>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7934>, account_name) == 2, "offsetof(NetPacket_Fixed<0x7934>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7934>, password) == 26, "offsetof(NetPacket_Fixed<0x7934>, password) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x7934>) == 50, "sizeof(NetPacket_Fixed<0x7934>) == 50"); -static_assert(alignof(NetPacket_Fixed<0x7934>) == 1, "alignof(NetPacket_Fixed<0x7934>) == 1"); - -template<> -struct NetPacket_Fixed<0x7935> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x7935>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7935>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7935>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7935>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7935>, account_name) == 6, "offsetof(NetPacket_Fixed<0x7935>, account_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x7935>) == 30, "sizeof(NetPacket_Fixed<0x7935>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x7935>) == 1, "alignof(NetPacket_Fixed<0x7935>) == 1"); - -template<> -struct NetPacket_Fixed<0x7936> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - Little32 status; - NetString<sizeof(timestamp_seconds_buffer)> error_message; -}; -static_assert(offsetof(NetPacket_Fixed<0x7936>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7936>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7936>, account_name) == 2, "offsetof(NetPacket_Fixed<0x7936>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7936>, status) == 26, "offsetof(NetPacket_Fixed<0x7936>, status) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x7936>, error_message) == 30, "offsetof(NetPacket_Fixed<0x7936>, error_message) == 30"); -static_assert(sizeof(NetPacket_Fixed<0x7936>) == 50, "sizeof(NetPacket_Fixed<0x7936>) == 50"); -static_assert(alignof(NetPacket_Fixed<0x7936>) == 1, "alignof(NetPacket_Fixed<0x7936>) == 1"); - -template<> -struct NetPacket_Fixed<0x7937> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; - Little32 status; -}; -static_assert(offsetof(NetPacket_Fixed<0x7937>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7937>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7937>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7937>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7937>, account_name) == 6, "offsetof(NetPacket_Fixed<0x7937>, account_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x7937>, status) == 30, "offsetof(NetPacket_Fixed<0x7937>, status) == 30"); -static_assert(sizeof(NetPacket_Fixed<0x7937>) == 34, "sizeof(NetPacket_Fixed<0x7937>) == 34"); -static_assert(alignof(NetPacket_Fixed<0x7937>) == 1, "alignof(NetPacket_Fixed<0x7937>) == 1"); - -template<> -struct NetPacket_Fixed<0x7938> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x7938>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7938>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x7938>) == 2, "sizeof(NetPacket_Fixed<0x7938>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x7938>) == 1, "alignof(NetPacket_Fixed<0x7938>) == 1"); - -template<> -struct NetPacket_Head<0x7939> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x7939>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x7939>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x7939>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x7939>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x7939>) == 4, "sizeof(NetPacket_Head<0x7939>) == 4"); -static_assert(alignof(NetPacket_Head<0x7939>) == 1, "alignof(NetPacket_Head<0x7939>) == 1"); -template<> -struct NetPacket_Repeat<0x7939> -{ - IP4Address ip; - Little16 port; - NetString<sizeof(ServerName)> name; - Little16 users; - Little16 maintenance; - Little16 is_new; -}; -static_assert(offsetof(NetPacket_Repeat<0x7939>, ip) == 0, "offsetof(NetPacket_Repeat<0x7939>, ip) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x7939>, port) == 4, "offsetof(NetPacket_Repeat<0x7939>, port) == 4"); -static_assert(offsetof(NetPacket_Repeat<0x7939>, name) == 6, "offsetof(NetPacket_Repeat<0x7939>, name) == 6"); -static_assert(offsetof(NetPacket_Repeat<0x7939>, users) == 26, "offsetof(NetPacket_Repeat<0x7939>, users) == 26"); -static_assert(offsetof(NetPacket_Repeat<0x7939>, maintenance) == 28, "offsetof(NetPacket_Repeat<0x7939>, maintenance) == 28"); -static_assert(offsetof(NetPacket_Repeat<0x7939>, is_new) == 30, "offsetof(NetPacket_Repeat<0x7939>, is_new) == 30"); -static_assert(sizeof(NetPacket_Repeat<0x7939>) == 32, "sizeof(NetPacket_Repeat<0x7939>) == 32"); -static_assert(alignof(NetPacket_Repeat<0x7939>) == 1, "alignof(NetPacket_Repeat<0x7939>) == 1"); - -template<> -struct NetPacket_Fixed<0x793a> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - NetString<sizeof(AccountPass)> password; -}; -static_assert(offsetof(NetPacket_Fixed<0x793a>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x793a>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x793a>, account_name) == 2, "offsetof(NetPacket_Fixed<0x793a>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x793a>, password) == 26, "offsetof(NetPacket_Fixed<0x793a>, password) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x793a>) == 50, "sizeof(NetPacket_Fixed<0x793a>) == 50"); -static_assert(alignof(NetPacket_Fixed<0x793a>) == 1, "alignof(NetPacket_Fixed<0x793a>) == 1"); - -template<> -struct NetPacket_Fixed<0x793b> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x793b>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x793b>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x793b>, account_id) == 2, "offsetof(NetPacket_Fixed<0x793b>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x793b>, account_name) == 6, "offsetof(NetPacket_Fixed<0x793b>, account_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x793b>) == 30, "sizeof(NetPacket_Fixed<0x793b>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x793b>) == 1, "alignof(NetPacket_Fixed<0x793b>) == 1"); - -template<> -struct NetPacket_Fixed<0x793c> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - char sex; -}; -static_assert(offsetof(NetPacket_Fixed<0x793c>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x793c>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x793c>, account_name) == 2, "offsetof(NetPacket_Fixed<0x793c>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x793c>, sex) == 26, "offsetof(NetPacket_Fixed<0x793c>, sex) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x793c>) == 27, "sizeof(NetPacket_Fixed<0x793c>) == 27"); -static_assert(alignof(NetPacket_Fixed<0x793c>) == 1, "alignof(NetPacket_Fixed<0x793c>) == 1"); - -template<> -struct NetPacket_Fixed<0x793d> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x793d>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x793d>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x793d>, account_id) == 2, "offsetof(NetPacket_Fixed<0x793d>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x793d>, account_name) == 6, "offsetof(NetPacket_Fixed<0x793d>, account_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x793d>) == 30, "sizeof(NetPacket_Fixed<0x793d>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x793d>) == 1, "alignof(NetPacket_Fixed<0x793d>) == 1"); - -template<> -struct NetPacket_Fixed<0x793e> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - Byte gm_level; -}; -static_assert(offsetof(NetPacket_Fixed<0x793e>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x793e>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x793e>, account_name) == 2, "offsetof(NetPacket_Fixed<0x793e>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x793e>, gm_level) == 26, "offsetof(NetPacket_Fixed<0x793e>, gm_level) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x793e>) == 27, "sizeof(NetPacket_Fixed<0x793e>) == 27"); -static_assert(alignof(NetPacket_Fixed<0x793e>) == 1, "alignof(NetPacket_Fixed<0x793e>) == 1"); - -template<> -struct NetPacket_Fixed<0x793f> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x793f>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x793f>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x793f>, account_id) == 2, "offsetof(NetPacket_Fixed<0x793f>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x793f>, account_name) == 6, "offsetof(NetPacket_Fixed<0x793f>, account_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x793f>) == 30, "sizeof(NetPacket_Fixed<0x793f>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x793f>) == 1, "alignof(NetPacket_Fixed<0x793f>) == 1"); - -template<> -struct NetPacket_Fixed<0x7940> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - NetString<sizeof(AccountEmail)> email; -}; -static_assert(offsetof(NetPacket_Fixed<0x7940>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7940>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7940>, account_name) == 2, "offsetof(NetPacket_Fixed<0x7940>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7940>, email) == 26, "offsetof(NetPacket_Fixed<0x7940>, email) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x7940>) == 66, "sizeof(NetPacket_Fixed<0x7940>) == 66"); -static_assert(alignof(NetPacket_Fixed<0x7940>) == 1, "alignof(NetPacket_Fixed<0x7940>) == 1"); - -template<> -struct NetPacket_Fixed<0x7941> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x7941>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7941>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7941>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7941>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7941>, account_name) == 6, "offsetof(NetPacket_Fixed<0x7941>, account_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x7941>) == 30, "sizeof(NetPacket_Fixed<0x7941>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x7941>) == 1, "alignof(NetPacket_Fixed<0x7941>) == 1"); - -template<> -struct NetPacket_Head<0x7942> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - SkewedLength<Little16, 28> magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x7942>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x7942>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x7942>, account_name) == 2, "offsetof(NetPacket_Head<0x7942>, account_name) == 2"); -static_assert(offsetof(NetPacket_Head<0x7942>, magic_packet_length) == 26, "offsetof(NetPacket_Head<0x7942>, magic_packet_length) == 26"); -static_assert(sizeof(NetPacket_Head<0x7942>) == 28, "sizeof(NetPacket_Head<0x7942>) == 28"); -static_assert(alignof(NetPacket_Head<0x7942>) == 1, "alignof(NetPacket_Head<0x7942>) == 1"); -template<> -struct NetPacket_Repeat<0x7942> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x7942>, c) == 0, "offsetof(NetPacket_Repeat<0x7942>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x7942>) == 1, "sizeof(NetPacket_Repeat<0x7942>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x7942>) == 1, "alignof(NetPacket_Repeat<0x7942>) == 1"); - -template<> -struct NetPacket_Fixed<0x7943> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x7943>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7943>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7943>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7943>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7943>, account_name) == 6, "offsetof(NetPacket_Fixed<0x7943>, account_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x7943>) == 30, "sizeof(NetPacket_Fixed<0x7943>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x7943>) == 1, "alignof(NetPacket_Fixed<0x7943>) == 1"); - -template<> -struct NetPacket_Fixed<0x7944> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x7944>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7944>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7944>, account_name) == 2, "offsetof(NetPacket_Fixed<0x7944>, account_name) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x7944>) == 26, "sizeof(NetPacket_Fixed<0x7944>) == 26"); -static_assert(alignof(NetPacket_Fixed<0x7944>) == 1, "alignof(NetPacket_Fixed<0x7944>) == 1"); - -template<> -struct NetPacket_Fixed<0x7945> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x7945>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7945>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7945>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7945>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7945>, account_name) == 6, "offsetof(NetPacket_Fixed<0x7945>, account_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x7945>) == 30, "sizeof(NetPacket_Fixed<0x7945>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x7945>) == 1, "alignof(NetPacket_Fixed<0x7945>) == 1"); - -template<> -struct NetPacket_Fixed<0x7946> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x7946>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7946>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7946>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7946>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x7946>) == 6, "sizeof(NetPacket_Fixed<0x7946>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x7946>) == 1, "alignof(NetPacket_Fixed<0x7946>) == 1"); - -template<> -struct NetPacket_Fixed<0x7947> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x7947>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7947>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7947>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7947>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7947>, account_name) == 6, "offsetof(NetPacket_Fixed<0x7947>, account_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x7947>) == 30, "sizeof(NetPacket_Fixed<0x7947>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x7947>) == 1, "alignof(NetPacket_Fixed<0x7947>) == 1"); - -template<> -struct NetPacket_Fixed<0x7948> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - Little32 valid_until; -}; -static_assert(offsetof(NetPacket_Fixed<0x7948>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7948>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7948>, account_name) == 2, "offsetof(NetPacket_Fixed<0x7948>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7948>, valid_until) == 26, "offsetof(NetPacket_Fixed<0x7948>, valid_until) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x7948>) == 30, "sizeof(NetPacket_Fixed<0x7948>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x7948>) == 1, "alignof(NetPacket_Fixed<0x7948>) == 1"); - -template<> -struct NetPacket_Fixed<0x7949> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; - Little32 valid_until; -}; -static_assert(offsetof(NetPacket_Fixed<0x7949>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7949>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7949>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7949>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7949>, account_name) == 6, "offsetof(NetPacket_Fixed<0x7949>, account_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x7949>, valid_until) == 30, "offsetof(NetPacket_Fixed<0x7949>, valid_until) == 30"); -static_assert(sizeof(NetPacket_Fixed<0x7949>) == 34, "sizeof(NetPacket_Fixed<0x7949>) == 34"); -static_assert(alignof(NetPacket_Fixed<0x7949>) == 1, "alignof(NetPacket_Fixed<0x7949>) == 1"); - -template<> -struct NetPacket_Fixed<0x794a> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - Little32 ban_until; -}; -static_assert(offsetof(NetPacket_Fixed<0x794a>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x794a>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x794a>, account_name) == 2, "offsetof(NetPacket_Fixed<0x794a>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x794a>, ban_until) == 26, "offsetof(NetPacket_Fixed<0x794a>, ban_until) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x794a>) == 30, "sizeof(NetPacket_Fixed<0x794a>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x794a>) == 1, "alignof(NetPacket_Fixed<0x794a>) == 1"); - -template<> -struct NetPacket_Fixed<0x794b> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; - Little32 ban_until; -}; -static_assert(offsetof(NetPacket_Fixed<0x794b>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x794b>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x794b>, account_id) == 2, "offsetof(NetPacket_Fixed<0x794b>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x794b>, account_name) == 6, "offsetof(NetPacket_Fixed<0x794b>, account_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x794b>, ban_until) == 30, "offsetof(NetPacket_Fixed<0x794b>, ban_until) == 30"); -static_assert(sizeof(NetPacket_Fixed<0x794b>) == 34, "sizeof(NetPacket_Fixed<0x794b>) == 34"); -static_assert(alignof(NetPacket_Fixed<0x794b>) == 1, "alignof(NetPacket_Fixed<0x794b>) == 1"); - -template<> -struct NetPacket_Fixed<0x794c> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - NetHumanTimeDiff ban_add; -}; -static_assert(offsetof(NetPacket_Fixed<0x794c>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x794c>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x794c>, account_name) == 2, "offsetof(NetPacket_Fixed<0x794c>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x794c>, ban_add) == 26, "offsetof(NetPacket_Fixed<0x794c>, ban_add) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x794c>) == 38, "sizeof(NetPacket_Fixed<0x794c>) == 38"); -static_assert(alignof(NetPacket_Fixed<0x794c>) == 1, "alignof(NetPacket_Fixed<0x794c>) == 1"); - -template<> -struct NetPacket_Fixed<0x794d> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; - Little32 ban_until; -}; -static_assert(offsetof(NetPacket_Fixed<0x794d>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x794d>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x794d>, account_id) == 2, "offsetof(NetPacket_Fixed<0x794d>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x794d>, account_name) == 6, "offsetof(NetPacket_Fixed<0x794d>, account_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x794d>, ban_until) == 30, "offsetof(NetPacket_Fixed<0x794d>, ban_until) == 30"); -static_assert(sizeof(NetPacket_Fixed<0x794d>) == 34, "sizeof(NetPacket_Fixed<0x794d>) == 34"); -static_assert(alignof(NetPacket_Fixed<0x794d>) == 1, "alignof(NetPacket_Fixed<0x794d>) == 1"); - -template<> -struct NetPacket_Head<0x794e> -{ - Little16 magic_packet_id; - Little16 unused; - SkewedLength<Little32, 8> magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x794e>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x794e>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x794e>, unused) == 2, "offsetof(NetPacket_Head<0x794e>, unused) == 2"); -static_assert(offsetof(NetPacket_Head<0x794e>, magic_packet_length) == 4, "offsetof(NetPacket_Head<0x794e>, magic_packet_length) == 4"); -static_assert(sizeof(NetPacket_Head<0x794e>) == 8, "sizeof(NetPacket_Head<0x794e>) == 8"); -static_assert(alignof(NetPacket_Head<0x794e>) == 1, "alignof(NetPacket_Head<0x794e>) == 1"); -template<> -struct NetPacket_Repeat<0x794e> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x794e>, c) == 0, "offsetof(NetPacket_Repeat<0x794e>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x794e>) == 1, "sizeof(NetPacket_Repeat<0x794e>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x794e>) == 1, "alignof(NetPacket_Repeat<0x794e>) == 1"); - -template<> -struct NetPacket_Fixed<0x794f> -{ - Little16 magic_packet_id; - Little16 error; -}; -static_assert(offsetof(NetPacket_Fixed<0x794f>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x794f>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x794f>, error) == 2, "offsetof(NetPacket_Fixed<0x794f>, error) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x794f>) == 4, "sizeof(NetPacket_Fixed<0x794f>) == 4"); -static_assert(alignof(NetPacket_Fixed<0x794f>) == 1, "alignof(NetPacket_Fixed<0x794f>) == 1"); - -template<> -struct NetPacket_Fixed<0x7950> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - NetHumanTimeDiff valid_add; -}; -static_assert(offsetof(NetPacket_Fixed<0x7950>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7950>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7950>, account_name) == 2, "offsetof(NetPacket_Fixed<0x7950>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7950>, valid_add) == 26, "offsetof(NetPacket_Fixed<0x7950>, valid_add) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x7950>) == 38, "sizeof(NetPacket_Fixed<0x7950>) == 38"); -static_assert(alignof(NetPacket_Fixed<0x7950>) == 1, "alignof(NetPacket_Fixed<0x7950>) == 1"); - -template<> -struct NetPacket_Fixed<0x7951> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountName)> account_name; - Little32 valid_until; -}; -static_assert(offsetof(NetPacket_Fixed<0x7951>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7951>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7951>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7951>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x7951>, account_name) == 6, "offsetof(NetPacket_Fixed<0x7951>, account_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x7951>, valid_until) == 30, "offsetof(NetPacket_Fixed<0x7951>, valid_until) == 30"); -static_assert(sizeof(NetPacket_Fixed<0x7951>) == 34, "sizeof(NetPacket_Fixed<0x7951>) == 34"); -static_assert(alignof(NetPacket_Fixed<0x7951>) == 1, "alignof(NetPacket_Fixed<0x7951>) == 1"); - -template<> -struct NetPacket_Fixed<0x7952> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x7952>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7952>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7952>, account_name) == 2, "offsetof(NetPacket_Fixed<0x7952>, account_name) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x7952>) == 26, "sizeof(NetPacket_Fixed<0x7952>) == 26"); -static_assert(alignof(NetPacket_Fixed<0x7952>) == 1, "alignof(NetPacket_Fixed<0x7952>) == 1"); - -template<> -struct NetPacket_Head<0x7953> -{ - Little16 magic_packet_id; - Little32 account_id; - Byte gm_level; - NetString<sizeof(AccountName)> account_name; - Byte sex; - Little32 login_count; - Little32 state; - NetString<sizeof(timestamp_seconds_buffer)> error_message; - NetString<sizeof(timestamp_milliseconds_buffer)> last_login_string; - NetString<sizeof(VString<15>)> ip_string; - NetString<sizeof(AccountEmail)> email; - Little32 connect_until; - Little32 ban_until; - SkewedLength<Little16, 150> magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x7953>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x7953>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x7953>, account_id) == 2, "offsetof(NetPacket_Head<0x7953>, account_id) == 2"); -static_assert(offsetof(NetPacket_Head<0x7953>, gm_level) == 6, "offsetof(NetPacket_Head<0x7953>, gm_level) == 6"); -static_assert(offsetof(NetPacket_Head<0x7953>, account_name) == 7, "offsetof(NetPacket_Head<0x7953>, account_name) == 7"); -static_assert(offsetof(NetPacket_Head<0x7953>, sex) == 31, "offsetof(NetPacket_Head<0x7953>, sex) == 31"); -static_assert(offsetof(NetPacket_Head<0x7953>, login_count) == 32, "offsetof(NetPacket_Head<0x7953>, login_count) == 32"); -static_assert(offsetof(NetPacket_Head<0x7953>, state) == 36, "offsetof(NetPacket_Head<0x7953>, state) == 36"); -static_assert(offsetof(NetPacket_Head<0x7953>, error_message) == 40, "offsetof(NetPacket_Head<0x7953>, error_message) == 40"); -static_assert(offsetof(NetPacket_Head<0x7953>, last_login_string) == 60, "offsetof(NetPacket_Head<0x7953>, last_login_string) == 60"); -static_assert(offsetof(NetPacket_Head<0x7953>, ip_string) == 84, "offsetof(NetPacket_Head<0x7953>, ip_string) == 84"); -static_assert(offsetof(NetPacket_Head<0x7953>, email) == 100, "offsetof(NetPacket_Head<0x7953>, email) == 100"); -static_assert(offsetof(NetPacket_Head<0x7953>, connect_until) == 140, "offsetof(NetPacket_Head<0x7953>, connect_until) == 140"); -static_assert(offsetof(NetPacket_Head<0x7953>, ban_until) == 144, "offsetof(NetPacket_Head<0x7953>, ban_until) == 144"); -static_assert(offsetof(NetPacket_Head<0x7953>, magic_packet_length) == 148, "offsetof(NetPacket_Head<0x7953>, magic_packet_length) == 148"); -static_assert(sizeof(NetPacket_Head<0x7953>) == 150, "sizeof(NetPacket_Head<0x7953>) == 150"); -static_assert(alignof(NetPacket_Head<0x7953>) == 1, "alignof(NetPacket_Head<0x7953>) == 1"); -template<> -struct NetPacket_Repeat<0x7953> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x7953>, c) == 0, "offsetof(NetPacket_Repeat<0x7953>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x7953>) == 1, "sizeof(NetPacket_Repeat<0x7953>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x7953>) == 1, "alignof(NetPacket_Repeat<0x7953>) == 1"); - -template<> -struct NetPacket_Fixed<0x7954> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x7954>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7954>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x7954>, account_id) == 2, "offsetof(NetPacket_Fixed<0x7954>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x7954>) == 6, "sizeof(NetPacket_Fixed<0x7954>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x7954>) == 1, "alignof(NetPacket_Fixed<0x7954>) == 1"); - -template<> -struct NetPacket_Fixed<0x7955> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x7955>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x7955>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x7955>) == 2, "sizeof(NetPacket_Fixed<0x7955>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x7955>) == 1, "alignof(NetPacket_Fixed<0x7955>) == 1"); - - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2726> *network, Packet_Head<0x2726> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->unused, native.unused); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2726> *native, NetPacket_Head<0x2726> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->unused, network.unused); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2726> *network, Packet_Repeat<0x2726> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2726> *native, NetPacket_Repeat<0x2726> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7918> *network, Packet_Fixed<0x7918> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->encryption_zero, native.encryption_zero); - rv &= native_to_network(&network->account_pass, native.account_pass); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7918> *native, NetPacket_Fixed<0x7918> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->encryption_zero, network.encryption_zero); - rv &= network_to_native(&native->account_pass, network.account_pass); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7919> *network, Packet_Fixed<0x7919> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->error, native.error); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7919> *native, NetPacket_Fixed<0x7919> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->error, network.error); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7920> *network, Packet_Fixed<0x7920> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->start_account_id, native.start_account_id); - rv &= native_to_network(&network->end_account_id, native.end_account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7920> *native, NetPacket_Fixed<0x7920> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->start_account_id, network.start_account_id); - rv &= network_to_native(&native->end_account_id, network.end_account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x7921> *network, Packet_Head<0x7921> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x7921> *native, NetPacket_Head<0x7921> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x7921> *network, Packet_Repeat<0x7921> native) -{ - bool rv = true; - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->gm_level, native.gm_level); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->sex, native.sex); - rv &= native_to_network(&network->login_count, native.login_count); - rv &= native_to_network(&network->status, native.status); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x7921> *native, NetPacket_Repeat<0x7921> network) -{ - bool rv = true; - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->gm_level, network.gm_level); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->sex, network.sex); - rv &= network_to_native(&native->login_count, network.login_count); - rv &= network_to_native(&native->status, network.status); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7924> *network, Packet_Fixed<0x7924> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->source_item_id, native.source_item_id); - rv &= native_to_network(&network->dest_item_id, native.dest_item_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7924> *native, NetPacket_Fixed<0x7924> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->source_item_id, network.source_item_id); - rv &= network_to_native(&native->dest_item_id, network.dest_item_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7925> *network, Packet_Fixed<0x7925> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7925> *native, NetPacket_Fixed<0x7925> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7930> *network, Packet_Fixed<0x7930> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->password, native.password); - rv &= native_to_network(&network->sex, native.sex); - rv &= native_to_network(&network->email, native.email); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7930> *native, NetPacket_Fixed<0x7930> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->password, network.password); - rv &= network_to_native(&native->sex, network.sex); - rv &= network_to_native(&native->email, network.email); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7931> *network, Packet_Fixed<0x7931> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7931> *native, NetPacket_Fixed<0x7931> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7932> *network, Packet_Fixed<0x7932> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7932> *native, NetPacket_Fixed<0x7932> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7933> *network, Packet_Fixed<0x7933> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7933> *native, NetPacket_Fixed<0x7933> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7934> *network, Packet_Fixed<0x7934> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->password, native.password); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7934> *native, NetPacket_Fixed<0x7934> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->password, network.password); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7935> *network, Packet_Fixed<0x7935> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7935> *native, NetPacket_Fixed<0x7935> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7936> *network, Packet_Fixed<0x7936> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->status, native.status); - rv &= native_to_network(&network->error_message, native.error_message); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7936> *native, NetPacket_Fixed<0x7936> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->status, network.status); - rv &= network_to_native(&native->error_message, network.error_message); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7937> *network, Packet_Fixed<0x7937> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->status, native.status); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7937> *native, NetPacket_Fixed<0x7937> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->status, network.status); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7938> *network, Packet_Fixed<0x7938> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7938> *native, NetPacket_Fixed<0x7938> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x7939> *network, Packet_Head<0x7939> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x7939> *native, NetPacket_Head<0x7939> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x7939> *network, Packet_Repeat<0x7939> native) -{ - bool rv = true; - rv &= native_to_network(&network->ip, native.ip); - rv &= native_to_network(&network->port, native.port); - rv &= native_to_network(&network->name, native.name); - rv &= native_to_network(&network->users, native.users); - rv &= native_to_network(&network->maintenance, native.maintenance); - rv &= native_to_network(&network->is_new, native.is_new); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x7939> *native, NetPacket_Repeat<0x7939> network) -{ - bool rv = true; - rv &= network_to_native(&native->ip, network.ip); - rv &= network_to_native(&native->port, network.port); - rv &= network_to_native(&native->name, network.name); - rv &= network_to_native(&native->users, network.users); - rv &= network_to_native(&native->maintenance, network.maintenance); - rv &= network_to_native(&native->is_new, network.is_new); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x793a> *network, Packet_Fixed<0x793a> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->password, native.password); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x793a> *native, NetPacket_Fixed<0x793a> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->password, network.password); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x793b> *network, Packet_Fixed<0x793b> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x793b> *native, NetPacket_Fixed<0x793b> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x793c> *network, Packet_Fixed<0x793c> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->sex, native.sex); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x793c> *native, NetPacket_Fixed<0x793c> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->sex, network.sex); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x793d> *network, Packet_Fixed<0x793d> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x793d> *native, NetPacket_Fixed<0x793d> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x793e> *network, Packet_Fixed<0x793e> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->gm_level, native.gm_level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x793e> *native, NetPacket_Fixed<0x793e> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->gm_level, network.gm_level); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x793f> *network, Packet_Fixed<0x793f> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x793f> *native, NetPacket_Fixed<0x793f> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7940> *network, Packet_Fixed<0x7940> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->email, native.email); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7940> *native, NetPacket_Fixed<0x7940> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->email, network.email); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7941> *network, Packet_Fixed<0x7941> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7941> *native, NetPacket_Fixed<0x7941> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x7942> *network, Packet_Head<0x7942> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x7942> *native, NetPacket_Head<0x7942> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x7942> *network, Packet_Repeat<0x7942> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x7942> *native, NetPacket_Repeat<0x7942> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7943> *network, Packet_Fixed<0x7943> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7943> *native, NetPacket_Fixed<0x7943> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7944> *network, Packet_Fixed<0x7944> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7944> *native, NetPacket_Fixed<0x7944> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7945> *network, Packet_Fixed<0x7945> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7945> *native, NetPacket_Fixed<0x7945> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7946> *network, Packet_Fixed<0x7946> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7946> *native, NetPacket_Fixed<0x7946> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7947> *network, Packet_Fixed<0x7947> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7947> *native, NetPacket_Fixed<0x7947> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7948> *network, Packet_Fixed<0x7948> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->valid_until, native.valid_until); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7948> *native, NetPacket_Fixed<0x7948> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->valid_until, network.valid_until); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7949> *network, Packet_Fixed<0x7949> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->valid_until, native.valid_until); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7949> *native, NetPacket_Fixed<0x7949> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->valid_until, network.valid_until); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x794a> *network, Packet_Fixed<0x794a> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->ban_until, native.ban_until); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x794a> *native, NetPacket_Fixed<0x794a> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->ban_until, network.ban_until); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x794b> *network, Packet_Fixed<0x794b> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->ban_until, native.ban_until); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x794b> *native, NetPacket_Fixed<0x794b> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->ban_until, network.ban_until); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x794c> *network, Packet_Fixed<0x794c> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->ban_add, native.ban_add); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x794c> *native, NetPacket_Fixed<0x794c> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->ban_add, network.ban_add); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x794d> *network, Packet_Fixed<0x794d> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->ban_until, native.ban_until); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x794d> *native, NetPacket_Fixed<0x794d> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->ban_until, network.ban_until); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x794e> *network, Packet_Head<0x794e> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->unused, native.unused); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x794e> *native, NetPacket_Head<0x794e> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->unused, network.unused); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x794e> *network, Packet_Repeat<0x794e> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x794e> *native, NetPacket_Repeat<0x794e> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x794f> *network, Packet_Fixed<0x794f> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->error, native.error); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x794f> *native, NetPacket_Fixed<0x794f> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->error, network.error); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7950> *network, Packet_Fixed<0x7950> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->valid_add, native.valid_add); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7950> *native, NetPacket_Fixed<0x7950> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->valid_add, network.valid_add); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7951> *network, Packet_Fixed<0x7951> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->valid_until, native.valid_until); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7951> *native, NetPacket_Fixed<0x7951> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->valid_until, network.valid_until); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7952> *network, Packet_Fixed<0x7952> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7952> *native, NetPacket_Fixed<0x7952> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x7953> *network, Packet_Head<0x7953> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->gm_level, native.gm_level); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->sex, native.sex); - rv &= native_to_network(&network->login_count, native.login_count); - rv &= native_to_network(&network->state, native.state); - rv &= native_to_network(&network->error_message, native.error_message); - rv &= native_to_network(&network->last_login_string, native.last_login_string); - rv &= native_to_network(&network->ip_string, native.ip_string); - rv &= native_to_network(&network->email, native.email); - rv &= native_to_network(&network->connect_until, native.connect_until); - rv &= native_to_network(&network->ban_until, native.ban_until); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x7953> *native, NetPacket_Head<0x7953> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->gm_level, network.gm_level); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->sex, network.sex); - rv &= network_to_native(&native->login_count, network.login_count); - rv &= network_to_native(&native->state, network.state); - rv &= network_to_native(&native->error_message, network.error_message); - rv &= network_to_native(&native->last_login_string, network.last_login_string); - rv &= network_to_native(&native->ip_string, network.ip_string); - rv &= network_to_native(&native->email, network.email); - rv &= network_to_native(&native->connect_until, network.connect_until); - rv &= network_to_native(&native->ban_until, network.ban_until); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x7953> *network, Packet_Repeat<0x7953> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x7953> *native, NetPacket_Repeat<0x7953> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7954> *network, Packet_Fixed<0x7954> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7954> *native, NetPacket_Fixed<0x7954> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x7955> *network, Packet_Fixed<0x7955> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x7955> *native, NetPacket_Fixed<0x7955> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -} // namespace tmwa diff --git a/src/proto2/login-admin_test.cpp b/src/proto2/login-admin_test.cpp deleted file mode 100644 index 1bc322d..0000000 --- a/src/proto2/login-admin_test.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "login-admin.hpp" -// login-admin_test.cpp - TMWA network protocol: login/admin -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "../poison.hpp" - -namespace tmwa -{ -} // namespace tmwa diff --git a/src/proto2/login-char.hpp b/src/proto2/login-char.hpp deleted file mode 100644 index 00fe2ac..0000000 --- a/src/proto2/login-char.hpp +++ /dev/null @@ -1,1192 +0,0 @@ -#pragma once -// login-char.hpp - TMWA network protocol: login/char -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "fwd.hpp" - -#include "types.hpp" - -namespace tmwa -{ -// This is an internal protocol, and can be changed without notice - -template<> -struct Packet_Fixed<0x2709> -{ - static const uint16_t PACKET_ID = 0x2709; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x2710> -{ - static const uint16_t PACKET_ID = 0x2710; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountName account_name = {}; - AccountPass account_pass = {}; - uint32_t unknown = {}; - IP4Address ip = {}; - uint16_t port = {}; - ServerName server_name = {}; - uint16_t unknown2 = {}; - uint16_t maintenance = {}; - uint16_t is_new = {}; -}; - -template<> -struct Packet_Fixed<0x2711> -{ - static const uint16_t PACKET_ID = 0x2711; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t code = {}; -}; - -template<> -struct Packet_Fixed<0x2712> -{ - static const uint16_t PACKET_ID = 0x2712; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint32_t login_id1 = {}; - uint32_t login_id2 = {}; - SEX sex = {}; - IP4Address ip = {}; -}; - -template<> -struct Packet_Fixed<0x2713> -{ - static const uint16_t PACKET_ID = 0x2713; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint8_t invalid = {}; - AccountEmail email = {}; - TimeT connect_until = {}; -}; - -template<> -struct Packet_Fixed<0x2714> -{ - static const uint16_t PACKET_ID = 0x2714; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint32_t users = {}; -}; - -template<> -struct Packet_Fixed<0x2716> -{ - static const uint16_t PACKET_ID = 0x2716; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Fixed<0x2717> -{ - static const uint16_t PACKET_ID = 0x2717; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountEmail email = {}; - TimeT connect_until = {}; -}; - -template<> -struct Packet_Head<0x2720> -{ - static const uint16_t PACKET_ID = 0x2720; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; -}; -template<> -struct Packet_Repeat<0x2720> -{ - static const uint16_t PACKET_ID = 0x2720; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x2721> -{ - static const uint16_t PACKET_ID = 0x2721; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - GmLevel gm_level = {}; -}; - -template<> -struct Packet_Fixed<0x2722> -{ - static const uint16_t PACKET_ID = 0x2722; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountEmail old_email = {}; - AccountEmail new_email = {}; -}; - -template<> -struct Packet_Fixed<0x2723> -{ - static const uint16_t PACKET_ID = 0x2723; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - SEX sex = {}; -}; - -template<> -struct Packet_Fixed<0x2724> -{ - static const uint16_t PACKET_ID = 0x2724; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint32_t status = {}; -}; - -template<> -struct Packet_Fixed<0x2725> -{ - static const uint16_t PACKET_ID = 0x2725; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - HumanTimeDiff ban_add = {}; -}; - -template<> -struct Packet_Fixed<0x2727> -{ - static const uint16_t PACKET_ID = 0x2727; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Head<0x2728> -{ - static const uint16_t PACKET_ID = 0x2728; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; -}; -template<> -struct Packet_Repeat<0x2728> -{ - static const uint16_t PACKET_ID = 0x2728; - - VarName name = {}; - uint32_t value = {}; -}; - -template<> -struct Packet_Head<0x2729> -{ - static const uint16_t PACKET_ID = 0x2729; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; -}; -template<> -struct Packet_Repeat<0x2729> -{ - static const uint16_t PACKET_ID = 0x2729; - - VarName name = {}; - uint32_t value = {}; -}; - -template<> -struct Packet_Fixed<0x272a> -{ - static const uint16_t PACKET_ID = 0x272a; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Fixed<0x2730> -{ - static const uint16_t PACKET_ID = 0x2730; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Fixed<0x2731> -{ - static const uint16_t PACKET_ID = 0x2731; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint8_t ban_not_status = {}; - TimeT status_or_ban_until = {}; -}; - -template<> -struct Packet_Head<0x2732> -{ - static const uint16_t PACKET_ID = 0x2732; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x2732> -{ - static const uint16_t PACKET_ID = 0x2732; - - AccountId account_id = {}; - GmLevel gm_level = {}; -}; - -template<> -struct Packet_Fixed<0x2740> -{ - static const uint16_t PACKET_ID = 0x2740; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - AccountPass old_pass = {}; - AccountPass new_pass = {}; -}; - -template<> -struct Packet_Fixed<0x2741> -{ - static const uint16_t PACKET_ID = 0x2741; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint8_t status = {}; -}; - - -template<> -struct NetPacket_Fixed<0x2709> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x2709>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2709>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x2709>) == 2, "sizeof(NetPacket_Fixed<0x2709>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x2709>) == 1, "alignof(NetPacket_Fixed<0x2709>) == 1"); - -template<> -struct NetPacket_Fixed<0x2710> -{ - Little16 magic_packet_id; - NetString<sizeof(AccountName)> account_name; - NetString<sizeof(AccountPass)> account_pass; - Little32 unknown; - IP4Address ip; - Little16 port; - NetString<sizeof(ServerName)> server_name; - Little16 unknown2; - Little16 maintenance; - Little16 is_new; -}; -static_assert(offsetof(NetPacket_Fixed<0x2710>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2710>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2710>, account_name) == 2, "offsetof(NetPacket_Fixed<0x2710>, account_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2710>, account_pass) == 26, "offsetof(NetPacket_Fixed<0x2710>, account_pass) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x2710>, unknown) == 50, "offsetof(NetPacket_Fixed<0x2710>, unknown) == 50"); -static_assert(offsetof(NetPacket_Fixed<0x2710>, ip) == 54, "offsetof(NetPacket_Fixed<0x2710>, ip) == 54"); -static_assert(offsetof(NetPacket_Fixed<0x2710>, port) == 58, "offsetof(NetPacket_Fixed<0x2710>, port) == 58"); -static_assert(offsetof(NetPacket_Fixed<0x2710>, server_name) == 60, "offsetof(NetPacket_Fixed<0x2710>, server_name) == 60"); -static_assert(offsetof(NetPacket_Fixed<0x2710>, unknown2) == 80, "offsetof(NetPacket_Fixed<0x2710>, unknown2) == 80"); -static_assert(offsetof(NetPacket_Fixed<0x2710>, maintenance) == 82, "offsetof(NetPacket_Fixed<0x2710>, maintenance) == 82"); -static_assert(offsetof(NetPacket_Fixed<0x2710>, is_new) == 84, "offsetof(NetPacket_Fixed<0x2710>, is_new) == 84"); -static_assert(sizeof(NetPacket_Fixed<0x2710>) == 86, "sizeof(NetPacket_Fixed<0x2710>) == 86"); -static_assert(alignof(NetPacket_Fixed<0x2710>) == 1, "alignof(NetPacket_Fixed<0x2710>) == 1"); - -template<> -struct NetPacket_Fixed<0x2711> -{ - Little16 magic_packet_id; - Byte code; -}; -static_assert(offsetof(NetPacket_Fixed<0x2711>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2711>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2711>, code) == 2, "offsetof(NetPacket_Fixed<0x2711>, code) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x2711>) == 3, "sizeof(NetPacket_Fixed<0x2711>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x2711>) == 1, "alignof(NetPacket_Fixed<0x2711>) == 1"); - -template<> -struct NetPacket_Fixed<0x2712> -{ - Little16 magic_packet_id; - Little32 account_id; - Little32 login_id1; - Little32 login_id2; - Byte sex; - IP4Address ip; -}; -static_assert(offsetof(NetPacket_Fixed<0x2712>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2712>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2712>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2712>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2712>, login_id1) == 6, "offsetof(NetPacket_Fixed<0x2712>, login_id1) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2712>, login_id2) == 10, "offsetof(NetPacket_Fixed<0x2712>, login_id2) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x2712>, sex) == 14, "offsetof(NetPacket_Fixed<0x2712>, sex) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x2712>, ip) == 15, "offsetof(NetPacket_Fixed<0x2712>, ip) == 15"); -static_assert(sizeof(NetPacket_Fixed<0x2712>) == 19, "sizeof(NetPacket_Fixed<0x2712>) == 19"); -static_assert(alignof(NetPacket_Fixed<0x2712>) == 1, "alignof(NetPacket_Fixed<0x2712>) == 1"); - -template<> -struct NetPacket_Fixed<0x2713> -{ - Little16 magic_packet_id; - Little32 account_id; - Byte invalid; - NetString<sizeof(AccountEmail)> email; - Little32 connect_until; -}; -static_assert(offsetof(NetPacket_Fixed<0x2713>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2713>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2713>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2713>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2713>, invalid) == 6, "offsetof(NetPacket_Fixed<0x2713>, invalid) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2713>, email) == 7, "offsetof(NetPacket_Fixed<0x2713>, email) == 7"); -static_assert(offsetof(NetPacket_Fixed<0x2713>, connect_until) == 47, "offsetof(NetPacket_Fixed<0x2713>, connect_until) == 47"); -static_assert(sizeof(NetPacket_Fixed<0x2713>) == 51, "sizeof(NetPacket_Fixed<0x2713>) == 51"); -static_assert(alignof(NetPacket_Fixed<0x2713>) == 1, "alignof(NetPacket_Fixed<0x2713>) == 1"); - -template<> -struct NetPacket_Fixed<0x2714> -{ - Little16 magic_packet_id; - Little32 users; -}; -static_assert(offsetof(NetPacket_Fixed<0x2714>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2714>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2714>, users) == 2, "offsetof(NetPacket_Fixed<0x2714>, users) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x2714>) == 6, "sizeof(NetPacket_Fixed<0x2714>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x2714>) == 1, "alignof(NetPacket_Fixed<0x2714>) == 1"); - -template<> -struct NetPacket_Fixed<0x2716> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x2716>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2716>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2716>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2716>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x2716>) == 6, "sizeof(NetPacket_Fixed<0x2716>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x2716>) == 1, "alignof(NetPacket_Fixed<0x2716>) == 1"); - -template<> -struct NetPacket_Fixed<0x2717> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountEmail)> email; - Little32 connect_until; -}; -static_assert(offsetof(NetPacket_Fixed<0x2717>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2717>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2717>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2717>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2717>, email) == 6, "offsetof(NetPacket_Fixed<0x2717>, email) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2717>, connect_until) == 46, "offsetof(NetPacket_Fixed<0x2717>, connect_until) == 46"); -static_assert(sizeof(NetPacket_Fixed<0x2717>) == 50, "sizeof(NetPacket_Fixed<0x2717>) == 50"); -static_assert(alignof(NetPacket_Fixed<0x2717>) == 1, "alignof(NetPacket_Fixed<0x2717>) == 1"); - -template<> -struct NetPacket_Head<0x2720> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Head<0x2720>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2720>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2720>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x2720>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x2720>, account_id) == 4, "offsetof(NetPacket_Head<0x2720>, account_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x2720>) == 8, "sizeof(NetPacket_Head<0x2720>) == 8"); -static_assert(alignof(NetPacket_Head<0x2720>) == 1, "alignof(NetPacket_Head<0x2720>) == 1"); -template<> -struct NetPacket_Repeat<0x2720> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x2720>, c) == 0, "offsetof(NetPacket_Repeat<0x2720>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x2720>) == 1, "sizeof(NetPacket_Repeat<0x2720>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x2720>) == 1, "alignof(NetPacket_Repeat<0x2720>) == 1"); - -template<> -struct NetPacket_Fixed<0x2721> -{ - Little16 magic_packet_id; - Little32 account_id; - Little32 gm_level; -}; -static_assert(offsetof(NetPacket_Fixed<0x2721>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2721>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2721>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2721>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2721>, gm_level) == 6, "offsetof(NetPacket_Fixed<0x2721>, gm_level) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x2721>) == 10, "sizeof(NetPacket_Fixed<0x2721>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x2721>) == 1, "alignof(NetPacket_Fixed<0x2721>) == 1"); - -template<> -struct NetPacket_Fixed<0x2722> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountEmail)> old_email; - NetString<sizeof(AccountEmail)> new_email; -}; -static_assert(offsetof(NetPacket_Fixed<0x2722>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2722>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2722>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2722>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2722>, old_email) == 6, "offsetof(NetPacket_Fixed<0x2722>, old_email) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2722>, new_email) == 46, "offsetof(NetPacket_Fixed<0x2722>, new_email) == 46"); -static_assert(sizeof(NetPacket_Fixed<0x2722>) == 86, "sizeof(NetPacket_Fixed<0x2722>) == 86"); -static_assert(alignof(NetPacket_Fixed<0x2722>) == 1, "alignof(NetPacket_Fixed<0x2722>) == 1"); - -template<> -struct NetPacket_Fixed<0x2723> -{ - Little16 magic_packet_id; - Little32 account_id; - Byte sex; -}; -static_assert(offsetof(NetPacket_Fixed<0x2723>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2723>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2723>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2723>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2723>, sex) == 6, "offsetof(NetPacket_Fixed<0x2723>, sex) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x2723>) == 7, "sizeof(NetPacket_Fixed<0x2723>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x2723>) == 1, "alignof(NetPacket_Fixed<0x2723>) == 1"); - -template<> -struct NetPacket_Fixed<0x2724> -{ - Little16 magic_packet_id; - Little32 account_id; - Little32 status; -}; -static_assert(offsetof(NetPacket_Fixed<0x2724>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2724>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2724>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2724>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2724>, status) == 6, "offsetof(NetPacket_Fixed<0x2724>, status) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x2724>) == 10, "sizeof(NetPacket_Fixed<0x2724>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x2724>) == 1, "alignof(NetPacket_Fixed<0x2724>) == 1"); - -template<> -struct NetPacket_Fixed<0x2725> -{ - Little16 magic_packet_id; - Little32 account_id; - NetHumanTimeDiff ban_add; -}; -static_assert(offsetof(NetPacket_Fixed<0x2725>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2725>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2725>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2725>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2725>, ban_add) == 6, "offsetof(NetPacket_Fixed<0x2725>, ban_add) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x2725>) == 18, "sizeof(NetPacket_Fixed<0x2725>) == 18"); -static_assert(alignof(NetPacket_Fixed<0x2725>) == 1, "alignof(NetPacket_Fixed<0x2725>) == 1"); - -template<> -struct NetPacket_Fixed<0x2727> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x2727>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2727>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2727>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2727>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x2727>) == 6, "sizeof(NetPacket_Fixed<0x2727>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x2727>) == 1, "alignof(NetPacket_Fixed<0x2727>) == 1"); - -template<> -struct NetPacket_Head<0x2728> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Head<0x2728>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2728>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2728>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x2728>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x2728>, account_id) == 4, "offsetof(NetPacket_Head<0x2728>, account_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x2728>) == 8, "sizeof(NetPacket_Head<0x2728>) == 8"); -static_assert(alignof(NetPacket_Head<0x2728>) == 1, "alignof(NetPacket_Head<0x2728>) == 1"); -template<> -struct NetPacket_Repeat<0x2728> -{ - NetString<sizeof(VarName)> name; - Little32 value; -}; -static_assert(offsetof(NetPacket_Repeat<0x2728>, name) == 0, "offsetof(NetPacket_Repeat<0x2728>, name) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x2728>, value) == 32, "offsetof(NetPacket_Repeat<0x2728>, value) == 32"); -static_assert(sizeof(NetPacket_Repeat<0x2728>) == 36, "sizeof(NetPacket_Repeat<0x2728>) == 36"); -static_assert(alignof(NetPacket_Repeat<0x2728>) == 1, "alignof(NetPacket_Repeat<0x2728>) == 1"); - -template<> -struct NetPacket_Head<0x2729> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Head<0x2729>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2729>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2729>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x2729>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x2729>, account_id) == 4, "offsetof(NetPacket_Head<0x2729>, account_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x2729>) == 8, "sizeof(NetPacket_Head<0x2729>) == 8"); -static_assert(alignof(NetPacket_Head<0x2729>) == 1, "alignof(NetPacket_Head<0x2729>) == 1"); -template<> -struct NetPacket_Repeat<0x2729> -{ - NetString<sizeof(VarName)> name; - Little32 value; -}; -static_assert(offsetof(NetPacket_Repeat<0x2729>, name) == 0, "offsetof(NetPacket_Repeat<0x2729>, name) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x2729>, value) == 32, "offsetof(NetPacket_Repeat<0x2729>, value) == 32"); -static_assert(sizeof(NetPacket_Repeat<0x2729>) == 36, "sizeof(NetPacket_Repeat<0x2729>) == 36"); -static_assert(alignof(NetPacket_Repeat<0x2729>) == 1, "alignof(NetPacket_Repeat<0x2729>) == 1"); - -template<> -struct NetPacket_Fixed<0x272a> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x272a>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x272a>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x272a>, account_id) == 2, "offsetof(NetPacket_Fixed<0x272a>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x272a>) == 6, "sizeof(NetPacket_Fixed<0x272a>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x272a>) == 1, "alignof(NetPacket_Fixed<0x272a>) == 1"); - -template<> -struct NetPacket_Fixed<0x2730> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x2730>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2730>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2730>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2730>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x2730>) == 6, "sizeof(NetPacket_Fixed<0x2730>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x2730>) == 1, "alignof(NetPacket_Fixed<0x2730>) == 1"); - -template<> -struct NetPacket_Fixed<0x2731> -{ - Little16 magic_packet_id; - Little32 account_id; - Byte ban_not_status; - Little32 status_or_ban_until; -}; -static_assert(offsetof(NetPacket_Fixed<0x2731>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2731>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2731>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2731>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2731>, ban_not_status) == 6, "offsetof(NetPacket_Fixed<0x2731>, ban_not_status) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2731>, status_or_ban_until) == 7, "offsetof(NetPacket_Fixed<0x2731>, status_or_ban_until) == 7"); -static_assert(sizeof(NetPacket_Fixed<0x2731>) == 11, "sizeof(NetPacket_Fixed<0x2731>) == 11"); -static_assert(alignof(NetPacket_Fixed<0x2731>) == 1, "alignof(NetPacket_Fixed<0x2731>) == 1"); - -template<> -struct NetPacket_Head<0x2732> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x2732>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x2732>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x2732>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x2732>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x2732>) == 4, "sizeof(NetPacket_Head<0x2732>) == 4"); -static_assert(alignof(NetPacket_Head<0x2732>) == 1, "alignof(NetPacket_Head<0x2732>) == 1"); -template<> -struct NetPacket_Repeat<0x2732> -{ - Little32 account_id; - Byte gm_level; -}; -static_assert(offsetof(NetPacket_Repeat<0x2732>, account_id) == 0, "offsetof(NetPacket_Repeat<0x2732>, account_id) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x2732>, gm_level) == 4, "offsetof(NetPacket_Repeat<0x2732>, gm_level) == 4"); -static_assert(sizeof(NetPacket_Repeat<0x2732>) == 5, "sizeof(NetPacket_Repeat<0x2732>) == 5"); -static_assert(alignof(NetPacket_Repeat<0x2732>) == 1, "alignof(NetPacket_Repeat<0x2732>) == 1"); - -template<> -struct NetPacket_Fixed<0x2740> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(AccountPass)> old_pass; - NetString<sizeof(AccountPass)> new_pass; -}; -static_assert(offsetof(NetPacket_Fixed<0x2740>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2740>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2740>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2740>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2740>, old_pass) == 6, "offsetof(NetPacket_Fixed<0x2740>, old_pass) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x2740>, new_pass) == 30, "offsetof(NetPacket_Fixed<0x2740>, new_pass) == 30"); -static_assert(sizeof(NetPacket_Fixed<0x2740>) == 54, "sizeof(NetPacket_Fixed<0x2740>) == 54"); -static_assert(alignof(NetPacket_Fixed<0x2740>) == 1, "alignof(NetPacket_Fixed<0x2740>) == 1"); - -template<> -struct NetPacket_Fixed<0x2741> -{ - Little16 magic_packet_id; - Little32 account_id; - Byte status; -}; -static_assert(offsetof(NetPacket_Fixed<0x2741>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x2741>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x2741>, account_id) == 2, "offsetof(NetPacket_Fixed<0x2741>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x2741>, status) == 6, "offsetof(NetPacket_Fixed<0x2741>, status) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x2741>) == 7, "sizeof(NetPacket_Fixed<0x2741>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x2741>) == 1, "alignof(NetPacket_Fixed<0x2741>) == 1"); - - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2709> *network, Packet_Fixed<0x2709> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2709> *native, NetPacket_Fixed<0x2709> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2710> *network, Packet_Fixed<0x2710> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->account_pass, native.account_pass); - rv &= native_to_network(&network->unknown, native.unknown); - rv &= native_to_network(&network->ip, native.ip); - rv &= native_to_network(&network->port, native.port); - rv &= native_to_network(&network->server_name, native.server_name); - rv &= native_to_network(&network->unknown2, native.unknown2); - rv &= native_to_network(&network->maintenance, native.maintenance); - rv &= native_to_network(&network->is_new, native.is_new); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2710> *native, NetPacket_Fixed<0x2710> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->account_pass, network.account_pass); - rv &= network_to_native(&native->unknown, network.unknown); - rv &= network_to_native(&native->ip, network.ip); - rv &= network_to_native(&native->port, network.port); - rv &= network_to_native(&native->server_name, network.server_name); - rv &= network_to_native(&native->unknown2, network.unknown2); - rv &= network_to_native(&native->maintenance, network.maintenance); - rv &= network_to_native(&native->is_new, network.is_new); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2711> *network, Packet_Fixed<0x2711> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->code, native.code); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2711> *native, NetPacket_Fixed<0x2711> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->code, network.code); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2712> *network, Packet_Fixed<0x2712> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->login_id1, native.login_id1); - rv &= native_to_network(&network->login_id2, native.login_id2); - rv &= native_to_network(&network->sex, native.sex); - rv &= native_to_network(&network->ip, native.ip); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2712> *native, NetPacket_Fixed<0x2712> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->login_id1, network.login_id1); - rv &= network_to_native(&native->login_id2, network.login_id2); - rv &= network_to_native(&native->sex, network.sex); - rv &= network_to_native(&native->ip, network.ip); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2713> *network, Packet_Fixed<0x2713> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->invalid, native.invalid); - rv &= native_to_network(&network->email, native.email); - rv &= native_to_network(&network->connect_until, native.connect_until); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2713> *native, NetPacket_Fixed<0x2713> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->invalid, network.invalid); - rv &= network_to_native(&native->email, network.email); - rv &= network_to_native(&native->connect_until, network.connect_until); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2714> *network, Packet_Fixed<0x2714> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->users, native.users); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2714> *native, NetPacket_Fixed<0x2714> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->users, network.users); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2716> *network, Packet_Fixed<0x2716> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2716> *native, NetPacket_Fixed<0x2716> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2717> *network, Packet_Fixed<0x2717> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->email, native.email); - rv &= native_to_network(&network->connect_until, native.connect_until); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2717> *native, NetPacket_Fixed<0x2717> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->email, network.email); - rv &= network_to_native(&native->connect_until, network.connect_until); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2720> *network, Packet_Head<0x2720> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2720> *native, NetPacket_Head<0x2720> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2720> *network, Packet_Repeat<0x2720> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2720> *native, NetPacket_Repeat<0x2720> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2721> *network, Packet_Fixed<0x2721> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->gm_level, native.gm_level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2721> *native, NetPacket_Fixed<0x2721> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->gm_level, network.gm_level); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2722> *network, Packet_Fixed<0x2722> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->old_email, native.old_email); - rv &= native_to_network(&network->new_email, native.new_email); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2722> *native, NetPacket_Fixed<0x2722> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->old_email, network.old_email); - rv &= network_to_native(&native->new_email, network.new_email); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2723> *network, Packet_Fixed<0x2723> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->sex, native.sex); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2723> *native, NetPacket_Fixed<0x2723> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->sex, network.sex); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2724> *network, Packet_Fixed<0x2724> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->status, native.status); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2724> *native, NetPacket_Fixed<0x2724> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->status, network.status); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2725> *network, Packet_Fixed<0x2725> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->ban_add, native.ban_add); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2725> *native, NetPacket_Fixed<0x2725> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->ban_add, network.ban_add); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2727> *network, Packet_Fixed<0x2727> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2727> *native, NetPacket_Fixed<0x2727> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2728> *network, Packet_Head<0x2728> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2728> *native, NetPacket_Head<0x2728> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2728> *network, Packet_Repeat<0x2728> native) -{ - bool rv = true; - rv &= native_to_network(&network->name, native.name); - rv &= native_to_network(&network->value, native.value); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2728> *native, NetPacket_Repeat<0x2728> network) -{ - bool rv = true; - rv &= network_to_native(&native->name, network.name); - rv &= network_to_native(&native->value, network.value); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2729> *network, Packet_Head<0x2729> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2729> *native, NetPacket_Head<0x2729> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2729> *network, Packet_Repeat<0x2729> native) -{ - bool rv = true; - rv &= native_to_network(&network->name, native.name); - rv &= native_to_network(&network->value, native.value); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2729> *native, NetPacket_Repeat<0x2729> network) -{ - bool rv = true; - rv &= network_to_native(&native->name, network.name); - rv &= network_to_native(&native->value, network.value); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x272a> *network, Packet_Fixed<0x272a> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x272a> *native, NetPacket_Fixed<0x272a> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2730> *network, Packet_Fixed<0x2730> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2730> *native, NetPacket_Fixed<0x2730> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2731> *network, Packet_Fixed<0x2731> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->ban_not_status, native.ban_not_status); - rv &= native_to_network(&network->status_or_ban_until, native.status_or_ban_until); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2731> *native, NetPacket_Fixed<0x2731> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->ban_not_status, network.ban_not_status); - rv &= network_to_native(&native->status_or_ban_until, network.status_or_ban_until); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x2732> *network, Packet_Head<0x2732> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x2732> *native, NetPacket_Head<0x2732> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x2732> *network, Packet_Repeat<0x2732> native) -{ - bool rv = true; - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->gm_level, native.gm_level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x2732> *native, NetPacket_Repeat<0x2732> network) -{ - bool rv = true; - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->gm_level, network.gm_level); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2740> *network, Packet_Fixed<0x2740> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->old_pass, native.old_pass); - rv &= native_to_network(&network->new_pass, native.new_pass); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2740> *native, NetPacket_Fixed<0x2740> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->old_pass, network.old_pass); - rv &= network_to_native(&native->new_pass, network.new_pass); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x2741> *network, Packet_Fixed<0x2741> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->status, native.status); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x2741> *native, NetPacket_Fixed<0x2741> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->status, network.status); - return rv; -} - -} // namespace tmwa diff --git a/src/proto2/login-char_test.cpp b/src/proto2/login-char_test.cpp deleted file mode 100644 index 0b61645..0000000 --- a/src/proto2/login-char_test.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "login-char.hpp" -// login-char_test.cpp - TMWA network protocol: login/char -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "../poison.hpp" - -namespace tmwa -{ -} // namespace tmwa diff --git a/src/proto2/login-user.hpp b/src/proto2/login-user.hpp deleted file mode 100644 index fb6fcc7..0000000 --- a/src/proto2/login-user.hpp +++ /dev/null @@ -1,325 +0,0 @@ -#pragma once -// login-user.hpp - TMWA network protocol: login/user -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "fwd.hpp" - -#include "types.hpp" - -namespace tmwa -{ -// This is a public protocol, and changes require client cooperation - -template<> -struct Packet_Head<0x0063> -{ - static const uint16_t PACKET_ID = 0x0063; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x0063> -{ - static const uint16_t PACKET_ID = 0x0063; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x0064> -{ - static const uint16_t PACKET_ID = 0x0064; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint32_t unknown = {}; - AccountName account_name = {}; - AccountPass account_pass = {}; - VERSION_2 version_2_flags = {}; -}; - -template<> -struct Packet_Head<0x0069> -{ - static const uint16_t PACKET_ID = 0x0069; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - uint32_t login_id1 = {}; - AccountId account_id = {}; - uint32_t login_id2 = {}; - uint32_t unused = {}; - timestamp_milliseconds_buffer last_login_string = {}; - uint16_t unused2 = {}; - SEX sex = {}; -}; -template<> -struct Packet_Repeat<0x0069> -{ - static const uint16_t PACKET_ID = 0x0069; - - IP4Address ip = {}; - uint16_t port = {}; - ServerName server_name = {}; - uint16_t users = {}; - uint16_t maintenance = {}; - uint16_t is_new = {}; -}; - -template<> -struct Packet_Fixed<0x006a> -{ - static const uint16_t PACKET_ID = 0x006a; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t error_code = {}; - timestamp_seconds_buffer error_message = {}; -}; - - -template<> -struct NetPacket_Head<0x0063> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x0063>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x0063>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x0063>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x0063>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x0063>) == 4, "sizeof(NetPacket_Head<0x0063>) == 4"); -static_assert(alignof(NetPacket_Head<0x0063>) == 1, "alignof(NetPacket_Head<0x0063>) == 1"); -template<> -struct NetPacket_Repeat<0x0063> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x0063>, c) == 0, "offsetof(NetPacket_Repeat<0x0063>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x0063>) == 1, "sizeof(NetPacket_Repeat<0x0063>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x0063>) == 1, "alignof(NetPacket_Repeat<0x0063>) == 1"); - -template<> -struct NetPacket_Fixed<0x0064> -{ - Little16 magic_packet_id; - Little32 unknown; - NetString<sizeof(AccountName)> account_name; - NetString<sizeof(AccountPass)> account_pass; - Byte version_2_flags; -}; -static_assert(offsetof(NetPacket_Fixed<0x0064>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0064>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0064>, unknown) == 2, "offsetof(NetPacket_Fixed<0x0064>, unknown) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0064>, account_name) == 6, "offsetof(NetPacket_Fixed<0x0064>, account_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0064>, account_pass) == 30, "offsetof(NetPacket_Fixed<0x0064>, account_pass) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x0064>, version_2_flags) == 54, "offsetof(NetPacket_Fixed<0x0064>, version_2_flags) == 54"); -static_assert(sizeof(NetPacket_Fixed<0x0064>) == 55, "sizeof(NetPacket_Fixed<0x0064>) == 55"); -static_assert(alignof(NetPacket_Fixed<0x0064>) == 1, "alignof(NetPacket_Fixed<0x0064>) == 1"); - -template<> -struct NetPacket_Head<0x0069> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 login_id1; - Little32 account_id; - Little32 login_id2; - Little32 unused; - NetString<sizeof(timestamp_milliseconds_buffer)> last_login_string; - Little16 unused2; - Byte sex; -}; -static_assert(offsetof(NetPacket_Head<0x0069>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x0069>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x0069>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x0069>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x0069>, login_id1) == 4, "offsetof(NetPacket_Head<0x0069>, login_id1) == 4"); -static_assert(offsetof(NetPacket_Head<0x0069>, account_id) == 8, "offsetof(NetPacket_Head<0x0069>, account_id) == 8"); -static_assert(offsetof(NetPacket_Head<0x0069>, login_id2) == 12, "offsetof(NetPacket_Head<0x0069>, login_id2) == 12"); -static_assert(offsetof(NetPacket_Head<0x0069>, unused) == 16, "offsetof(NetPacket_Head<0x0069>, unused) == 16"); -static_assert(offsetof(NetPacket_Head<0x0069>, last_login_string) == 20, "offsetof(NetPacket_Head<0x0069>, last_login_string) == 20"); -static_assert(offsetof(NetPacket_Head<0x0069>, unused2) == 44, "offsetof(NetPacket_Head<0x0069>, unused2) == 44"); -static_assert(offsetof(NetPacket_Head<0x0069>, sex) == 46, "offsetof(NetPacket_Head<0x0069>, sex) == 46"); -static_assert(sizeof(NetPacket_Head<0x0069>) == 47, "sizeof(NetPacket_Head<0x0069>) == 47"); -static_assert(alignof(NetPacket_Head<0x0069>) == 1, "alignof(NetPacket_Head<0x0069>) == 1"); -template<> -struct NetPacket_Repeat<0x0069> -{ - IP4Address ip; - Little16 port; - NetString<sizeof(ServerName)> server_name; - Little16 users; - Little16 maintenance; - Little16 is_new; -}; -static_assert(offsetof(NetPacket_Repeat<0x0069>, ip) == 0, "offsetof(NetPacket_Repeat<0x0069>, ip) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x0069>, port) == 4, "offsetof(NetPacket_Repeat<0x0069>, port) == 4"); -static_assert(offsetof(NetPacket_Repeat<0x0069>, server_name) == 6, "offsetof(NetPacket_Repeat<0x0069>, server_name) == 6"); -static_assert(offsetof(NetPacket_Repeat<0x0069>, users) == 26, "offsetof(NetPacket_Repeat<0x0069>, users) == 26"); -static_assert(offsetof(NetPacket_Repeat<0x0069>, maintenance) == 28, "offsetof(NetPacket_Repeat<0x0069>, maintenance) == 28"); -static_assert(offsetof(NetPacket_Repeat<0x0069>, is_new) == 30, "offsetof(NetPacket_Repeat<0x0069>, is_new) == 30"); -static_assert(sizeof(NetPacket_Repeat<0x0069>) == 32, "sizeof(NetPacket_Repeat<0x0069>) == 32"); -static_assert(alignof(NetPacket_Repeat<0x0069>) == 1, "alignof(NetPacket_Repeat<0x0069>) == 1"); - -template<> -struct NetPacket_Fixed<0x006a> -{ - Little16 magic_packet_id; - Byte error_code; - NetString<sizeof(timestamp_seconds_buffer)> error_message; -}; -static_assert(offsetof(NetPacket_Fixed<0x006a>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x006a>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x006a>, error_code) == 2, "offsetof(NetPacket_Fixed<0x006a>, error_code) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x006a>, error_message) == 3, "offsetof(NetPacket_Fixed<0x006a>, error_message) == 3"); -static_assert(sizeof(NetPacket_Fixed<0x006a>) == 23, "sizeof(NetPacket_Fixed<0x006a>) == 23"); -static_assert(alignof(NetPacket_Fixed<0x006a>) == 1, "alignof(NetPacket_Fixed<0x006a>) == 1"); - - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x0063> *network, Packet_Head<0x0063> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x0063> *native, NetPacket_Head<0x0063> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x0063> *network, Packet_Repeat<0x0063> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x0063> *native, NetPacket_Repeat<0x0063> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0064> *network, Packet_Fixed<0x0064> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->unknown, native.unknown); - rv &= native_to_network(&network->account_name, native.account_name); - rv &= native_to_network(&network->account_pass, native.account_pass); - rv &= native_to_network(&network->version_2_flags, native.version_2_flags); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0064> *native, NetPacket_Fixed<0x0064> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->unknown, network.unknown); - rv &= network_to_native(&native->account_name, network.account_name); - rv &= network_to_native(&native->account_pass, network.account_pass); - rv &= network_to_native(&native->version_2_flags, network.version_2_flags); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x0069> *network, Packet_Head<0x0069> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->login_id1, native.login_id1); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->login_id2, native.login_id2); - rv &= native_to_network(&network->unused, native.unused); - rv &= native_to_network(&network->last_login_string, native.last_login_string); - rv &= native_to_network(&network->unused2, native.unused2); - rv &= native_to_network(&network->sex, native.sex); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x0069> *native, NetPacket_Head<0x0069> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->login_id1, network.login_id1); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->login_id2, network.login_id2); - rv &= network_to_native(&native->unused, network.unused); - rv &= network_to_native(&native->last_login_string, network.last_login_string); - rv &= network_to_native(&native->unused2, network.unused2); - rv &= network_to_native(&native->sex, network.sex); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x0069> *network, Packet_Repeat<0x0069> native) -{ - bool rv = true; - rv &= native_to_network(&network->ip, native.ip); - rv &= native_to_network(&network->port, native.port); - rv &= native_to_network(&network->server_name, native.server_name); - rv &= native_to_network(&network->users, native.users); - rv &= native_to_network(&network->maintenance, native.maintenance); - rv &= native_to_network(&network->is_new, native.is_new); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x0069> *native, NetPacket_Repeat<0x0069> network) -{ - bool rv = true; - rv &= network_to_native(&native->ip, network.ip); - rv &= network_to_native(&native->port, network.port); - rv &= network_to_native(&native->server_name, network.server_name); - rv &= network_to_native(&native->users, network.users); - rv &= network_to_native(&native->maintenance, network.maintenance); - rv &= network_to_native(&native->is_new, network.is_new); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x006a> *network, Packet_Fixed<0x006a> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->error_code, native.error_code); - rv &= native_to_network(&network->error_message, native.error_message); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x006a> *native, NetPacket_Fixed<0x006a> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->error_code, network.error_code); - rv &= network_to_native(&native->error_message, network.error_message); - return rv; -} - -} // namespace tmwa diff --git a/src/proto2/login-user_test.cpp b/src/proto2/login-user_test.cpp deleted file mode 100644 index fa2128a..0000000 --- a/src/proto2/login-user_test.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "login-user.hpp" -// login-user_test.cpp - TMWA network protocol: login/user -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "../poison.hpp" - -namespace tmwa -{ -} // namespace tmwa diff --git a/src/proto2/map-user.hpp b/src/proto2/map-user.hpp deleted file mode 100644 index 630c4f2..0000000 --- a/src/proto2/map-user.hpp +++ /dev/null @@ -1,7931 +0,0 @@ -#pragma once -// map-user.hpp - TMWA network protocol: map/user -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "fwd.hpp" - -#include "types.hpp" - -namespace tmwa -{ -// This is a public protocol, and changes require client cooperation - -template<> -struct Packet_Fixed<0x0072> -{ - static const uint16_t PACKET_ID = 0x0072; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - CharId char_id = {}; - uint32_t login_id1 = {}; - uint32_t client_tick = {}; - SEX sex = {}; -}; - -template<> -struct Packet_Fixed<0x0073> -{ - static const uint16_t PACKET_ID = 0x0073; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - tick_t tick = {}; - Position1 pos = {}; - uint8_t five1 = {}; - uint8_t five2 = {}; -}; - -template<> -struct Packet_Fixed<0x0078> -{ - static const uint16_t PACKET_ID = 0x0078; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - interval_t speed = {}; - Opt1 opt1 = {}; - Opt2 opt2 = {}; - Option option = {}; - Species species = {}; - uint16_t unused_hair_style = {}; - uint16_t unused_weapon = {}; - uint16_t unused_head_bottom_or_species_again = {}; - uint16_t unused_shield_or_part_of_guild_emblem = {}; - uint16_t unused_head_top_or_unused_part_of_guild_emblem = {}; - uint16_t unused_head_mid_or_part_of_guild_id = {}; - uint16_t unused_hair_color_or_part_of_guild_id = {}; - uint16_t unused_clothes_color = {}; - uint16_t unused_1 = {}; - uint16_t unused_2 = {}; - Position1 unused_pos_again = {}; - uint8_t unused_4b = {}; - uint16_t unused_5 = {}; - uint16_t unused_zero_1 = {}; - uint8_t unused_zero_2 = {}; - uint8_t unused_sex = {}; - Position1 pos = {}; - uint8_t five1 = {}; - uint8_t five2 = {}; - uint8_t zero = {}; - uint16_t level = {}; -}; - -template<> -struct Packet_Fixed<0x007b> -{ - static const uint16_t PACKET_ID = 0x007b; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - interval_t speed = {}; - Opt1 opt1 = {}; - Opt2 opt2 = {}; - Option option = {}; - Species mob_class = {}; - uint16_t unused_hair_style = {}; - uint16_t unused_weapon = {}; - uint16_t unused_head_bottom = {}; - tick_t tick_and_maybe_part_of_guild_emblem = {}; - uint16_t unused_shield_or_maybe_part_of_guild_emblem = {}; - uint16_t unused_head_top_or_maybe_part_of_guild_id = {}; - uint16_t unused_head_mid_or_maybe_part_of_guild_id = {}; - uint16_t unused_hair_color = {}; - uint16_t unused_clothes_color = {}; - uint16_t unused_1 = {}; - uint16_t unused_2 = {}; - uint16_t unused_3 = {}; - uint16_t unused_4 = {}; - uint16_t unused_5 = {}; - uint16_t unused_zero_1 = {}; - uint8_t unused_zero_2 = {}; - uint8_t unused_sex = {}; - Position2 pos2 = {}; - uint8_t zero = {}; - uint8_t five1 = {}; - uint8_t five2 = {}; - uint16_t level = {}; -}; - -template<> -struct Packet_Fixed<0x007c> -{ - static const uint16_t PACKET_ID = 0x007c; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - interval_t speed = {}; - Opt1 opt1 = {}; - Opt2 opt2 = {}; - Option option = {}; - uint16_t unknown_1 = {}; - uint16_t unknown_2 = {}; - uint16_t unknown_3 = {}; - Species species = {}; - uint16_t unknown_4 = {}; - uint16_t unknown_5 = {}; - uint16_t unknown_6 = {}; - uint16_t unknown_7 = {}; - uint16_t unknown_8 = {}; - uint16_t unknown_9 = {}; - uint16_t unknown_10 = {}; - Position1 pos = {}; - uint16_t unknown_11 = {}; -}; - -template<> -struct Packet_Fixed<0x007d> -{ - static const uint16_t PACKET_ID = 0x007d; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x007e> -{ - static const uint16_t PACKET_ID = 0x007e; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint32_t client_tick = {}; -}; - -template<> -struct Packet_Fixed<0x007f> -{ - static const uint16_t PACKET_ID = 0x007f; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - tick_t tick = {}; -}; - -template<> -struct Packet_Fixed<0x0080> -{ - static const uint16_t PACKET_ID = 0x0080; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - BeingRemoveWhy type = {}; -}; - -template<> -struct Packet_Fixed<0x0085> -{ - static const uint16_t PACKET_ID = 0x0085; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - Position1 pos = {}; -}; - -template<> -struct Packet_Fixed<0x0087> -{ - static const uint16_t PACKET_ID = 0x0087; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - tick_t tick = {}; - Position2 pos2 = {}; - uint8_t zero = {}; -}; - -template<> -struct Packet_Fixed<0x0088> -{ - static const uint16_t PACKET_ID = 0x0088; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - uint16_t x = {}; - uint16_t y = {}; -}; - -template<> -struct Packet_Fixed<0x0089> -{ - static const uint16_t PACKET_ID = 0x0089; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId target_id = {}; - DamageType action = {}; -}; - -template<> -struct Packet_Fixed<0x008a> -{ - static const uint16_t PACKET_ID = 0x008a; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId src_id = {}; - BlockId dst_id = {}; - tick_t tick = {}; - interval_t sdelay = {}; - interval_t ddelay = {}; - uint16_t damage = {}; - uint16_t div = {}; - DamageType damage_type = {}; - uint16_t damage2 = {}; -}; - -template<> -struct Packet_Head<0x008c> -{ - static const uint16_t PACKET_ID = 0x008c; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x008c> -{ - static const uint16_t PACKET_ID = 0x008c; - - uint8_t c = {}; -}; - -template<> -struct Packet_Head<0x008d> -{ - static const uint16_t PACKET_ID = 0x008d; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - BlockId block_id = {}; -}; -template<> -struct Packet_Repeat<0x008d> -{ - static const uint16_t PACKET_ID = 0x008d; - - uint8_t c = {}; -}; - -template<> -struct Packet_Head<0x008e> -{ - static const uint16_t PACKET_ID = 0x008e; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x008e> -{ - static const uint16_t PACKET_ID = 0x008e; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x0090> -{ - static const uint16_t PACKET_ID = 0x0090; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - uint8_t unused = {}; -}; - -template<> -struct Packet_Fixed<0x0091> -{ - static const uint16_t PACKET_ID = 0x0091; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - MapName map_name = {}; - uint16_t x = {}; - uint16_t y = {}; -}; - -template<> -struct Packet_Fixed<0x0092> -{ - static const uint16_t PACKET_ID = 0x0092; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - MapName map_name = {}; - uint16_t x = {}; - uint16_t y = {}; - IP4Address ip = {}; - uint16_t port = {}; -}; - -template<> -struct Packet_Fixed<0x0094> -{ - static const uint16_t PACKET_ID = 0x0094; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; -}; - -template<> -struct Packet_Fixed<0x0095> -{ - static const uint16_t PACKET_ID = 0x0095; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - CharName char_name = {}; -}; - -template<> -struct Packet_Head<0x0096> -{ - static const uint16_t PACKET_ID = 0x0096; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - CharName target_name = {}; -}; -template<> -struct Packet_Repeat<0x0096> -{ - static const uint16_t PACKET_ID = 0x0096; - - uint8_t c = {}; -}; - -template<> -struct Packet_Head<0x0097> -{ - static const uint16_t PACKET_ID = 0x0097; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - CharName char_name = {}; -}; -template<> -struct Packet_Repeat<0x0097> -{ - static const uint16_t PACKET_ID = 0x0097; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x0098> -{ - static const uint16_t PACKET_ID = 0x0098; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t flag = {}; -}; - -template<> -struct Packet_Head<0x009a> -{ - static const uint16_t PACKET_ID = 0x009a; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x009a> -{ - static const uint16_t PACKET_ID = 0x009a; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x009b> -{ - static const uint16_t PACKET_ID = 0x009b; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t unused = {}; - uint8_t client_dir = {}; -}; - -template<> -struct Packet_Fixed<0x009c> -{ - static const uint16_t PACKET_ID = 0x009c; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - uint16_t zero = {}; - uint8_t client_dir = {}; -}; - -template<> -struct Packet_Fixed<0x009d> -{ - static const uint16_t PACKET_ID = 0x009d; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - ItemNameId name_id = {}; - uint8_t identify = {}; - uint16_t x = {}; - uint16_t y = {}; - uint16_t amount = {}; - uint8_t subx = {}; - uint8_t suby = {}; -}; - -template<> -struct Packet_Fixed<0x009e> -{ - static const uint16_t PACKET_ID = 0x009e; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - ItemNameId name_id = {}; - uint8_t identify = {}; - uint16_t x = {}; - uint16_t y = {}; - uint8_t subx = {}; - uint8_t suby = {}; - uint16_t amount = {}; -}; - -template<> -struct Packet_Fixed<0x009f> -{ - static const uint16_t PACKET_ID = 0x009f; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId object_id = {}; -}; - -template<> -struct Packet_Fixed<0x00a0> -{ - static const uint16_t PACKET_ID = 0x00a0; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; - uint16_t amount = {}; - ItemNameId name_id = {}; - uint8_t identify = {}; - uint8_t broken_or_attribute = {}; - uint8_t refine = {}; - uint16_t card0 = {}; - uint16_t card1 = {}; - uint16_t card2 = {}; - uint16_t card3 = {}; - EPOS epos = {}; - ItemType item_type = {}; - PickupFail pickup_fail = {}; -}; - -template<> -struct Packet_Fixed<0x00a1> -{ - static const uint16_t PACKET_ID = 0x00a1; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; -}; - -template<> -struct Packet_Fixed<0x00a2> -{ - static const uint16_t PACKET_ID = 0x00a2; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; - uint16_t amount = {}; -}; - -template<> -struct Packet_Head<0x00a4> -{ - static const uint16_t PACKET_ID = 0x00a4; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x00a4> -{ - static const uint16_t PACKET_ID = 0x00a4; - - IOff2 ioff2 = {}; - ItemNameId name_id = {}; - ItemType item_type = {}; - uint8_t identify = {}; - EPOS epos_pc = {}; - EPOS epos_inv = {}; - uint8_t broken_or_attribute = {}; - uint8_t refine = {}; - uint16_t card0 = {}; - uint16_t card1 = {}; - uint16_t card2 = {}; - uint16_t card3 = {}; -}; - -template<> -struct Packet_Head<0x00a6> -{ - static const uint16_t PACKET_ID = 0x00a6; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x00a6> -{ - static const uint16_t PACKET_ID = 0x00a6; - - SOff1 soff1 = {}; - ItemNameId name_id = {}; - ItemType item_type = {}; - uint8_t identify = {}; - EPOS epos_id = {}; - EPOS epos_stor = {}; - uint8_t broken_or_attribute = {}; - uint8_t refine = {}; - uint16_t card0 = {}; - uint16_t card1 = {}; - uint16_t card2 = {}; - uint16_t card3 = {}; -}; - -template<> -struct Packet_Fixed<0x00a7> -{ - static const uint16_t PACKET_ID = 0x00a7; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; - uint32_t unused_id = {}; -}; - -template<> -struct Packet_Fixed<0x00a8> -{ - static const uint16_t PACKET_ID = 0x00a8; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; - uint16_t amount = {}; - uint8_t ok = {}; -}; - -template<> -struct Packet_Fixed<0x00a9> -{ - static const uint16_t PACKET_ID = 0x00a9; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; - EPOS epos_ignored = {}; -}; - -template<> -struct Packet_Fixed<0x00aa> -{ - static const uint16_t PACKET_ID = 0x00aa; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; - EPOS epos = {}; - uint8_t ok = {}; -}; - -template<> -struct Packet_Fixed<0x00ab> -{ - static const uint16_t PACKET_ID = 0x00ab; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; -}; - -template<> -struct Packet_Fixed<0x00ac> -{ - static const uint16_t PACKET_ID = 0x00ac; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; - EPOS epos = {}; - uint8_t ok = {}; -}; - -template<> -struct Packet_Fixed<0x00af> -{ - static const uint16_t PACKET_ID = 0x00af; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; - uint16_t amount = {}; -}; - -template<> -struct Packet_Fixed<0x00b0> -{ - static const uint16_t PACKET_ID = 0x00b0; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SP sp_type = {}; - uint32_t value = {}; -}; - -template<> -struct Packet_Fixed<0x00b1> -{ - static const uint16_t PACKET_ID = 0x00b1; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SP sp_type = {}; - uint32_t value = {}; -}; - -template<> -struct Packet_Fixed<0x00b2> -{ - static const uint16_t PACKET_ID = 0x00b2; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t flag = {}; -}; - -template<> -struct Packet_Fixed<0x00b3> -{ - static const uint16_t PACKET_ID = 0x00b3; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t one = {}; -}; - -template<> -struct Packet_Head<0x00b4> -{ - static const uint16_t PACKET_ID = 0x00b4; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - BlockId block_id = {}; -}; -template<> -struct Packet_Repeat<0x00b4> -{ - static const uint16_t PACKET_ID = 0x00b4; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x00b5> -{ - static const uint16_t PACKET_ID = 0x00b5; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; -}; - -template<> -struct Packet_Fixed<0x00b6> -{ - static const uint16_t PACKET_ID = 0x00b6; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; -}; - -template<> -struct Packet_Head<0x00b7> -{ - static const uint16_t PACKET_ID = 0x00b7; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - BlockId block_id = {}; -}; -template<> -struct Packet_Repeat<0x00b7> -{ - static const uint16_t PACKET_ID = 0x00b7; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x00b8> -{ - static const uint16_t PACKET_ID = 0x00b8; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId npc_id = {}; - uint8_t menu_entry = {}; -}; - -template<> -struct Packet_Fixed<0x00b9> -{ - static const uint16_t PACKET_ID = 0x00b9; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId npc_id = {}; -}; - -template<> -struct Packet_Fixed<0x00bb> -{ - static const uint16_t PACKET_ID = 0x00bb; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SP asp = {}; - uint8_t unused = {}; -}; - -template<> -struct Packet_Fixed<0x00bc> -{ - static const uint16_t PACKET_ID = 0x00bc; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SP sp_type = {}; - uint8_t ok = {}; - uint8_t val = {}; -}; - -template<> -struct Packet_Fixed<0x00bd> -{ - static const uint16_t PACKET_ID = 0x00bd; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t status_point = {}; - uint8_t str_attr = {}; - uint8_t str_upd = {}; - uint8_t agi_attr = {}; - uint8_t agi_upd = {}; - uint8_t vit_attr = {}; - uint8_t vit_upd = {}; - uint8_t int_attr = {}; - uint8_t int_upd = {}; - uint8_t dex_attr = {}; - uint8_t dex_upd = {}; - uint8_t luk_attr = {}; - uint8_t luk_upd = {}; - uint16_t atk_sum = {}; - uint16_t watk2 = {}; - uint16_t matk1 = {}; - uint16_t matk2 = {}; - uint16_t def = {}; - uint16_t def2 = {}; - uint16_t mdef = {}; - uint16_t mdef2 = {}; - uint16_t hit = {}; - uint16_t flee = {}; - uint16_t flee2 = {}; - uint16_t critical = {}; - uint16_t karma = {}; - uint16_t manner = {}; -}; - -template<> -struct Packet_Fixed<0x00be> -{ - static const uint16_t PACKET_ID = 0x00be; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SP sp_type = {}; - uint8_t value = {}; -}; - -template<> -struct Packet_Fixed<0x00bf> -{ - static const uint16_t PACKET_ID = 0x00bf; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t emote = {}; -}; - -template<> -struct Packet_Fixed<0x00c0> -{ - static const uint16_t PACKET_ID = 0x00c0; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - uint8_t type = {}; -}; - -template<> -struct Packet_Fixed<0x00c1> -{ - static const uint16_t PACKET_ID = 0x00c1; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x00c2> -{ - static const uint16_t PACKET_ID = 0x00c2; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint32_t users = {}; -}; - -template<> -struct Packet_Fixed<0x00c4> -{ - static const uint16_t PACKET_ID = 0x00c4; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; -}; - -template<> -struct Packet_Fixed<0x00c5> -{ - static const uint16_t PACKET_ID = 0x00c5; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - uint8_t type = {}; -}; - -template<> -struct Packet_Head<0x00c6> -{ - static const uint16_t PACKET_ID = 0x00c6; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x00c6> -{ - static const uint16_t PACKET_ID = 0x00c6; - - uint32_t base_price = {}; - uint32_t actual_price = {}; - ItemType type = {}; - ItemNameId name_id = {}; -}; - -template<> -struct Packet_Head<0x00c7> -{ - static const uint16_t PACKET_ID = 0x00c7; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x00c7> -{ - static const uint16_t PACKET_ID = 0x00c7; - - IOff2 ioff2 = {}; - uint32_t base_price = {}; - uint32_t actual_price = {}; -}; - -template<> -struct Packet_Head<0x00c8> -{ - static const uint16_t PACKET_ID = 0x00c8; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x00c8> -{ - static const uint16_t PACKET_ID = 0x00c8; - - uint16_t count = {}; - ItemNameId name_id = {}; -}; - -template<> -struct Packet_Head<0x00c9> -{ - static const uint16_t PACKET_ID = 0x00c9; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x00c9> -{ - static const uint16_t PACKET_ID = 0x00c9; - - IOff2 ioff2 = {}; - uint16_t count = {}; -}; - -template<> -struct Packet_Fixed<0x00ca> -{ - static const uint16_t PACKET_ID = 0x00ca; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t fail = {}; -}; - -template<> -struct Packet_Fixed<0x00cb> -{ - static const uint16_t PACKET_ID = 0x00cb; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t fail = {}; -}; - -template<> -struct Packet_Fixed<0x00cd> -{ - static const uint16_t PACKET_ID = 0x00cd; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Fixed<0x00e4> -{ - static const uint16_t PACKET_ID = 0x00e4; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; -}; - -template<> -struct Packet_Fixed<0x00e5> -{ - static const uint16_t PACKET_ID = 0x00e5; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - CharName char_name = {}; -}; - -template<> -struct Packet_Fixed<0x00e6> -{ - static const uint16_t PACKET_ID = 0x00e6; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t type = {}; -}; - -template<> -struct Packet_Fixed<0x00e7> -{ - static const uint16_t PACKET_ID = 0x00e7; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t type = {}; -}; - -template<> -struct Packet_Fixed<0x00e8> -{ - static const uint16_t PACKET_ID = 0x00e8; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 zeny_or_ioff2 = {}; - uint32_t amount = {}; -}; - -template<> -struct Packet_Fixed<0x00e9> -{ - static const uint16_t PACKET_ID = 0x00e9; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint32_t amount = {}; - ItemNameId name_id = {}; - uint8_t identify = {}; - uint8_t broken_or_attribute = {}; - uint8_t refine = {}; - uint16_t card0 = {}; - uint16_t card1 = {}; - uint16_t card2 = {}; - uint16_t card3 = {}; -}; - -template<> -struct Packet_Fixed<0x00eb> -{ - static const uint16_t PACKET_ID = 0x00eb; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x00ec> -{ - static const uint16_t PACKET_ID = 0x00ec; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t fail = {}; -}; - -template<> -struct Packet_Fixed<0x00ed> -{ - static const uint16_t PACKET_ID = 0x00ed; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x00ee> -{ - static const uint16_t PACKET_ID = 0x00ee; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x00ef> -{ - static const uint16_t PACKET_ID = 0x00ef; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x00f0> -{ - static const uint16_t PACKET_ID = 0x00f0; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t fail = {}; -}; - -template<> -struct Packet_Fixed<0x00f2> -{ - static const uint16_t PACKET_ID = 0x00f2; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t current_slots = {}; - uint16_t max_slots = {}; -}; - -template<> -struct Packet_Fixed<0x00f3> -{ - static const uint16_t PACKET_ID = 0x00f3; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; - uint32_t amount = {}; -}; - -template<> -struct Packet_Fixed<0x00f4> -{ - static const uint16_t PACKET_ID = 0x00f4; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SOff1 soff1 = {}; - uint32_t amount = {}; - ItemNameId name_id = {}; - uint8_t identify = {}; - uint8_t broken_or_attribute = {}; - uint8_t refine = {}; - uint16_t card0 = {}; - uint16_t card1 = {}; - uint16_t card2 = {}; - uint16_t card3 = {}; -}; - -template<> -struct Packet_Fixed<0x00f5> -{ - static const uint16_t PACKET_ID = 0x00f5; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SOff1 soff1 = {}; - uint32_t amount = {}; -}; - -template<> -struct Packet_Fixed<0x00f6> -{ - static const uint16_t PACKET_ID = 0x00f6; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SOff1 soff1 = {}; - uint32_t amount = {}; -}; - -template<> -struct Packet_Fixed<0x00f7> -{ - static const uint16_t PACKET_ID = 0x00f7; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x00f8> -{ - static const uint16_t PACKET_ID = 0x00f8; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x00f9> -{ - static const uint16_t PACKET_ID = 0x00f9; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - PartyName party_name = {}; -}; - -template<> -struct Packet_Fixed<0x00fa> -{ - static const uint16_t PACKET_ID = 0x00fa; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint8_t flag = {}; -}; - -template<> -struct Packet_Head<0x00fb> -{ - static const uint16_t PACKET_ID = 0x00fb; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - PartyName party_name = {}; -}; -template<> -struct Packet_Repeat<0x00fb> -{ - static const uint16_t PACKET_ID = 0x00fb; - - AccountId account_id = {}; - CharName char_name = {}; - MapName map_name = {}; - uint8_t leader = {}; - uint8_t online = {}; -}; - -template<> -struct Packet_Fixed<0x00fc> -{ - static const uint16_t PACKET_ID = 0x00fc; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; -}; - -template<> -struct Packet_Fixed<0x00fd> -{ - static const uint16_t PACKET_ID = 0x00fd; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - CharName char_name = {}; - uint8_t flag = {}; -}; - -template<> -struct Packet_Fixed<0x00fe> -{ - static const uint16_t PACKET_ID = 0x00fe; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - PartyName party_name = {}; -}; - -template<> -struct Packet_Fixed<0x00ff> -{ - static const uint16_t PACKET_ID = 0x00ff; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint32_t flag = {}; -}; - -template<> -struct Packet_Fixed<0x0100> -{ - static const uint16_t PACKET_ID = 0x0100; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x0101> -{ - static const uint16_t PACKET_ID = 0x0101; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t exp = {}; - uint16_t item = {}; -}; - -template<> -struct Packet_Fixed<0x0102> -{ - static const uint16_t PACKET_ID = 0x0102; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t exp = {}; - uint16_t item = {}; -}; - -template<> -struct Packet_Fixed<0x0103> -{ - static const uint16_t PACKET_ID = 0x0103; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - CharName unused_char_name = {}; -}; - -template<> -struct Packet_Fixed<0x0105> -{ - static const uint16_t PACKET_ID = 0x0105; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - CharName char_name = {}; - uint8_t flag = {}; -}; - -template<> -struct Packet_Fixed<0x0106> -{ - static const uint16_t PACKET_ID = 0x0106; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint16_t hp = {}; - uint16_t max_hp = {}; -}; - -template<> -struct Packet_Fixed<0x0107> -{ - static const uint16_t PACKET_ID = 0x0107; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - AccountId account_id = {}; - uint16_t x = {}; - uint16_t y = {}; -}; - -template<> -struct Packet_Head<0x0108> -{ - static const uint16_t PACKET_ID = 0x0108; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x0108> -{ - static const uint16_t PACKET_ID = 0x0108; - - uint8_t c = {}; -}; - -template<> -struct Packet_Head<0x0109> -{ - static const uint16_t PACKET_ID = 0x0109; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - AccountId account_id = {}; -}; -template<> -struct Packet_Repeat<0x0109> -{ - static const uint16_t PACKET_ID = 0x0109; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x010c> -{ - static const uint16_t PACKET_ID = 0x010c; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; -}; - -template<> -struct Packet_Fixed<0x010e> -{ - static const uint16_t PACKET_ID = 0x010e; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SkillID skill_id = {}; - uint16_t level = {}; - uint16_t sp = {}; - uint16_t range = {}; - uint8_t can_raise = {}; -}; - -template<> -struct Packet_Head<0x010f> -{ - static const uint16_t PACKET_ID = 0x010f; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x010f> -{ - static const uint16_t PACKET_ID = 0x010f; - - SkillInfo info = {}; -}; - -template<> -struct Packet_Fixed<0x0110> -{ - static const uint16_t PACKET_ID = 0x0110; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SkillID skill_id = {}; - uint16_t btype = {}; - uint16_t zero1 = {}; - uint8_t zero2 = {}; - uint8_t type = {}; -}; - -template<> -struct Packet_Fixed<0x0112> -{ - static const uint16_t PACKET_ID = 0x0112; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SkillID skill_id = {}; -}; - -template<> -struct Packet_Fixed<0x0118> -{ - static const uint16_t PACKET_ID = 0x0118; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x0119> -{ - static const uint16_t PACKET_ID = 0x0119; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - Opt1 opt1 = {}; - Opt2 opt2 = {}; - Option option = {}; - uint8_t zero = {}; -}; - -template<> -struct Packet_Fixed<0x0139> -{ - static const uint16_t PACKET_ID = 0x0139; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - uint16_t bl_x = {}; - uint16_t bl_y = {}; - uint16_t sd_x = {}; - uint16_t sd_y = {}; - uint16_t range = {}; -}; - -template<> -struct Packet_Fixed<0x013a> -{ - static const uint16_t PACKET_ID = 0x013a; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t attack_range = {}; -}; - -template<> -struct Packet_Fixed<0x013b> -{ - static const uint16_t PACKET_ID = 0x013b; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t type = {}; -}; - -template<> -struct Packet_Fixed<0x013c> -{ - static const uint16_t PACKET_ID = 0x013c; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; -}; - -template<> -struct Packet_Fixed<0x0141> -{ - static const uint16_t PACKET_ID = 0x0141; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SP sp_type = {}; - uint16_t zero = {}; - uint32_t value_status = {}; - uint32_t value_b_e = {}; -}; - -template<> -struct Packet_Fixed<0x0142> -{ - static const uint16_t PACKET_ID = 0x0142; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; -}; - -template<> -struct Packet_Fixed<0x0143> -{ - static const uint16_t PACKET_ID = 0x0143; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - uint32_t input_int_value = {}; -}; - -template<> -struct Packet_Fixed<0x0146> -{ - static const uint16_t PACKET_ID = 0x0146; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; -}; - -template<> -struct Packet_Fixed<0x0147> -{ - static const uint16_t PACKET_ID = 0x0147; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SkillInfo info = {}; -}; - -template<> -struct Packet_Fixed<0x0148> -{ - static const uint16_t PACKET_ID = 0x0148; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - uint16_t type = {}; -}; - -template<> -struct Packet_Fixed<0x014d> -{ - static const uint16_t PACKET_ID = 0x014d; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; -}; - -template<> -struct Packet_Fixed<0x018a> -{ - static const uint16_t PACKET_ID = 0x018a; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t unused = {}; -}; - -template<> -struct Packet_Fixed<0x018b> -{ - static const uint16_t PACKET_ID = 0x018b; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - uint16_t okay = {}; -}; - -template<> -struct Packet_Fixed<0x0195> -{ - static const uint16_t PACKET_ID = 0x0195; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - PartyName party_name = {}; - VString<23> guild_name = {}; - VString<23> guild_pos = {}; - VString<23> guild_pos_again = {}; -}; - -template<> -struct Packet_Fixed<0x0196> -{ - static const uint16_t PACKET_ID = 0x0196; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - StatusChange sc_type = {}; - BlockId block_id = {}; - uint8_t flag = {}; -}; - -template<> -struct Packet_Fixed<0x019b> -{ - static const uint16_t PACKET_ID = 0x019b; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - uint32_t type = {}; -}; - -template<> -struct Packet_Fixed<0x01b1> -{ - static const uint16_t PACKET_ID = 0x01b1; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; - uint16_t amount = {}; - uint8_t fail = {}; -}; - -template<> -struct Packet_Fixed<0x01c8> -{ - static const uint16_t PACKET_ID = 0x01c8; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - IOff2 ioff2 = {}; - ItemNameId name_id = {}; - BlockId block_id = {}; - uint16_t amount = {}; - uint8_t ok = {}; -}; - -template<> -struct Packet_Fixed<0x01d4> -{ - static const uint16_t PACKET_ID = 0x01d4; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; -}; - -template<> -struct Packet_Head<0x01d5> -{ - static const uint16_t PACKET_ID = 0x01d5; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; - BlockId block_id = {}; -}; -template<> -struct Packet_Repeat<0x01d5> -{ - static const uint16_t PACKET_ID = 0x01d5; - - uint8_t c = {}; -}; - -template<> -struct Packet_Fixed<0x01d7> -{ - static const uint16_t PACKET_ID = 0x01d7; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - LOOK look_type = {}; - uint16_t weapon_or_name_id_or_value = {}; - ItemNameId shield = {}; -}; - -template<> -struct Packet_Fixed<0x01d8> -{ - static const uint16_t PACKET_ID = 0x01d8; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - interval_t speed = {}; - Opt1 opt1 = {}; - Opt2 opt2 = {}; - Option option = {}; - Species species = {}; - uint16_t hair_style = {}; - ItemNameId weapon = {}; - ItemNameId shield = {}; - ItemNameId head_bottom = {}; - ItemNameId head_top = {}; - ItemNameId head_mid = {}; - uint16_t hair_color = {}; - uint16_t clothes_color = {}; - DIR head_dir = {}; - uint8_t unused2 = {}; - uint32_t guild_id = {}; - uint16_t guild_emblem_id = {}; - uint16_t manner = {}; - Opt3 opt3 = {}; - uint8_t karma = {}; - SEX sex = {}; - Position1 pos = {}; - uint16_t gm_bits = {}; - uint8_t dead_sit = {}; - uint16_t unused = {}; -}; - -template<> -struct Packet_Fixed<0x01d9> -{ - static const uint16_t PACKET_ID = 0x01d9; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - interval_t speed = {}; - Opt1 opt1 = {}; - Opt2 opt2 = {}; - Option option = {}; - Species species = {}; - uint16_t hair_style = {}; - ItemNameId weapon = {}; - ItemNameId shield = {}; - ItemNameId head_bottom = {}; - ItemNameId head_top = {}; - ItemNameId head_mid = {}; - uint16_t hair_color = {}; - uint16_t clothes_color = {}; - DIR head_dir = {}; - uint8_t unused2 = {}; - uint32_t guild_id = {}; - uint16_t guild_emblem_id = {}; - uint16_t manner = {}; - Opt3 opt3 = {}; - uint8_t karma = {}; - SEX sex = {}; - Position1 pos = {}; - uint16_t gm_bits = {}; - uint16_t unused = {}; -}; - -template<> -struct Packet_Fixed<0x01da> -{ - static const uint16_t PACKET_ID = 0x01da; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - interval_t speed = {}; - Opt1 opt1 = {}; - Opt2 opt2 = {}; - Option option = {}; - Species species = {}; - uint16_t hair_style = {}; - ItemNameId weapon = {}; - ItemNameId shield = {}; - ItemNameId head_bottom = {}; - tick_t tick = {}; - ItemNameId head_top = {}; - ItemNameId head_mid = {}; - uint16_t hair_color = {}; - uint16_t clothes_color = {}; - DIR head_dir = {}; - uint8_t unused2 = {}; - uint32_t guild_id = {}; - uint16_t guild_emblem_id = {}; - uint16_t manner = {}; - Opt3 opt3 = {}; - uint8_t karma = {}; - SEX sex = {}; - Position2 pos2 = {}; - uint16_t gm_bits = {}; - uint8_t five = {}; - uint16_t unused = {}; -}; - -template<> -struct Packet_Fixed<0x01de> -{ - static const uint16_t PACKET_ID = 0x01de; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - SkillID skill_id = {}; - BlockId src_id = {}; - BlockId dst_id = {}; - tick_t tick = {}; - interval_t sdelay = {}; - interval_t ddelay = {}; - uint32_t damage = {}; - uint16_t skill_level = {}; - uint16_t div = {}; - uint8_t type_or_hit = {}; -}; - -template<> -struct Packet_Head<0x01ee> -{ - static const uint16_t PACKET_ID = 0x01ee; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x01ee> -{ - static const uint16_t PACKET_ID = 0x01ee; - - IOff2 ioff2 = {}; - ItemNameId name_id = {}; - ItemType item_type = {}; - uint8_t identify = {}; - uint16_t amount = {}; - EPOS epos = {}; - uint16_t card0 = {}; - uint16_t card1 = {}; - uint16_t card2 = {}; - uint16_t card3 = {}; -}; - -template<> -struct Packet_Head<0x01f0> -{ - static const uint16_t PACKET_ID = 0x01f0; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - // TODO remove this - uint16_t magic_packet_length = {}; -}; -template<> -struct Packet_Repeat<0x01f0> -{ - static const uint16_t PACKET_ID = 0x01f0; - - SOff1 soff1 = {}; - ItemNameId name_id = {}; - ItemType item_type = {}; - uint8_t identify = {}; - uint16_t amount = {}; - EPOS epos_zero = {}; - uint16_t card0 = {}; - uint16_t card1 = {}; - uint16_t card2 = {}; - uint16_t card3 = {}; -}; - -template<> -struct Packet_Fixed<0x020c> -{ - static const uint16_t PACKET_ID = 0x020c; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId block_id = {}; - IP4Address ip = {}; -}; - -template<> -struct Packet_Fixed<0x0212> -{ - static const uint16_t PACKET_ID = 0x0212; - - // TODO remove this - uint16_t magic_packet_id = PACKET_ID; - BlockId npc_id = {}; - uint16_t command = {}; - BlockId id = {}; - uint16_t x = {}; - uint16_t y = {}; -}; - - -template<> -struct NetPacket_Fixed<0x0072> -{ - Little16 magic_packet_id; - Little32 account_id; - Little32 char_id; - Little32 login_id1; - Little32 client_tick; - Byte sex; -}; -static_assert(offsetof(NetPacket_Fixed<0x0072>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0072>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0072>, account_id) == 2, "offsetof(NetPacket_Fixed<0x0072>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0072>, char_id) == 6, "offsetof(NetPacket_Fixed<0x0072>, char_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0072>, login_id1) == 10, "offsetof(NetPacket_Fixed<0x0072>, login_id1) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x0072>, client_tick) == 14, "offsetof(NetPacket_Fixed<0x0072>, client_tick) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x0072>, sex) == 18, "offsetof(NetPacket_Fixed<0x0072>, sex) == 18"); -static_assert(sizeof(NetPacket_Fixed<0x0072>) == 19, "sizeof(NetPacket_Fixed<0x0072>) == 19"); -static_assert(alignof(NetPacket_Fixed<0x0072>) == 1, "alignof(NetPacket_Fixed<0x0072>) == 1"); - -template<> -struct NetPacket_Fixed<0x0073> -{ - Little16 magic_packet_id; - Little32 tick; - NetPosition1 pos; - Byte five1; - Byte five2; -}; -static_assert(offsetof(NetPacket_Fixed<0x0073>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0073>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0073>, tick) == 2, "offsetof(NetPacket_Fixed<0x0073>, tick) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0073>, pos) == 6, "offsetof(NetPacket_Fixed<0x0073>, pos) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0073>, five1) == 9, "offsetof(NetPacket_Fixed<0x0073>, five1) == 9"); -static_assert(offsetof(NetPacket_Fixed<0x0073>, five2) == 10, "offsetof(NetPacket_Fixed<0x0073>, five2) == 10"); -static_assert(sizeof(NetPacket_Fixed<0x0073>) == 11, "sizeof(NetPacket_Fixed<0x0073>) == 11"); -static_assert(alignof(NetPacket_Fixed<0x0073>) == 1, "alignof(NetPacket_Fixed<0x0073>) == 1"); - -template<> -struct NetPacket_Fixed<0x0078> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 speed; - Little16 opt1; - Little16 opt2; - Little16 option; - Little16 species; - Little16 unused_hair_style; - Little16 unused_weapon; - Little16 unused_head_bottom_or_species_again; - Little16 unused_shield_or_part_of_guild_emblem; - Little16 unused_head_top_or_unused_part_of_guild_emblem; - Little16 unused_head_mid_or_part_of_guild_id; - Little16 unused_hair_color_or_part_of_guild_id; - Little16 unused_clothes_color; - Little16 unused_1; - Little16 unused_2; - NetPosition1 unused_pos_again; - Byte unused_4b; - Little16 unused_5; - Little16 unused_zero_1; - Byte unused_zero_2; - Byte unused_sex; - NetPosition1 pos; - Byte five1; - Byte five2; - Byte zero; - Little16 level; -}; -static_assert(offsetof(NetPacket_Fixed<0x0078>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0078>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0078>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, speed) == 6, "offsetof(NetPacket_Fixed<0x0078>, speed) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, opt1) == 8, "offsetof(NetPacket_Fixed<0x0078>, opt1) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, opt2) == 10, "offsetof(NetPacket_Fixed<0x0078>, opt2) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, option) == 12, "offsetof(NetPacket_Fixed<0x0078>, option) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, species) == 14, "offsetof(NetPacket_Fixed<0x0078>, species) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_hair_style) == 16, "offsetof(NetPacket_Fixed<0x0078>, unused_hair_style) == 16"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_weapon) == 18, "offsetof(NetPacket_Fixed<0x0078>, unused_weapon) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_head_bottom_or_species_again) == 20, "offsetof(NetPacket_Fixed<0x0078>, unused_head_bottom_or_species_again) == 20"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_shield_or_part_of_guild_emblem) == 22, "offsetof(NetPacket_Fixed<0x0078>, unused_shield_or_part_of_guild_emblem) == 22"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_head_top_or_unused_part_of_guild_emblem) == 24, "offsetof(NetPacket_Fixed<0x0078>, unused_head_top_or_unused_part_of_guild_emblem) == 24"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_head_mid_or_part_of_guild_id) == 26, "offsetof(NetPacket_Fixed<0x0078>, unused_head_mid_or_part_of_guild_id) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_hair_color_or_part_of_guild_id) == 28, "offsetof(NetPacket_Fixed<0x0078>, unused_hair_color_or_part_of_guild_id) == 28"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_clothes_color) == 30, "offsetof(NetPacket_Fixed<0x0078>, unused_clothes_color) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_1) == 32, "offsetof(NetPacket_Fixed<0x0078>, unused_1) == 32"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_2) == 34, "offsetof(NetPacket_Fixed<0x0078>, unused_2) == 34"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_pos_again) == 36, "offsetof(NetPacket_Fixed<0x0078>, unused_pos_again) == 36"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_4b) == 39, "offsetof(NetPacket_Fixed<0x0078>, unused_4b) == 39"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_5) == 40, "offsetof(NetPacket_Fixed<0x0078>, unused_5) == 40"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_zero_1) == 42, "offsetof(NetPacket_Fixed<0x0078>, unused_zero_1) == 42"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_zero_2) == 44, "offsetof(NetPacket_Fixed<0x0078>, unused_zero_2) == 44"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, unused_sex) == 45, "offsetof(NetPacket_Fixed<0x0078>, unused_sex) == 45"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, pos) == 46, "offsetof(NetPacket_Fixed<0x0078>, pos) == 46"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, five1) == 49, "offsetof(NetPacket_Fixed<0x0078>, five1) == 49"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, five2) == 50, "offsetof(NetPacket_Fixed<0x0078>, five2) == 50"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, zero) == 51, "offsetof(NetPacket_Fixed<0x0078>, zero) == 51"); -static_assert(offsetof(NetPacket_Fixed<0x0078>, level) == 52, "offsetof(NetPacket_Fixed<0x0078>, level) == 52"); -static_assert(sizeof(NetPacket_Fixed<0x0078>) == 54, "sizeof(NetPacket_Fixed<0x0078>) == 54"); -static_assert(alignof(NetPacket_Fixed<0x0078>) == 1, "alignof(NetPacket_Fixed<0x0078>) == 1"); - -template<> -struct NetPacket_Fixed<0x007b> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 speed; - Little16 opt1; - Little16 opt2; - Little16 option; - Little16 mob_class; - Little16 unused_hair_style; - Little16 unused_weapon; - Little16 unused_head_bottom; - Little32 tick_and_maybe_part_of_guild_emblem; - Little16 unused_shield_or_maybe_part_of_guild_emblem; - Little16 unused_head_top_or_maybe_part_of_guild_id; - Little16 unused_head_mid_or_maybe_part_of_guild_id; - Little16 unused_hair_color; - Little16 unused_clothes_color; - Little16 unused_1; - Little16 unused_2; - Little16 unused_3; - Little16 unused_4; - Little16 unused_5; - Little16 unused_zero_1; - Byte unused_zero_2; - Byte unused_sex; - NetPosition2 pos2; - Byte zero; - Byte five1; - Byte five2; - Little16 level; -}; -static_assert(offsetof(NetPacket_Fixed<0x007b>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x007b>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, block_id) == 2, "offsetof(NetPacket_Fixed<0x007b>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, speed) == 6, "offsetof(NetPacket_Fixed<0x007b>, speed) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, opt1) == 8, "offsetof(NetPacket_Fixed<0x007b>, opt1) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, opt2) == 10, "offsetof(NetPacket_Fixed<0x007b>, opt2) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, option) == 12, "offsetof(NetPacket_Fixed<0x007b>, option) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, mob_class) == 14, "offsetof(NetPacket_Fixed<0x007b>, mob_class) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_hair_style) == 16, "offsetof(NetPacket_Fixed<0x007b>, unused_hair_style) == 16"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_weapon) == 18, "offsetof(NetPacket_Fixed<0x007b>, unused_weapon) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_head_bottom) == 20, "offsetof(NetPacket_Fixed<0x007b>, unused_head_bottom) == 20"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, tick_and_maybe_part_of_guild_emblem) == 22, "offsetof(NetPacket_Fixed<0x007b>, tick_and_maybe_part_of_guild_emblem) == 22"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_shield_or_maybe_part_of_guild_emblem) == 26, "offsetof(NetPacket_Fixed<0x007b>, unused_shield_or_maybe_part_of_guild_emblem) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_head_top_or_maybe_part_of_guild_id) == 28, "offsetof(NetPacket_Fixed<0x007b>, unused_head_top_or_maybe_part_of_guild_id) == 28"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_head_mid_or_maybe_part_of_guild_id) == 30, "offsetof(NetPacket_Fixed<0x007b>, unused_head_mid_or_maybe_part_of_guild_id) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_hair_color) == 32, "offsetof(NetPacket_Fixed<0x007b>, unused_hair_color) == 32"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_clothes_color) == 34, "offsetof(NetPacket_Fixed<0x007b>, unused_clothes_color) == 34"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_1) == 36, "offsetof(NetPacket_Fixed<0x007b>, unused_1) == 36"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_2) == 38, "offsetof(NetPacket_Fixed<0x007b>, unused_2) == 38"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_3) == 40, "offsetof(NetPacket_Fixed<0x007b>, unused_3) == 40"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_4) == 42, "offsetof(NetPacket_Fixed<0x007b>, unused_4) == 42"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_5) == 44, "offsetof(NetPacket_Fixed<0x007b>, unused_5) == 44"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_zero_1) == 46, "offsetof(NetPacket_Fixed<0x007b>, unused_zero_1) == 46"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_zero_2) == 48, "offsetof(NetPacket_Fixed<0x007b>, unused_zero_2) == 48"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, unused_sex) == 49, "offsetof(NetPacket_Fixed<0x007b>, unused_sex) == 49"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, pos2) == 50, "offsetof(NetPacket_Fixed<0x007b>, pos2) == 50"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, zero) == 55, "offsetof(NetPacket_Fixed<0x007b>, zero) == 55"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, five1) == 56, "offsetof(NetPacket_Fixed<0x007b>, five1) == 56"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, five2) == 57, "offsetof(NetPacket_Fixed<0x007b>, five2) == 57"); -static_assert(offsetof(NetPacket_Fixed<0x007b>, level) == 58, "offsetof(NetPacket_Fixed<0x007b>, level) == 58"); -static_assert(sizeof(NetPacket_Fixed<0x007b>) == 60, "sizeof(NetPacket_Fixed<0x007b>) == 60"); -static_assert(alignof(NetPacket_Fixed<0x007b>) == 1, "alignof(NetPacket_Fixed<0x007b>) == 1"); - -template<> -struct NetPacket_Fixed<0x007c> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 speed; - Little16 opt1; - Little16 opt2; - Little16 option; - Little16 unknown_1; - Little16 unknown_2; - Little16 unknown_3; - Little16 species; - Little16 unknown_4; - Little16 unknown_5; - Little16 unknown_6; - Little16 unknown_7; - Little16 unknown_8; - Little16 unknown_9; - Little16 unknown_10; - NetPosition1 pos; - Little16 unknown_11; -}; -static_assert(offsetof(NetPacket_Fixed<0x007c>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x007c>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, block_id) == 2, "offsetof(NetPacket_Fixed<0x007c>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, speed) == 6, "offsetof(NetPacket_Fixed<0x007c>, speed) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, opt1) == 8, "offsetof(NetPacket_Fixed<0x007c>, opt1) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, opt2) == 10, "offsetof(NetPacket_Fixed<0x007c>, opt2) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, option) == 12, "offsetof(NetPacket_Fixed<0x007c>, option) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, unknown_1) == 14, "offsetof(NetPacket_Fixed<0x007c>, unknown_1) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, unknown_2) == 16, "offsetof(NetPacket_Fixed<0x007c>, unknown_2) == 16"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, unknown_3) == 18, "offsetof(NetPacket_Fixed<0x007c>, unknown_3) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, species) == 20, "offsetof(NetPacket_Fixed<0x007c>, species) == 20"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, unknown_4) == 22, "offsetof(NetPacket_Fixed<0x007c>, unknown_4) == 22"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, unknown_5) == 24, "offsetof(NetPacket_Fixed<0x007c>, unknown_5) == 24"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, unknown_6) == 26, "offsetof(NetPacket_Fixed<0x007c>, unknown_6) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, unknown_7) == 28, "offsetof(NetPacket_Fixed<0x007c>, unknown_7) == 28"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, unknown_8) == 30, "offsetof(NetPacket_Fixed<0x007c>, unknown_8) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, unknown_9) == 32, "offsetof(NetPacket_Fixed<0x007c>, unknown_9) == 32"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, unknown_10) == 34, "offsetof(NetPacket_Fixed<0x007c>, unknown_10) == 34"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, pos) == 36, "offsetof(NetPacket_Fixed<0x007c>, pos) == 36"); -static_assert(offsetof(NetPacket_Fixed<0x007c>, unknown_11) == 39, "offsetof(NetPacket_Fixed<0x007c>, unknown_11) == 39"); -static_assert(sizeof(NetPacket_Fixed<0x007c>) == 41, "sizeof(NetPacket_Fixed<0x007c>) == 41"); -static_assert(alignof(NetPacket_Fixed<0x007c>) == 1, "alignof(NetPacket_Fixed<0x007c>) == 1"); - -template<> -struct NetPacket_Fixed<0x007d> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x007d>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x007d>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x007d>) == 2, "sizeof(NetPacket_Fixed<0x007d>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x007d>) == 1, "alignof(NetPacket_Fixed<0x007d>) == 1"); - -template<> -struct NetPacket_Fixed<0x007e> -{ - Little16 magic_packet_id; - Little32 client_tick; -}; -static_assert(offsetof(NetPacket_Fixed<0x007e>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x007e>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x007e>, client_tick) == 2, "offsetof(NetPacket_Fixed<0x007e>, client_tick) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x007e>) == 6, "sizeof(NetPacket_Fixed<0x007e>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x007e>) == 1, "alignof(NetPacket_Fixed<0x007e>) == 1"); - -template<> -struct NetPacket_Fixed<0x007f> -{ - Little16 magic_packet_id; - Little32 tick; -}; -static_assert(offsetof(NetPacket_Fixed<0x007f>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x007f>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x007f>, tick) == 2, "offsetof(NetPacket_Fixed<0x007f>, tick) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x007f>) == 6, "sizeof(NetPacket_Fixed<0x007f>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x007f>) == 1, "alignof(NetPacket_Fixed<0x007f>) == 1"); - -template<> -struct NetPacket_Fixed<0x0080> -{ - Little16 magic_packet_id; - Little32 block_id; - Byte type; -}; -static_assert(offsetof(NetPacket_Fixed<0x0080>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0080>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0080>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0080>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0080>, type) == 6, "offsetof(NetPacket_Fixed<0x0080>, type) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x0080>) == 7, "sizeof(NetPacket_Fixed<0x0080>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x0080>) == 1, "alignof(NetPacket_Fixed<0x0080>) == 1"); - -template<> -struct NetPacket_Fixed<0x0085> -{ - Little16 magic_packet_id; - NetPosition1 pos; -}; -static_assert(offsetof(NetPacket_Fixed<0x0085>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0085>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0085>, pos) == 2, "offsetof(NetPacket_Fixed<0x0085>, pos) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x0085>) == 5, "sizeof(NetPacket_Fixed<0x0085>) == 5"); -static_assert(alignof(NetPacket_Fixed<0x0085>) == 1, "alignof(NetPacket_Fixed<0x0085>) == 1"); - -template<> -struct NetPacket_Fixed<0x0087> -{ - Little16 magic_packet_id; - Little32 tick; - NetPosition2 pos2; - Byte zero; -}; -static_assert(offsetof(NetPacket_Fixed<0x0087>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0087>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0087>, tick) == 2, "offsetof(NetPacket_Fixed<0x0087>, tick) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0087>, pos2) == 6, "offsetof(NetPacket_Fixed<0x0087>, pos2) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0087>, zero) == 11, "offsetof(NetPacket_Fixed<0x0087>, zero) == 11"); -static_assert(sizeof(NetPacket_Fixed<0x0087>) == 12, "sizeof(NetPacket_Fixed<0x0087>) == 12"); -static_assert(alignof(NetPacket_Fixed<0x0087>) == 1, "alignof(NetPacket_Fixed<0x0087>) == 1"); - -template<> -struct NetPacket_Fixed<0x0088> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 x; - Little16 y; -}; -static_assert(offsetof(NetPacket_Fixed<0x0088>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0088>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0088>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0088>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0088>, x) == 6, "offsetof(NetPacket_Fixed<0x0088>, x) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0088>, y) == 8, "offsetof(NetPacket_Fixed<0x0088>, y) == 8"); -static_assert(sizeof(NetPacket_Fixed<0x0088>) == 10, "sizeof(NetPacket_Fixed<0x0088>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x0088>) == 1, "alignof(NetPacket_Fixed<0x0088>) == 1"); - -template<> -struct NetPacket_Fixed<0x0089> -{ - Little16 magic_packet_id; - Little32 target_id; - Byte action; -}; -static_assert(offsetof(NetPacket_Fixed<0x0089>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0089>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0089>, target_id) == 2, "offsetof(NetPacket_Fixed<0x0089>, target_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0089>, action) == 6, "offsetof(NetPacket_Fixed<0x0089>, action) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x0089>) == 7, "sizeof(NetPacket_Fixed<0x0089>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x0089>) == 1, "alignof(NetPacket_Fixed<0x0089>) == 1"); - -template<> -struct NetPacket_Fixed<0x008a> -{ - Little16 magic_packet_id; - Little32 src_id; - Little32 dst_id; - Little32 tick; - Little32 sdelay; - Little32 ddelay; - Little16 damage; - Little16 div; - Byte damage_type; - Little16 damage2; -}; -static_assert(offsetof(NetPacket_Fixed<0x008a>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x008a>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x008a>, src_id) == 2, "offsetof(NetPacket_Fixed<0x008a>, src_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x008a>, dst_id) == 6, "offsetof(NetPacket_Fixed<0x008a>, dst_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x008a>, tick) == 10, "offsetof(NetPacket_Fixed<0x008a>, tick) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x008a>, sdelay) == 14, "offsetof(NetPacket_Fixed<0x008a>, sdelay) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x008a>, ddelay) == 18, "offsetof(NetPacket_Fixed<0x008a>, ddelay) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x008a>, damage) == 22, "offsetof(NetPacket_Fixed<0x008a>, damage) == 22"); -static_assert(offsetof(NetPacket_Fixed<0x008a>, div) == 24, "offsetof(NetPacket_Fixed<0x008a>, div) == 24"); -static_assert(offsetof(NetPacket_Fixed<0x008a>, damage_type) == 26, "offsetof(NetPacket_Fixed<0x008a>, damage_type) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x008a>, damage2) == 27, "offsetof(NetPacket_Fixed<0x008a>, damage2) == 27"); -static_assert(sizeof(NetPacket_Fixed<0x008a>) == 29, "sizeof(NetPacket_Fixed<0x008a>) == 29"); -static_assert(alignof(NetPacket_Fixed<0x008a>) == 1, "alignof(NetPacket_Fixed<0x008a>) == 1"); - -template<> -struct NetPacket_Head<0x008c> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x008c>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x008c>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x008c>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x008c>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x008c>) == 4, "sizeof(NetPacket_Head<0x008c>) == 4"); -static_assert(alignof(NetPacket_Head<0x008c>) == 1, "alignof(NetPacket_Head<0x008c>) == 1"); -template<> -struct NetPacket_Repeat<0x008c> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x008c>, c) == 0, "offsetof(NetPacket_Repeat<0x008c>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x008c>) == 1, "sizeof(NetPacket_Repeat<0x008c>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x008c>) == 1, "alignof(NetPacket_Repeat<0x008c>) == 1"); - -template<> -struct NetPacket_Head<0x008d> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Head<0x008d>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x008d>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x008d>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x008d>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x008d>, block_id) == 4, "offsetof(NetPacket_Head<0x008d>, block_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x008d>) == 8, "sizeof(NetPacket_Head<0x008d>) == 8"); -static_assert(alignof(NetPacket_Head<0x008d>) == 1, "alignof(NetPacket_Head<0x008d>) == 1"); -template<> -struct NetPacket_Repeat<0x008d> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x008d>, c) == 0, "offsetof(NetPacket_Repeat<0x008d>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x008d>) == 1, "sizeof(NetPacket_Repeat<0x008d>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x008d>) == 1, "alignof(NetPacket_Repeat<0x008d>) == 1"); - -template<> -struct NetPacket_Head<0x008e> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x008e>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x008e>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x008e>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x008e>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x008e>) == 4, "sizeof(NetPacket_Head<0x008e>) == 4"); -static_assert(alignof(NetPacket_Head<0x008e>) == 1, "alignof(NetPacket_Head<0x008e>) == 1"); -template<> -struct NetPacket_Repeat<0x008e> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x008e>, c) == 0, "offsetof(NetPacket_Repeat<0x008e>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x008e>) == 1, "sizeof(NetPacket_Repeat<0x008e>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x008e>) == 1, "alignof(NetPacket_Repeat<0x008e>) == 1"); - -template<> -struct NetPacket_Fixed<0x0090> -{ - Little16 magic_packet_id; - Little32 block_id; - Byte unused; -}; -static_assert(offsetof(NetPacket_Fixed<0x0090>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0090>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0090>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0090>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0090>, unused) == 6, "offsetof(NetPacket_Fixed<0x0090>, unused) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x0090>) == 7, "sizeof(NetPacket_Fixed<0x0090>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x0090>) == 1, "alignof(NetPacket_Fixed<0x0090>) == 1"); - -template<> -struct NetPacket_Fixed<0x0091> -{ - Little16 magic_packet_id; - NetString<sizeof(MapName)> map_name; - Little16 x; - Little16 y; -}; -static_assert(offsetof(NetPacket_Fixed<0x0091>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0091>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0091>, map_name) == 2, "offsetof(NetPacket_Fixed<0x0091>, map_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0091>, x) == 18, "offsetof(NetPacket_Fixed<0x0091>, x) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x0091>, y) == 20, "offsetof(NetPacket_Fixed<0x0091>, y) == 20"); -static_assert(sizeof(NetPacket_Fixed<0x0091>) == 22, "sizeof(NetPacket_Fixed<0x0091>) == 22"); -static_assert(alignof(NetPacket_Fixed<0x0091>) == 1, "alignof(NetPacket_Fixed<0x0091>) == 1"); - -template<> -struct NetPacket_Fixed<0x0092> -{ - Little16 magic_packet_id; - NetString<sizeof(MapName)> map_name; - Little16 x; - Little16 y; - IP4Address ip; - Little16 port; -}; -static_assert(offsetof(NetPacket_Fixed<0x0092>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0092>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0092>, map_name) == 2, "offsetof(NetPacket_Fixed<0x0092>, map_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0092>, x) == 18, "offsetof(NetPacket_Fixed<0x0092>, x) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x0092>, y) == 20, "offsetof(NetPacket_Fixed<0x0092>, y) == 20"); -static_assert(offsetof(NetPacket_Fixed<0x0092>, ip) == 22, "offsetof(NetPacket_Fixed<0x0092>, ip) == 22"); -static_assert(offsetof(NetPacket_Fixed<0x0092>, port) == 26, "offsetof(NetPacket_Fixed<0x0092>, port) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x0092>) == 28, "sizeof(NetPacket_Fixed<0x0092>) == 28"); -static_assert(alignof(NetPacket_Fixed<0x0092>) == 1, "alignof(NetPacket_Fixed<0x0092>) == 1"); - -template<> -struct NetPacket_Fixed<0x0094> -{ - Little16 magic_packet_id; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x0094>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0094>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0094>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0094>, block_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x0094>) == 6, "sizeof(NetPacket_Fixed<0x0094>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x0094>) == 1, "alignof(NetPacket_Fixed<0x0094>) == 1"); - -template<> -struct NetPacket_Fixed<0x0095> -{ - Little16 magic_packet_id; - Little32 block_id; - NetString<sizeof(CharName)> char_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x0095>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0095>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0095>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0095>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0095>, char_name) == 6, "offsetof(NetPacket_Fixed<0x0095>, char_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x0095>) == 30, "sizeof(NetPacket_Fixed<0x0095>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x0095>) == 1, "alignof(NetPacket_Fixed<0x0095>) == 1"); - -template<> -struct NetPacket_Head<0x0096> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - NetString<sizeof(CharName)> target_name; -}; -static_assert(offsetof(NetPacket_Head<0x0096>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x0096>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x0096>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x0096>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x0096>, target_name) == 4, "offsetof(NetPacket_Head<0x0096>, target_name) == 4"); -static_assert(sizeof(NetPacket_Head<0x0096>) == 28, "sizeof(NetPacket_Head<0x0096>) == 28"); -static_assert(alignof(NetPacket_Head<0x0096>) == 1, "alignof(NetPacket_Head<0x0096>) == 1"); -template<> -struct NetPacket_Repeat<0x0096> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x0096>, c) == 0, "offsetof(NetPacket_Repeat<0x0096>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x0096>) == 1, "sizeof(NetPacket_Repeat<0x0096>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x0096>) == 1, "alignof(NetPacket_Repeat<0x0096>) == 1"); - -template<> -struct NetPacket_Head<0x0097> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - NetString<sizeof(CharName)> char_name; -}; -static_assert(offsetof(NetPacket_Head<0x0097>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x0097>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x0097>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x0097>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x0097>, char_name) == 4, "offsetof(NetPacket_Head<0x0097>, char_name) == 4"); -static_assert(sizeof(NetPacket_Head<0x0097>) == 28, "sizeof(NetPacket_Head<0x0097>) == 28"); -static_assert(alignof(NetPacket_Head<0x0097>) == 1, "alignof(NetPacket_Head<0x0097>) == 1"); -template<> -struct NetPacket_Repeat<0x0097> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x0097>, c) == 0, "offsetof(NetPacket_Repeat<0x0097>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x0097>) == 1, "sizeof(NetPacket_Repeat<0x0097>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x0097>) == 1, "alignof(NetPacket_Repeat<0x0097>) == 1"); - -template<> -struct NetPacket_Fixed<0x0098> -{ - Little16 magic_packet_id; - Byte flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x0098>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0098>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0098>, flag) == 2, "offsetof(NetPacket_Fixed<0x0098>, flag) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x0098>) == 3, "sizeof(NetPacket_Fixed<0x0098>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x0098>) == 1, "alignof(NetPacket_Fixed<0x0098>) == 1"); - -template<> -struct NetPacket_Head<0x009a> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x009a>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x009a>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x009a>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x009a>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x009a>) == 4, "sizeof(NetPacket_Head<0x009a>) == 4"); -static_assert(alignof(NetPacket_Head<0x009a>) == 1, "alignof(NetPacket_Head<0x009a>) == 1"); -template<> -struct NetPacket_Repeat<0x009a> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x009a>, c) == 0, "offsetof(NetPacket_Repeat<0x009a>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x009a>) == 1, "sizeof(NetPacket_Repeat<0x009a>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x009a>) == 1, "alignof(NetPacket_Repeat<0x009a>) == 1"); - -template<> -struct NetPacket_Fixed<0x009b> -{ - Little16 magic_packet_id; - Little16 unused; - Byte client_dir; -}; -static_assert(offsetof(NetPacket_Fixed<0x009b>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x009b>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x009b>, unused) == 2, "offsetof(NetPacket_Fixed<0x009b>, unused) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x009b>, client_dir) == 4, "offsetof(NetPacket_Fixed<0x009b>, client_dir) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x009b>) == 5, "sizeof(NetPacket_Fixed<0x009b>) == 5"); -static_assert(alignof(NetPacket_Fixed<0x009b>) == 1, "alignof(NetPacket_Fixed<0x009b>) == 1"); - -template<> -struct NetPacket_Fixed<0x009c> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 zero; - Byte client_dir; -}; -static_assert(offsetof(NetPacket_Fixed<0x009c>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x009c>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x009c>, block_id) == 2, "offsetof(NetPacket_Fixed<0x009c>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x009c>, zero) == 6, "offsetof(NetPacket_Fixed<0x009c>, zero) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x009c>, client_dir) == 8, "offsetof(NetPacket_Fixed<0x009c>, client_dir) == 8"); -static_assert(sizeof(NetPacket_Fixed<0x009c>) == 9, "sizeof(NetPacket_Fixed<0x009c>) == 9"); -static_assert(alignof(NetPacket_Fixed<0x009c>) == 1, "alignof(NetPacket_Fixed<0x009c>) == 1"); - -template<> -struct NetPacket_Fixed<0x009d> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 name_id; - Byte identify; - Little16 x; - Little16 y; - Little16 amount; - Byte subx; - Byte suby; -}; -static_assert(offsetof(NetPacket_Fixed<0x009d>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x009d>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x009d>, block_id) == 2, "offsetof(NetPacket_Fixed<0x009d>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x009d>, name_id) == 6, "offsetof(NetPacket_Fixed<0x009d>, name_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x009d>, identify) == 8, "offsetof(NetPacket_Fixed<0x009d>, identify) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x009d>, x) == 9, "offsetof(NetPacket_Fixed<0x009d>, x) == 9"); -static_assert(offsetof(NetPacket_Fixed<0x009d>, y) == 11, "offsetof(NetPacket_Fixed<0x009d>, y) == 11"); -static_assert(offsetof(NetPacket_Fixed<0x009d>, amount) == 13, "offsetof(NetPacket_Fixed<0x009d>, amount) == 13"); -static_assert(offsetof(NetPacket_Fixed<0x009d>, subx) == 15, "offsetof(NetPacket_Fixed<0x009d>, subx) == 15"); -static_assert(offsetof(NetPacket_Fixed<0x009d>, suby) == 16, "offsetof(NetPacket_Fixed<0x009d>, suby) == 16"); -static_assert(sizeof(NetPacket_Fixed<0x009d>) == 17, "sizeof(NetPacket_Fixed<0x009d>) == 17"); -static_assert(alignof(NetPacket_Fixed<0x009d>) == 1, "alignof(NetPacket_Fixed<0x009d>) == 1"); - -template<> -struct NetPacket_Fixed<0x009e> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 name_id; - Byte identify; - Little16 x; - Little16 y; - Byte subx; - Byte suby; - Little16 amount; -}; -static_assert(offsetof(NetPacket_Fixed<0x009e>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x009e>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x009e>, block_id) == 2, "offsetof(NetPacket_Fixed<0x009e>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x009e>, name_id) == 6, "offsetof(NetPacket_Fixed<0x009e>, name_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x009e>, identify) == 8, "offsetof(NetPacket_Fixed<0x009e>, identify) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x009e>, x) == 9, "offsetof(NetPacket_Fixed<0x009e>, x) == 9"); -static_assert(offsetof(NetPacket_Fixed<0x009e>, y) == 11, "offsetof(NetPacket_Fixed<0x009e>, y) == 11"); -static_assert(offsetof(NetPacket_Fixed<0x009e>, subx) == 13, "offsetof(NetPacket_Fixed<0x009e>, subx) == 13"); -static_assert(offsetof(NetPacket_Fixed<0x009e>, suby) == 14, "offsetof(NetPacket_Fixed<0x009e>, suby) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x009e>, amount) == 15, "offsetof(NetPacket_Fixed<0x009e>, amount) == 15"); -static_assert(sizeof(NetPacket_Fixed<0x009e>) == 17, "sizeof(NetPacket_Fixed<0x009e>) == 17"); -static_assert(alignof(NetPacket_Fixed<0x009e>) == 1, "alignof(NetPacket_Fixed<0x009e>) == 1"); - -template<> -struct NetPacket_Fixed<0x009f> -{ - Little16 magic_packet_id; - Little32 object_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x009f>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x009f>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x009f>, object_id) == 2, "offsetof(NetPacket_Fixed<0x009f>, object_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x009f>) == 6, "sizeof(NetPacket_Fixed<0x009f>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x009f>) == 1, "alignof(NetPacket_Fixed<0x009f>) == 1"); - -template<> -struct NetPacket_Fixed<0x00a0> -{ - Little16 magic_packet_id; - Little16 ioff2; - Little16 amount; - Little16 name_id; - Byte identify; - Byte broken_or_attribute; - Byte refine; - Little16 card0; - Little16 card1; - Little16 card2; - Little16 card3; - Little16 epos; - Byte item_type; - Byte pickup_fail; -}; -static_assert(offsetof(NetPacket_Fixed<0x00a0>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00a0>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x00a0>, ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, amount) == 4, "offsetof(NetPacket_Fixed<0x00a0>, amount) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, name_id) == 6, "offsetof(NetPacket_Fixed<0x00a0>, name_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, identify) == 8, "offsetof(NetPacket_Fixed<0x00a0>, identify) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, broken_or_attribute) == 9, "offsetof(NetPacket_Fixed<0x00a0>, broken_or_attribute) == 9"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, refine) == 10, "offsetof(NetPacket_Fixed<0x00a0>, refine) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, card0) == 11, "offsetof(NetPacket_Fixed<0x00a0>, card0) == 11"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, card1) == 13, "offsetof(NetPacket_Fixed<0x00a0>, card1) == 13"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, card2) == 15, "offsetof(NetPacket_Fixed<0x00a0>, card2) == 15"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, card3) == 17, "offsetof(NetPacket_Fixed<0x00a0>, card3) == 17"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, epos) == 19, "offsetof(NetPacket_Fixed<0x00a0>, epos) == 19"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, item_type) == 21, "offsetof(NetPacket_Fixed<0x00a0>, item_type) == 21"); -static_assert(offsetof(NetPacket_Fixed<0x00a0>, pickup_fail) == 22, "offsetof(NetPacket_Fixed<0x00a0>, pickup_fail) == 22"); -static_assert(sizeof(NetPacket_Fixed<0x00a0>) == 23, "sizeof(NetPacket_Fixed<0x00a0>) == 23"); -static_assert(alignof(NetPacket_Fixed<0x00a0>) == 1, "alignof(NetPacket_Fixed<0x00a0>) == 1"); - -template<> -struct NetPacket_Fixed<0x00a1> -{ - Little16 magic_packet_id; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00a1>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00a1>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00a1>, block_id) == 2, "offsetof(NetPacket_Fixed<0x00a1>, block_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00a1>) == 6, "sizeof(NetPacket_Fixed<0x00a1>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00a1>) == 1, "alignof(NetPacket_Fixed<0x00a1>) == 1"); - -template<> -struct NetPacket_Fixed<0x00a2> -{ - Little16 magic_packet_id; - Little16 ioff2; - Little16 amount; -}; -static_assert(offsetof(NetPacket_Fixed<0x00a2>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00a2>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00a2>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x00a2>, ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00a2>, amount) == 4, "offsetof(NetPacket_Fixed<0x00a2>, amount) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00a2>) == 6, "sizeof(NetPacket_Fixed<0x00a2>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00a2>) == 1, "alignof(NetPacket_Fixed<0x00a2>) == 1"); - -template<> -struct NetPacket_Head<0x00a4> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x00a4>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x00a4>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x00a4>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x00a4>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x00a4>) == 4, "sizeof(NetPacket_Head<0x00a4>) == 4"); -static_assert(alignof(NetPacket_Head<0x00a4>) == 1, "alignof(NetPacket_Head<0x00a4>) == 1"); -template<> -struct NetPacket_Repeat<0x00a4> -{ - Little16 ioff2; - Little16 name_id; - Byte item_type; - Byte identify; - Little16 epos_pc; - Little16 epos_inv; - Byte broken_or_attribute; - Byte refine; - Little16 card0; - Little16 card1; - Little16 card2; - Little16 card3; -}; -static_assert(offsetof(NetPacket_Repeat<0x00a4>, ioff2) == 0, "offsetof(NetPacket_Repeat<0x00a4>, ioff2) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x00a4>, name_id) == 2, "offsetof(NetPacket_Repeat<0x00a4>, name_id) == 2"); -static_assert(offsetof(NetPacket_Repeat<0x00a4>, item_type) == 4, "offsetof(NetPacket_Repeat<0x00a4>, item_type) == 4"); -static_assert(offsetof(NetPacket_Repeat<0x00a4>, identify) == 5, "offsetof(NetPacket_Repeat<0x00a4>, identify) == 5"); -static_assert(offsetof(NetPacket_Repeat<0x00a4>, epos_pc) == 6, "offsetof(NetPacket_Repeat<0x00a4>, epos_pc) == 6"); -static_assert(offsetof(NetPacket_Repeat<0x00a4>, epos_inv) == 8, "offsetof(NetPacket_Repeat<0x00a4>, epos_inv) == 8"); -static_assert(offsetof(NetPacket_Repeat<0x00a4>, broken_or_attribute) == 10, "offsetof(NetPacket_Repeat<0x00a4>, broken_or_attribute) == 10"); -static_assert(offsetof(NetPacket_Repeat<0x00a4>, refine) == 11, "offsetof(NetPacket_Repeat<0x00a4>, refine) == 11"); -static_assert(offsetof(NetPacket_Repeat<0x00a4>, card0) == 12, "offsetof(NetPacket_Repeat<0x00a4>, card0) == 12"); -static_assert(offsetof(NetPacket_Repeat<0x00a4>, card1) == 14, "offsetof(NetPacket_Repeat<0x00a4>, card1) == 14"); -static_assert(offsetof(NetPacket_Repeat<0x00a4>, card2) == 16, "offsetof(NetPacket_Repeat<0x00a4>, card2) == 16"); -static_assert(offsetof(NetPacket_Repeat<0x00a4>, card3) == 18, "offsetof(NetPacket_Repeat<0x00a4>, card3) == 18"); -static_assert(sizeof(NetPacket_Repeat<0x00a4>) == 20, "sizeof(NetPacket_Repeat<0x00a4>) == 20"); -static_assert(alignof(NetPacket_Repeat<0x00a4>) == 1, "alignof(NetPacket_Repeat<0x00a4>) == 1"); - -template<> -struct NetPacket_Head<0x00a6> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x00a6>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x00a6>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x00a6>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x00a6>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x00a6>) == 4, "sizeof(NetPacket_Head<0x00a6>) == 4"); -static_assert(alignof(NetPacket_Head<0x00a6>) == 1, "alignof(NetPacket_Head<0x00a6>) == 1"); -template<> -struct NetPacket_Repeat<0x00a6> -{ - Little16 soff1; - Little16 name_id; - Byte item_type; - Byte identify; - Little16 epos_id; - Little16 epos_stor; - Byte broken_or_attribute; - Byte refine; - Little16 card0; - Little16 card1; - Little16 card2; - Little16 card3; -}; -static_assert(offsetof(NetPacket_Repeat<0x00a6>, soff1) == 0, "offsetof(NetPacket_Repeat<0x00a6>, soff1) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x00a6>, name_id) == 2, "offsetof(NetPacket_Repeat<0x00a6>, name_id) == 2"); -static_assert(offsetof(NetPacket_Repeat<0x00a6>, item_type) == 4, "offsetof(NetPacket_Repeat<0x00a6>, item_type) == 4"); -static_assert(offsetof(NetPacket_Repeat<0x00a6>, identify) == 5, "offsetof(NetPacket_Repeat<0x00a6>, identify) == 5"); -static_assert(offsetof(NetPacket_Repeat<0x00a6>, epos_id) == 6, "offsetof(NetPacket_Repeat<0x00a6>, epos_id) == 6"); -static_assert(offsetof(NetPacket_Repeat<0x00a6>, epos_stor) == 8, "offsetof(NetPacket_Repeat<0x00a6>, epos_stor) == 8"); -static_assert(offsetof(NetPacket_Repeat<0x00a6>, broken_or_attribute) == 10, "offsetof(NetPacket_Repeat<0x00a6>, broken_or_attribute) == 10"); -static_assert(offsetof(NetPacket_Repeat<0x00a6>, refine) == 11, "offsetof(NetPacket_Repeat<0x00a6>, refine) == 11"); -static_assert(offsetof(NetPacket_Repeat<0x00a6>, card0) == 12, "offsetof(NetPacket_Repeat<0x00a6>, card0) == 12"); -static_assert(offsetof(NetPacket_Repeat<0x00a6>, card1) == 14, "offsetof(NetPacket_Repeat<0x00a6>, card1) == 14"); -static_assert(offsetof(NetPacket_Repeat<0x00a6>, card2) == 16, "offsetof(NetPacket_Repeat<0x00a6>, card2) == 16"); -static_assert(offsetof(NetPacket_Repeat<0x00a6>, card3) == 18, "offsetof(NetPacket_Repeat<0x00a6>, card3) == 18"); -static_assert(sizeof(NetPacket_Repeat<0x00a6>) == 20, "sizeof(NetPacket_Repeat<0x00a6>) == 20"); -static_assert(alignof(NetPacket_Repeat<0x00a6>) == 1, "alignof(NetPacket_Repeat<0x00a6>) == 1"); - -template<> -struct NetPacket_Fixed<0x00a7> -{ - Little16 magic_packet_id; - Little16 ioff2; - Little32 unused_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00a7>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00a7>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00a7>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x00a7>, ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00a7>, unused_id) == 4, "offsetof(NetPacket_Fixed<0x00a7>, unused_id) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00a7>) == 8, "sizeof(NetPacket_Fixed<0x00a7>) == 8"); -static_assert(alignof(NetPacket_Fixed<0x00a7>) == 1, "alignof(NetPacket_Fixed<0x00a7>) == 1"); - -template<> -struct NetPacket_Fixed<0x00a8> -{ - Little16 magic_packet_id; - Little16 ioff2; - Little16 amount; - Byte ok; -}; -static_assert(offsetof(NetPacket_Fixed<0x00a8>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00a8>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00a8>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x00a8>, ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00a8>, amount) == 4, "offsetof(NetPacket_Fixed<0x00a8>, amount) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x00a8>, ok) == 6, "offsetof(NetPacket_Fixed<0x00a8>, ok) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x00a8>) == 7, "sizeof(NetPacket_Fixed<0x00a8>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x00a8>) == 1, "alignof(NetPacket_Fixed<0x00a8>) == 1"); - -template<> -struct NetPacket_Fixed<0x00a9> -{ - Little16 magic_packet_id; - Little16 ioff2; - Little16 epos_ignored; -}; -static_assert(offsetof(NetPacket_Fixed<0x00a9>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00a9>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00a9>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x00a9>, ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00a9>, epos_ignored) == 4, "offsetof(NetPacket_Fixed<0x00a9>, epos_ignored) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00a9>) == 6, "sizeof(NetPacket_Fixed<0x00a9>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00a9>) == 1, "alignof(NetPacket_Fixed<0x00a9>) == 1"); - -template<> -struct NetPacket_Fixed<0x00aa> -{ - Little16 magic_packet_id; - Little16 ioff2; - Little16 epos; - Byte ok; -}; -static_assert(offsetof(NetPacket_Fixed<0x00aa>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00aa>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00aa>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x00aa>, ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00aa>, epos) == 4, "offsetof(NetPacket_Fixed<0x00aa>, epos) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x00aa>, ok) == 6, "offsetof(NetPacket_Fixed<0x00aa>, ok) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x00aa>) == 7, "sizeof(NetPacket_Fixed<0x00aa>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x00aa>) == 1, "alignof(NetPacket_Fixed<0x00aa>) == 1"); - -template<> -struct NetPacket_Fixed<0x00ab> -{ - Little16 magic_packet_id; - Little16 ioff2; -}; -static_assert(offsetof(NetPacket_Fixed<0x00ab>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00ab>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00ab>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x00ab>, ioff2) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00ab>) == 4, "sizeof(NetPacket_Fixed<0x00ab>) == 4"); -static_assert(alignof(NetPacket_Fixed<0x00ab>) == 1, "alignof(NetPacket_Fixed<0x00ab>) == 1"); - -template<> -struct NetPacket_Fixed<0x00ac> -{ - Little16 magic_packet_id; - Little16 ioff2; - Little16 epos; - Byte ok; -}; -static_assert(offsetof(NetPacket_Fixed<0x00ac>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00ac>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00ac>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x00ac>, ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00ac>, epos) == 4, "offsetof(NetPacket_Fixed<0x00ac>, epos) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x00ac>, ok) == 6, "offsetof(NetPacket_Fixed<0x00ac>, ok) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x00ac>) == 7, "sizeof(NetPacket_Fixed<0x00ac>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x00ac>) == 1, "alignof(NetPacket_Fixed<0x00ac>) == 1"); - -template<> -struct NetPacket_Fixed<0x00af> -{ - Little16 magic_packet_id; - Little16 ioff2; - Little16 amount; -}; -static_assert(offsetof(NetPacket_Fixed<0x00af>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00af>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00af>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x00af>, ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00af>, amount) == 4, "offsetof(NetPacket_Fixed<0x00af>, amount) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00af>) == 6, "sizeof(NetPacket_Fixed<0x00af>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00af>) == 1, "alignof(NetPacket_Fixed<0x00af>) == 1"); - -template<> -struct NetPacket_Fixed<0x00b0> -{ - Little16 magic_packet_id; - Little16 sp_type; - Little32 value; -}; -static_assert(offsetof(NetPacket_Fixed<0x00b0>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00b0>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00b0>, sp_type) == 2, "offsetof(NetPacket_Fixed<0x00b0>, sp_type) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00b0>, value) == 4, "offsetof(NetPacket_Fixed<0x00b0>, value) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00b0>) == 8, "sizeof(NetPacket_Fixed<0x00b0>) == 8"); -static_assert(alignof(NetPacket_Fixed<0x00b0>) == 1, "alignof(NetPacket_Fixed<0x00b0>) == 1"); - -template<> -struct NetPacket_Fixed<0x00b1> -{ - Little16 magic_packet_id; - Little16 sp_type; - Little32 value; -}; -static_assert(offsetof(NetPacket_Fixed<0x00b1>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00b1>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00b1>, sp_type) == 2, "offsetof(NetPacket_Fixed<0x00b1>, sp_type) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00b1>, value) == 4, "offsetof(NetPacket_Fixed<0x00b1>, value) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00b1>) == 8, "sizeof(NetPacket_Fixed<0x00b1>) == 8"); -static_assert(alignof(NetPacket_Fixed<0x00b1>) == 1, "alignof(NetPacket_Fixed<0x00b1>) == 1"); - -template<> -struct NetPacket_Fixed<0x00b2> -{ - Little16 magic_packet_id; - Byte flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x00b2>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00b2>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00b2>, flag) == 2, "offsetof(NetPacket_Fixed<0x00b2>, flag) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00b2>) == 3, "sizeof(NetPacket_Fixed<0x00b2>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x00b2>) == 1, "alignof(NetPacket_Fixed<0x00b2>) == 1"); - -template<> -struct NetPacket_Fixed<0x00b3> -{ - Little16 magic_packet_id; - Byte one; -}; -static_assert(offsetof(NetPacket_Fixed<0x00b3>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00b3>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00b3>, one) == 2, "offsetof(NetPacket_Fixed<0x00b3>, one) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00b3>) == 3, "sizeof(NetPacket_Fixed<0x00b3>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x00b3>) == 1, "alignof(NetPacket_Fixed<0x00b3>) == 1"); - -template<> -struct NetPacket_Head<0x00b4> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Head<0x00b4>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x00b4>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x00b4>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x00b4>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x00b4>, block_id) == 4, "offsetof(NetPacket_Head<0x00b4>, block_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x00b4>) == 8, "sizeof(NetPacket_Head<0x00b4>) == 8"); -static_assert(alignof(NetPacket_Head<0x00b4>) == 1, "alignof(NetPacket_Head<0x00b4>) == 1"); -template<> -struct NetPacket_Repeat<0x00b4> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x00b4>, c) == 0, "offsetof(NetPacket_Repeat<0x00b4>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x00b4>) == 1, "sizeof(NetPacket_Repeat<0x00b4>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x00b4>) == 1, "alignof(NetPacket_Repeat<0x00b4>) == 1"); - -template<> -struct NetPacket_Fixed<0x00b5> -{ - Little16 magic_packet_id; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00b5>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00b5>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00b5>, block_id) == 2, "offsetof(NetPacket_Fixed<0x00b5>, block_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00b5>) == 6, "sizeof(NetPacket_Fixed<0x00b5>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00b5>) == 1, "alignof(NetPacket_Fixed<0x00b5>) == 1"); - -template<> -struct NetPacket_Fixed<0x00b6> -{ - Little16 magic_packet_id; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00b6>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00b6>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00b6>, block_id) == 2, "offsetof(NetPacket_Fixed<0x00b6>, block_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00b6>) == 6, "sizeof(NetPacket_Fixed<0x00b6>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00b6>) == 1, "alignof(NetPacket_Fixed<0x00b6>) == 1"); - -template<> -struct NetPacket_Head<0x00b7> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Head<0x00b7>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x00b7>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x00b7>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x00b7>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x00b7>, block_id) == 4, "offsetof(NetPacket_Head<0x00b7>, block_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x00b7>) == 8, "sizeof(NetPacket_Head<0x00b7>) == 8"); -static_assert(alignof(NetPacket_Head<0x00b7>) == 1, "alignof(NetPacket_Head<0x00b7>) == 1"); -template<> -struct NetPacket_Repeat<0x00b7> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x00b7>, c) == 0, "offsetof(NetPacket_Repeat<0x00b7>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x00b7>) == 1, "sizeof(NetPacket_Repeat<0x00b7>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x00b7>) == 1, "alignof(NetPacket_Repeat<0x00b7>) == 1"); - -template<> -struct NetPacket_Fixed<0x00b8> -{ - Little16 magic_packet_id; - Little32 npc_id; - Byte menu_entry; -}; -static_assert(offsetof(NetPacket_Fixed<0x00b8>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00b8>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00b8>, npc_id) == 2, "offsetof(NetPacket_Fixed<0x00b8>, npc_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00b8>, menu_entry) == 6, "offsetof(NetPacket_Fixed<0x00b8>, menu_entry) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x00b8>) == 7, "sizeof(NetPacket_Fixed<0x00b8>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x00b8>) == 1, "alignof(NetPacket_Fixed<0x00b8>) == 1"); - -template<> -struct NetPacket_Fixed<0x00b9> -{ - Little16 magic_packet_id; - Little32 npc_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00b9>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00b9>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00b9>, npc_id) == 2, "offsetof(NetPacket_Fixed<0x00b9>, npc_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00b9>) == 6, "sizeof(NetPacket_Fixed<0x00b9>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00b9>) == 1, "alignof(NetPacket_Fixed<0x00b9>) == 1"); - -template<> -struct NetPacket_Fixed<0x00bb> -{ - Little16 magic_packet_id; - Little16 asp; - Byte unused; -}; -static_assert(offsetof(NetPacket_Fixed<0x00bb>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00bb>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00bb>, asp) == 2, "offsetof(NetPacket_Fixed<0x00bb>, asp) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00bb>, unused) == 4, "offsetof(NetPacket_Fixed<0x00bb>, unused) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00bb>) == 5, "sizeof(NetPacket_Fixed<0x00bb>) == 5"); -static_assert(alignof(NetPacket_Fixed<0x00bb>) == 1, "alignof(NetPacket_Fixed<0x00bb>) == 1"); - -template<> -struct NetPacket_Fixed<0x00bc> -{ - Little16 magic_packet_id; - Little16 sp_type; - Byte ok; - Byte val; -}; -static_assert(offsetof(NetPacket_Fixed<0x00bc>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00bc>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00bc>, sp_type) == 2, "offsetof(NetPacket_Fixed<0x00bc>, sp_type) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00bc>, ok) == 4, "offsetof(NetPacket_Fixed<0x00bc>, ok) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x00bc>, val) == 5, "offsetof(NetPacket_Fixed<0x00bc>, val) == 5"); -static_assert(sizeof(NetPacket_Fixed<0x00bc>) == 6, "sizeof(NetPacket_Fixed<0x00bc>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00bc>) == 1, "alignof(NetPacket_Fixed<0x00bc>) == 1"); - -template<> -struct NetPacket_Fixed<0x00bd> -{ - Little16 magic_packet_id; - Little16 status_point; - Byte str_attr; - Byte str_upd; - Byte agi_attr; - Byte agi_upd; - Byte vit_attr; - Byte vit_upd; - Byte int_attr; - Byte int_upd; - Byte dex_attr; - Byte dex_upd; - Byte luk_attr; - Byte luk_upd; - Little16 atk_sum; - Little16 watk2; - Little16 matk1; - Little16 matk2; - Little16 def; - Little16 def2; - Little16 mdef; - Little16 mdef2; - Little16 hit; - Little16 flee; - Little16 flee2; - Little16 critical; - Little16 karma; - Little16 manner; -}; -static_assert(offsetof(NetPacket_Fixed<0x00bd>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00bd>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, status_point) == 2, "offsetof(NetPacket_Fixed<0x00bd>, status_point) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, str_attr) == 4, "offsetof(NetPacket_Fixed<0x00bd>, str_attr) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, str_upd) == 5, "offsetof(NetPacket_Fixed<0x00bd>, str_upd) == 5"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, agi_attr) == 6, "offsetof(NetPacket_Fixed<0x00bd>, agi_attr) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, agi_upd) == 7, "offsetof(NetPacket_Fixed<0x00bd>, agi_upd) == 7"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, vit_attr) == 8, "offsetof(NetPacket_Fixed<0x00bd>, vit_attr) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, vit_upd) == 9, "offsetof(NetPacket_Fixed<0x00bd>, vit_upd) == 9"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, int_attr) == 10, "offsetof(NetPacket_Fixed<0x00bd>, int_attr) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, int_upd) == 11, "offsetof(NetPacket_Fixed<0x00bd>, int_upd) == 11"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, dex_attr) == 12, "offsetof(NetPacket_Fixed<0x00bd>, dex_attr) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, dex_upd) == 13, "offsetof(NetPacket_Fixed<0x00bd>, dex_upd) == 13"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, luk_attr) == 14, "offsetof(NetPacket_Fixed<0x00bd>, luk_attr) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, luk_upd) == 15, "offsetof(NetPacket_Fixed<0x00bd>, luk_upd) == 15"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, atk_sum) == 16, "offsetof(NetPacket_Fixed<0x00bd>, atk_sum) == 16"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, watk2) == 18, "offsetof(NetPacket_Fixed<0x00bd>, watk2) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, matk1) == 20, "offsetof(NetPacket_Fixed<0x00bd>, matk1) == 20"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, matk2) == 22, "offsetof(NetPacket_Fixed<0x00bd>, matk2) == 22"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, def) == 24, "offsetof(NetPacket_Fixed<0x00bd>, def) == 24"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, def2) == 26, "offsetof(NetPacket_Fixed<0x00bd>, def2) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, mdef) == 28, "offsetof(NetPacket_Fixed<0x00bd>, mdef) == 28"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, mdef2) == 30, "offsetof(NetPacket_Fixed<0x00bd>, mdef2) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, hit) == 32, "offsetof(NetPacket_Fixed<0x00bd>, hit) == 32"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, flee) == 34, "offsetof(NetPacket_Fixed<0x00bd>, flee) == 34"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, flee2) == 36, "offsetof(NetPacket_Fixed<0x00bd>, flee2) == 36"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, critical) == 38, "offsetof(NetPacket_Fixed<0x00bd>, critical) == 38"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, karma) == 40, "offsetof(NetPacket_Fixed<0x00bd>, karma) == 40"); -static_assert(offsetof(NetPacket_Fixed<0x00bd>, manner) == 42, "offsetof(NetPacket_Fixed<0x00bd>, manner) == 42"); -static_assert(sizeof(NetPacket_Fixed<0x00bd>) == 44, "sizeof(NetPacket_Fixed<0x00bd>) == 44"); -static_assert(alignof(NetPacket_Fixed<0x00bd>) == 1, "alignof(NetPacket_Fixed<0x00bd>) == 1"); - -template<> -struct NetPacket_Fixed<0x00be> -{ - Little16 magic_packet_id; - Little16 sp_type; - Byte value; -}; -static_assert(offsetof(NetPacket_Fixed<0x00be>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00be>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00be>, sp_type) == 2, "offsetof(NetPacket_Fixed<0x00be>, sp_type) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00be>, value) == 4, "offsetof(NetPacket_Fixed<0x00be>, value) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00be>) == 5, "sizeof(NetPacket_Fixed<0x00be>) == 5"); -static_assert(alignof(NetPacket_Fixed<0x00be>) == 1, "alignof(NetPacket_Fixed<0x00be>) == 1"); - -template<> -struct NetPacket_Fixed<0x00bf> -{ - Little16 magic_packet_id; - Byte emote; -}; -static_assert(offsetof(NetPacket_Fixed<0x00bf>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00bf>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00bf>, emote) == 2, "offsetof(NetPacket_Fixed<0x00bf>, emote) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00bf>) == 3, "sizeof(NetPacket_Fixed<0x00bf>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x00bf>) == 1, "alignof(NetPacket_Fixed<0x00bf>) == 1"); - -template<> -struct NetPacket_Fixed<0x00c0> -{ - Little16 magic_packet_id; - Little32 block_id; - Byte type; -}; -static_assert(offsetof(NetPacket_Fixed<0x00c0>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00c0>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00c0>, block_id) == 2, "offsetof(NetPacket_Fixed<0x00c0>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00c0>, type) == 6, "offsetof(NetPacket_Fixed<0x00c0>, type) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x00c0>) == 7, "sizeof(NetPacket_Fixed<0x00c0>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x00c0>) == 1, "alignof(NetPacket_Fixed<0x00c0>) == 1"); - -template<> -struct NetPacket_Fixed<0x00c1> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00c1>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00c1>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x00c1>) == 2, "sizeof(NetPacket_Fixed<0x00c1>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x00c1>) == 1, "alignof(NetPacket_Fixed<0x00c1>) == 1"); - -template<> -struct NetPacket_Fixed<0x00c2> -{ - Little16 magic_packet_id; - Little32 users; -}; -static_assert(offsetof(NetPacket_Fixed<0x00c2>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00c2>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00c2>, users) == 2, "offsetof(NetPacket_Fixed<0x00c2>, users) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00c2>) == 6, "sizeof(NetPacket_Fixed<0x00c2>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00c2>) == 1, "alignof(NetPacket_Fixed<0x00c2>) == 1"); - -template<> -struct NetPacket_Fixed<0x00c4> -{ - Little16 magic_packet_id; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00c4>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00c4>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00c4>, block_id) == 2, "offsetof(NetPacket_Fixed<0x00c4>, block_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00c4>) == 6, "sizeof(NetPacket_Fixed<0x00c4>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00c4>) == 1, "alignof(NetPacket_Fixed<0x00c4>) == 1"); - -template<> -struct NetPacket_Fixed<0x00c5> -{ - Little16 magic_packet_id; - Little32 block_id; - Byte type; -}; -static_assert(offsetof(NetPacket_Fixed<0x00c5>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00c5>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00c5>, block_id) == 2, "offsetof(NetPacket_Fixed<0x00c5>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00c5>, type) == 6, "offsetof(NetPacket_Fixed<0x00c5>, type) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x00c5>) == 7, "sizeof(NetPacket_Fixed<0x00c5>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x00c5>) == 1, "alignof(NetPacket_Fixed<0x00c5>) == 1"); - -template<> -struct NetPacket_Head<0x00c6> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x00c6>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x00c6>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x00c6>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x00c6>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x00c6>) == 4, "sizeof(NetPacket_Head<0x00c6>) == 4"); -static_assert(alignof(NetPacket_Head<0x00c6>) == 1, "alignof(NetPacket_Head<0x00c6>) == 1"); -template<> -struct NetPacket_Repeat<0x00c6> -{ - Little32 base_price; - Little32 actual_price; - Byte type; - Little16 name_id; -}; -static_assert(offsetof(NetPacket_Repeat<0x00c6>, base_price) == 0, "offsetof(NetPacket_Repeat<0x00c6>, base_price) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x00c6>, actual_price) == 4, "offsetof(NetPacket_Repeat<0x00c6>, actual_price) == 4"); -static_assert(offsetof(NetPacket_Repeat<0x00c6>, type) == 8, "offsetof(NetPacket_Repeat<0x00c6>, type) == 8"); -static_assert(offsetof(NetPacket_Repeat<0x00c6>, name_id) == 9, "offsetof(NetPacket_Repeat<0x00c6>, name_id) == 9"); -static_assert(sizeof(NetPacket_Repeat<0x00c6>) == 11, "sizeof(NetPacket_Repeat<0x00c6>) == 11"); -static_assert(alignof(NetPacket_Repeat<0x00c6>) == 1, "alignof(NetPacket_Repeat<0x00c6>) == 1"); - -template<> -struct NetPacket_Head<0x00c7> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x00c7>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x00c7>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x00c7>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x00c7>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x00c7>) == 4, "sizeof(NetPacket_Head<0x00c7>) == 4"); -static_assert(alignof(NetPacket_Head<0x00c7>) == 1, "alignof(NetPacket_Head<0x00c7>) == 1"); -template<> -struct NetPacket_Repeat<0x00c7> -{ - Little16 ioff2; - Little32 base_price; - Little32 actual_price; -}; -static_assert(offsetof(NetPacket_Repeat<0x00c7>, ioff2) == 0, "offsetof(NetPacket_Repeat<0x00c7>, ioff2) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x00c7>, base_price) == 2, "offsetof(NetPacket_Repeat<0x00c7>, base_price) == 2"); -static_assert(offsetof(NetPacket_Repeat<0x00c7>, actual_price) == 6, "offsetof(NetPacket_Repeat<0x00c7>, actual_price) == 6"); -static_assert(sizeof(NetPacket_Repeat<0x00c7>) == 10, "sizeof(NetPacket_Repeat<0x00c7>) == 10"); -static_assert(alignof(NetPacket_Repeat<0x00c7>) == 1, "alignof(NetPacket_Repeat<0x00c7>) == 1"); - -template<> -struct NetPacket_Head<0x00c8> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x00c8>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x00c8>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x00c8>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x00c8>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x00c8>) == 4, "sizeof(NetPacket_Head<0x00c8>) == 4"); -static_assert(alignof(NetPacket_Head<0x00c8>) == 1, "alignof(NetPacket_Head<0x00c8>) == 1"); -template<> -struct NetPacket_Repeat<0x00c8> -{ - Little16 count; - Little16 name_id; -}; -static_assert(offsetof(NetPacket_Repeat<0x00c8>, count) == 0, "offsetof(NetPacket_Repeat<0x00c8>, count) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x00c8>, name_id) == 2, "offsetof(NetPacket_Repeat<0x00c8>, name_id) == 2"); -static_assert(sizeof(NetPacket_Repeat<0x00c8>) == 4, "sizeof(NetPacket_Repeat<0x00c8>) == 4"); -static_assert(alignof(NetPacket_Repeat<0x00c8>) == 1, "alignof(NetPacket_Repeat<0x00c8>) == 1"); - -template<> -struct NetPacket_Head<0x00c9> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x00c9>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x00c9>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x00c9>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x00c9>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x00c9>) == 4, "sizeof(NetPacket_Head<0x00c9>) == 4"); -static_assert(alignof(NetPacket_Head<0x00c9>) == 1, "alignof(NetPacket_Head<0x00c9>) == 1"); -template<> -struct NetPacket_Repeat<0x00c9> -{ - Little16 ioff2; - Little16 count; -}; -static_assert(offsetof(NetPacket_Repeat<0x00c9>, ioff2) == 0, "offsetof(NetPacket_Repeat<0x00c9>, ioff2) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x00c9>, count) == 2, "offsetof(NetPacket_Repeat<0x00c9>, count) == 2"); -static_assert(sizeof(NetPacket_Repeat<0x00c9>) == 4, "sizeof(NetPacket_Repeat<0x00c9>) == 4"); -static_assert(alignof(NetPacket_Repeat<0x00c9>) == 1, "alignof(NetPacket_Repeat<0x00c9>) == 1"); - -template<> -struct NetPacket_Fixed<0x00ca> -{ - Little16 magic_packet_id; - Byte fail; -}; -static_assert(offsetof(NetPacket_Fixed<0x00ca>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00ca>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00ca>, fail) == 2, "offsetof(NetPacket_Fixed<0x00ca>, fail) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00ca>) == 3, "sizeof(NetPacket_Fixed<0x00ca>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x00ca>) == 1, "alignof(NetPacket_Fixed<0x00ca>) == 1"); - -template<> -struct NetPacket_Fixed<0x00cb> -{ - Little16 magic_packet_id; - Byte fail; -}; -static_assert(offsetof(NetPacket_Fixed<0x00cb>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00cb>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00cb>, fail) == 2, "offsetof(NetPacket_Fixed<0x00cb>, fail) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00cb>) == 3, "sizeof(NetPacket_Fixed<0x00cb>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x00cb>) == 1, "alignof(NetPacket_Fixed<0x00cb>) == 1"); - -template<> -struct NetPacket_Fixed<0x00cd> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00cd>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00cd>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00cd>, account_id) == 2, "offsetof(NetPacket_Fixed<0x00cd>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00cd>) == 6, "sizeof(NetPacket_Fixed<0x00cd>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00cd>) == 1, "alignof(NetPacket_Fixed<0x00cd>) == 1"); - -template<> -struct NetPacket_Fixed<0x00e4> -{ - Little16 magic_packet_id; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00e4>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00e4>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00e4>, block_id) == 2, "offsetof(NetPacket_Fixed<0x00e4>, block_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00e4>) == 6, "sizeof(NetPacket_Fixed<0x00e4>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00e4>) == 1, "alignof(NetPacket_Fixed<0x00e4>) == 1"); - -template<> -struct NetPacket_Fixed<0x00e5> -{ - Little16 magic_packet_id; - NetString<sizeof(CharName)> char_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x00e5>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00e5>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00e5>, char_name) == 2, "offsetof(NetPacket_Fixed<0x00e5>, char_name) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00e5>) == 26, "sizeof(NetPacket_Fixed<0x00e5>) == 26"); -static_assert(alignof(NetPacket_Fixed<0x00e5>) == 1, "alignof(NetPacket_Fixed<0x00e5>) == 1"); - -template<> -struct NetPacket_Fixed<0x00e6> -{ - Little16 magic_packet_id; - Byte type; -}; -static_assert(offsetof(NetPacket_Fixed<0x00e6>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00e6>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00e6>, type) == 2, "offsetof(NetPacket_Fixed<0x00e6>, type) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00e6>) == 3, "sizeof(NetPacket_Fixed<0x00e6>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x00e6>) == 1, "alignof(NetPacket_Fixed<0x00e6>) == 1"); - -template<> -struct NetPacket_Fixed<0x00e7> -{ - Little16 magic_packet_id; - Byte type; -}; -static_assert(offsetof(NetPacket_Fixed<0x00e7>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00e7>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00e7>, type) == 2, "offsetof(NetPacket_Fixed<0x00e7>, type) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00e7>) == 3, "sizeof(NetPacket_Fixed<0x00e7>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x00e7>) == 1, "alignof(NetPacket_Fixed<0x00e7>) == 1"); - -template<> -struct NetPacket_Fixed<0x00e8> -{ - Little16 magic_packet_id; - Little16 zeny_or_ioff2; - Little32 amount; -}; -static_assert(offsetof(NetPacket_Fixed<0x00e8>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00e8>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00e8>, zeny_or_ioff2) == 2, "offsetof(NetPacket_Fixed<0x00e8>, zeny_or_ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00e8>, amount) == 4, "offsetof(NetPacket_Fixed<0x00e8>, amount) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00e8>) == 8, "sizeof(NetPacket_Fixed<0x00e8>) == 8"); -static_assert(alignof(NetPacket_Fixed<0x00e8>) == 1, "alignof(NetPacket_Fixed<0x00e8>) == 1"); - -template<> -struct NetPacket_Fixed<0x00e9> -{ - Little16 magic_packet_id; - Little32 amount; - Little16 name_id; - Byte identify; - Byte broken_or_attribute; - Byte refine; - Little16 card0; - Little16 card1; - Little16 card2; - Little16 card3; -}; -static_assert(offsetof(NetPacket_Fixed<0x00e9>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00e9>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00e9>, amount) == 2, "offsetof(NetPacket_Fixed<0x00e9>, amount) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00e9>, name_id) == 6, "offsetof(NetPacket_Fixed<0x00e9>, name_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x00e9>, identify) == 8, "offsetof(NetPacket_Fixed<0x00e9>, identify) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x00e9>, broken_or_attribute) == 9, "offsetof(NetPacket_Fixed<0x00e9>, broken_or_attribute) == 9"); -static_assert(offsetof(NetPacket_Fixed<0x00e9>, refine) == 10, "offsetof(NetPacket_Fixed<0x00e9>, refine) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x00e9>, card0) == 11, "offsetof(NetPacket_Fixed<0x00e9>, card0) == 11"); -static_assert(offsetof(NetPacket_Fixed<0x00e9>, card1) == 13, "offsetof(NetPacket_Fixed<0x00e9>, card1) == 13"); -static_assert(offsetof(NetPacket_Fixed<0x00e9>, card2) == 15, "offsetof(NetPacket_Fixed<0x00e9>, card2) == 15"); -static_assert(offsetof(NetPacket_Fixed<0x00e9>, card3) == 17, "offsetof(NetPacket_Fixed<0x00e9>, card3) == 17"); -static_assert(sizeof(NetPacket_Fixed<0x00e9>) == 19, "sizeof(NetPacket_Fixed<0x00e9>) == 19"); -static_assert(alignof(NetPacket_Fixed<0x00e9>) == 1, "alignof(NetPacket_Fixed<0x00e9>) == 1"); - -template<> -struct NetPacket_Fixed<0x00eb> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00eb>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00eb>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x00eb>) == 2, "sizeof(NetPacket_Fixed<0x00eb>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x00eb>) == 1, "alignof(NetPacket_Fixed<0x00eb>) == 1"); - -template<> -struct NetPacket_Fixed<0x00ec> -{ - Little16 magic_packet_id; - Byte fail; -}; -static_assert(offsetof(NetPacket_Fixed<0x00ec>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00ec>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00ec>, fail) == 2, "offsetof(NetPacket_Fixed<0x00ec>, fail) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00ec>) == 3, "sizeof(NetPacket_Fixed<0x00ec>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x00ec>) == 1, "alignof(NetPacket_Fixed<0x00ec>) == 1"); - -template<> -struct NetPacket_Fixed<0x00ed> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00ed>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00ed>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x00ed>) == 2, "sizeof(NetPacket_Fixed<0x00ed>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x00ed>) == 1, "alignof(NetPacket_Fixed<0x00ed>) == 1"); - -template<> -struct NetPacket_Fixed<0x00ee> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00ee>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00ee>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x00ee>) == 2, "sizeof(NetPacket_Fixed<0x00ee>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x00ee>) == 1, "alignof(NetPacket_Fixed<0x00ee>) == 1"); - -template<> -struct NetPacket_Fixed<0x00ef> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00ef>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00ef>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x00ef>) == 2, "sizeof(NetPacket_Fixed<0x00ef>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x00ef>) == 1, "alignof(NetPacket_Fixed<0x00ef>) == 1"); - -template<> -struct NetPacket_Fixed<0x00f0> -{ - Little16 magic_packet_id; - Byte fail; -}; -static_assert(offsetof(NetPacket_Fixed<0x00f0>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00f0>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00f0>, fail) == 2, "offsetof(NetPacket_Fixed<0x00f0>, fail) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00f0>) == 3, "sizeof(NetPacket_Fixed<0x00f0>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x00f0>) == 1, "alignof(NetPacket_Fixed<0x00f0>) == 1"); - -template<> -struct NetPacket_Fixed<0x00f2> -{ - Little16 magic_packet_id; - Little16 current_slots; - Little16 max_slots; -}; -static_assert(offsetof(NetPacket_Fixed<0x00f2>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00f2>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00f2>, current_slots) == 2, "offsetof(NetPacket_Fixed<0x00f2>, current_slots) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00f2>, max_slots) == 4, "offsetof(NetPacket_Fixed<0x00f2>, max_slots) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00f2>) == 6, "sizeof(NetPacket_Fixed<0x00f2>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00f2>) == 1, "alignof(NetPacket_Fixed<0x00f2>) == 1"); - -template<> -struct NetPacket_Fixed<0x00f3> -{ - Little16 magic_packet_id; - Little16 ioff2; - Little32 amount; -}; -static_assert(offsetof(NetPacket_Fixed<0x00f3>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00f3>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00f3>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x00f3>, ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00f3>, amount) == 4, "offsetof(NetPacket_Fixed<0x00f3>, amount) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00f3>) == 8, "sizeof(NetPacket_Fixed<0x00f3>) == 8"); -static_assert(alignof(NetPacket_Fixed<0x00f3>) == 1, "alignof(NetPacket_Fixed<0x00f3>) == 1"); - -template<> -struct NetPacket_Fixed<0x00f4> -{ - Little16 magic_packet_id; - Little16 soff1; - Little32 amount; - Little16 name_id; - Byte identify; - Byte broken_or_attribute; - Byte refine; - Little16 card0; - Little16 card1; - Little16 card2; - Little16 card3; -}; -static_assert(offsetof(NetPacket_Fixed<0x00f4>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00f4>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00f4>, soff1) == 2, "offsetof(NetPacket_Fixed<0x00f4>, soff1) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00f4>, amount) == 4, "offsetof(NetPacket_Fixed<0x00f4>, amount) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x00f4>, name_id) == 8, "offsetof(NetPacket_Fixed<0x00f4>, name_id) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x00f4>, identify) == 10, "offsetof(NetPacket_Fixed<0x00f4>, identify) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x00f4>, broken_or_attribute) == 11, "offsetof(NetPacket_Fixed<0x00f4>, broken_or_attribute) == 11"); -static_assert(offsetof(NetPacket_Fixed<0x00f4>, refine) == 12, "offsetof(NetPacket_Fixed<0x00f4>, refine) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x00f4>, card0) == 13, "offsetof(NetPacket_Fixed<0x00f4>, card0) == 13"); -static_assert(offsetof(NetPacket_Fixed<0x00f4>, card1) == 15, "offsetof(NetPacket_Fixed<0x00f4>, card1) == 15"); -static_assert(offsetof(NetPacket_Fixed<0x00f4>, card2) == 17, "offsetof(NetPacket_Fixed<0x00f4>, card2) == 17"); -static_assert(offsetof(NetPacket_Fixed<0x00f4>, card3) == 19, "offsetof(NetPacket_Fixed<0x00f4>, card3) == 19"); -static_assert(sizeof(NetPacket_Fixed<0x00f4>) == 21, "sizeof(NetPacket_Fixed<0x00f4>) == 21"); -static_assert(alignof(NetPacket_Fixed<0x00f4>) == 1, "alignof(NetPacket_Fixed<0x00f4>) == 1"); - -template<> -struct NetPacket_Fixed<0x00f5> -{ - Little16 magic_packet_id; - Little16 soff1; - Little32 amount; -}; -static_assert(offsetof(NetPacket_Fixed<0x00f5>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00f5>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00f5>, soff1) == 2, "offsetof(NetPacket_Fixed<0x00f5>, soff1) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00f5>, amount) == 4, "offsetof(NetPacket_Fixed<0x00f5>, amount) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00f5>) == 8, "sizeof(NetPacket_Fixed<0x00f5>) == 8"); -static_assert(alignof(NetPacket_Fixed<0x00f5>) == 1, "alignof(NetPacket_Fixed<0x00f5>) == 1"); - -template<> -struct NetPacket_Fixed<0x00f6> -{ - Little16 magic_packet_id; - Little16 soff1; - Little32 amount; -}; -static_assert(offsetof(NetPacket_Fixed<0x00f6>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00f6>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00f6>, soff1) == 2, "offsetof(NetPacket_Fixed<0x00f6>, soff1) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00f6>, amount) == 4, "offsetof(NetPacket_Fixed<0x00f6>, amount) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x00f6>) == 8, "sizeof(NetPacket_Fixed<0x00f6>) == 8"); -static_assert(alignof(NetPacket_Fixed<0x00f6>) == 1, "alignof(NetPacket_Fixed<0x00f6>) == 1"); - -template<> -struct NetPacket_Fixed<0x00f7> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00f7>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00f7>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x00f7>) == 2, "sizeof(NetPacket_Fixed<0x00f7>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x00f7>) == 1, "alignof(NetPacket_Fixed<0x00f7>) == 1"); - -template<> -struct NetPacket_Fixed<0x00f8> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00f8>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00f8>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x00f8>) == 2, "sizeof(NetPacket_Fixed<0x00f8>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x00f8>) == 1, "alignof(NetPacket_Fixed<0x00f8>) == 1"); - -template<> -struct NetPacket_Fixed<0x00f9> -{ - Little16 magic_packet_id; - NetString<sizeof(PartyName)> party_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x00f9>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00f9>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00f9>, party_name) == 2, "offsetof(NetPacket_Fixed<0x00f9>, party_name) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00f9>) == 26, "sizeof(NetPacket_Fixed<0x00f9>) == 26"); -static_assert(alignof(NetPacket_Fixed<0x00f9>) == 1, "alignof(NetPacket_Fixed<0x00f9>) == 1"); - -template<> -struct NetPacket_Fixed<0x00fa> -{ - Little16 magic_packet_id; - Byte flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x00fa>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00fa>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00fa>, flag) == 2, "offsetof(NetPacket_Fixed<0x00fa>, flag) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00fa>) == 3, "sizeof(NetPacket_Fixed<0x00fa>) == 3"); -static_assert(alignof(NetPacket_Fixed<0x00fa>) == 1, "alignof(NetPacket_Fixed<0x00fa>) == 1"); - -template<> -struct NetPacket_Head<0x00fb> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - NetString<sizeof(PartyName)> party_name; -}; -static_assert(offsetof(NetPacket_Head<0x00fb>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x00fb>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x00fb>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x00fb>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x00fb>, party_name) == 4, "offsetof(NetPacket_Head<0x00fb>, party_name) == 4"); -static_assert(sizeof(NetPacket_Head<0x00fb>) == 28, "sizeof(NetPacket_Head<0x00fb>) == 28"); -static_assert(alignof(NetPacket_Head<0x00fb>) == 1, "alignof(NetPacket_Head<0x00fb>) == 1"); -template<> -struct NetPacket_Repeat<0x00fb> -{ - Little32 account_id; - NetString<sizeof(CharName)> char_name; - NetString<sizeof(MapName)> map_name; - Byte leader; - Byte online; -}; -static_assert(offsetof(NetPacket_Repeat<0x00fb>, account_id) == 0, "offsetof(NetPacket_Repeat<0x00fb>, account_id) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x00fb>, char_name) == 4, "offsetof(NetPacket_Repeat<0x00fb>, char_name) == 4"); -static_assert(offsetof(NetPacket_Repeat<0x00fb>, map_name) == 28, "offsetof(NetPacket_Repeat<0x00fb>, map_name) == 28"); -static_assert(offsetof(NetPacket_Repeat<0x00fb>, leader) == 44, "offsetof(NetPacket_Repeat<0x00fb>, leader) == 44"); -static_assert(offsetof(NetPacket_Repeat<0x00fb>, online) == 45, "offsetof(NetPacket_Repeat<0x00fb>, online) == 45"); -static_assert(sizeof(NetPacket_Repeat<0x00fb>) == 46, "sizeof(NetPacket_Repeat<0x00fb>) == 46"); -static_assert(alignof(NetPacket_Repeat<0x00fb>) == 1, "alignof(NetPacket_Repeat<0x00fb>) == 1"); - -template<> -struct NetPacket_Fixed<0x00fc> -{ - Little16 magic_packet_id; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x00fc>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00fc>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00fc>, account_id) == 2, "offsetof(NetPacket_Fixed<0x00fc>, account_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x00fc>) == 6, "sizeof(NetPacket_Fixed<0x00fc>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x00fc>) == 1, "alignof(NetPacket_Fixed<0x00fc>) == 1"); - -template<> -struct NetPacket_Fixed<0x00fd> -{ - Little16 magic_packet_id; - NetString<sizeof(CharName)> char_name; - Byte flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x00fd>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00fd>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00fd>, char_name) == 2, "offsetof(NetPacket_Fixed<0x00fd>, char_name) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00fd>, flag) == 26, "offsetof(NetPacket_Fixed<0x00fd>, flag) == 26"); -static_assert(sizeof(NetPacket_Fixed<0x00fd>) == 27, "sizeof(NetPacket_Fixed<0x00fd>) == 27"); -static_assert(alignof(NetPacket_Fixed<0x00fd>) == 1, "alignof(NetPacket_Fixed<0x00fd>) == 1"); - -template<> -struct NetPacket_Fixed<0x00fe> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(PartyName)> party_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x00fe>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00fe>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00fe>, account_id) == 2, "offsetof(NetPacket_Fixed<0x00fe>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00fe>, party_name) == 6, "offsetof(NetPacket_Fixed<0x00fe>, party_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x00fe>) == 30, "sizeof(NetPacket_Fixed<0x00fe>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x00fe>) == 1, "alignof(NetPacket_Fixed<0x00fe>) == 1"); - -template<> -struct NetPacket_Fixed<0x00ff> -{ - Little16 magic_packet_id; - Little32 account_id; - Little32 flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x00ff>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x00ff>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x00ff>, account_id) == 2, "offsetof(NetPacket_Fixed<0x00ff>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x00ff>, flag) == 6, "offsetof(NetPacket_Fixed<0x00ff>, flag) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x00ff>) == 10, "sizeof(NetPacket_Fixed<0x00ff>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x00ff>) == 1, "alignof(NetPacket_Fixed<0x00ff>) == 1"); - -template<> -struct NetPacket_Fixed<0x0100> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x0100>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0100>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x0100>) == 2, "sizeof(NetPacket_Fixed<0x0100>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x0100>) == 1, "alignof(NetPacket_Fixed<0x0100>) == 1"); - -template<> -struct NetPacket_Fixed<0x0101> -{ - Little16 magic_packet_id; - Little16 exp; - Little16 item; -}; -static_assert(offsetof(NetPacket_Fixed<0x0101>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0101>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0101>, exp) == 2, "offsetof(NetPacket_Fixed<0x0101>, exp) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0101>, item) == 4, "offsetof(NetPacket_Fixed<0x0101>, item) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x0101>) == 6, "sizeof(NetPacket_Fixed<0x0101>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x0101>) == 1, "alignof(NetPacket_Fixed<0x0101>) == 1"); - -template<> -struct NetPacket_Fixed<0x0102> -{ - Little16 magic_packet_id; - Little16 exp; - Little16 item; -}; -static_assert(offsetof(NetPacket_Fixed<0x0102>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0102>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0102>, exp) == 2, "offsetof(NetPacket_Fixed<0x0102>, exp) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0102>, item) == 4, "offsetof(NetPacket_Fixed<0x0102>, item) == 4"); -static_assert(sizeof(NetPacket_Fixed<0x0102>) == 6, "sizeof(NetPacket_Fixed<0x0102>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x0102>) == 1, "alignof(NetPacket_Fixed<0x0102>) == 1"); - -template<> -struct NetPacket_Fixed<0x0103> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(CharName)> unused_char_name; -}; -static_assert(offsetof(NetPacket_Fixed<0x0103>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0103>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0103>, account_id) == 2, "offsetof(NetPacket_Fixed<0x0103>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0103>, unused_char_name) == 6, "offsetof(NetPacket_Fixed<0x0103>, unused_char_name) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x0103>) == 30, "sizeof(NetPacket_Fixed<0x0103>) == 30"); -static_assert(alignof(NetPacket_Fixed<0x0103>) == 1, "alignof(NetPacket_Fixed<0x0103>) == 1"); - -template<> -struct NetPacket_Fixed<0x0105> -{ - Little16 magic_packet_id; - Little32 account_id; - NetString<sizeof(CharName)> char_name; - Byte flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x0105>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0105>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0105>, account_id) == 2, "offsetof(NetPacket_Fixed<0x0105>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0105>, char_name) == 6, "offsetof(NetPacket_Fixed<0x0105>, char_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0105>, flag) == 30, "offsetof(NetPacket_Fixed<0x0105>, flag) == 30"); -static_assert(sizeof(NetPacket_Fixed<0x0105>) == 31, "sizeof(NetPacket_Fixed<0x0105>) == 31"); -static_assert(alignof(NetPacket_Fixed<0x0105>) == 1, "alignof(NetPacket_Fixed<0x0105>) == 1"); - -template<> -struct NetPacket_Fixed<0x0106> -{ - Little16 magic_packet_id; - Little32 account_id; - Little16 hp; - Little16 max_hp; -}; -static_assert(offsetof(NetPacket_Fixed<0x0106>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0106>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0106>, account_id) == 2, "offsetof(NetPacket_Fixed<0x0106>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0106>, hp) == 6, "offsetof(NetPacket_Fixed<0x0106>, hp) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0106>, max_hp) == 8, "offsetof(NetPacket_Fixed<0x0106>, max_hp) == 8"); -static_assert(sizeof(NetPacket_Fixed<0x0106>) == 10, "sizeof(NetPacket_Fixed<0x0106>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x0106>) == 1, "alignof(NetPacket_Fixed<0x0106>) == 1"); - -template<> -struct NetPacket_Fixed<0x0107> -{ - Little16 magic_packet_id; - Little32 account_id; - Little16 x; - Little16 y; -}; -static_assert(offsetof(NetPacket_Fixed<0x0107>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0107>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0107>, account_id) == 2, "offsetof(NetPacket_Fixed<0x0107>, account_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0107>, x) == 6, "offsetof(NetPacket_Fixed<0x0107>, x) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0107>, y) == 8, "offsetof(NetPacket_Fixed<0x0107>, y) == 8"); -static_assert(sizeof(NetPacket_Fixed<0x0107>) == 10, "sizeof(NetPacket_Fixed<0x0107>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x0107>) == 1, "alignof(NetPacket_Fixed<0x0107>) == 1"); - -template<> -struct NetPacket_Head<0x0108> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x0108>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x0108>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x0108>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x0108>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x0108>) == 4, "sizeof(NetPacket_Head<0x0108>) == 4"); -static_assert(alignof(NetPacket_Head<0x0108>) == 1, "alignof(NetPacket_Head<0x0108>) == 1"); -template<> -struct NetPacket_Repeat<0x0108> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x0108>, c) == 0, "offsetof(NetPacket_Repeat<0x0108>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x0108>) == 1, "sizeof(NetPacket_Repeat<0x0108>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x0108>) == 1, "alignof(NetPacket_Repeat<0x0108>) == 1"); - -template<> -struct NetPacket_Head<0x0109> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 account_id; -}; -static_assert(offsetof(NetPacket_Head<0x0109>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x0109>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x0109>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x0109>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x0109>, account_id) == 4, "offsetof(NetPacket_Head<0x0109>, account_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x0109>) == 8, "sizeof(NetPacket_Head<0x0109>) == 8"); -static_assert(alignof(NetPacket_Head<0x0109>) == 1, "alignof(NetPacket_Head<0x0109>) == 1"); -template<> -struct NetPacket_Repeat<0x0109> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x0109>, c) == 0, "offsetof(NetPacket_Repeat<0x0109>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x0109>) == 1, "sizeof(NetPacket_Repeat<0x0109>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x0109>) == 1, "alignof(NetPacket_Repeat<0x0109>) == 1"); - -template<> -struct NetPacket_Fixed<0x010c> -{ - Little16 magic_packet_id; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x010c>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x010c>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x010c>, block_id) == 2, "offsetof(NetPacket_Fixed<0x010c>, block_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x010c>) == 6, "sizeof(NetPacket_Fixed<0x010c>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x010c>) == 1, "alignof(NetPacket_Fixed<0x010c>) == 1"); - -template<> -struct NetPacket_Fixed<0x010e> -{ - Little16 magic_packet_id; - Little16 skill_id; - Little16 level; - Little16 sp; - Little16 range; - Byte can_raise; -}; -static_assert(offsetof(NetPacket_Fixed<0x010e>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x010e>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x010e>, skill_id) == 2, "offsetof(NetPacket_Fixed<0x010e>, skill_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x010e>, level) == 4, "offsetof(NetPacket_Fixed<0x010e>, level) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x010e>, sp) == 6, "offsetof(NetPacket_Fixed<0x010e>, sp) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x010e>, range) == 8, "offsetof(NetPacket_Fixed<0x010e>, range) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x010e>, can_raise) == 10, "offsetof(NetPacket_Fixed<0x010e>, can_raise) == 10"); -static_assert(sizeof(NetPacket_Fixed<0x010e>) == 11, "sizeof(NetPacket_Fixed<0x010e>) == 11"); -static_assert(alignof(NetPacket_Fixed<0x010e>) == 1, "alignof(NetPacket_Fixed<0x010e>) == 1"); - -template<> -struct NetPacket_Head<0x010f> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x010f>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x010f>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x010f>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x010f>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x010f>) == 4, "sizeof(NetPacket_Head<0x010f>) == 4"); -static_assert(alignof(NetPacket_Head<0x010f>) == 1, "alignof(NetPacket_Head<0x010f>) == 1"); -template<> -struct NetPacket_Repeat<0x010f> -{ - NetSkillInfo info; -}; -static_assert(offsetof(NetPacket_Repeat<0x010f>, info) == 0, "offsetof(NetPacket_Repeat<0x010f>, info) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x010f>) == 37, "sizeof(NetPacket_Repeat<0x010f>) == 37"); -static_assert(alignof(NetPacket_Repeat<0x010f>) == 1, "alignof(NetPacket_Repeat<0x010f>) == 1"); - -template<> -struct NetPacket_Fixed<0x0110> -{ - Little16 magic_packet_id; - Little16 skill_id; - Little16 btype; - Little16 zero1; - Byte zero2; - Byte type; -}; -static_assert(offsetof(NetPacket_Fixed<0x0110>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0110>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0110>, skill_id) == 2, "offsetof(NetPacket_Fixed<0x0110>, skill_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0110>, btype) == 4, "offsetof(NetPacket_Fixed<0x0110>, btype) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x0110>, zero1) == 6, "offsetof(NetPacket_Fixed<0x0110>, zero1) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0110>, zero2) == 8, "offsetof(NetPacket_Fixed<0x0110>, zero2) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x0110>, type) == 9, "offsetof(NetPacket_Fixed<0x0110>, type) == 9"); -static_assert(sizeof(NetPacket_Fixed<0x0110>) == 10, "sizeof(NetPacket_Fixed<0x0110>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x0110>) == 1, "alignof(NetPacket_Fixed<0x0110>) == 1"); - -template<> -struct NetPacket_Fixed<0x0112> -{ - Little16 magic_packet_id; - Little16 skill_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x0112>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0112>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0112>, skill_id) == 2, "offsetof(NetPacket_Fixed<0x0112>, skill_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x0112>) == 4, "sizeof(NetPacket_Fixed<0x0112>) == 4"); -static_assert(alignof(NetPacket_Fixed<0x0112>) == 1, "alignof(NetPacket_Fixed<0x0112>) == 1"); - -template<> -struct NetPacket_Fixed<0x0118> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x0118>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0118>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x0118>) == 2, "sizeof(NetPacket_Fixed<0x0118>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x0118>) == 1, "alignof(NetPacket_Fixed<0x0118>) == 1"); - -template<> -struct NetPacket_Fixed<0x0119> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 opt1; - Little16 opt2; - Little16 option; - Byte zero; -}; -static_assert(offsetof(NetPacket_Fixed<0x0119>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0119>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0119>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0119>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0119>, opt1) == 6, "offsetof(NetPacket_Fixed<0x0119>, opt1) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0119>, opt2) == 8, "offsetof(NetPacket_Fixed<0x0119>, opt2) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x0119>, option) == 10, "offsetof(NetPacket_Fixed<0x0119>, option) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x0119>, zero) == 12, "offsetof(NetPacket_Fixed<0x0119>, zero) == 12"); -static_assert(sizeof(NetPacket_Fixed<0x0119>) == 13, "sizeof(NetPacket_Fixed<0x0119>) == 13"); -static_assert(alignof(NetPacket_Fixed<0x0119>) == 1, "alignof(NetPacket_Fixed<0x0119>) == 1"); - -template<> -struct NetPacket_Fixed<0x0139> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 bl_x; - Little16 bl_y; - Little16 sd_x; - Little16 sd_y; - Little16 range; -}; -static_assert(offsetof(NetPacket_Fixed<0x0139>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0139>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0139>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0139>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0139>, bl_x) == 6, "offsetof(NetPacket_Fixed<0x0139>, bl_x) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0139>, bl_y) == 8, "offsetof(NetPacket_Fixed<0x0139>, bl_y) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x0139>, sd_x) == 10, "offsetof(NetPacket_Fixed<0x0139>, sd_x) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x0139>, sd_y) == 12, "offsetof(NetPacket_Fixed<0x0139>, sd_y) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x0139>, range) == 14, "offsetof(NetPacket_Fixed<0x0139>, range) == 14"); -static_assert(sizeof(NetPacket_Fixed<0x0139>) == 16, "sizeof(NetPacket_Fixed<0x0139>) == 16"); -static_assert(alignof(NetPacket_Fixed<0x0139>) == 1, "alignof(NetPacket_Fixed<0x0139>) == 1"); - -template<> -struct NetPacket_Fixed<0x013a> -{ - Little16 magic_packet_id; - Little16 attack_range; -}; -static_assert(offsetof(NetPacket_Fixed<0x013a>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x013a>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x013a>, attack_range) == 2, "offsetof(NetPacket_Fixed<0x013a>, attack_range) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x013a>) == 4, "sizeof(NetPacket_Fixed<0x013a>) == 4"); -static_assert(alignof(NetPacket_Fixed<0x013a>) == 1, "alignof(NetPacket_Fixed<0x013a>) == 1"); - -template<> -struct NetPacket_Fixed<0x013b> -{ - Little16 magic_packet_id; - Little16 type; -}; -static_assert(offsetof(NetPacket_Fixed<0x013b>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x013b>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x013b>, type) == 2, "offsetof(NetPacket_Fixed<0x013b>, type) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x013b>) == 4, "sizeof(NetPacket_Fixed<0x013b>) == 4"); -static_assert(alignof(NetPacket_Fixed<0x013b>) == 1, "alignof(NetPacket_Fixed<0x013b>) == 1"); - -template<> -struct NetPacket_Fixed<0x013c> -{ - Little16 magic_packet_id; - Little16 ioff2; -}; -static_assert(offsetof(NetPacket_Fixed<0x013c>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x013c>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x013c>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x013c>, ioff2) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x013c>) == 4, "sizeof(NetPacket_Fixed<0x013c>) == 4"); -static_assert(alignof(NetPacket_Fixed<0x013c>) == 1, "alignof(NetPacket_Fixed<0x013c>) == 1"); - -template<> -struct NetPacket_Fixed<0x0141> -{ - Little16 magic_packet_id; - Little16 sp_type; - Little16 zero; - Little32 value_status; - Little32 value_b_e; -}; -static_assert(offsetof(NetPacket_Fixed<0x0141>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0141>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0141>, sp_type) == 2, "offsetof(NetPacket_Fixed<0x0141>, sp_type) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0141>, zero) == 4, "offsetof(NetPacket_Fixed<0x0141>, zero) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x0141>, value_status) == 6, "offsetof(NetPacket_Fixed<0x0141>, value_status) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0141>, value_b_e) == 10, "offsetof(NetPacket_Fixed<0x0141>, value_b_e) == 10"); -static_assert(sizeof(NetPacket_Fixed<0x0141>) == 14, "sizeof(NetPacket_Fixed<0x0141>) == 14"); -static_assert(alignof(NetPacket_Fixed<0x0141>) == 1, "alignof(NetPacket_Fixed<0x0141>) == 1"); - -template<> -struct NetPacket_Fixed<0x0142> -{ - Little16 magic_packet_id; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x0142>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0142>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0142>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0142>, block_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x0142>) == 6, "sizeof(NetPacket_Fixed<0x0142>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x0142>) == 1, "alignof(NetPacket_Fixed<0x0142>) == 1"); - -template<> -struct NetPacket_Fixed<0x0143> -{ - Little16 magic_packet_id; - Little32 block_id; - Little32 input_int_value; -}; -static_assert(offsetof(NetPacket_Fixed<0x0143>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0143>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0143>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0143>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0143>, input_int_value) == 6, "offsetof(NetPacket_Fixed<0x0143>, input_int_value) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x0143>) == 10, "sizeof(NetPacket_Fixed<0x0143>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x0143>) == 1, "alignof(NetPacket_Fixed<0x0143>) == 1"); - -template<> -struct NetPacket_Fixed<0x0146> -{ - Little16 magic_packet_id; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x0146>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0146>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0146>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0146>, block_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x0146>) == 6, "sizeof(NetPacket_Fixed<0x0146>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x0146>) == 1, "alignof(NetPacket_Fixed<0x0146>) == 1"); - -template<> -struct NetPacket_Fixed<0x0147> -{ - Little16 magic_packet_id; - NetSkillInfo info; -}; -static_assert(offsetof(NetPacket_Fixed<0x0147>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0147>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0147>, info) == 2, "offsetof(NetPacket_Fixed<0x0147>, info) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x0147>) == 39, "sizeof(NetPacket_Fixed<0x0147>) == 39"); -static_assert(alignof(NetPacket_Fixed<0x0147>) == 1, "alignof(NetPacket_Fixed<0x0147>) == 1"); - -template<> -struct NetPacket_Fixed<0x0148> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 type; -}; -static_assert(offsetof(NetPacket_Fixed<0x0148>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0148>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0148>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0148>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0148>, type) == 6, "offsetof(NetPacket_Fixed<0x0148>, type) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x0148>) == 8, "sizeof(NetPacket_Fixed<0x0148>) == 8"); -static_assert(alignof(NetPacket_Fixed<0x0148>) == 1, "alignof(NetPacket_Fixed<0x0148>) == 1"); - -template<> -struct NetPacket_Fixed<0x014d> -{ - Little16 magic_packet_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x014d>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x014d>, magic_packet_id) == 0"); -static_assert(sizeof(NetPacket_Fixed<0x014d>) == 2, "sizeof(NetPacket_Fixed<0x014d>) == 2"); -static_assert(alignof(NetPacket_Fixed<0x014d>) == 1, "alignof(NetPacket_Fixed<0x014d>) == 1"); - -template<> -struct NetPacket_Fixed<0x018a> -{ - Little16 magic_packet_id; - Little16 unused; -}; -static_assert(offsetof(NetPacket_Fixed<0x018a>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x018a>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x018a>, unused) == 2, "offsetof(NetPacket_Fixed<0x018a>, unused) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x018a>) == 4, "sizeof(NetPacket_Fixed<0x018a>) == 4"); -static_assert(alignof(NetPacket_Fixed<0x018a>) == 1, "alignof(NetPacket_Fixed<0x018a>) == 1"); - -template<> -struct NetPacket_Fixed<0x018b> -{ - Little16 magic_packet_id; - Little16 okay; -}; -static_assert(offsetof(NetPacket_Fixed<0x018b>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x018b>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x018b>, okay) == 2, "offsetof(NetPacket_Fixed<0x018b>, okay) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x018b>) == 4, "sizeof(NetPacket_Fixed<0x018b>) == 4"); -static_assert(alignof(NetPacket_Fixed<0x018b>) == 1, "alignof(NetPacket_Fixed<0x018b>) == 1"); - -template<> -struct NetPacket_Fixed<0x0195> -{ - Little16 magic_packet_id; - Little32 block_id; - NetString<sizeof(PartyName)> party_name; - NetString<sizeof(VString<23>)> guild_name; - NetString<sizeof(VString<23>)> guild_pos; - NetString<sizeof(VString<23>)> guild_pos_again; -}; -static_assert(offsetof(NetPacket_Fixed<0x0195>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0195>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0195>, block_id) == 2, "offsetof(NetPacket_Fixed<0x0195>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0195>, party_name) == 6, "offsetof(NetPacket_Fixed<0x0195>, party_name) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0195>, guild_name) == 30, "offsetof(NetPacket_Fixed<0x0195>, guild_name) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x0195>, guild_pos) == 54, "offsetof(NetPacket_Fixed<0x0195>, guild_pos) == 54"); -static_assert(offsetof(NetPacket_Fixed<0x0195>, guild_pos_again) == 78, "offsetof(NetPacket_Fixed<0x0195>, guild_pos_again) == 78"); -static_assert(sizeof(NetPacket_Fixed<0x0195>) == 102, "sizeof(NetPacket_Fixed<0x0195>) == 102"); -static_assert(alignof(NetPacket_Fixed<0x0195>) == 1, "alignof(NetPacket_Fixed<0x0195>) == 1"); - -template<> -struct NetPacket_Fixed<0x0196> -{ - Little16 magic_packet_id; - Little16 sc_type; - Little32 block_id; - Byte flag; -}; -static_assert(offsetof(NetPacket_Fixed<0x0196>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0196>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0196>, sc_type) == 2, "offsetof(NetPacket_Fixed<0x0196>, sc_type) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0196>, block_id) == 4, "offsetof(NetPacket_Fixed<0x0196>, block_id) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x0196>, flag) == 8, "offsetof(NetPacket_Fixed<0x0196>, flag) == 8"); -static_assert(sizeof(NetPacket_Fixed<0x0196>) == 9, "sizeof(NetPacket_Fixed<0x0196>) == 9"); -static_assert(alignof(NetPacket_Fixed<0x0196>) == 1, "alignof(NetPacket_Fixed<0x0196>) == 1"); - -template<> -struct NetPacket_Fixed<0x019b> -{ - Little16 magic_packet_id; - Little32 block_id; - Little32 type; -}; -static_assert(offsetof(NetPacket_Fixed<0x019b>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x019b>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x019b>, block_id) == 2, "offsetof(NetPacket_Fixed<0x019b>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x019b>, type) == 6, "offsetof(NetPacket_Fixed<0x019b>, type) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x019b>) == 10, "sizeof(NetPacket_Fixed<0x019b>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x019b>) == 1, "alignof(NetPacket_Fixed<0x019b>) == 1"); - -template<> -struct NetPacket_Fixed<0x01b1> -{ - Little16 magic_packet_id; - Little16 ioff2; - Little16 amount; - Byte fail; -}; -static_assert(offsetof(NetPacket_Fixed<0x01b1>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x01b1>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x01b1>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x01b1>, ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x01b1>, amount) == 4, "offsetof(NetPacket_Fixed<0x01b1>, amount) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x01b1>, fail) == 6, "offsetof(NetPacket_Fixed<0x01b1>, fail) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x01b1>) == 7, "sizeof(NetPacket_Fixed<0x01b1>) == 7"); -static_assert(alignof(NetPacket_Fixed<0x01b1>) == 1, "alignof(NetPacket_Fixed<0x01b1>) == 1"); - -template<> -struct NetPacket_Fixed<0x01c8> -{ - Little16 magic_packet_id; - Little16 ioff2; - Little16 name_id; - Little32 block_id; - Little16 amount; - Byte ok; -}; -static_assert(offsetof(NetPacket_Fixed<0x01c8>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x01c8>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x01c8>, ioff2) == 2, "offsetof(NetPacket_Fixed<0x01c8>, ioff2) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x01c8>, name_id) == 4, "offsetof(NetPacket_Fixed<0x01c8>, name_id) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x01c8>, block_id) == 6, "offsetof(NetPacket_Fixed<0x01c8>, block_id) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x01c8>, amount) == 10, "offsetof(NetPacket_Fixed<0x01c8>, amount) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x01c8>, ok) == 12, "offsetof(NetPacket_Fixed<0x01c8>, ok) == 12"); -static_assert(sizeof(NetPacket_Fixed<0x01c8>) == 13, "sizeof(NetPacket_Fixed<0x01c8>) == 13"); -static_assert(alignof(NetPacket_Fixed<0x01c8>) == 1, "alignof(NetPacket_Fixed<0x01c8>) == 1"); - -template<> -struct NetPacket_Fixed<0x01d4> -{ - Little16 magic_packet_id; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Fixed<0x01d4>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x01d4>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x01d4>, block_id) == 2, "offsetof(NetPacket_Fixed<0x01d4>, block_id) == 2"); -static_assert(sizeof(NetPacket_Fixed<0x01d4>) == 6, "sizeof(NetPacket_Fixed<0x01d4>) == 6"); -static_assert(alignof(NetPacket_Fixed<0x01d4>) == 1, "alignof(NetPacket_Fixed<0x01d4>) == 1"); - -template<> -struct NetPacket_Head<0x01d5> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; - Little32 block_id; -}; -static_assert(offsetof(NetPacket_Head<0x01d5>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x01d5>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x01d5>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x01d5>, magic_packet_length) == 2"); -static_assert(offsetof(NetPacket_Head<0x01d5>, block_id) == 4, "offsetof(NetPacket_Head<0x01d5>, block_id) == 4"); -static_assert(sizeof(NetPacket_Head<0x01d5>) == 8, "sizeof(NetPacket_Head<0x01d5>) == 8"); -static_assert(alignof(NetPacket_Head<0x01d5>) == 1, "alignof(NetPacket_Head<0x01d5>) == 1"); -template<> -struct NetPacket_Repeat<0x01d5> -{ - Byte c; -}; -static_assert(offsetof(NetPacket_Repeat<0x01d5>, c) == 0, "offsetof(NetPacket_Repeat<0x01d5>, c) == 0"); -static_assert(sizeof(NetPacket_Repeat<0x01d5>) == 1, "sizeof(NetPacket_Repeat<0x01d5>) == 1"); -static_assert(alignof(NetPacket_Repeat<0x01d5>) == 1, "alignof(NetPacket_Repeat<0x01d5>) == 1"); - -template<> -struct NetPacket_Fixed<0x01d7> -{ - Little16 magic_packet_id; - Little32 block_id; - Byte look_type; - Little16 weapon_or_name_id_or_value; - Little16 shield; -}; -static_assert(offsetof(NetPacket_Fixed<0x01d7>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x01d7>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x01d7>, block_id) == 2, "offsetof(NetPacket_Fixed<0x01d7>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x01d7>, look_type) == 6, "offsetof(NetPacket_Fixed<0x01d7>, look_type) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x01d7>, weapon_or_name_id_or_value) == 7, "offsetof(NetPacket_Fixed<0x01d7>, weapon_or_name_id_or_value) == 7"); -static_assert(offsetof(NetPacket_Fixed<0x01d7>, shield) == 9, "offsetof(NetPacket_Fixed<0x01d7>, shield) == 9"); -static_assert(sizeof(NetPacket_Fixed<0x01d7>) == 11, "sizeof(NetPacket_Fixed<0x01d7>) == 11"); -static_assert(alignof(NetPacket_Fixed<0x01d7>) == 1, "alignof(NetPacket_Fixed<0x01d7>) == 1"); - -template<> -struct NetPacket_Fixed<0x01d8> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 speed; - Little16 opt1; - Little16 opt2; - Little16 option; - Little16 species; - Little16 hair_style; - Little16 weapon; - Little16 shield; - Little16 head_bottom; - Little16 head_top; - Little16 head_mid; - Little16 hair_color; - Little16 clothes_color; - Byte head_dir; - Byte unused2; - Little32 guild_id; - Little16 guild_emblem_id; - Little16 manner; - Little16 opt3; - Byte karma; - Byte sex; - NetPosition1 pos; - Little16 gm_bits; - Byte dead_sit; - Little16 unused; -}; -static_assert(offsetof(NetPacket_Fixed<0x01d8>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x01d8>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, block_id) == 2, "offsetof(NetPacket_Fixed<0x01d8>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, speed) == 6, "offsetof(NetPacket_Fixed<0x01d8>, speed) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, opt1) == 8, "offsetof(NetPacket_Fixed<0x01d8>, opt1) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, opt2) == 10, "offsetof(NetPacket_Fixed<0x01d8>, opt2) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, option) == 12, "offsetof(NetPacket_Fixed<0x01d8>, option) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, species) == 14, "offsetof(NetPacket_Fixed<0x01d8>, species) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, hair_style) == 16, "offsetof(NetPacket_Fixed<0x01d8>, hair_style) == 16"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, weapon) == 18, "offsetof(NetPacket_Fixed<0x01d8>, weapon) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, shield) == 20, "offsetof(NetPacket_Fixed<0x01d8>, shield) == 20"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, head_bottom) == 22, "offsetof(NetPacket_Fixed<0x01d8>, head_bottom) == 22"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, head_top) == 24, "offsetof(NetPacket_Fixed<0x01d8>, head_top) == 24"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, head_mid) == 26, "offsetof(NetPacket_Fixed<0x01d8>, head_mid) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, hair_color) == 28, "offsetof(NetPacket_Fixed<0x01d8>, hair_color) == 28"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, clothes_color) == 30, "offsetof(NetPacket_Fixed<0x01d8>, clothes_color) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, head_dir) == 32, "offsetof(NetPacket_Fixed<0x01d8>, head_dir) == 32"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, unused2) == 33, "offsetof(NetPacket_Fixed<0x01d8>, unused2) == 33"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, guild_id) == 34, "offsetof(NetPacket_Fixed<0x01d8>, guild_id) == 34"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, guild_emblem_id) == 38, "offsetof(NetPacket_Fixed<0x01d8>, guild_emblem_id) == 38"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, manner) == 40, "offsetof(NetPacket_Fixed<0x01d8>, manner) == 40"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, opt3) == 42, "offsetof(NetPacket_Fixed<0x01d8>, opt3) == 42"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, karma) == 44, "offsetof(NetPacket_Fixed<0x01d8>, karma) == 44"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, sex) == 45, "offsetof(NetPacket_Fixed<0x01d8>, sex) == 45"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, pos) == 46, "offsetof(NetPacket_Fixed<0x01d8>, pos) == 46"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, gm_bits) == 49, "offsetof(NetPacket_Fixed<0x01d8>, gm_bits) == 49"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, dead_sit) == 51, "offsetof(NetPacket_Fixed<0x01d8>, dead_sit) == 51"); -static_assert(offsetof(NetPacket_Fixed<0x01d8>, unused) == 52, "offsetof(NetPacket_Fixed<0x01d8>, unused) == 52"); -static_assert(sizeof(NetPacket_Fixed<0x01d8>) == 54, "sizeof(NetPacket_Fixed<0x01d8>) == 54"); -static_assert(alignof(NetPacket_Fixed<0x01d8>) == 1, "alignof(NetPacket_Fixed<0x01d8>) == 1"); - -template<> -struct NetPacket_Fixed<0x01d9> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 speed; - Little16 opt1; - Little16 opt2; - Little16 option; - Little16 species; - Little16 hair_style; - Little16 weapon; - Little16 shield; - Little16 head_bottom; - Little16 head_top; - Little16 head_mid; - Little16 hair_color; - Little16 clothes_color; - Byte head_dir; - Byte unused2; - Little32 guild_id; - Little16 guild_emblem_id; - Little16 manner; - Little16 opt3; - Byte karma; - Byte sex; - NetPosition1 pos; - Little16 gm_bits; - Little16 unused; -}; -static_assert(offsetof(NetPacket_Fixed<0x01d9>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x01d9>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, block_id) == 2, "offsetof(NetPacket_Fixed<0x01d9>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, speed) == 6, "offsetof(NetPacket_Fixed<0x01d9>, speed) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, opt1) == 8, "offsetof(NetPacket_Fixed<0x01d9>, opt1) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, opt2) == 10, "offsetof(NetPacket_Fixed<0x01d9>, opt2) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, option) == 12, "offsetof(NetPacket_Fixed<0x01d9>, option) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, species) == 14, "offsetof(NetPacket_Fixed<0x01d9>, species) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, hair_style) == 16, "offsetof(NetPacket_Fixed<0x01d9>, hair_style) == 16"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, weapon) == 18, "offsetof(NetPacket_Fixed<0x01d9>, weapon) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, shield) == 20, "offsetof(NetPacket_Fixed<0x01d9>, shield) == 20"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, head_bottom) == 22, "offsetof(NetPacket_Fixed<0x01d9>, head_bottom) == 22"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, head_top) == 24, "offsetof(NetPacket_Fixed<0x01d9>, head_top) == 24"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, head_mid) == 26, "offsetof(NetPacket_Fixed<0x01d9>, head_mid) == 26"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, hair_color) == 28, "offsetof(NetPacket_Fixed<0x01d9>, hair_color) == 28"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, clothes_color) == 30, "offsetof(NetPacket_Fixed<0x01d9>, clothes_color) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, head_dir) == 32, "offsetof(NetPacket_Fixed<0x01d9>, head_dir) == 32"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, unused2) == 33, "offsetof(NetPacket_Fixed<0x01d9>, unused2) == 33"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, guild_id) == 34, "offsetof(NetPacket_Fixed<0x01d9>, guild_id) == 34"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, guild_emblem_id) == 38, "offsetof(NetPacket_Fixed<0x01d9>, guild_emblem_id) == 38"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, manner) == 40, "offsetof(NetPacket_Fixed<0x01d9>, manner) == 40"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, opt3) == 42, "offsetof(NetPacket_Fixed<0x01d9>, opt3) == 42"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, karma) == 44, "offsetof(NetPacket_Fixed<0x01d9>, karma) == 44"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, sex) == 45, "offsetof(NetPacket_Fixed<0x01d9>, sex) == 45"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, pos) == 46, "offsetof(NetPacket_Fixed<0x01d9>, pos) == 46"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, gm_bits) == 49, "offsetof(NetPacket_Fixed<0x01d9>, gm_bits) == 49"); -static_assert(offsetof(NetPacket_Fixed<0x01d9>, unused) == 51, "offsetof(NetPacket_Fixed<0x01d9>, unused) == 51"); -static_assert(sizeof(NetPacket_Fixed<0x01d9>) == 53, "sizeof(NetPacket_Fixed<0x01d9>) == 53"); -static_assert(alignof(NetPacket_Fixed<0x01d9>) == 1, "alignof(NetPacket_Fixed<0x01d9>) == 1"); - -template<> -struct NetPacket_Fixed<0x01da> -{ - Little16 magic_packet_id; - Little32 block_id; - Little16 speed; - Little16 opt1; - Little16 opt2; - Little16 option; - Little16 species; - Little16 hair_style; - Little16 weapon; - Little16 shield; - Little16 head_bottom; - Little32 tick; - Little16 head_top; - Little16 head_mid; - Little16 hair_color; - Little16 clothes_color; - Byte head_dir; - Byte unused2; - Little32 guild_id; - Little16 guild_emblem_id; - Little16 manner; - Little16 opt3; - Byte karma; - Byte sex; - NetPosition2 pos2; - Little16 gm_bits; - Byte five; - Little16 unused; -}; -static_assert(offsetof(NetPacket_Fixed<0x01da>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x01da>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, block_id) == 2, "offsetof(NetPacket_Fixed<0x01da>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, speed) == 6, "offsetof(NetPacket_Fixed<0x01da>, speed) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, opt1) == 8, "offsetof(NetPacket_Fixed<0x01da>, opt1) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, opt2) == 10, "offsetof(NetPacket_Fixed<0x01da>, opt2) == 10"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, option) == 12, "offsetof(NetPacket_Fixed<0x01da>, option) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, species) == 14, "offsetof(NetPacket_Fixed<0x01da>, species) == 14"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, hair_style) == 16, "offsetof(NetPacket_Fixed<0x01da>, hair_style) == 16"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, weapon) == 18, "offsetof(NetPacket_Fixed<0x01da>, weapon) == 18"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, shield) == 20, "offsetof(NetPacket_Fixed<0x01da>, shield) == 20"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, head_bottom) == 22, "offsetof(NetPacket_Fixed<0x01da>, head_bottom) == 22"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, tick) == 24, "offsetof(NetPacket_Fixed<0x01da>, tick) == 24"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, head_top) == 28, "offsetof(NetPacket_Fixed<0x01da>, head_top) == 28"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, head_mid) == 30, "offsetof(NetPacket_Fixed<0x01da>, head_mid) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, hair_color) == 32, "offsetof(NetPacket_Fixed<0x01da>, hair_color) == 32"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, clothes_color) == 34, "offsetof(NetPacket_Fixed<0x01da>, clothes_color) == 34"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, head_dir) == 36, "offsetof(NetPacket_Fixed<0x01da>, head_dir) == 36"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, unused2) == 37, "offsetof(NetPacket_Fixed<0x01da>, unused2) == 37"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, guild_id) == 38, "offsetof(NetPacket_Fixed<0x01da>, guild_id) == 38"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, guild_emblem_id) == 42, "offsetof(NetPacket_Fixed<0x01da>, guild_emblem_id) == 42"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, manner) == 44, "offsetof(NetPacket_Fixed<0x01da>, manner) == 44"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, opt3) == 46, "offsetof(NetPacket_Fixed<0x01da>, opt3) == 46"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, karma) == 48, "offsetof(NetPacket_Fixed<0x01da>, karma) == 48"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, sex) == 49, "offsetof(NetPacket_Fixed<0x01da>, sex) == 49"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, pos2) == 50, "offsetof(NetPacket_Fixed<0x01da>, pos2) == 50"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, gm_bits) == 55, "offsetof(NetPacket_Fixed<0x01da>, gm_bits) == 55"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, five) == 57, "offsetof(NetPacket_Fixed<0x01da>, five) == 57"); -static_assert(offsetof(NetPacket_Fixed<0x01da>, unused) == 58, "offsetof(NetPacket_Fixed<0x01da>, unused) == 58"); -static_assert(sizeof(NetPacket_Fixed<0x01da>) == 60, "sizeof(NetPacket_Fixed<0x01da>) == 60"); -static_assert(alignof(NetPacket_Fixed<0x01da>) == 1, "alignof(NetPacket_Fixed<0x01da>) == 1"); - -template<> -struct NetPacket_Fixed<0x01de> -{ - Little16 magic_packet_id; - Little16 skill_id; - Little32 src_id; - Little32 dst_id; - Little32 tick; - Little32 sdelay; - Little32 ddelay; - Little32 damage; - Little16 skill_level; - Little16 div; - Byte type_or_hit; -}; -static_assert(offsetof(NetPacket_Fixed<0x01de>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x01de>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x01de>, skill_id) == 2, "offsetof(NetPacket_Fixed<0x01de>, skill_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x01de>, src_id) == 4, "offsetof(NetPacket_Fixed<0x01de>, src_id) == 4"); -static_assert(offsetof(NetPacket_Fixed<0x01de>, dst_id) == 8, "offsetof(NetPacket_Fixed<0x01de>, dst_id) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x01de>, tick) == 12, "offsetof(NetPacket_Fixed<0x01de>, tick) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x01de>, sdelay) == 16, "offsetof(NetPacket_Fixed<0x01de>, sdelay) == 16"); -static_assert(offsetof(NetPacket_Fixed<0x01de>, ddelay) == 20, "offsetof(NetPacket_Fixed<0x01de>, ddelay) == 20"); -static_assert(offsetof(NetPacket_Fixed<0x01de>, damage) == 24, "offsetof(NetPacket_Fixed<0x01de>, damage) == 24"); -static_assert(offsetof(NetPacket_Fixed<0x01de>, skill_level) == 28, "offsetof(NetPacket_Fixed<0x01de>, skill_level) == 28"); -static_assert(offsetof(NetPacket_Fixed<0x01de>, div) == 30, "offsetof(NetPacket_Fixed<0x01de>, div) == 30"); -static_assert(offsetof(NetPacket_Fixed<0x01de>, type_or_hit) == 32, "offsetof(NetPacket_Fixed<0x01de>, type_or_hit) == 32"); -static_assert(sizeof(NetPacket_Fixed<0x01de>) == 33, "sizeof(NetPacket_Fixed<0x01de>) == 33"); -static_assert(alignof(NetPacket_Fixed<0x01de>) == 1, "alignof(NetPacket_Fixed<0x01de>) == 1"); - -template<> -struct NetPacket_Head<0x01ee> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x01ee>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x01ee>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x01ee>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x01ee>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x01ee>) == 4, "sizeof(NetPacket_Head<0x01ee>) == 4"); -static_assert(alignof(NetPacket_Head<0x01ee>) == 1, "alignof(NetPacket_Head<0x01ee>) == 1"); -template<> -struct NetPacket_Repeat<0x01ee> -{ - Little16 ioff2; - Little16 name_id; - Byte item_type; - Byte identify; - Little16 amount; - Little16 epos; - Little16 card0; - Little16 card1; - Little16 card2; - Little16 card3; -}; -static_assert(offsetof(NetPacket_Repeat<0x01ee>, ioff2) == 0, "offsetof(NetPacket_Repeat<0x01ee>, ioff2) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x01ee>, name_id) == 2, "offsetof(NetPacket_Repeat<0x01ee>, name_id) == 2"); -static_assert(offsetof(NetPacket_Repeat<0x01ee>, item_type) == 4, "offsetof(NetPacket_Repeat<0x01ee>, item_type) == 4"); -static_assert(offsetof(NetPacket_Repeat<0x01ee>, identify) == 5, "offsetof(NetPacket_Repeat<0x01ee>, identify) == 5"); -static_assert(offsetof(NetPacket_Repeat<0x01ee>, amount) == 6, "offsetof(NetPacket_Repeat<0x01ee>, amount) == 6"); -static_assert(offsetof(NetPacket_Repeat<0x01ee>, epos) == 8, "offsetof(NetPacket_Repeat<0x01ee>, epos) == 8"); -static_assert(offsetof(NetPacket_Repeat<0x01ee>, card0) == 10, "offsetof(NetPacket_Repeat<0x01ee>, card0) == 10"); -static_assert(offsetof(NetPacket_Repeat<0x01ee>, card1) == 12, "offsetof(NetPacket_Repeat<0x01ee>, card1) == 12"); -static_assert(offsetof(NetPacket_Repeat<0x01ee>, card2) == 14, "offsetof(NetPacket_Repeat<0x01ee>, card2) == 14"); -static_assert(offsetof(NetPacket_Repeat<0x01ee>, card3) == 16, "offsetof(NetPacket_Repeat<0x01ee>, card3) == 16"); -static_assert(sizeof(NetPacket_Repeat<0x01ee>) == 18, "sizeof(NetPacket_Repeat<0x01ee>) == 18"); -static_assert(alignof(NetPacket_Repeat<0x01ee>) == 1, "alignof(NetPacket_Repeat<0x01ee>) == 1"); - -template<> -struct NetPacket_Head<0x01f0> -{ - Little16 magic_packet_id; - Little16 magic_packet_length; -}; -static_assert(offsetof(NetPacket_Head<0x01f0>, magic_packet_id) == 0, "offsetof(NetPacket_Head<0x01f0>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Head<0x01f0>, magic_packet_length) == 2, "offsetof(NetPacket_Head<0x01f0>, magic_packet_length) == 2"); -static_assert(sizeof(NetPacket_Head<0x01f0>) == 4, "sizeof(NetPacket_Head<0x01f0>) == 4"); -static_assert(alignof(NetPacket_Head<0x01f0>) == 1, "alignof(NetPacket_Head<0x01f0>) == 1"); -template<> -struct NetPacket_Repeat<0x01f0> -{ - Little16 soff1; - Little16 name_id; - Byte item_type; - Byte identify; - Little16 amount; - Little16 epos_zero; - Little16 card0; - Little16 card1; - Little16 card2; - Little16 card3; -}; -static_assert(offsetof(NetPacket_Repeat<0x01f0>, soff1) == 0, "offsetof(NetPacket_Repeat<0x01f0>, soff1) == 0"); -static_assert(offsetof(NetPacket_Repeat<0x01f0>, name_id) == 2, "offsetof(NetPacket_Repeat<0x01f0>, name_id) == 2"); -static_assert(offsetof(NetPacket_Repeat<0x01f0>, item_type) == 4, "offsetof(NetPacket_Repeat<0x01f0>, item_type) == 4"); -static_assert(offsetof(NetPacket_Repeat<0x01f0>, identify) == 5, "offsetof(NetPacket_Repeat<0x01f0>, identify) == 5"); -static_assert(offsetof(NetPacket_Repeat<0x01f0>, amount) == 6, "offsetof(NetPacket_Repeat<0x01f0>, amount) == 6"); -static_assert(offsetof(NetPacket_Repeat<0x01f0>, epos_zero) == 8, "offsetof(NetPacket_Repeat<0x01f0>, epos_zero) == 8"); -static_assert(offsetof(NetPacket_Repeat<0x01f0>, card0) == 10, "offsetof(NetPacket_Repeat<0x01f0>, card0) == 10"); -static_assert(offsetof(NetPacket_Repeat<0x01f0>, card1) == 12, "offsetof(NetPacket_Repeat<0x01f0>, card1) == 12"); -static_assert(offsetof(NetPacket_Repeat<0x01f0>, card2) == 14, "offsetof(NetPacket_Repeat<0x01f0>, card2) == 14"); -static_assert(offsetof(NetPacket_Repeat<0x01f0>, card3) == 16, "offsetof(NetPacket_Repeat<0x01f0>, card3) == 16"); -static_assert(sizeof(NetPacket_Repeat<0x01f0>) == 18, "sizeof(NetPacket_Repeat<0x01f0>) == 18"); -static_assert(alignof(NetPacket_Repeat<0x01f0>) == 1, "alignof(NetPacket_Repeat<0x01f0>) == 1"); - -template<> -struct NetPacket_Fixed<0x020c> -{ - Little16 magic_packet_id; - Little32 block_id; - IP4Address ip; -}; -static_assert(offsetof(NetPacket_Fixed<0x020c>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x020c>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x020c>, block_id) == 2, "offsetof(NetPacket_Fixed<0x020c>, block_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x020c>, ip) == 6, "offsetof(NetPacket_Fixed<0x020c>, ip) == 6"); -static_assert(sizeof(NetPacket_Fixed<0x020c>) == 10, "sizeof(NetPacket_Fixed<0x020c>) == 10"); -static_assert(alignof(NetPacket_Fixed<0x020c>) == 1, "alignof(NetPacket_Fixed<0x020c>) == 1"); - -template<> -struct NetPacket_Fixed<0x0212> -{ - Little16 magic_packet_id; - Little32 npc_id; - Little16 command; - Little32 id; - Little16 x; - Little16 y; -}; -static_assert(offsetof(NetPacket_Fixed<0x0212>, magic_packet_id) == 0, "offsetof(NetPacket_Fixed<0x0212>, magic_packet_id) == 0"); -static_assert(offsetof(NetPacket_Fixed<0x0212>, npc_id) == 2, "offsetof(NetPacket_Fixed<0x0212>, npc_id) == 2"); -static_assert(offsetof(NetPacket_Fixed<0x0212>, command) == 6, "offsetof(NetPacket_Fixed<0x0212>, command) == 6"); -static_assert(offsetof(NetPacket_Fixed<0x0212>, id) == 8, "offsetof(NetPacket_Fixed<0x0212>, id) == 8"); -static_assert(offsetof(NetPacket_Fixed<0x0212>, x) == 12, "offsetof(NetPacket_Fixed<0x0212>, x) == 12"); -static_assert(offsetof(NetPacket_Fixed<0x0212>, y) == 14, "offsetof(NetPacket_Fixed<0x0212>, y) == 14"); -static_assert(sizeof(NetPacket_Fixed<0x0212>) == 16, "sizeof(NetPacket_Fixed<0x0212>) == 16"); -static_assert(alignof(NetPacket_Fixed<0x0212>) == 1, "alignof(NetPacket_Fixed<0x0212>) == 1"); - - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0072> *network, Packet_Fixed<0x0072> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->char_id, native.char_id); - rv &= native_to_network(&network->login_id1, native.login_id1); - rv &= native_to_network(&network->client_tick, native.client_tick); - rv &= native_to_network(&network->sex, native.sex); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0072> *native, NetPacket_Fixed<0x0072> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->char_id, network.char_id); - rv &= network_to_native(&native->login_id1, network.login_id1); - rv &= network_to_native(&native->client_tick, network.client_tick); - rv &= network_to_native(&native->sex, network.sex); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0073> *network, Packet_Fixed<0x0073> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->tick, native.tick); - rv &= native_to_network(&network->pos, native.pos); - rv &= native_to_network(&network->five1, native.five1); - rv &= native_to_network(&network->five2, native.five2); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0073> *native, NetPacket_Fixed<0x0073> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->tick, network.tick); - rv &= network_to_native(&native->pos, network.pos); - rv &= network_to_native(&native->five1, network.five1); - rv &= network_to_native(&native->five2, network.five2); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0078> *network, Packet_Fixed<0x0078> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->speed, native.speed); - rv &= native_to_network(&network->opt1, native.opt1); - rv &= native_to_network(&network->opt2, native.opt2); - rv &= native_to_network(&network->option, native.option); - rv &= native_to_network(&network->species, native.species); - rv &= native_to_network(&network->unused_hair_style, native.unused_hair_style); - rv &= native_to_network(&network->unused_weapon, native.unused_weapon); - rv &= native_to_network(&network->unused_head_bottom_or_species_again, native.unused_head_bottom_or_species_again); - rv &= native_to_network(&network->unused_shield_or_part_of_guild_emblem, native.unused_shield_or_part_of_guild_emblem); - rv &= native_to_network(&network->unused_head_top_or_unused_part_of_guild_emblem, native.unused_head_top_or_unused_part_of_guild_emblem); - rv &= native_to_network(&network->unused_head_mid_or_part_of_guild_id, native.unused_head_mid_or_part_of_guild_id); - rv &= native_to_network(&network->unused_hair_color_or_part_of_guild_id, native.unused_hair_color_or_part_of_guild_id); - rv &= native_to_network(&network->unused_clothes_color, native.unused_clothes_color); - rv &= native_to_network(&network->unused_1, native.unused_1); - rv &= native_to_network(&network->unused_2, native.unused_2); - rv &= native_to_network(&network->unused_pos_again, native.unused_pos_again); - rv &= native_to_network(&network->unused_4b, native.unused_4b); - rv &= native_to_network(&network->unused_5, native.unused_5); - rv &= native_to_network(&network->unused_zero_1, native.unused_zero_1); - rv &= native_to_network(&network->unused_zero_2, native.unused_zero_2); - rv &= native_to_network(&network->unused_sex, native.unused_sex); - rv &= native_to_network(&network->pos, native.pos); - rv &= native_to_network(&network->five1, native.five1); - rv &= native_to_network(&network->five2, native.five2); - rv &= native_to_network(&network->zero, native.zero); - rv &= native_to_network(&network->level, native.level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0078> *native, NetPacket_Fixed<0x0078> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->speed, network.speed); - rv &= network_to_native(&native->opt1, network.opt1); - rv &= network_to_native(&native->opt2, network.opt2); - rv &= network_to_native(&native->option, network.option); - rv &= network_to_native(&native->species, network.species); - rv &= network_to_native(&native->unused_hair_style, network.unused_hair_style); - rv &= network_to_native(&native->unused_weapon, network.unused_weapon); - rv &= network_to_native(&native->unused_head_bottom_or_species_again, network.unused_head_bottom_or_species_again); - rv &= network_to_native(&native->unused_shield_or_part_of_guild_emblem, network.unused_shield_or_part_of_guild_emblem); - rv &= network_to_native(&native->unused_head_top_or_unused_part_of_guild_emblem, network.unused_head_top_or_unused_part_of_guild_emblem); - rv &= network_to_native(&native->unused_head_mid_or_part_of_guild_id, network.unused_head_mid_or_part_of_guild_id); - rv &= network_to_native(&native->unused_hair_color_or_part_of_guild_id, network.unused_hair_color_or_part_of_guild_id); - rv &= network_to_native(&native->unused_clothes_color, network.unused_clothes_color); - rv &= network_to_native(&native->unused_1, network.unused_1); - rv &= network_to_native(&native->unused_2, network.unused_2); - rv &= network_to_native(&native->unused_pos_again, network.unused_pos_again); - rv &= network_to_native(&native->unused_4b, network.unused_4b); - rv &= network_to_native(&native->unused_5, network.unused_5); - rv &= network_to_native(&native->unused_zero_1, network.unused_zero_1); - rv &= network_to_native(&native->unused_zero_2, network.unused_zero_2); - rv &= network_to_native(&native->unused_sex, network.unused_sex); - rv &= network_to_native(&native->pos, network.pos); - rv &= network_to_native(&native->five1, network.five1); - rv &= network_to_native(&native->five2, network.five2); - rv &= network_to_native(&native->zero, network.zero); - rv &= network_to_native(&native->level, network.level); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x007b> *network, Packet_Fixed<0x007b> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->speed, native.speed); - rv &= native_to_network(&network->opt1, native.opt1); - rv &= native_to_network(&network->opt2, native.opt2); - rv &= native_to_network(&network->option, native.option); - rv &= native_to_network(&network->mob_class, native.mob_class); - rv &= native_to_network(&network->unused_hair_style, native.unused_hair_style); - rv &= native_to_network(&network->unused_weapon, native.unused_weapon); - rv &= native_to_network(&network->unused_head_bottom, native.unused_head_bottom); - rv &= native_to_network(&network->tick_and_maybe_part_of_guild_emblem, native.tick_and_maybe_part_of_guild_emblem); - rv &= native_to_network(&network->unused_shield_or_maybe_part_of_guild_emblem, native.unused_shield_or_maybe_part_of_guild_emblem); - rv &= native_to_network(&network->unused_head_top_or_maybe_part_of_guild_id, native.unused_head_top_or_maybe_part_of_guild_id); - rv &= native_to_network(&network->unused_head_mid_or_maybe_part_of_guild_id, native.unused_head_mid_or_maybe_part_of_guild_id); - rv &= native_to_network(&network->unused_hair_color, native.unused_hair_color); - rv &= native_to_network(&network->unused_clothes_color, native.unused_clothes_color); - rv &= native_to_network(&network->unused_1, native.unused_1); - rv &= native_to_network(&network->unused_2, native.unused_2); - rv &= native_to_network(&network->unused_3, native.unused_3); - rv &= native_to_network(&network->unused_4, native.unused_4); - rv &= native_to_network(&network->unused_5, native.unused_5); - rv &= native_to_network(&network->unused_zero_1, native.unused_zero_1); - rv &= native_to_network(&network->unused_zero_2, native.unused_zero_2); - rv &= native_to_network(&network->unused_sex, native.unused_sex); - rv &= native_to_network(&network->pos2, native.pos2); - rv &= native_to_network(&network->zero, native.zero); - rv &= native_to_network(&network->five1, native.five1); - rv &= native_to_network(&network->five2, native.five2); - rv &= native_to_network(&network->level, native.level); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x007b> *native, NetPacket_Fixed<0x007b> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->speed, network.speed); - rv &= network_to_native(&native->opt1, network.opt1); - rv &= network_to_native(&native->opt2, network.opt2); - rv &= network_to_native(&native->option, network.option); - rv &= network_to_native(&native->mob_class, network.mob_class); - rv &= network_to_native(&native->unused_hair_style, network.unused_hair_style); - rv &= network_to_native(&native->unused_weapon, network.unused_weapon); - rv &= network_to_native(&native->unused_head_bottom, network.unused_head_bottom); - rv &= network_to_native(&native->tick_and_maybe_part_of_guild_emblem, network.tick_and_maybe_part_of_guild_emblem); - rv &= network_to_native(&native->unused_shield_or_maybe_part_of_guild_emblem, network.unused_shield_or_maybe_part_of_guild_emblem); - rv &= network_to_native(&native->unused_head_top_or_maybe_part_of_guild_id, network.unused_head_top_or_maybe_part_of_guild_id); - rv &= network_to_native(&native->unused_head_mid_or_maybe_part_of_guild_id, network.unused_head_mid_or_maybe_part_of_guild_id); - rv &= network_to_native(&native->unused_hair_color, network.unused_hair_color); - rv &= network_to_native(&native->unused_clothes_color, network.unused_clothes_color); - rv &= network_to_native(&native->unused_1, network.unused_1); - rv &= network_to_native(&native->unused_2, network.unused_2); - rv &= network_to_native(&native->unused_3, network.unused_3); - rv &= network_to_native(&native->unused_4, network.unused_4); - rv &= network_to_native(&native->unused_5, network.unused_5); - rv &= network_to_native(&native->unused_zero_1, network.unused_zero_1); - rv &= network_to_native(&native->unused_zero_2, network.unused_zero_2); - rv &= network_to_native(&native->unused_sex, network.unused_sex); - rv &= network_to_native(&native->pos2, network.pos2); - rv &= network_to_native(&native->zero, network.zero); - rv &= network_to_native(&native->five1, network.five1); - rv &= network_to_native(&native->five2, network.five2); - rv &= network_to_native(&native->level, network.level); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x007c> *network, Packet_Fixed<0x007c> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->speed, native.speed); - rv &= native_to_network(&network->opt1, native.opt1); - rv &= native_to_network(&network->opt2, native.opt2); - rv &= native_to_network(&network->option, native.option); - rv &= native_to_network(&network->unknown_1, native.unknown_1); - rv &= native_to_network(&network->unknown_2, native.unknown_2); - rv &= native_to_network(&network->unknown_3, native.unknown_3); - rv &= native_to_network(&network->species, native.species); - rv &= native_to_network(&network->unknown_4, native.unknown_4); - rv &= native_to_network(&network->unknown_5, native.unknown_5); - rv &= native_to_network(&network->unknown_6, native.unknown_6); - rv &= native_to_network(&network->unknown_7, native.unknown_7); - rv &= native_to_network(&network->unknown_8, native.unknown_8); - rv &= native_to_network(&network->unknown_9, native.unknown_9); - rv &= native_to_network(&network->unknown_10, native.unknown_10); - rv &= native_to_network(&network->pos, native.pos); - rv &= native_to_network(&network->unknown_11, native.unknown_11); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x007c> *native, NetPacket_Fixed<0x007c> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->speed, network.speed); - rv &= network_to_native(&native->opt1, network.opt1); - rv &= network_to_native(&native->opt2, network.opt2); - rv &= network_to_native(&native->option, network.option); - rv &= network_to_native(&native->unknown_1, network.unknown_1); - rv &= network_to_native(&native->unknown_2, network.unknown_2); - rv &= network_to_native(&native->unknown_3, network.unknown_3); - rv &= network_to_native(&native->species, network.species); - rv &= network_to_native(&native->unknown_4, network.unknown_4); - rv &= network_to_native(&native->unknown_5, network.unknown_5); - rv &= network_to_native(&native->unknown_6, network.unknown_6); - rv &= network_to_native(&native->unknown_7, network.unknown_7); - rv &= network_to_native(&native->unknown_8, network.unknown_8); - rv &= network_to_native(&native->unknown_9, network.unknown_9); - rv &= network_to_native(&native->unknown_10, network.unknown_10); - rv &= network_to_native(&native->pos, network.pos); - rv &= network_to_native(&native->unknown_11, network.unknown_11); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x007d> *network, Packet_Fixed<0x007d> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x007d> *native, NetPacket_Fixed<0x007d> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x007e> *network, Packet_Fixed<0x007e> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->client_tick, native.client_tick); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x007e> *native, NetPacket_Fixed<0x007e> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->client_tick, network.client_tick); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x007f> *network, Packet_Fixed<0x007f> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->tick, native.tick); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x007f> *native, NetPacket_Fixed<0x007f> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->tick, network.tick); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0080> *network, Packet_Fixed<0x0080> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->type, native.type); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0080> *native, NetPacket_Fixed<0x0080> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->type, network.type); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0085> *network, Packet_Fixed<0x0085> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->pos, native.pos); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0085> *native, NetPacket_Fixed<0x0085> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->pos, network.pos); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0087> *network, Packet_Fixed<0x0087> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->tick, native.tick); - rv &= native_to_network(&network->pos2, native.pos2); - rv &= native_to_network(&network->zero, native.zero); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0087> *native, NetPacket_Fixed<0x0087> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->tick, network.tick); - rv &= network_to_native(&native->pos2, network.pos2); - rv &= network_to_native(&native->zero, network.zero); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0088> *network, Packet_Fixed<0x0088> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->x, native.x); - rv &= native_to_network(&network->y, native.y); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0088> *native, NetPacket_Fixed<0x0088> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->x, network.x); - rv &= network_to_native(&native->y, network.y); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0089> *network, Packet_Fixed<0x0089> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->target_id, native.target_id); - rv &= native_to_network(&network->action, native.action); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0089> *native, NetPacket_Fixed<0x0089> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->target_id, network.target_id); - rv &= network_to_native(&native->action, network.action); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x008a> *network, Packet_Fixed<0x008a> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->src_id, native.src_id); - rv &= native_to_network(&network->dst_id, native.dst_id); - rv &= native_to_network(&network->tick, native.tick); - rv &= native_to_network(&network->sdelay, native.sdelay); - rv &= native_to_network(&network->ddelay, native.ddelay); - rv &= native_to_network(&network->damage, native.damage); - rv &= native_to_network(&network->div, native.div); - rv &= native_to_network(&network->damage_type, native.damage_type); - rv &= native_to_network(&network->damage2, native.damage2); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x008a> *native, NetPacket_Fixed<0x008a> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->src_id, network.src_id); - rv &= network_to_native(&native->dst_id, network.dst_id); - rv &= network_to_native(&native->tick, network.tick); - rv &= network_to_native(&native->sdelay, network.sdelay); - rv &= network_to_native(&native->ddelay, network.ddelay); - rv &= network_to_native(&native->damage, network.damage); - rv &= network_to_native(&native->div, network.div); - rv &= network_to_native(&native->damage_type, network.damage_type); - rv &= network_to_native(&native->damage2, network.damage2); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x008c> *network, Packet_Head<0x008c> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x008c> *native, NetPacket_Head<0x008c> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x008c> *network, Packet_Repeat<0x008c> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x008c> *native, NetPacket_Repeat<0x008c> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x008d> *network, Packet_Head<0x008d> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x008d> *native, NetPacket_Head<0x008d> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x008d> *network, Packet_Repeat<0x008d> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x008d> *native, NetPacket_Repeat<0x008d> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x008e> *network, Packet_Head<0x008e> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x008e> *native, NetPacket_Head<0x008e> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x008e> *network, Packet_Repeat<0x008e> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x008e> *native, NetPacket_Repeat<0x008e> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0090> *network, Packet_Fixed<0x0090> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->unused, native.unused); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0090> *native, NetPacket_Fixed<0x0090> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->unused, network.unused); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0091> *network, Packet_Fixed<0x0091> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->map_name, native.map_name); - rv &= native_to_network(&network->x, native.x); - rv &= native_to_network(&network->y, native.y); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0091> *native, NetPacket_Fixed<0x0091> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->map_name, network.map_name); - rv &= network_to_native(&native->x, network.x); - rv &= network_to_native(&native->y, network.y); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0092> *network, Packet_Fixed<0x0092> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->map_name, native.map_name); - rv &= native_to_network(&network->x, native.x); - rv &= native_to_network(&network->y, native.y); - rv &= native_to_network(&network->ip, native.ip); - rv &= native_to_network(&network->port, native.port); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0092> *native, NetPacket_Fixed<0x0092> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->map_name, network.map_name); - rv &= network_to_native(&native->x, network.x); - rv &= network_to_native(&native->y, network.y); - rv &= network_to_native(&native->ip, network.ip); - rv &= network_to_native(&native->port, network.port); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0094> *network, Packet_Fixed<0x0094> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0094> *native, NetPacket_Fixed<0x0094> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0095> *network, Packet_Fixed<0x0095> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->char_name, native.char_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0095> *native, NetPacket_Fixed<0x0095> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->char_name, network.char_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x0096> *network, Packet_Head<0x0096> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->target_name, native.target_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x0096> *native, NetPacket_Head<0x0096> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->target_name, network.target_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x0096> *network, Packet_Repeat<0x0096> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x0096> *native, NetPacket_Repeat<0x0096> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x0097> *network, Packet_Head<0x0097> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->char_name, native.char_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x0097> *native, NetPacket_Head<0x0097> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->char_name, network.char_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x0097> *network, Packet_Repeat<0x0097> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x0097> *native, NetPacket_Repeat<0x0097> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0098> *network, Packet_Fixed<0x0098> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0098> *native, NetPacket_Fixed<0x0098> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x009a> *network, Packet_Head<0x009a> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x009a> *native, NetPacket_Head<0x009a> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x009a> *network, Packet_Repeat<0x009a> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x009a> *native, NetPacket_Repeat<0x009a> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x009b> *network, Packet_Fixed<0x009b> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->unused, native.unused); - rv &= native_to_network(&network->client_dir, native.client_dir); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x009b> *native, NetPacket_Fixed<0x009b> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->unused, network.unused); - rv &= network_to_native(&native->client_dir, network.client_dir); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x009c> *network, Packet_Fixed<0x009c> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->zero, native.zero); - rv &= native_to_network(&network->client_dir, native.client_dir); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x009c> *native, NetPacket_Fixed<0x009c> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->zero, network.zero); - rv &= network_to_native(&native->client_dir, network.client_dir); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x009d> *network, Packet_Fixed<0x009d> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->name_id, native.name_id); - rv &= native_to_network(&network->identify, native.identify); - rv &= native_to_network(&network->x, native.x); - rv &= native_to_network(&network->y, native.y); - rv &= native_to_network(&network->amount, native.amount); - rv &= native_to_network(&network->subx, native.subx); - rv &= native_to_network(&network->suby, native.suby); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x009d> *native, NetPacket_Fixed<0x009d> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->name_id, network.name_id); - rv &= network_to_native(&native->identify, network.identify); - rv &= network_to_native(&native->x, network.x); - rv &= network_to_native(&native->y, network.y); - rv &= network_to_native(&native->amount, network.amount); - rv &= network_to_native(&native->subx, network.subx); - rv &= network_to_native(&native->suby, network.suby); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x009e> *network, Packet_Fixed<0x009e> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->name_id, native.name_id); - rv &= native_to_network(&network->identify, native.identify); - rv &= native_to_network(&network->x, native.x); - rv &= native_to_network(&network->y, native.y); - rv &= native_to_network(&network->subx, native.subx); - rv &= native_to_network(&network->suby, native.suby); - rv &= native_to_network(&network->amount, native.amount); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x009e> *native, NetPacket_Fixed<0x009e> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->name_id, network.name_id); - rv &= network_to_native(&native->identify, network.identify); - rv &= network_to_native(&native->x, network.x); - rv &= network_to_native(&native->y, network.y); - rv &= network_to_native(&native->subx, network.subx); - rv &= network_to_native(&native->suby, network.suby); - rv &= network_to_native(&native->amount, network.amount); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x009f> *network, Packet_Fixed<0x009f> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->object_id, native.object_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x009f> *native, NetPacket_Fixed<0x009f> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->object_id, network.object_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00a0> *network, Packet_Fixed<0x00a0> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->amount, native.amount); - rv &= native_to_network(&network->name_id, native.name_id); - rv &= native_to_network(&network->identify, native.identify); - rv &= native_to_network(&network->broken_or_attribute, native.broken_or_attribute); - rv &= native_to_network(&network->refine, native.refine); - rv &= native_to_network(&network->card0, native.card0); - rv &= native_to_network(&network->card1, native.card1); - rv &= native_to_network(&network->card2, native.card2); - rv &= native_to_network(&network->card3, native.card3); - rv &= native_to_network(&network->epos, native.epos); - rv &= native_to_network(&network->item_type, native.item_type); - rv &= native_to_network(&network->pickup_fail, native.pickup_fail); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00a0> *native, NetPacket_Fixed<0x00a0> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->amount, network.amount); - rv &= network_to_native(&native->name_id, network.name_id); - rv &= network_to_native(&native->identify, network.identify); - rv &= network_to_native(&native->broken_or_attribute, network.broken_or_attribute); - rv &= network_to_native(&native->refine, network.refine); - rv &= network_to_native(&native->card0, network.card0); - rv &= network_to_native(&native->card1, network.card1); - rv &= network_to_native(&native->card2, network.card2); - rv &= network_to_native(&native->card3, network.card3); - rv &= network_to_native(&native->epos, network.epos); - rv &= network_to_native(&native->item_type, network.item_type); - rv &= network_to_native(&native->pickup_fail, network.pickup_fail); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00a1> *network, Packet_Fixed<0x00a1> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00a1> *native, NetPacket_Fixed<0x00a1> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00a2> *network, Packet_Fixed<0x00a2> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->amount, native.amount); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00a2> *native, NetPacket_Fixed<0x00a2> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->amount, network.amount); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x00a4> *network, Packet_Head<0x00a4> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x00a4> *native, NetPacket_Head<0x00a4> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x00a4> *network, Packet_Repeat<0x00a4> native) -{ - bool rv = true; - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->name_id, native.name_id); - rv &= native_to_network(&network->item_type, native.item_type); - rv &= native_to_network(&network->identify, native.identify); - rv &= native_to_network(&network->epos_pc, native.epos_pc); - rv &= native_to_network(&network->epos_inv, native.epos_inv); - rv &= native_to_network(&network->broken_or_attribute, native.broken_or_attribute); - rv &= native_to_network(&network->refine, native.refine); - rv &= native_to_network(&network->card0, native.card0); - rv &= native_to_network(&network->card1, native.card1); - rv &= native_to_network(&network->card2, native.card2); - rv &= native_to_network(&network->card3, native.card3); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x00a4> *native, NetPacket_Repeat<0x00a4> network) -{ - bool rv = true; - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->name_id, network.name_id); - rv &= network_to_native(&native->item_type, network.item_type); - rv &= network_to_native(&native->identify, network.identify); - rv &= network_to_native(&native->epos_pc, network.epos_pc); - rv &= network_to_native(&native->epos_inv, network.epos_inv); - rv &= network_to_native(&native->broken_or_attribute, network.broken_or_attribute); - rv &= network_to_native(&native->refine, network.refine); - rv &= network_to_native(&native->card0, network.card0); - rv &= network_to_native(&native->card1, network.card1); - rv &= network_to_native(&native->card2, network.card2); - rv &= network_to_native(&native->card3, network.card3); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x00a6> *network, Packet_Head<0x00a6> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x00a6> *native, NetPacket_Head<0x00a6> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x00a6> *network, Packet_Repeat<0x00a6> native) -{ - bool rv = true; - rv &= native_to_network(&network->soff1, native.soff1); - rv &= native_to_network(&network->name_id, native.name_id); - rv &= native_to_network(&network->item_type, native.item_type); - rv &= native_to_network(&network->identify, native.identify); - rv &= native_to_network(&network->epos_id, native.epos_id); - rv &= native_to_network(&network->epos_stor, native.epos_stor); - rv &= native_to_network(&network->broken_or_attribute, native.broken_or_attribute); - rv &= native_to_network(&network->refine, native.refine); - rv &= native_to_network(&network->card0, native.card0); - rv &= native_to_network(&network->card1, native.card1); - rv &= native_to_network(&network->card2, native.card2); - rv &= native_to_network(&network->card3, native.card3); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x00a6> *native, NetPacket_Repeat<0x00a6> network) -{ - bool rv = true; - rv &= network_to_native(&native->soff1, network.soff1); - rv &= network_to_native(&native->name_id, network.name_id); - rv &= network_to_native(&native->item_type, network.item_type); - rv &= network_to_native(&native->identify, network.identify); - rv &= network_to_native(&native->epos_id, network.epos_id); - rv &= network_to_native(&native->epos_stor, network.epos_stor); - rv &= network_to_native(&native->broken_or_attribute, network.broken_or_attribute); - rv &= network_to_native(&native->refine, network.refine); - rv &= network_to_native(&native->card0, network.card0); - rv &= network_to_native(&native->card1, network.card1); - rv &= network_to_native(&native->card2, network.card2); - rv &= network_to_native(&native->card3, network.card3); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00a7> *network, Packet_Fixed<0x00a7> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->unused_id, native.unused_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00a7> *native, NetPacket_Fixed<0x00a7> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->unused_id, network.unused_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00a8> *network, Packet_Fixed<0x00a8> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->amount, native.amount); - rv &= native_to_network(&network->ok, native.ok); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00a8> *native, NetPacket_Fixed<0x00a8> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->amount, network.amount); - rv &= network_to_native(&native->ok, network.ok); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00a9> *network, Packet_Fixed<0x00a9> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->epos_ignored, native.epos_ignored); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00a9> *native, NetPacket_Fixed<0x00a9> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->epos_ignored, network.epos_ignored); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00aa> *network, Packet_Fixed<0x00aa> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->epos, native.epos); - rv &= native_to_network(&network->ok, native.ok); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00aa> *native, NetPacket_Fixed<0x00aa> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->epos, network.epos); - rv &= network_to_native(&native->ok, network.ok); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00ab> *network, Packet_Fixed<0x00ab> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00ab> *native, NetPacket_Fixed<0x00ab> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00ac> *network, Packet_Fixed<0x00ac> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->epos, native.epos); - rv &= native_to_network(&network->ok, native.ok); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00ac> *native, NetPacket_Fixed<0x00ac> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->epos, network.epos); - rv &= network_to_native(&native->ok, network.ok); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00af> *network, Packet_Fixed<0x00af> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->amount, native.amount); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00af> *native, NetPacket_Fixed<0x00af> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->amount, network.amount); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00b0> *network, Packet_Fixed<0x00b0> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->sp_type, native.sp_type); - rv &= native_to_network(&network->value, native.value); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00b0> *native, NetPacket_Fixed<0x00b0> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->sp_type, network.sp_type); - rv &= network_to_native(&native->value, network.value); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00b1> *network, Packet_Fixed<0x00b1> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->sp_type, native.sp_type); - rv &= native_to_network(&network->value, native.value); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00b1> *native, NetPacket_Fixed<0x00b1> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->sp_type, network.sp_type); - rv &= network_to_native(&native->value, network.value); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00b2> *network, Packet_Fixed<0x00b2> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00b2> *native, NetPacket_Fixed<0x00b2> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00b3> *network, Packet_Fixed<0x00b3> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->one, native.one); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00b3> *native, NetPacket_Fixed<0x00b3> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->one, network.one); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x00b4> *network, Packet_Head<0x00b4> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x00b4> *native, NetPacket_Head<0x00b4> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x00b4> *network, Packet_Repeat<0x00b4> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x00b4> *native, NetPacket_Repeat<0x00b4> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00b5> *network, Packet_Fixed<0x00b5> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00b5> *native, NetPacket_Fixed<0x00b5> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00b6> *network, Packet_Fixed<0x00b6> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00b6> *native, NetPacket_Fixed<0x00b6> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x00b7> *network, Packet_Head<0x00b7> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x00b7> *native, NetPacket_Head<0x00b7> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x00b7> *network, Packet_Repeat<0x00b7> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x00b7> *native, NetPacket_Repeat<0x00b7> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00b8> *network, Packet_Fixed<0x00b8> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->npc_id, native.npc_id); - rv &= native_to_network(&network->menu_entry, native.menu_entry); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00b8> *native, NetPacket_Fixed<0x00b8> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->npc_id, network.npc_id); - rv &= network_to_native(&native->menu_entry, network.menu_entry); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00b9> *network, Packet_Fixed<0x00b9> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->npc_id, native.npc_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00b9> *native, NetPacket_Fixed<0x00b9> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->npc_id, network.npc_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00bb> *network, Packet_Fixed<0x00bb> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->asp, native.asp); - rv &= native_to_network(&network->unused, native.unused); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00bb> *native, NetPacket_Fixed<0x00bb> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->asp, network.asp); - rv &= network_to_native(&native->unused, network.unused); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00bc> *network, Packet_Fixed<0x00bc> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->sp_type, native.sp_type); - rv &= native_to_network(&network->ok, native.ok); - rv &= native_to_network(&network->val, native.val); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00bc> *native, NetPacket_Fixed<0x00bc> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->sp_type, network.sp_type); - rv &= network_to_native(&native->ok, network.ok); - rv &= network_to_native(&native->val, network.val); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00bd> *network, Packet_Fixed<0x00bd> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->status_point, native.status_point); - rv &= native_to_network(&network->str_attr, native.str_attr); - rv &= native_to_network(&network->str_upd, native.str_upd); - rv &= native_to_network(&network->agi_attr, native.agi_attr); - rv &= native_to_network(&network->agi_upd, native.agi_upd); - rv &= native_to_network(&network->vit_attr, native.vit_attr); - rv &= native_to_network(&network->vit_upd, native.vit_upd); - rv &= native_to_network(&network->int_attr, native.int_attr); - rv &= native_to_network(&network->int_upd, native.int_upd); - rv &= native_to_network(&network->dex_attr, native.dex_attr); - rv &= native_to_network(&network->dex_upd, native.dex_upd); - rv &= native_to_network(&network->luk_attr, native.luk_attr); - rv &= native_to_network(&network->luk_upd, native.luk_upd); - rv &= native_to_network(&network->atk_sum, native.atk_sum); - rv &= native_to_network(&network->watk2, native.watk2); - rv &= native_to_network(&network->matk1, native.matk1); - rv &= native_to_network(&network->matk2, native.matk2); - rv &= native_to_network(&network->def, native.def); - rv &= native_to_network(&network->def2, native.def2); - rv &= native_to_network(&network->mdef, native.mdef); - rv &= native_to_network(&network->mdef2, native.mdef2); - rv &= native_to_network(&network->hit, native.hit); - rv &= native_to_network(&network->flee, native.flee); - rv &= native_to_network(&network->flee2, native.flee2); - rv &= native_to_network(&network->critical, native.critical); - rv &= native_to_network(&network->karma, native.karma); - rv &= native_to_network(&network->manner, native.manner); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00bd> *native, NetPacket_Fixed<0x00bd> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->status_point, network.status_point); - rv &= network_to_native(&native->str_attr, network.str_attr); - rv &= network_to_native(&native->str_upd, network.str_upd); - rv &= network_to_native(&native->agi_attr, network.agi_attr); - rv &= network_to_native(&native->agi_upd, network.agi_upd); - rv &= network_to_native(&native->vit_attr, network.vit_attr); - rv &= network_to_native(&native->vit_upd, network.vit_upd); - rv &= network_to_native(&native->int_attr, network.int_attr); - rv &= network_to_native(&native->int_upd, network.int_upd); - rv &= network_to_native(&native->dex_attr, network.dex_attr); - rv &= network_to_native(&native->dex_upd, network.dex_upd); - rv &= network_to_native(&native->luk_attr, network.luk_attr); - rv &= network_to_native(&native->luk_upd, network.luk_upd); - rv &= network_to_native(&native->atk_sum, network.atk_sum); - rv &= network_to_native(&native->watk2, network.watk2); - rv &= network_to_native(&native->matk1, network.matk1); - rv &= network_to_native(&native->matk2, network.matk2); - rv &= network_to_native(&native->def, network.def); - rv &= network_to_native(&native->def2, network.def2); - rv &= network_to_native(&native->mdef, network.mdef); - rv &= network_to_native(&native->mdef2, network.mdef2); - rv &= network_to_native(&native->hit, network.hit); - rv &= network_to_native(&native->flee, network.flee); - rv &= network_to_native(&native->flee2, network.flee2); - rv &= network_to_native(&native->critical, network.critical); - rv &= network_to_native(&native->karma, network.karma); - rv &= network_to_native(&native->manner, network.manner); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00be> *network, Packet_Fixed<0x00be> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->sp_type, native.sp_type); - rv &= native_to_network(&network->value, native.value); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00be> *native, NetPacket_Fixed<0x00be> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->sp_type, network.sp_type); - rv &= network_to_native(&native->value, network.value); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00bf> *network, Packet_Fixed<0x00bf> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->emote, native.emote); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00bf> *native, NetPacket_Fixed<0x00bf> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->emote, network.emote); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00c0> *network, Packet_Fixed<0x00c0> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->type, native.type); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00c0> *native, NetPacket_Fixed<0x00c0> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->type, network.type); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00c1> *network, Packet_Fixed<0x00c1> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00c1> *native, NetPacket_Fixed<0x00c1> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00c2> *network, Packet_Fixed<0x00c2> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->users, native.users); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00c2> *native, NetPacket_Fixed<0x00c2> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->users, network.users); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00c4> *network, Packet_Fixed<0x00c4> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00c4> *native, NetPacket_Fixed<0x00c4> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00c5> *network, Packet_Fixed<0x00c5> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->type, native.type); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00c5> *native, NetPacket_Fixed<0x00c5> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->type, network.type); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x00c6> *network, Packet_Head<0x00c6> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x00c6> *native, NetPacket_Head<0x00c6> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x00c6> *network, Packet_Repeat<0x00c6> native) -{ - bool rv = true; - rv &= native_to_network(&network->base_price, native.base_price); - rv &= native_to_network(&network->actual_price, native.actual_price); - rv &= native_to_network(&network->type, native.type); - rv &= native_to_network(&network->name_id, native.name_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x00c6> *native, NetPacket_Repeat<0x00c6> network) -{ - bool rv = true; - rv &= network_to_native(&native->base_price, network.base_price); - rv &= network_to_native(&native->actual_price, network.actual_price); - rv &= network_to_native(&native->type, network.type); - rv &= network_to_native(&native->name_id, network.name_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x00c7> *network, Packet_Head<0x00c7> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x00c7> *native, NetPacket_Head<0x00c7> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x00c7> *network, Packet_Repeat<0x00c7> native) -{ - bool rv = true; - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->base_price, native.base_price); - rv &= native_to_network(&network->actual_price, native.actual_price); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x00c7> *native, NetPacket_Repeat<0x00c7> network) -{ - bool rv = true; - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->base_price, network.base_price); - rv &= network_to_native(&native->actual_price, network.actual_price); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x00c8> *network, Packet_Head<0x00c8> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x00c8> *native, NetPacket_Head<0x00c8> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x00c8> *network, Packet_Repeat<0x00c8> native) -{ - bool rv = true; - rv &= native_to_network(&network->count, native.count); - rv &= native_to_network(&network->name_id, native.name_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x00c8> *native, NetPacket_Repeat<0x00c8> network) -{ - bool rv = true; - rv &= network_to_native(&native->count, network.count); - rv &= network_to_native(&native->name_id, network.name_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x00c9> *network, Packet_Head<0x00c9> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x00c9> *native, NetPacket_Head<0x00c9> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x00c9> *network, Packet_Repeat<0x00c9> native) -{ - bool rv = true; - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->count, native.count); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x00c9> *native, NetPacket_Repeat<0x00c9> network) -{ - bool rv = true; - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->count, network.count); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00ca> *network, Packet_Fixed<0x00ca> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->fail, native.fail); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00ca> *native, NetPacket_Fixed<0x00ca> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->fail, network.fail); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00cb> *network, Packet_Fixed<0x00cb> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->fail, native.fail); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00cb> *native, NetPacket_Fixed<0x00cb> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->fail, network.fail); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00cd> *network, Packet_Fixed<0x00cd> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00cd> *native, NetPacket_Fixed<0x00cd> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00e4> *network, Packet_Fixed<0x00e4> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00e4> *native, NetPacket_Fixed<0x00e4> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00e5> *network, Packet_Fixed<0x00e5> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->char_name, native.char_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00e5> *native, NetPacket_Fixed<0x00e5> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->char_name, network.char_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00e6> *network, Packet_Fixed<0x00e6> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->type, native.type); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00e6> *native, NetPacket_Fixed<0x00e6> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->type, network.type); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00e7> *network, Packet_Fixed<0x00e7> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->type, native.type); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00e7> *native, NetPacket_Fixed<0x00e7> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->type, network.type); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00e8> *network, Packet_Fixed<0x00e8> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->zeny_or_ioff2, native.zeny_or_ioff2); - rv &= native_to_network(&network->amount, native.amount); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00e8> *native, NetPacket_Fixed<0x00e8> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->zeny_or_ioff2, network.zeny_or_ioff2); - rv &= network_to_native(&native->amount, network.amount); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00e9> *network, Packet_Fixed<0x00e9> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->amount, native.amount); - rv &= native_to_network(&network->name_id, native.name_id); - rv &= native_to_network(&network->identify, native.identify); - rv &= native_to_network(&network->broken_or_attribute, native.broken_or_attribute); - rv &= native_to_network(&network->refine, native.refine); - rv &= native_to_network(&network->card0, native.card0); - rv &= native_to_network(&network->card1, native.card1); - rv &= native_to_network(&network->card2, native.card2); - rv &= native_to_network(&network->card3, native.card3); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00e9> *native, NetPacket_Fixed<0x00e9> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->amount, network.amount); - rv &= network_to_native(&native->name_id, network.name_id); - rv &= network_to_native(&native->identify, network.identify); - rv &= network_to_native(&native->broken_or_attribute, network.broken_or_attribute); - rv &= network_to_native(&native->refine, network.refine); - rv &= network_to_native(&native->card0, network.card0); - rv &= network_to_native(&native->card1, network.card1); - rv &= network_to_native(&native->card2, network.card2); - rv &= network_to_native(&native->card3, network.card3); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00eb> *network, Packet_Fixed<0x00eb> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00eb> *native, NetPacket_Fixed<0x00eb> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00ec> *network, Packet_Fixed<0x00ec> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->fail, native.fail); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00ec> *native, NetPacket_Fixed<0x00ec> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->fail, network.fail); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00ed> *network, Packet_Fixed<0x00ed> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00ed> *native, NetPacket_Fixed<0x00ed> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00ee> *network, Packet_Fixed<0x00ee> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00ee> *native, NetPacket_Fixed<0x00ee> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00ef> *network, Packet_Fixed<0x00ef> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00ef> *native, NetPacket_Fixed<0x00ef> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00f0> *network, Packet_Fixed<0x00f0> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->fail, native.fail); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00f0> *native, NetPacket_Fixed<0x00f0> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->fail, network.fail); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00f2> *network, Packet_Fixed<0x00f2> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->current_slots, native.current_slots); - rv &= native_to_network(&network->max_slots, native.max_slots); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00f2> *native, NetPacket_Fixed<0x00f2> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->current_slots, network.current_slots); - rv &= network_to_native(&native->max_slots, network.max_slots); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00f3> *network, Packet_Fixed<0x00f3> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->amount, native.amount); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00f3> *native, NetPacket_Fixed<0x00f3> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->amount, network.amount); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00f4> *network, Packet_Fixed<0x00f4> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->soff1, native.soff1); - rv &= native_to_network(&network->amount, native.amount); - rv &= native_to_network(&network->name_id, native.name_id); - rv &= native_to_network(&network->identify, native.identify); - rv &= native_to_network(&network->broken_or_attribute, native.broken_or_attribute); - rv &= native_to_network(&network->refine, native.refine); - rv &= native_to_network(&network->card0, native.card0); - rv &= native_to_network(&network->card1, native.card1); - rv &= native_to_network(&network->card2, native.card2); - rv &= native_to_network(&network->card3, native.card3); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00f4> *native, NetPacket_Fixed<0x00f4> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->soff1, network.soff1); - rv &= network_to_native(&native->amount, network.amount); - rv &= network_to_native(&native->name_id, network.name_id); - rv &= network_to_native(&native->identify, network.identify); - rv &= network_to_native(&native->broken_or_attribute, network.broken_or_attribute); - rv &= network_to_native(&native->refine, network.refine); - rv &= network_to_native(&native->card0, network.card0); - rv &= network_to_native(&native->card1, network.card1); - rv &= network_to_native(&native->card2, network.card2); - rv &= network_to_native(&native->card3, network.card3); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00f5> *network, Packet_Fixed<0x00f5> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->soff1, native.soff1); - rv &= native_to_network(&network->amount, native.amount); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00f5> *native, NetPacket_Fixed<0x00f5> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->soff1, network.soff1); - rv &= network_to_native(&native->amount, network.amount); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00f6> *network, Packet_Fixed<0x00f6> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->soff1, native.soff1); - rv &= native_to_network(&network->amount, native.amount); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00f6> *native, NetPacket_Fixed<0x00f6> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->soff1, network.soff1); - rv &= network_to_native(&native->amount, network.amount); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00f7> *network, Packet_Fixed<0x00f7> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00f7> *native, NetPacket_Fixed<0x00f7> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00f8> *network, Packet_Fixed<0x00f8> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00f8> *native, NetPacket_Fixed<0x00f8> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00f9> *network, Packet_Fixed<0x00f9> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->party_name, native.party_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00f9> *native, NetPacket_Fixed<0x00f9> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->party_name, network.party_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00fa> *network, Packet_Fixed<0x00fa> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00fa> *native, NetPacket_Fixed<0x00fa> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x00fb> *network, Packet_Head<0x00fb> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->party_name, native.party_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x00fb> *native, NetPacket_Head<0x00fb> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->party_name, network.party_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x00fb> *network, Packet_Repeat<0x00fb> native) -{ - bool rv = true; - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->char_name, native.char_name); - rv &= native_to_network(&network->map_name, native.map_name); - rv &= native_to_network(&network->leader, native.leader); - rv &= native_to_network(&network->online, native.online); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x00fb> *native, NetPacket_Repeat<0x00fb> network) -{ - bool rv = true; - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->char_name, network.char_name); - rv &= network_to_native(&native->map_name, network.map_name); - rv &= network_to_native(&native->leader, network.leader); - rv &= network_to_native(&native->online, network.online); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00fc> *network, Packet_Fixed<0x00fc> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00fc> *native, NetPacket_Fixed<0x00fc> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00fd> *network, Packet_Fixed<0x00fd> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->char_name, native.char_name); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00fd> *native, NetPacket_Fixed<0x00fd> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->char_name, network.char_name); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00fe> *network, Packet_Fixed<0x00fe> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->party_name, native.party_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00fe> *native, NetPacket_Fixed<0x00fe> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->party_name, network.party_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x00ff> *network, Packet_Fixed<0x00ff> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x00ff> *native, NetPacket_Fixed<0x00ff> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0100> *network, Packet_Fixed<0x0100> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0100> *native, NetPacket_Fixed<0x0100> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0101> *network, Packet_Fixed<0x0101> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->exp, native.exp); - rv &= native_to_network(&network->item, native.item); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0101> *native, NetPacket_Fixed<0x0101> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->exp, network.exp); - rv &= network_to_native(&native->item, network.item); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0102> *network, Packet_Fixed<0x0102> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->exp, native.exp); - rv &= native_to_network(&network->item, native.item); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0102> *native, NetPacket_Fixed<0x0102> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->exp, network.exp); - rv &= network_to_native(&native->item, network.item); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0103> *network, Packet_Fixed<0x0103> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->unused_char_name, native.unused_char_name); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0103> *native, NetPacket_Fixed<0x0103> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->unused_char_name, network.unused_char_name); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0105> *network, Packet_Fixed<0x0105> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->char_name, native.char_name); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0105> *native, NetPacket_Fixed<0x0105> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->char_name, network.char_name); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0106> *network, Packet_Fixed<0x0106> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->hp, native.hp); - rv &= native_to_network(&network->max_hp, native.max_hp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0106> *native, NetPacket_Fixed<0x0106> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->hp, network.hp); - rv &= network_to_native(&native->max_hp, network.max_hp); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0107> *network, Packet_Fixed<0x0107> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->x, native.x); - rv &= native_to_network(&network->y, native.y); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0107> *native, NetPacket_Fixed<0x0107> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->x, network.x); - rv &= network_to_native(&native->y, network.y); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x0108> *network, Packet_Head<0x0108> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x0108> *native, NetPacket_Head<0x0108> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x0108> *network, Packet_Repeat<0x0108> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x0108> *native, NetPacket_Repeat<0x0108> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x0109> *network, Packet_Head<0x0109> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->account_id, native.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x0109> *native, NetPacket_Head<0x0109> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->account_id, network.account_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x0109> *network, Packet_Repeat<0x0109> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x0109> *native, NetPacket_Repeat<0x0109> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x010c> *network, Packet_Fixed<0x010c> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x010c> *native, NetPacket_Fixed<0x010c> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x010e> *network, Packet_Fixed<0x010e> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->skill_id, native.skill_id); - rv &= native_to_network(&network->level, native.level); - rv &= native_to_network(&network->sp, native.sp); - rv &= native_to_network(&network->range, native.range); - rv &= native_to_network(&network->can_raise, native.can_raise); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x010e> *native, NetPacket_Fixed<0x010e> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->skill_id, network.skill_id); - rv &= network_to_native(&native->level, network.level); - rv &= network_to_native(&native->sp, network.sp); - rv &= network_to_native(&native->range, network.range); - rv &= network_to_native(&native->can_raise, network.can_raise); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x010f> *network, Packet_Head<0x010f> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x010f> *native, NetPacket_Head<0x010f> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x010f> *network, Packet_Repeat<0x010f> native) -{ - bool rv = true; - rv &= native_to_network(&network->info, native.info); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x010f> *native, NetPacket_Repeat<0x010f> network) -{ - bool rv = true; - rv &= network_to_native(&native->info, network.info); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0110> *network, Packet_Fixed<0x0110> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->skill_id, native.skill_id); - rv &= native_to_network(&network->btype, native.btype); - rv &= native_to_network(&network->zero1, native.zero1); - rv &= native_to_network(&network->zero2, native.zero2); - rv &= native_to_network(&network->type, native.type); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0110> *native, NetPacket_Fixed<0x0110> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->skill_id, network.skill_id); - rv &= network_to_native(&native->btype, network.btype); - rv &= network_to_native(&native->zero1, network.zero1); - rv &= network_to_native(&native->zero2, network.zero2); - rv &= network_to_native(&native->type, network.type); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0112> *network, Packet_Fixed<0x0112> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->skill_id, native.skill_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0112> *native, NetPacket_Fixed<0x0112> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->skill_id, network.skill_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0118> *network, Packet_Fixed<0x0118> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0118> *native, NetPacket_Fixed<0x0118> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0119> *network, Packet_Fixed<0x0119> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->opt1, native.opt1); - rv &= native_to_network(&network->opt2, native.opt2); - rv &= native_to_network(&network->option, native.option); - rv &= native_to_network(&network->zero, native.zero); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0119> *native, NetPacket_Fixed<0x0119> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->opt1, network.opt1); - rv &= network_to_native(&native->opt2, network.opt2); - rv &= network_to_native(&native->option, network.option); - rv &= network_to_native(&native->zero, network.zero); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0139> *network, Packet_Fixed<0x0139> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->bl_x, native.bl_x); - rv &= native_to_network(&network->bl_y, native.bl_y); - rv &= native_to_network(&network->sd_x, native.sd_x); - rv &= native_to_network(&network->sd_y, native.sd_y); - rv &= native_to_network(&network->range, native.range); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0139> *native, NetPacket_Fixed<0x0139> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->bl_x, network.bl_x); - rv &= network_to_native(&native->bl_y, network.bl_y); - rv &= network_to_native(&native->sd_x, network.sd_x); - rv &= network_to_native(&native->sd_y, network.sd_y); - rv &= network_to_native(&native->range, network.range); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x013a> *network, Packet_Fixed<0x013a> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->attack_range, native.attack_range); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x013a> *native, NetPacket_Fixed<0x013a> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->attack_range, network.attack_range); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x013b> *network, Packet_Fixed<0x013b> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->type, native.type); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x013b> *native, NetPacket_Fixed<0x013b> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->type, network.type); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x013c> *network, Packet_Fixed<0x013c> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x013c> *native, NetPacket_Fixed<0x013c> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0141> *network, Packet_Fixed<0x0141> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->sp_type, native.sp_type); - rv &= native_to_network(&network->zero, native.zero); - rv &= native_to_network(&network->value_status, native.value_status); - rv &= native_to_network(&network->value_b_e, native.value_b_e); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0141> *native, NetPacket_Fixed<0x0141> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->sp_type, network.sp_type); - rv &= network_to_native(&native->zero, network.zero); - rv &= network_to_native(&native->value_status, network.value_status); - rv &= network_to_native(&native->value_b_e, network.value_b_e); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0142> *network, Packet_Fixed<0x0142> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0142> *native, NetPacket_Fixed<0x0142> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0143> *network, Packet_Fixed<0x0143> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->input_int_value, native.input_int_value); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0143> *native, NetPacket_Fixed<0x0143> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->input_int_value, network.input_int_value); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0146> *network, Packet_Fixed<0x0146> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0146> *native, NetPacket_Fixed<0x0146> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0147> *network, Packet_Fixed<0x0147> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->info, native.info); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0147> *native, NetPacket_Fixed<0x0147> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->info, network.info); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0148> *network, Packet_Fixed<0x0148> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->type, native.type); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0148> *native, NetPacket_Fixed<0x0148> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->type, network.type); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x014d> *network, Packet_Fixed<0x014d> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x014d> *native, NetPacket_Fixed<0x014d> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x018a> *network, Packet_Fixed<0x018a> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->unused, native.unused); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x018a> *native, NetPacket_Fixed<0x018a> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->unused, network.unused); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x018b> *network, Packet_Fixed<0x018b> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->okay, native.okay); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x018b> *native, NetPacket_Fixed<0x018b> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->okay, network.okay); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0195> *network, Packet_Fixed<0x0195> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->party_name, native.party_name); - rv &= native_to_network(&network->guild_name, native.guild_name); - rv &= native_to_network(&network->guild_pos, native.guild_pos); - rv &= native_to_network(&network->guild_pos_again, native.guild_pos_again); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0195> *native, NetPacket_Fixed<0x0195> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->party_name, network.party_name); - rv &= network_to_native(&native->guild_name, network.guild_name); - rv &= network_to_native(&native->guild_pos, network.guild_pos); - rv &= network_to_native(&native->guild_pos_again, network.guild_pos_again); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0196> *network, Packet_Fixed<0x0196> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->sc_type, native.sc_type); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->flag, native.flag); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0196> *native, NetPacket_Fixed<0x0196> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->sc_type, network.sc_type); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->flag, network.flag); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x019b> *network, Packet_Fixed<0x019b> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->type, native.type); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x019b> *native, NetPacket_Fixed<0x019b> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->type, network.type); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x01b1> *network, Packet_Fixed<0x01b1> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->amount, native.amount); - rv &= native_to_network(&network->fail, native.fail); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x01b1> *native, NetPacket_Fixed<0x01b1> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->amount, network.amount); - rv &= network_to_native(&native->fail, network.fail); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x01c8> *network, Packet_Fixed<0x01c8> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->name_id, native.name_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->amount, native.amount); - rv &= native_to_network(&network->ok, native.ok); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x01c8> *native, NetPacket_Fixed<0x01c8> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->name_id, network.name_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->amount, network.amount); - rv &= network_to_native(&native->ok, network.ok); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x01d4> *network, Packet_Fixed<0x01d4> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x01d4> *native, NetPacket_Fixed<0x01d4> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x01d5> *network, Packet_Head<0x01d5> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - rv &= native_to_network(&network->block_id, native.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x01d5> *native, NetPacket_Head<0x01d5> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - rv &= network_to_native(&native->block_id, network.block_id); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x01d5> *network, Packet_Repeat<0x01d5> native) -{ - bool rv = true; - rv &= native_to_network(&network->c, native.c); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x01d5> *native, NetPacket_Repeat<0x01d5> network) -{ - bool rv = true; - rv &= network_to_native(&native->c, network.c); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x01d7> *network, Packet_Fixed<0x01d7> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->look_type, native.look_type); - rv &= native_to_network(&network->weapon_or_name_id_or_value, native.weapon_or_name_id_or_value); - rv &= native_to_network(&network->shield, native.shield); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x01d7> *native, NetPacket_Fixed<0x01d7> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->look_type, network.look_type); - rv &= network_to_native(&native->weapon_or_name_id_or_value, network.weapon_or_name_id_or_value); - rv &= network_to_native(&native->shield, network.shield); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x01d8> *network, Packet_Fixed<0x01d8> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->speed, native.speed); - rv &= native_to_network(&network->opt1, native.opt1); - rv &= native_to_network(&network->opt2, native.opt2); - rv &= native_to_network(&network->option, native.option); - rv &= native_to_network(&network->species, native.species); - rv &= native_to_network(&network->hair_style, native.hair_style); - rv &= native_to_network(&network->weapon, native.weapon); - rv &= native_to_network(&network->shield, native.shield); - rv &= native_to_network(&network->head_bottom, native.head_bottom); - rv &= native_to_network(&network->head_top, native.head_top); - rv &= native_to_network(&network->head_mid, native.head_mid); - rv &= native_to_network(&network->hair_color, native.hair_color); - rv &= native_to_network(&network->clothes_color, native.clothes_color); - rv &= native_to_network(&network->head_dir, native.head_dir); - rv &= native_to_network(&network->unused2, native.unused2); - rv &= native_to_network(&network->guild_id, native.guild_id); - rv &= native_to_network(&network->guild_emblem_id, native.guild_emblem_id); - rv &= native_to_network(&network->manner, native.manner); - rv &= native_to_network(&network->opt3, native.opt3); - rv &= native_to_network(&network->karma, native.karma); - rv &= native_to_network(&network->sex, native.sex); - rv &= native_to_network(&network->pos, native.pos); - rv &= native_to_network(&network->gm_bits, native.gm_bits); - rv &= native_to_network(&network->dead_sit, native.dead_sit); - rv &= native_to_network(&network->unused, native.unused); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x01d8> *native, NetPacket_Fixed<0x01d8> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->speed, network.speed); - rv &= network_to_native(&native->opt1, network.opt1); - rv &= network_to_native(&native->opt2, network.opt2); - rv &= network_to_native(&native->option, network.option); - rv &= network_to_native(&native->species, network.species); - rv &= network_to_native(&native->hair_style, network.hair_style); - rv &= network_to_native(&native->weapon, network.weapon); - rv &= network_to_native(&native->shield, network.shield); - rv &= network_to_native(&native->head_bottom, network.head_bottom); - rv &= network_to_native(&native->head_top, network.head_top); - rv &= network_to_native(&native->head_mid, network.head_mid); - rv &= network_to_native(&native->hair_color, network.hair_color); - rv &= network_to_native(&native->clothes_color, network.clothes_color); - rv &= network_to_native(&native->head_dir, network.head_dir); - rv &= network_to_native(&native->unused2, network.unused2); - rv &= network_to_native(&native->guild_id, network.guild_id); - rv &= network_to_native(&native->guild_emblem_id, network.guild_emblem_id); - rv &= network_to_native(&native->manner, network.manner); - rv &= network_to_native(&native->opt3, network.opt3); - rv &= network_to_native(&native->karma, network.karma); - rv &= network_to_native(&native->sex, network.sex); - rv &= network_to_native(&native->pos, network.pos); - rv &= network_to_native(&native->gm_bits, network.gm_bits); - rv &= network_to_native(&native->dead_sit, network.dead_sit); - rv &= network_to_native(&native->unused, network.unused); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x01d9> *network, Packet_Fixed<0x01d9> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->speed, native.speed); - rv &= native_to_network(&network->opt1, native.opt1); - rv &= native_to_network(&network->opt2, native.opt2); - rv &= native_to_network(&network->option, native.option); - rv &= native_to_network(&network->species, native.species); - rv &= native_to_network(&network->hair_style, native.hair_style); - rv &= native_to_network(&network->weapon, native.weapon); - rv &= native_to_network(&network->shield, native.shield); - rv &= native_to_network(&network->head_bottom, native.head_bottom); - rv &= native_to_network(&network->head_top, native.head_top); - rv &= native_to_network(&network->head_mid, native.head_mid); - rv &= native_to_network(&network->hair_color, native.hair_color); - rv &= native_to_network(&network->clothes_color, native.clothes_color); - rv &= native_to_network(&network->head_dir, native.head_dir); - rv &= native_to_network(&network->unused2, native.unused2); - rv &= native_to_network(&network->guild_id, native.guild_id); - rv &= native_to_network(&network->guild_emblem_id, native.guild_emblem_id); - rv &= native_to_network(&network->manner, native.manner); - rv &= native_to_network(&network->opt3, native.opt3); - rv &= native_to_network(&network->karma, native.karma); - rv &= native_to_network(&network->sex, native.sex); - rv &= native_to_network(&network->pos, native.pos); - rv &= native_to_network(&network->gm_bits, native.gm_bits); - rv &= native_to_network(&network->unused, native.unused); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x01d9> *native, NetPacket_Fixed<0x01d9> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->speed, network.speed); - rv &= network_to_native(&native->opt1, network.opt1); - rv &= network_to_native(&native->opt2, network.opt2); - rv &= network_to_native(&native->option, network.option); - rv &= network_to_native(&native->species, network.species); - rv &= network_to_native(&native->hair_style, network.hair_style); - rv &= network_to_native(&native->weapon, network.weapon); - rv &= network_to_native(&native->shield, network.shield); - rv &= network_to_native(&native->head_bottom, network.head_bottom); - rv &= network_to_native(&native->head_top, network.head_top); - rv &= network_to_native(&native->head_mid, network.head_mid); - rv &= network_to_native(&native->hair_color, network.hair_color); - rv &= network_to_native(&native->clothes_color, network.clothes_color); - rv &= network_to_native(&native->head_dir, network.head_dir); - rv &= network_to_native(&native->unused2, network.unused2); - rv &= network_to_native(&native->guild_id, network.guild_id); - rv &= network_to_native(&native->guild_emblem_id, network.guild_emblem_id); - rv &= network_to_native(&native->manner, network.manner); - rv &= network_to_native(&native->opt3, network.opt3); - rv &= network_to_native(&native->karma, network.karma); - rv &= network_to_native(&native->sex, network.sex); - rv &= network_to_native(&native->pos, network.pos); - rv &= network_to_native(&native->gm_bits, network.gm_bits); - rv &= network_to_native(&native->unused, network.unused); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x01da> *network, Packet_Fixed<0x01da> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->speed, native.speed); - rv &= native_to_network(&network->opt1, native.opt1); - rv &= native_to_network(&network->opt2, native.opt2); - rv &= native_to_network(&network->option, native.option); - rv &= native_to_network(&network->species, native.species); - rv &= native_to_network(&network->hair_style, native.hair_style); - rv &= native_to_network(&network->weapon, native.weapon); - rv &= native_to_network(&network->shield, native.shield); - rv &= native_to_network(&network->head_bottom, native.head_bottom); - rv &= native_to_network(&network->tick, native.tick); - rv &= native_to_network(&network->head_top, native.head_top); - rv &= native_to_network(&network->head_mid, native.head_mid); - rv &= native_to_network(&network->hair_color, native.hair_color); - rv &= native_to_network(&network->clothes_color, native.clothes_color); - rv &= native_to_network(&network->head_dir, native.head_dir); - rv &= native_to_network(&network->unused2, native.unused2); - rv &= native_to_network(&network->guild_id, native.guild_id); - rv &= native_to_network(&network->guild_emblem_id, native.guild_emblem_id); - rv &= native_to_network(&network->manner, native.manner); - rv &= native_to_network(&network->opt3, native.opt3); - rv &= native_to_network(&network->karma, native.karma); - rv &= native_to_network(&network->sex, native.sex); - rv &= native_to_network(&network->pos2, native.pos2); - rv &= native_to_network(&network->gm_bits, native.gm_bits); - rv &= native_to_network(&network->five, native.five); - rv &= native_to_network(&network->unused, native.unused); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x01da> *native, NetPacket_Fixed<0x01da> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->speed, network.speed); - rv &= network_to_native(&native->opt1, network.opt1); - rv &= network_to_native(&native->opt2, network.opt2); - rv &= network_to_native(&native->option, network.option); - rv &= network_to_native(&native->species, network.species); - rv &= network_to_native(&native->hair_style, network.hair_style); - rv &= network_to_native(&native->weapon, network.weapon); - rv &= network_to_native(&native->shield, network.shield); - rv &= network_to_native(&native->head_bottom, network.head_bottom); - rv &= network_to_native(&native->tick, network.tick); - rv &= network_to_native(&native->head_top, network.head_top); - rv &= network_to_native(&native->head_mid, network.head_mid); - rv &= network_to_native(&native->hair_color, network.hair_color); - rv &= network_to_native(&native->clothes_color, network.clothes_color); - rv &= network_to_native(&native->head_dir, network.head_dir); - rv &= network_to_native(&native->unused2, network.unused2); - rv &= network_to_native(&native->guild_id, network.guild_id); - rv &= network_to_native(&native->guild_emblem_id, network.guild_emblem_id); - rv &= network_to_native(&native->manner, network.manner); - rv &= network_to_native(&native->opt3, network.opt3); - rv &= network_to_native(&native->karma, network.karma); - rv &= network_to_native(&native->sex, network.sex); - rv &= network_to_native(&native->pos2, network.pos2); - rv &= network_to_native(&native->gm_bits, network.gm_bits); - rv &= network_to_native(&native->five, network.five); - rv &= network_to_native(&native->unused, network.unused); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x01de> *network, Packet_Fixed<0x01de> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->skill_id, native.skill_id); - rv &= native_to_network(&network->src_id, native.src_id); - rv &= native_to_network(&network->dst_id, native.dst_id); - rv &= native_to_network(&network->tick, native.tick); - rv &= native_to_network(&network->sdelay, native.sdelay); - rv &= native_to_network(&network->ddelay, native.ddelay); - rv &= native_to_network(&network->damage, native.damage); - rv &= native_to_network(&network->skill_level, native.skill_level); - rv &= native_to_network(&network->div, native.div); - rv &= native_to_network(&network->type_or_hit, native.type_or_hit); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x01de> *native, NetPacket_Fixed<0x01de> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->skill_id, network.skill_id); - rv &= network_to_native(&native->src_id, network.src_id); - rv &= network_to_native(&native->dst_id, network.dst_id); - rv &= network_to_native(&native->tick, network.tick); - rv &= network_to_native(&native->sdelay, network.sdelay); - rv &= network_to_native(&native->ddelay, network.ddelay); - rv &= network_to_native(&native->damage, network.damage); - rv &= network_to_native(&native->skill_level, network.skill_level); - rv &= network_to_native(&native->div, network.div); - rv &= network_to_native(&native->type_or_hit, network.type_or_hit); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x01ee> *network, Packet_Head<0x01ee> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x01ee> *native, NetPacket_Head<0x01ee> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x01ee> *network, Packet_Repeat<0x01ee> native) -{ - bool rv = true; - rv &= native_to_network(&network->ioff2, native.ioff2); - rv &= native_to_network(&network->name_id, native.name_id); - rv &= native_to_network(&network->item_type, native.item_type); - rv &= native_to_network(&network->identify, native.identify); - rv &= native_to_network(&network->amount, native.amount); - rv &= native_to_network(&network->epos, native.epos); - rv &= native_to_network(&network->card0, native.card0); - rv &= native_to_network(&network->card1, native.card1); - rv &= native_to_network(&network->card2, native.card2); - rv &= native_to_network(&network->card3, native.card3); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x01ee> *native, NetPacket_Repeat<0x01ee> network) -{ - bool rv = true; - rv &= network_to_native(&native->ioff2, network.ioff2); - rv &= network_to_native(&native->name_id, network.name_id); - rv &= network_to_native(&native->item_type, network.item_type); - rv &= network_to_native(&native->identify, network.identify); - rv &= network_to_native(&native->amount, network.amount); - rv &= network_to_native(&native->epos, network.epos); - rv &= network_to_native(&native->card0, network.card0); - rv &= network_to_native(&native->card1, network.card1); - rv &= network_to_native(&native->card2, network.card2); - rv &= network_to_native(&native->card3, network.card3); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Head<0x01f0> *network, Packet_Head<0x01f0> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->magic_packet_length, native.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Head<0x01f0> *native, NetPacket_Head<0x01f0> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->magic_packet_length, network.magic_packet_length); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Repeat<0x01f0> *network, Packet_Repeat<0x01f0> native) -{ - bool rv = true; - rv &= native_to_network(&network->soff1, native.soff1); - rv &= native_to_network(&network->name_id, native.name_id); - rv &= native_to_network(&network->item_type, native.item_type); - rv &= native_to_network(&network->identify, native.identify); - rv &= native_to_network(&network->amount, native.amount); - rv &= native_to_network(&network->epos_zero, native.epos_zero); - rv &= native_to_network(&network->card0, native.card0); - rv &= native_to_network(&network->card1, native.card1); - rv &= native_to_network(&network->card2, native.card2); - rv &= native_to_network(&network->card3, native.card3); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Repeat<0x01f0> *native, NetPacket_Repeat<0x01f0> network) -{ - bool rv = true; - rv &= network_to_native(&native->soff1, network.soff1); - rv &= network_to_native(&native->name_id, network.name_id); - rv &= network_to_native(&native->item_type, network.item_type); - rv &= network_to_native(&native->identify, network.identify); - rv &= network_to_native(&native->amount, network.amount); - rv &= network_to_native(&native->epos_zero, network.epos_zero); - rv &= network_to_native(&native->card0, network.card0); - rv &= network_to_native(&native->card1, network.card1); - rv &= network_to_native(&native->card2, network.card2); - rv &= network_to_native(&native->card3, network.card3); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x020c> *network, Packet_Fixed<0x020c> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->block_id, native.block_id); - rv &= native_to_network(&network->ip, native.ip); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x020c> *native, NetPacket_Fixed<0x020c> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->block_id, network.block_id); - rv &= network_to_native(&native->ip, network.ip); - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPacket_Fixed<0x0212> *network, Packet_Fixed<0x0212> native) -{ - bool rv = true; - rv &= native_to_network(&network->magic_packet_id, native.magic_packet_id); - rv &= native_to_network(&network->npc_id, native.npc_id); - rv &= native_to_network(&network->command, native.command); - rv &= native_to_network(&network->id, native.id); - rv &= native_to_network(&network->x, native.x); - rv &= native_to_network(&network->y, native.y); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Packet_Fixed<0x0212> *native, NetPacket_Fixed<0x0212> network) -{ - bool rv = true; - rv &= network_to_native(&native->magic_packet_id, network.magic_packet_id); - rv &= network_to_native(&native->npc_id, network.npc_id); - rv &= network_to_native(&native->command, network.command); - rv &= network_to_native(&native->id, network.id); - rv &= network_to_native(&native->x, network.x); - rv &= network_to_native(&native->y, network.y); - return rv; -} - -} // namespace tmwa diff --git a/src/proto2/map-user_test.cpp b/src/proto2/map-user_test.cpp deleted file mode 100644 index 75d39d5..0000000 --- a/src/proto2/map-user_test.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "map-user.hpp" -// map-user_test.cpp - TMWA network protocol: map/user -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -// This is a generated file, edit tools/protocol.py instead - -#include "../poison.hpp" - -namespace tmwa -{ -} // namespace tmwa diff --git a/src/proto2/types.hpp b/src/proto2/types.hpp deleted file mode 100644 index 516889a..0000000 --- a/src/proto2/types.hpp +++ /dev/null @@ -1,1421 +0,0 @@ -#pragma once -// proto2/types.hpp - Forward declarations of packet component types -// -// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> -// -// This file is part of The Mana World (Athena server) -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. - -#include "fwd.hpp" - -#include "../generic/array.hpp" -#include "../mmo/consts.hpp" - -//TODO split the includes -#include <cstdint> -#include "../ints/little.hpp" -#include "../strings/vstring.hpp" -#include "../net/ip.hpp" -#include "../net/timer.t.hpp" -#include "../mmo/consts.hpp" -#include "../mmo/enums.hpp" -#include "../mmo/human_time_diff.hpp" -#include "../mmo/ids.hpp" -#include "../mmo/strs.hpp" -#include "../mmo/utils.hpp" -#include "../mmo/version.hpp" -#include "../login/login.t.hpp" -#include "../map/clif.t.hpp" -#include "../map/skill.t.hpp" - -namespace tmwa -{ -template<class T> -bool native_to_network(T *network, T native) -{ - *network = native; - return true; -} -template<class T> -bool network_to_native(T *native, T network) -{ - *native = network; - return true; -} -template<class T, size_t N> -struct NetArray -{ - T data[N]; -}; -template<class T, class U, class I> -bool native_to_network(NetArray<T, I::alloc_size> *network, GenericArray<U, I> native) -{ - for (size_t i = 0; i < I::alloc_size; ++i) - { - if (!native_to_network(&(*network).data[i], native[I::offset_to_index(i)])) - return false; - } - return true; -} -template<class T, class U, class I> -bool network_to_native(GenericArray<U, I> *native, NetArray<T, I::alloc_size> network) -{ - for (size_t i = 0; i < I::alloc_size; ++i) - { - if (!network_to_native(&(*native)[I::offset_to_index(i)], network.data[i])) - return false; - } - return true; -} - -template<size_t N> -struct NetString -{ - char data[N]; -}; -template<size_t N> -bool native_to_network(NetString<N> *network, VString<N-1> native) -{ - // basically WBUF_STRING - char *const begin = network->data; - char *const end = begin + N; - char *const mid = std::copy(native.begin(), native.end(), begin); - std::fill(mid, end, '\0'); - return true; -} -template<size_t N> -bool network_to_native(VString<N-1> *native, NetString<N> network) -{ - // basically RBUF_STRING - const char *const begin = network.data; - const char *const end = begin + N; - const char *const mid = std::find(begin, end, '\0'); - *native = XString(begin, mid, nullptr); - return true; -} - -inline -bool native_to_network(NetString<24> *network, CharName native) -{ - VString<23> tmp = native.to__actual(); - bool rv = native_to_network(network, tmp); - return rv; -} -inline -bool network_to_native(CharName *native, NetString<24> network) -{ - VString<23> tmp; - bool rv = network_to_native(&tmp, network); - *native = stringish<CharName>(tmp); - return rv; -} - -inline -bool native_to_network(NetString<16> *network, MapName native) -{ - XString tmp = native; - bool rv = native_to_network(network, VString<15>(tmp)); - return rv; -} -inline -bool network_to_native(MapName *native, NetString<16> network) -{ - VString<15> tmp; - bool rv = network_to_native(&tmp, network); - *native = stringish<MapName>(tmp); - return rv; -} - -template<class T, size_t N> -struct SkewedLength -{ - T data; -}; -template<class T, size_t N, class U> -bool native_to_network(SkewedLength<T, N> *network, U native) -{ - native -= N; - return native_to_network(&network->data, native); -} -template<class T, size_t N, class U> -bool network_to_native(U *native, SkewedLength<T, N> network) -{ - bool rv = network_to_native(native, network.data); - *native += N; - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(Byte *network, DIR native) -{ - bool rv = true; - uint8_t tmp = static_cast<uint8_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(DIR *native, Byte network) -{ - bool rv = true; - uint8_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<DIR>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Byte *network, BeingRemoveWhy native) -{ - bool rv = true; - uint8_t tmp = static_cast<uint8_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(BeingRemoveWhy *native, Byte network) -{ - bool rv = true; - uint8_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<BeingRemoveWhy>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, Opt1 native) -{ - bool rv = true; - uint16_t tmp = static_cast<uint16_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Opt1 *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<Opt1>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, Opt2 native) -{ - bool rv = true; - uint16_t tmp = static_cast<uint16_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Opt2 *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<Opt2>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, Opt3 native) -{ - bool rv = true; - uint16_t tmp = static_cast<uint16_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Opt3 *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<Opt3>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Byte *network, ItemType native) -{ - bool rv = true; - uint8_t tmp = static_cast<uint8_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(ItemType *native, Byte network) -{ - bool rv = true; - uint8_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<ItemType>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Byte *network, PickupFail native) -{ - bool rv = true; - uint8_t tmp = static_cast<uint8_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(PickupFail *native, Byte network) -{ - bool rv = true; - uint8_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<PickupFail>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Byte *network, DamageType native) -{ - bool rv = true; - uint8_t tmp = static_cast<uint8_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(DamageType *native, Byte network) -{ - bool rv = true; - uint8_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<DamageType>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, SP native) -{ - bool rv = true; - uint16_t tmp = static_cast<uint16_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(SP *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<SP>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Byte *network, LOOK native) -{ - bool rv = true; - uint8_t tmp = static_cast<uint8_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(LOOK *native, Byte network) -{ - bool rv = true; - uint8_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<LOOK>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, SkillID native) -{ - bool rv = true; - uint16_t tmp = static_cast<uint16_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(SkillID *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<SkillID>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, StatusChange native) -{ - bool rv = true; - uint16_t tmp = static_cast<uint16_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(StatusChange *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<StatusChange>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, SkillFlags native) -{ - bool rv = true; - uint16_t tmp = static_cast<uint16_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(SkillFlags *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<SkillFlags>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Byte *network, SEX native) -{ - bool rv = true; - uint8_t tmp = static_cast<uint8_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(SEX *native, Byte network) -{ - bool rv = true; - uint8_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<SEX>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, Option native) -{ - bool rv = true; - uint16_t tmp = static_cast<uint16_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Option *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<Option>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, EPOS native) -{ - bool rv = true; - uint16_t tmp = static_cast<uint16_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(EPOS *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<EPOS>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, ItemLook native) -{ - bool rv = true; - uint16_t tmp = static_cast<uint16_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(ItemLook *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<ItemLook>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, Species native) -{ - bool rv = true; - uint16_t tmp = unwrap<Species>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Species *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = wrap<Species>(tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little32 *network, AccountId native) -{ - bool rv = true; - uint32_t tmp = unwrap<AccountId>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(AccountId *native, Little32 network) -{ - bool rv = true; - uint32_t tmp; - rv &= network_to_native(&tmp, network); - *native = wrap<AccountId>(tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little32 *network, CharId native) -{ - bool rv = true; - uint32_t tmp = unwrap<CharId>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(CharId *native, Little32 network) -{ - bool rv = true; - uint32_t tmp; - rv &= network_to_native(&tmp, network); - *native = wrap<CharId>(tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little32 *network, PartyId native) -{ - bool rv = true; - uint32_t tmp = unwrap<PartyId>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(PartyId *native, Little32 network) -{ - bool rv = true; - uint32_t tmp; - rv &= network_to_native(&tmp, network); - *native = wrap<PartyId>(tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little16 *network, ItemNameId native) -{ - bool rv = true; - uint16_t tmp = unwrap<ItemNameId>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(ItemNameId *native, Little16 network) -{ - bool rv = true; - uint16_t tmp; - rv &= network_to_native(&tmp, network); - *native = wrap<ItemNameId>(tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little32 *network, ItemNameId native) -{ - bool rv = true; - uint32_t tmp = unwrap<ItemNameId>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(ItemNameId *native, Little32 network) -{ - bool rv = true; - uint32_t tmp; - rv &= network_to_native(&tmp, network); - *native = wrap<ItemNameId>(tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool native_to_network(Little32 *network, BlockId native) -{ - bool rv = true; - uint32_t tmp = unwrap<BlockId>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(BlockId *native, Little32 network) -{ - bool rv = true; - uint32_t tmp; - rv &= network_to_native(&tmp, network); - *native = wrap<BlockId>(tmp); - return rv; -} -struct NetHumanTimeDiff -{ - Little16 year; - Little16 month; - Little16 day; - Little16 hour; - Little16 minute; - Little16 second; -}; -inline __attribute__((warn_unused_result)) -bool native_to_network(NetHumanTimeDiff *network, HumanTimeDiff native) -{ - bool rv = true; - int16_t year = native.year; rv &= native_to_network(&network->year, year); - int16_t month = native.month; rv &= native_to_network(&network->month, month); - int16_t day = native.day; rv &= native_to_network(&network->day, day); - int16_t hour = native.hour; rv &= native_to_network(&network->hour, hour); - int16_t minute = native.minute; rv &= native_to_network(&network->minute, minute); - int16_t second = native.second; rv &= native_to_network(&network->second, second); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(HumanTimeDiff *native, NetHumanTimeDiff network) -{ - bool rv = true; - int16_t year; rv &= network_to_native(&year, network.year); native->year = year; - int16_t month; rv &= network_to_native(&month, network.month); native->month = month; - int16_t day; rv &= network_to_native(&day, network.day); native->day = day; - int16_t hour; rv &= network_to_native(&hour, network.hour); native->hour = hour; - int16_t minute; rv &= network_to_native(&minute, network.minute); native->minute = minute; - int16_t second; rv &= network_to_native(&second, network.second); native->second = second; - return rv; -} - -struct NetVersion -{ - Byte major; - Byte minor; - Byte patch; - Byte devel; - Byte flags; - Byte which; - Little16 vend; -}; -inline __attribute__((warn_unused_result)) -bool native_to_network(NetVersion *network, Version native) -{ - bool rv = true; - uint8_t major = native.major; rv &= native_to_network(&network->major, major); - uint8_t minor = native.minor; rv &= native_to_network(&network->minor, minor); - uint8_t patch = native.patch; rv &= native_to_network(&network->patch, patch); - uint8_t devel = native.devel; rv &= native_to_network(&network->devel, devel); - uint8_t flags = native.flags; rv &= native_to_network(&network->flags, flags); - uint8_t which = native.which; rv &= native_to_network(&network->which, which); - uint16_t vend = native.vend; rv &= native_to_network(&network->vend, vend); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Version *native, NetVersion network) -{ - bool rv = true; - uint8_t major; rv &= network_to_native(&major, network.major); native->major = major; - uint8_t minor; rv &= network_to_native(&minor, network.minor); native->minor = minor; - uint8_t patch; rv &= network_to_native(&patch, network.patch); native->patch = patch; - uint8_t devel; rv &= network_to_native(&devel, network.devel); native->devel = devel; - uint8_t flags; rv &= network_to_native(&flags, network.flags); native->flags = flags; - uint8_t which; rv &= network_to_native(&which, network.which); native->which = which; - uint16_t vend; rv &= network_to_native(&vend, network.vend); native->vend = vend; - return rv; -} - -inline __attribute__((warn_unused_result)) -bool native_to_network(Byte *network, VERSION_2 native) -{ - bool rv = true; - uint8_t tmp = static_cast<uint8_t>(native); - rv &= native_to_network(network, tmp); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(VERSION_2 *native, Byte network) -{ - bool rv = true; - uint8_t tmp; - rv &= network_to_native(&tmp, network); - *native = static_cast<VERSION_2>(tmp); - // TODO this is what really should be doing a checked cast - return rv; -} -struct Stats6 -{ - uint8_t str = {}; - uint8_t agi = {}; - uint8_t vit = {}; - uint8_t int_ = {}; - uint8_t dex = {}; - uint8_t luk = {}; -}; -struct NetStats6 -{ - Byte str; - Byte agi; - Byte vit; - Byte int_; - Byte dex; - Byte luk; -}; -static_assert(offsetof(NetStats6, str) == 0, "offsetof(NetStats6, str) == 0"); -static_assert(offsetof(NetStats6, agi) == 1, "offsetof(NetStats6, agi) == 1"); -static_assert(offsetof(NetStats6, vit) == 2, "offsetof(NetStats6, vit) == 2"); -static_assert(offsetof(NetStats6, int_) == 3, "offsetof(NetStats6, int_) == 3"); -static_assert(offsetof(NetStats6, dex) == 4, "offsetof(NetStats6, dex) == 4"); -static_assert(offsetof(NetStats6, luk) == 5, "offsetof(NetStats6, luk) == 5"); -static_assert(sizeof(NetStats6) == 6, "sizeof(NetStats6) == 6"); -static_assert(alignof(NetStats6) == 1, "alignof(NetStats6) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetStats6 *network, Stats6 native) -{ - bool rv = true; - rv &= native_to_network(&network->str, native.str); - rv &= native_to_network(&network->agi, native.agi); - rv &= native_to_network(&network->vit, native.vit); - rv &= native_to_network(&network->int_, native.int_); - rv &= native_to_network(&network->dex, native.dex); - rv &= native_to_network(&network->luk, native.luk); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Stats6 *native, NetStats6 network) -{ - bool rv = true; - rv &= network_to_native(&native->str, network.str); - rv &= network_to_native(&native->agi, network.agi); - rv &= network_to_native(&native->vit, network.vit); - rv &= network_to_native(&native->int_, network.int_); - rv &= network_to_native(&native->dex, network.dex); - rv &= network_to_native(&native->luk, network.luk); - return rv; -} - -struct CharSelect -{ - CharId char_id = {}; - uint32_t base_exp = {}; - uint32_t zeny = {}; - uint32_t job_exp = {}; - uint32_t job_level = {}; - ItemNameId shoes = {}; - ItemNameId gloves = {}; - ItemNameId cape = {}; - ItemNameId misc1 = {}; - Option option = {}; - uint16_t unused = {}; - uint32_t karma = {}; - uint32_t manner = {}; - uint16_t status_point = {}; - uint16_t hp = {}; - uint16_t max_hp = {}; - uint16_t sp = {}; - uint16_t max_sp = {}; - uint16_t speed = {}; - Species species = {}; - uint16_t hair_style = {}; - uint16_t weapon = {}; - uint16_t base_level = {}; - uint16_t skill_point = {}; - ItemNameId head_bottom = {}; - ItemNameId shield = {}; - ItemNameId head_top = {}; - ItemNameId head_mid = {}; - uint16_t hair_color = {}; - ItemNameId misc2 = {}; - CharName char_name = {}; - Stats6 stats = {}; - uint8_t char_num = {}; - uint8_t unused2 = {}; -}; -struct NetCharSelect -{ - Little32 char_id; - Little32 base_exp; - Little32 zeny; - Little32 job_exp; - Little32 job_level; - Little16 shoes; - Little16 gloves; - Little16 cape; - Little16 misc1; - Little16 option; - Little16 unused; - Little32 karma; - Little32 manner; - Little16 status_point; - Little16 hp; - Little16 max_hp; - Little16 sp; - Little16 max_sp; - Little16 speed; - Little16 species; - Little16 hair_style; - Little16 weapon; - Little16 base_level; - Little16 skill_point; - Little16 head_bottom; - Little16 shield; - Little16 head_top; - Little16 head_mid; - Little16 hair_color; - Little16 misc2; - NetString<sizeof(CharName)> char_name; - NetStats6 stats; - Byte char_num; - Byte unused2; -}; -static_assert(offsetof(NetCharSelect, char_id) == 0, "offsetof(NetCharSelect, char_id) == 0"); -static_assert(offsetof(NetCharSelect, base_exp) == 4, "offsetof(NetCharSelect, base_exp) == 4"); -static_assert(offsetof(NetCharSelect, zeny) == 8, "offsetof(NetCharSelect, zeny) == 8"); -static_assert(offsetof(NetCharSelect, job_exp) == 12, "offsetof(NetCharSelect, job_exp) == 12"); -static_assert(offsetof(NetCharSelect, job_level) == 16, "offsetof(NetCharSelect, job_level) == 16"); -static_assert(offsetof(NetCharSelect, shoes) == 20, "offsetof(NetCharSelect, shoes) == 20"); -static_assert(offsetof(NetCharSelect, gloves) == 22, "offsetof(NetCharSelect, gloves) == 22"); -static_assert(offsetof(NetCharSelect, cape) == 24, "offsetof(NetCharSelect, cape) == 24"); -static_assert(offsetof(NetCharSelect, misc1) == 26, "offsetof(NetCharSelect, misc1) == 26"); -static_assert(offsetof(NetCharSelect, option) == 28, "offsetof(NetCharSelect, option) == 28"); -static_assert(offsetof(NetCharSelect, unused) == 30, "offsetof(NetCharSelect, unused) == 30"); -static_assert(offsetof(NetCharSelect, karma) == 32, "offsetof(NetCharSelect, karma) == 32"); -static_assert(offsetof(NetCharSelect, manner) == 36, "offsetof(NetCharSelect, manner) == 36"); -static_assert(offsetof(NetCharSelect, status_point) == 40, "offsetof(NetCharSelect, status_point) == 40"); -static_assert(offsetof(NetCharSelect, hp) == 42, "offsetof(NetCharSelect, hp) == 42"); -static_assert(offsetof(NetCharSelect, max_hp) == 44, "offsetof(NetCharSelect, max_hp) == 44"); -static_assert(offsetof(NetCharSelect, sp) == 46, "offsetof(NetCharSelect, sp) == 46"); -static_assert(offsetof(NetCharSelect, max_sp) == 48, "offsetof(NetCharSelect, max_sp) == 48"); -static_assert(offsetof(NetCharSelect, speed) == 50, "offsetof(NetCharSelect, speed) == 50"); -static_assert(offsetof(NetCharSelect, species) == 52, "offsetof(NetCharSelect, species) == 52"); -static_assert(offsetof(NetCharSelect, hair_style) == 54, "offsetof(NetCharSelect, hair_style) == 54"); -static_assert(offsetof(NetCharSelect, weapon) == 56, "offsetof(NetCharSelect, weapon) == 56"); -static_assert(offsetof(NetCharSelect, base_level) == 58, "offsetof(NetCharSelect, base_level) == 58"); -static_assert(offsetof(NetCharSelect, skill_point) == 60, "offsetof(NetCharSelect, skill_point) == 60"); -static_assert(offsetof(NetCharSelect, head_bottom) == 62, "offsetof(NetCharSelect, head_bottom) == 62"); -static_assert(offsetof(NetCharSelect, shield) == 64, "offsetof(NetCharSelect, shield) == 64"); -static_assert(offsetof(NetCharSelect, head_top) == 66, "offsetof(NetCharSelect, head_top) == 66"); -static_assert(offsetof(NetCharSelect, head_mid) == 68, "offsetof(NetCharSelect, head_mid) == 68"); -static_assert(offsetof(NetCharSelect, hair_color) == 70, "offsetof(NetCharSelect, hair_color) == 70"); -static_assert(offsetof(NetCharSelect, misc2) == 72, "offsetof(NetCharSelect, misc2) == 72"); -static_assert(offsetof(NetCharSelect, char_name) == 74, "offsetof(NetCharSelect, char_name) == 74"); -static_assert(offsetof(NetCharSelect, stats) == 98, "offsetof(NetCharSelect, stats) == 98"); -static_assert(offsetof(NetCharSelect, char_num) == 104, "offsetof(NetCharSelect, char_num) == 104"); -static_assert(offsetof(NetCharSelect, unused2) == 105, "offsetof(NetCharSelect, unused2) == 105"); -static_assert(sizeof(NetCharSelect) == 106, "sizeof(NetCharSelect) == 106"); -static_assert(alignof(NetCharSelect) == 1, "alignof(NetCharSelect) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetCharSelect *network, CharSelect native) -{ - bool rv = true; - rv &= native_to_network(&network->char_id, native.char_id); - rv &= native_to_network(&network->base_exp, native.base_exp); - rv &= native_to_network(&network->zeny, native.zeny); - rv &= native_to_network(&network->job_exp, native.job_exp); - rv &= native_to_network(&network->job_level, native.job_level); - rv &= native_to_network(&network->shoes, native.shoes); - rv &= native_to_network(&network->gloves, native.gloves); - rv &= native_to_network(&network->cape, native.cape); - rv &= native_to_network(&network->misc1, native.misc1); - rv &= native_to_network(&network->option, native.option); - rv &= native_to_network(&network->unused, native.unused); - rv &= native_to_network(&network->karma, native.karma); - rv &= native_to_network(&network->manner, native.manner); - rv &= native_to_network(&network->status_point, native.status_point); - rv &= native_to_network(&network->hp, native.hp); - rv &= native_to_network(&network->max_hp, native.max_hp); - rv &= native_to_network(&network->sp, native.sp); - rv &= native_to_network(&network->max_sp, native.max_sp); - rv &= native_to_network(&network->speed, native.speed); - rv &= native_to_network(&network->species, native.species); - rv &= native_to_network(&network->hair_style, native.hair_style); - rv &= native_to_network(&network->weapon, native.weapon); - rv &= native_to_network(&network->base_level, native.base_level); - rv &= native_to_network(&network->skill_point, native.skill_point); - rv &= native_to_network(&network->head_bottom, native.head_bottom); - rv &= native_to_network(&network->shield, native.shield); - rv &= native_to_network(&network->head_top, native.head_top); - rv &= native_to_network(&network->head_mid, native.head_mid); - rv &= native_to_network(&network->hair_color, native.hair_color); - rv &= native_to_network(&network->misc2, native.misc2); - rv &= native_to_network(&network->char_name, native.char_name); - rv &= native_to_network(&network->stats, native.stats); - rv &= native_to_network(&network->char_num, native.char_num); - rv &= native_to_network(&network->unused2, native.unused2); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(CharSelect *native, NetCharSelect network) -{ - bool rv = true; - rv &= network_to_native(&native->char_id, network.char_id); - rv &= network_to_native(&native->base_exp, network.base_exp); - rv &= network_to_native(&native->zeny, network.zeny); - rv &= network_to_native(&native->job_exp, network.job_exp); - rv &= network_to_native(&native->job_level, network.job_level); - rv &= network_to_native(&native->shoes, network.shoes); - rv &= network_to_native(&native->gloves, network.gloves); - rv &= network_to_native(&native->cape, network.cape); - rv &= network_to_native(&native->misc1, network.misc1); - rv &= network_to_native(&native->option, network.option); - rv &= network_to_native(&native->unused, network.unused); - rv &= network_to_native(&native->karma, network.karma); - rv &= network_to_native(&native->manner, network.manner); - rv &= network_to_native(&native->status_point, network.status_point); - rv &= network_to_native(&native->hp, network.hp); - rv &= network_to_native(&native->max_hp, network.max_hp); - rv &= network_to_native(&native->sp, network.sp); - rv &= network_to_native(&native->max_sp, network.max_sp); - rv &= network_to_native(&native->speed, network.speed); - rv &= network_to_native(&native->species, network.species); - rv &= network_to_native(&native->hair_style, network.hair_style); - rv &= network_to_native(&native->weapon, network.weapon); - rv &= network_to_native(&native->base_level, network.base_level); - rv &= network_to_native(&native->skill_point, network.skill_point); - rv &= network_to_native(&native->head_bottom, network.head_bottom); - rv &= network_to_native(&native->shield, network.shield); - rv &= network_to_native(&native->head_top, network.head_top); - rv &= network_to_native(&native->head_mid, network.head_mid); - rv &= network_to_native(&native->hair_color, network.hair_color); - rv &= network_to_native(&native->misc2, network.misc2); - rv &= network_to_native(&native->char_name, network.char_name); - rv &= network_to_native(&native->stats, network.stats); - rv &= network_to_native(&native->char_num, network.char_num); - rv &= network_to_native(&native->unused2, network.unused2); - return rv; -} - -struct SkillInfo -{ - SkillID skill_id = {}; - uint16_t type_or_inf = {}; - SkillFlags flags = {}; - uint16_t level = {}; - uint16_t sp = {}; - uint16_t range = {}; - VString<23> unused = {}; - uint8_t can_raise = {}; -}; -struct NetSkillInfo -{ - Little16 skill_id; - Little16 type_or_inf; - Little16 flags; - Little16 level; - Little16 sp; - Little16 range; - NetString<sizeof(VString<23>)> unused; - Byte can_raise; -}; -static_assert(offsetof(NetSkillInfo, skill_id) == 0, "offsetof(NetSkillInfo, skill_id) == 0"); -static_assert(offsetof(NetSkillInfo, type_or_inf) == 2, "offsetof(NetSkillInfo, type_or_inf) == 2"); -static_assert(offsetof(NetSkillInfo, flags) == 4, "offsetof(NetSkillInfo, flags) == 4"); -static_assert(offsetof(NetSkillInfo, level) == 6, "offsetof(NetSkillInfo, level) == 6"); -static_assert(offsetof(NetSkillInfo, sp) == 8, "offsetof(NetSkillInfo, sp) == 8"); -static_assert(offsetof(NetSkillInfo, range) == 10, "offsetof(NetSkillInfo, range) == 10"); -static_assert(offsetof(NetSkillInfo, unused) == 12, "offsetof(NetSkillInfo, unused) == 12"); -static_assert(offsetof(NetSkillInfo, can_raise) == 36, "offsetof(NetSkillInfo, can_raise) == 36"); -static_assert(sizeof(NetSkillInfo) == 37, "sizeof(NetSkillInfo) == 37"); -static_assert(alignof(NetSkillInfo) == 1, "alignof(NetSkillInfo) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetSkillInfo *network, SkillInfo native) -{ - bool rv = true; - rv &= native_to_network(&network->skill_id, native.skill_id); - rv &= native_to_network(&network->type_or_inf, native.type_or_inf); - rv &= native_to_network(&network->flags, native.flags); - rv &= native_to_network(&network->level, native.level); - rv &= native_to_network(&network->sp, native.sp); - rv &= native_to_network(&network->range, native.range); - rv &= native_to_network(&network->unused, native.unused); - rv &= native_to_network(&network->can_raise, native.can_raise); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(SkillInfo *native, NetSkillInfo network) -{ - bool rv = true; - rv &= network_to_native(&native->skill_id, network.skill_id); - rv &= network_to_native(&native->type_or_inf, network.type_or_inf); - rv &= network_to_native(&native->flags, network.flags); - rv &= network_to_native(&native->level, network.level); - rv &= network_to_native(&native->sp, network.sp); - rv &= network_to_native(&native->range, network.range); - rv &= network_to_native(&native->unused, network.unused); - rv &= network_to_native(&native->can_raise, network.can_raise); - return rv; -} - -struct Item -{ - ItemNameId nameid = {}; - int16_t amount = {}; - EPOS equip = {}; -}; -struct NetItem -{ - Little16 nameid; - Little16 amount; - Little16 equip; -}; -static_assert(alignof(NetItem) == 1, "alignof(NetItem) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetItem *network, Item native) -{ - bool rv = true; - rv &= native_to_network(&network->nameid, native.nameid); - rv &= native_to_network(&network->amount, native.amount); - rv &= native_to_network(&network->equip, native.equip); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Item *native, NetItem network) -{ - bool rv = true; - rv &= network_to_native(&native->nameid, network.nameid); - rv &= network_to_native(&native->amount, network.amount); - rv &= network_to_native(&native->equip, network.equip); - return rv; -} - -struct Point -{ - MapName map_ = {}; - int16_t x = {}; - int16_t y = {}; - Point() = default; - Point(MapName _map_, int16_t _x, int16_t _y) : map_(_map_), x(_x), y(_y) {} -}; -struct NetPoint -{ - NetString<sizeof(MapName)> map_; - Little16 x; - Little16 y; -}; -static_assert(alignof(NetPoint) == 1, "alignof(NetPoint) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPoint *network, Point native) -{ - bool rv = true; - rv &= native_to_network(&network->map_, native.map_); - rv &= native_to_network(&network->x, native.x); - rv &= native_to_network(&network->y, native.y); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Point *native, NetPoint network) -{ - bool rv = true; - rv &= network_to_native(&native->map_, network.map_); - rv &= network_to_native(&native->x, network.x); - rv &= network_to_native(&native->y, network.y); - return rv; -} - -struct SkillValue -{ - uint16_t lv = {}; - SkillFlags flags = {}; -}; -struct NetSkillValue -{ - Little16 lv; - Little16 flags; -}; -static_assert(alignof(NetSkillValue) == 1, "alignof(NetSkillValue) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetSkillValue *network, SkillValue native) -{ - bool rv = true; - rv &= native_to_network(&network->lv, native.lv); - rv &= native_to_network(&network->flags, native.flags); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(SkillValue *native, NetSkillValue network) -{ - bool rv = true; - rv &= network_to_native(&native->lv, network.lv); - rv &= network_to_native(&native->flags, network.flags); - return rv; -} - -struct GlobalReg -{ - VarName str = {}; - int32_t value = {}; -}; -struct NetGlobalReg -{ - NetString<sizeof(VarName)> str; - Little32 value; -}; -static_assert(alignof(NetGlobalReg) == 1, "alignof(NetGlobalReg) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetGlobalReg *network, GlobalReg native) -{ - bool rv = true; - rv &= native_to_network(&network->str, native.str); - rv &= native_to_network(&network->value, native.value); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(GlobalReg *native, NetGlobalReg network) -{ - bool rv = true; - rv &= network_to_native(&native->str, network.str); - rv &= network_to_native(&native->value, network.value); - return rv; -} - -struct CharKey -{ - CharName name = {}; - AccountId account_id = {}; - CharId char_id = {}; - uint8_t char_num = {}; -}; -struct NetCharKey -{ - NetString<sizeof(CharName)> name; - Little32 account_id; - Little32 char_id; - Byte char_num; -}; -static_assert(alignof(NetCharKey) == 1, "alignof(NetCharKey) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetCharKey *network, CharKey native) -{ - bool rv = true; - rv &= native_to_network(&network->name, native.name); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->char_id, native.char_id); - rv &= native_to_network(&network->char_num, native.char_num); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(CharKey *native, NetCharKey network) -{ - bool rv = true; - rv &= network_to_native(&native->name, network.name); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->char_id, network.char_id); - rv &= network_to_native(&native->char_num, network.char_num); - return rv; -} - -struct CharData -{ - CharId partner_id = {}; - int32_t base_exp = {}; - int32_t job_exp = {}; - int32_t zeny = {}; - Species species = {}; - int16_t status_point = {}; - int16_t skill_point = {}; - int32_t hp = {}; - int32_t max_hp = {}; - int32_t sp = {}; - int32_t max_sp = {}; - Option option = {}; - int16_t karma = {}; - int16_t manner = {}; - int16_t hair = {}; - int16_t hair_color = {}; - int16_t clothes_color = {}; - PartyId party_id = {}; - ItemLook weapon = {}; - ItemNameId shield = {}; - ItemNameId head_top = {}; - ItemNameId head_mid = {}; - ItemNameId head_bottom = {}; - uint8_t base_level = {}; - uint8_t job_level = {}; - earray<int16_t, ATTR, ATTR::COUNT> attrs = {}; - SEX sex = {}; - IP4Address mapip = {}; - uint16_t mapport = {}; - Point last_point = {}; - Point save_point = {}; - GenericArray<Item, InventoryIndexing<IOff0, MAX_INVENTORY>> inventory = {}; - earray<SkillValue, SkillID, MAX_SKILL> skill = {}; - int32_t global_reg_num = {}; - Array<GlobalReg, GLOBAL_REG_NUM> global_reg = {}; - int32_t account_reg_num = {}; - Array<GlobalReg, ACCOUNT_REG_NUM> account_reg = {}; - int32_t account_reg2_num = {}; - Array<GlobalReg, ACCOUNT_REG2_NUM> account_reg2 = {}; -}; -struct NetCharData -{ - Little32 partner_id; - Little32 base_exp; - Little32 job_exp; - Little32 zeny; - Little16 species; - Little16 status_point; - Little16 skill_point; - Little32 hp; - Little32 max_hp; - Little32 sp; - Little32 max_sp; - Little16 option; - Little16 karma; - Little16 manner; - Little16 hair; - Little16 hair_color; - Little16 clothes_color; - Little32 party_id; - Little16 weapon; - Little16 shield; - Little16 head_top; - Little16 head_mid; - Little16 head_bottom; - Byte base_level; - Byte job_level; - NetArray<Little16, static_cast<size_t>(ATTR::COUNT)> attrs; - Byte sex; - IP4Address mapip; - Little16 mapport; - NetPoint last_point; - NetPoint save_point; - NetArray<NetItem, MAX_INVENTORY> inventory; - NetArray<NetSkillValue, static_cast<size_t>(MAX_SKILL)> skill; - Little32 global_reg_num; - NetArray<NetGlobalReg, GLOBAL_REG_NUM> global_reg; - Little32 account_reg_num; - NetArray<NetGlobalReg, ACCOUNT_REG_NUM> account_reg; - Little32 account_reg2_num; - NetArray<NetGlobalReg, ACCOUNT_REG2_NUM> account_reg2; -}; -static_assert(alignof(NetCharData) == 1, "alignof(NetCharData) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetCharData *network, CharData native) -{ - bool rv = true; - rv &= native_to_network(&network->partner_id, native.partner_id); - rv &= native_to_network(&network->base_exp, native.base_exp); - rv &= native_to_network(&network->job_exp, native.job_exp); - rv &= native_to_network(&network->zeny, native.zeny); - rv &= native_to_network(&network->species, native.species); - rv &= native_to_network(&network->status_point, native.status_point); - rv &= native_to_network(&network->skill_point, native.skill_point); - rv &= native_to_network(&network->hp, native.hp); - rv &= native_to_network(&network->max_hp, native.max_hp); - rv &= native_to_network(&network->sp, native.sp); - rv &= native_to_network(&network->max_sp, native.max_sp); - rv &= native_to_network(&network->option, native.option); - rv &= native_to_network(&network->karma, native.karma); - rv &= native_to_network(&network->manner, native.manner); - rv &= native_to_network(&network->hair, native.hair); - rv &= native_to_network(&network->hair_color, native.hair_color); - rv &= native_to_network(&network->clothes_color, native.clothes_color); - rv &= native_to_network(&network->party_id, native.party_id); - rv &= native_to_network(&network->weapon, native.weapon); - rv &= native_to_network(&network->shield, native.shield); - rv &= native_to_network(&network->head_top, native.head_top); - rv &= native_to_network(&network->head_mid, native.head_mid); - rv &= native_to_network(&network->head_bottom, native.head_bottom); - rv &= native_to_network(&network->base_level, native.base_level); - rv &= native_to_network(&network->job_level, native.job_level); - rv &= native_to_network(&network->attrs, native.attrs); - rv &= native_to_network(&network->sex, native.sex); - rv &= native_to_network(&network->mapip, native.mapip); - rv &= native_to_network(&network->mapport, native.mapport); - rv &= native_to_network(&network->last_point, native.last_point); - rv &= native_to_network(&network->save_point, native.save_point); - rv &= native_to_network(&network->inventory, native.inventory); - rv &= native_to_network(&network->skill, native.skill); - rv &= native_to_network(&network->global_reg_num, native.global_reg_num); - rv &= native_to_network(&network->global_reg, native.global_reg); - rv &= native_to_network(&network->account_reg_num, native.account_reg_num); - rv &= native_to_network(&network->account_reg, native.account_reg); - rv &= native_to_network(&network->account_reg2_num, native.account_reg2_num); - rv &= native_to_network(&network->account_reg2, native.account_reg2); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(CharData *native, NetCharData network) -{ - bool rv = true; - rv &= network_to_native(&native->partner_id, network.partner_id); - rv &= network_to_native(&native->base_exp, network.base_exp); - rv &= network_to_native(&native->job_exp, network.job_exp); - rv &= network_to_native(&native->zeny, network.zeny); - rv &= network_to_native(&native->species, network.species); - rv &= network_to_native(&native->status_point, network.status_point); - rv &= network_to_native(&native->skill_point, network.skill_point); - rv &= network_to_native(&native->hp, network.hp); - rv &= network_to_native(&native->max_hp, network.max_hp); - rv &= network_to_native(&native->sp, network.sp); - rv &= network_to_native(&native->max_sp, network.max_sp); - rv &= network_to_native(&native->option, network.option); - rv &= network_to_native(&native->karma, network.karma); - rv &= network_to_native(&native->manner, network.manner); - rv &= network_to_native(&native->hair, network.hair); - rv &= network_to_native(&native->hair_color, network.hair_color); - rv &= network_to_native(&native->clothes_color, network.clothes_color); - rv &= network_to_native(&native->party_id, network.party_id); - rv &= network_to_native(&native->weapon, network.weapon); - rv &= network_to_native(&native->shield, network.shield); - rv &= network_to_native(&native->head_top, network.head_top); - rv &= network_to_native(&native->head_mid, network.head_mid); - rv &= network_to_native(&native->head_bottom, network.head_bottom); - rv &= network_to_native(&native->base_level, network.base_level); - rv &= network_to_native(&native->job_level, network.job_level); - rv &= network_to_native(&native->attrs, network.attrs); - rv &= network_to_native(&native->sex, network.sex); - rv &= network_to_native(&native->mapip, network.mapip); - rv &= network_to_native(&native->mapport, network.mapport); - rv &= network_to_native(&native->last_point, network.last_point); - rv &= network_to_native(&native->save_point, network.save_point); - rv &= network_to_native(&native->inventory, network.inventory); - rv &= network_to_native(&native->skill, network.skill); - rv &= network_to_native(&native->global_reg_num, network.global_reg_num); - rv &= network_to_native(&native->global_reg, network.global_reg); - rv &= network_to_native(&native->account_reg_num, network.account_reg_num); - rv &= network_to_native(&native->account_reg, network.account_reg); - rv &= network_to_native(&native->account_reg2_num, network.account_reg2_num); - rv &= network_to_native(&native->account_reg2, network.account_reg2); - return rv; -} - -struct NetPartyMember -{ - Little32 account_id; - NetString<sizeof(CharName)> name; - NetString<sizeof(MapName)> map; - Little32 leader; - Little32 online; - Little32 lv; -}; -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPartyMember *network, PartyMember native) -{ - bool rv = true; - AccountId account_id = native.account_id; rv &= native_to_network(&network->account_id, account_id); - CharName name = native.name; rv &= native_to_network(&network->name, name); - MapName map = native.map; rv &= native_to_network(&network->map, map); - int32_t leader = native.leader; rv &= native_to_network(&network->leader, leader); - int32_t online = native.online; rv &= native_to_network(&network->online, online); - int32_t lv = native.lv; rv &= native_to_network(&network->lv, lv); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(PartyMember *native, NetPartyMember network) -{ - bool rv = true; - AccountId account_id; rv &= network_to_native(&account_id, network.account_id); native->account_id = account_id; - CharName name; rv &= network_to_native(&name, network.name); native->name = name; - MapName map; rv &= network_to_native(&map, network.map); native->map = map; - int32_t leader; rv &= network_to_native(&leader, network.leader); native->leader = leader; - int32_t online; rv &= network_to_native(&online, network.online); native->online = online; - int32_t lv; rv &= network_to_native(&lv, network.lv); native->lv = lv; - return rv; -} - -struct PartyMost -{ - PartyName name = {}; - int32_t exp = {}; - int32_t item = {}; - Array<PartyMember, MAX_PARTY> member = {}; -}; -struct NetPartyMost -{ - NetString<sizeof(PartyName)> name; - Little32 exp; - Little32 item; - NetArray<NetPartyMember, MAX_PARTY> member; -}; -static_assert(alignof(NetPartyMost) == 1, "alignof(NetPartyMost) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetPartyMost *network, PartyMost native) -{ - bool rv = true; - rv &= native_to_network(&network->name, native.name); - rv &= native_to_network(&network->exp, native.exp); - rv &= native_to_network(&network->item, native.item); - rv &= native_to_network(&network->member, native.member); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(PartyMost *native, NetPartyMost network) -{ - bool rv = true; - rv &= network_to_native(&native->name, network.name); - rv &= network_to_native(&native->exp, network.exp); - rv &= network_to_native(&native->item, network.item); - rv &= network_to_native(&native->member, network.member); - return rv; -} - -struct Storage -{ - bool dirty = {}; - AccountId account_id = {}; - int16_t storage_status = {}; - int16_t storage_amount = {}; - GenericArray<Item, InventoryIndexing<SOff0, MAX_STORAGE>> storage_ = {}; -}; -struct NetStorage -{ - bool dirty; - Little32 account_id; - Little16 storage_status; - Little16 storage_amount; - NetArray<NetItem, MAX_STORAGE> storage_; -}; -static_assert(alignof(NetStorage) == 1, "alignof(NetStorage) == 1"); -inline __attribute__((warn_unused_result)) -bool native_to_network(NetStorage *network, Storage native) -{ - bool rv = true; - rv &= native_to_network(&network->dirty, native.dirty); - rv &= native_to_network(&network->account_id, native.account_id); - rv &= native_to_network(&network->storage_status, native.storage_status); - rv &= native_to_network(&network->storage_amount, native.storage_amount); - rv &= native_to_network(&network->storage_, native.storage_); - return rv; -} -inline __attribute__((warn_unused_result)) -bool network_to_native(Storage *native, NetStorage network) -{ - bool rv = true; - rv &= network_to_native(&native->dirty, network.dirty); - rv &= network_to_native(&native->account_id, network.account_id); - rv &= network_to_native(&native->storage_status, network.storage_status); - rv &= network_to_native(&native->storage_amount, network.storage_amount); - rv &= network_to_native(&native->storage_, network.storage_); - return rv; -} - -} // namespace tmwa diff --git a/src/sexpr/parser.py b/src/sexpr/parser.py index 201f457..885c63c 100644 --- a/src/sexpr/parser.py +++ b/src/sexpr/parser.py @@ -1,6 +1,4 @@ class SExpr(object): - ''' print a SExpr - ''' __slots__ = ('_value') name = 'tmwa::sexpr::SExpr' enabled = True @@ -23,3 +21,19 @@ class SExpr(object): if t == 3: yield '(token)', v['_str'] yield '_span', v['_span'] + + test_extra = ''' + #include "../strings/fwd.hpp" + using tmwa::operator "" _s; + ''' + + tests = [ + ('tmwa::sexpr::SExpr(); value._type = tmwa::sexpr::LIST; value._list = {tmwa::sexpr::SExpr(), tmwa::sexpr::SExpr()}', + '{(list) = std::vector of length 2, capacity 2 = {{(list) = std::vector of length 0, capacity 0, _span = {begin = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}, end = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}}}, {(list) = std::vector of length 0, capacity 0, _span = {begin = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}, end = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}}}}, _span = {begin = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}, end = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}}}'), + ('tmwa::sexpr::SExpr(); value._type = tmwa::sexpr::INT; value._int = 42', + '{(int) = 42, _span = {begin = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}, end = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}}}'), + ('tmwa::sexpr::SExpr(); value._type = tmwa::sexpr::STRING; value._str = "Hello"_s', + '{(str) = "Hello", _span = {begin = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}, end = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}}}'), + ('tmwa::sexpr::SExpr(); value._type = tmwa::sexpr::TOKEN; value._str = "Hello"_s', + '{(token) = "Hello", _span = {begin = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}, end = {<tmwa::io::Line> = {text = "", filename = "", line = 0, column = 0}, <No data fields>}}}'), + ] diff --git a/src/sexpr/variant.py b/src/sexpr/variant.py new file mode 100644 index 0000000..3be402a --- /dev/null +++ b/src/sexpr/variant.py @@ -0,0 +1,22 @@ +class Variant(object): + __slots__ = ('_value') + name = 'tmwa::sexpr::Variant' + enabled = True + + def __init__(self, value): + self._value = value + + def to_string(self): + return None + + def children(self): + value = self._value + data = value['data'] + state = value['state'] + ty = value.type.template_argument(state) + yield '(%s)' % ty, data.address.cast(ty.pointer()).dereference() + + tests = [ + ('tmwa::sexpr::Variant<int, const char *>(42)', '{(int) = 42}'), + ('tmwa::sexpr::Variant<int, const char *>("Hello, World!")', '{(const char *) = "Hello, World!"}'), + ] diff --git a/src/strings/astring.py b/src/strings/astring.py index 063e721..47e4e55 100644 --- a/src/strings/astring.py +++ b/src/strings/astring.py @@ -1,6 +1,4 @@ class AString(object): - ''' print an AString - ''' __slots__ = ('_value') name = 'tmwa::strings::AString' enabled = True @@ -14,11 +12,40 @@ class AString(object): def children(self): b = self._value['data'] s = self._value['special'] + b = b[0].address if s == 255: - b = b.cast(gdb.lookup_type('strings::RString').pointer()) + b = b.cast(gdb.lookup_type('tmwa::strings::RString').pointer()) yield 'allocated', b.dereference() else: - b = b.cast(b.type.target().pointer()) n = 255 d = n - s yield 'contained', b.lazy_string(length=d) + + str256 = '0123456789abcdef' * 16 + + tests = [ + ('tmwa::AString(""_s)', '{allocated = ""}'), + ('tmwa::AString(tmwa::ZString(""_s))', '{allocated = ""}'), + ('tmwa::AString(tmwa::RString(""_s))', '{allocated = ""}'), + ('tmwa::AString(tmwa::RString(tmwa::ZString(""_s)))', '{allocated = ""}'), + ('tmwa::AString("Hello"_s)', '{allocated = "Hello"}'), + ('tmwa::AString(tmwa::ZString("Hello"_s))', '{contained = "Hello"}'), + ('tmwa::AString(tmwa::RString("Hello"_s))', '{allocated = "Hello"}'), + ('tmwa::AString(tmwa::RString(tmwa::ZString("Hello"_s)))', '{allocated = "Hello" = {count = 0}}'), + ('tmwa::AString("' + str256[:-2] + '"_s)', '{allocated = "' + str256[:-2] + '"}'), + ('tmwa::AString(tmwa::ZString("' + str256[:-2] + '"_s))', '{contained = "' + str256[:-2] + '"}'), + ('tmwa::AString(tmwa::RString("' + str256[:-2] + '"_s))', '{allocated = "' + str256[:-2] + '"}'), + ('tmwa::AString(tmwa::RString(tmwa::ZString("' + str256[:-2] + '"_s)))', '{allocated = "' + str256[:-2] + '" = {count = 0}}'), + ('tmwa::AString("' + str256[:-1] + '"_s)', '{allocated = "' + str256[:-1] + '"}'), + ('tmwa::AString(tmwa::ZString("' + str256[:-1] + '"_s))', '{contained = "' + str256[:-1] + '"}'), + ('tmwa::AString(tmwa::RString("' + str256[:-1] + '"_s))', '{allocated = "' + str256[:-1] + '"}'), + ('tmwa::AString(tmwa::RString(tmwa::ZString("' + str256[:-1] + '"_s)))', '{allocated = "' + str256[:-1] + '" = {count = 0}}'), + ('tmwa::AString("' + str256 + '"_s)', '{allocated = "' + str256 + '"}'), + ('tmwa::AString(tmwa::ZString("' + str256 + '"_s))', '{allocated = "' + str256 + '" = {count = 0}}'), + ('tmwa::AString(tmwa::RString("' + str256 + '"_s))', '{allocated = "' + str256 + '"}'), + ('tmwa::AString(tmwa::RString(tmwa::ZString("' + str256 + '"_s)))', '{allocated = "' + str256 + '" = {count = 0}}'), + ('tmwa::AString("' + str256 + 'x"_s)', '{allocated = "' + str256 + 'x"}'), + ('tmwa::AString(tmwa::ZString("' + str256 + 'x"_s))', '{allocated = "' + str256 + 'x" = {count = 0}}'), + ('tmwa::AString(tmwa::RString("' + str256 + 'x"_s))', '{allocated = "' + str256 + 'x"}'), + ('tmwa::AString(tmwa::RString(tmwa::ZString("' + str256 + 'x"_s)))', '{allocated = "' + str256 + 'x" = {count = 0}}'), + ] diff --git a/src/strings/literal.py b/src/strings/literal.py new file mode 100644 index 0000000..5031ff9 --- /dev/null +++ b/src/strings/literal.py @@ -0,0 +1,23 @@ +class LString(object): + __slots__ = ('_value') + name = 'tmwa::strings::LString' + enabled = True + + def __init__(self, value): + self._value = value + + def to_string(self): + v = self._value + b = v['_b']['_ptr'] + e = v['_e']['_ptr'] + d = e - b + return b.lazy_string(length=d) + + test_extra = ''' + using tmwa::operator "" _s; + ''' + + tests = [ + ('""_s', '""'), + ('"Hello, World!"_s', '"Hello, World!"'), + ] diff --git a/src/strings/rstring.py b/src/strings/rstring.py index 8021ec2..fd26801 100644 --- a/src/strings/rstring.py +++ b/src/strings/rstring.py @@ -1,6 +1,4 @@ class RString(object): - ''' print a RString - ''' __slots__ = ('_value') name = 'tmwa::strings::RString' enabled = True @@ -8,12 +6,40 @@ class RString(object): def __init__(self, value): self._value = value + def to_string(self): + v = self._value + e = v['maybe_end'] + if e: + b = v['u']['begin'] + d = e - b + return b.lazy_string(length=d) + else: + r = v['u']['owned'].dereference() + b = r['body'] + b = b[0].address + d = r['size'] + return b.lazy_string(length=d) + def children(self): - yield 'count', self._value['owned'].dereference()['count'] + v = self._value + if v['maybe_end']: + pass + else: + yield 'count', v['u']['owned'].dereference()['count'] - def to_string(self): - r = self._value['owned'].dereference() - b = r['body'] - b = b.cast(b.type.target().pointer()) - d = r['size'] - return b.lazy_string(length=d) + str256 = '0123456789abcdef' * 16 + + tests = [ + ('tmwa::RString(""_s)', '""'), + ('tmwa::RString(tmwa::ZString(""_s))', '""'), + ('tmwa::RString("Hello"_s)', '"Hello"'), + ('tmwa::RString(tmwa::ZString("Hello"_s))', '"Hello" = {count = 0}'), + ('tmwa::RString("' + str256[:-2] + '"_s)', '"' + str256[:-2] + '"'), + ('tmwa::RString(tmwa::ZString("' + str256[:-2] + '"_s))', '"' + str256[:-2] + '" = {count = 0}'), + ('tmwa::RString("' + str256[:-1] + '"_s)', '"' + str256[:-1] + '"'), + ('tmwa::RString(tmwa::ZString("' + str256[:-1] + '"_s))', '"' + str256[:-1] + '" = {count = 0}'), + ('tmwa::RString("' + str256 + '"_s)', '"' + str256 + '"'), + ('tmwa::RString(tmwa::ZString("' + str256 + '"_s))', '"' + str256 + '" = {count = 0}'), + ('tmwa::RString("' + str256 + 'x"_s)', '"' + str256 + 'x"'), + ('tmwa::RString(tmwa::ZString("' + str256 + 'x"_s))', '"' + str256 + 'x" = {count = 0}'), + ] diff --git a/src/strings/vstring.py b/src/strings/vstring.py index fa975b2..945e3ee 100644 --- a/src/strings/vstring.py +++ b/src/strings/vstring.py @@ -1,6 +1,4 @@ class VString(object): - ''' print a VString - ''' __slots__ = ('_value') name = 'tmwa::strings::VString' enabled = True @@ -15,3 +13,14 @@ class VString(object): s = self._value['_special'] d = n - s return b.lazy_string(length=d) + + str256 = '0123456789abcdef' * 16 + + tests = [ + ('tmwa::VString<255>(""_s)', '""'), + ('tmwa::VString<255>("Hello"_s)', '"Hello"'), + ('tmwa::VString<255>("' + str256[:-2] + '"_s)', '"' + str256[:-2] + '"'), + ('tmwa::VString<255>("' + str256[:-1] + '"_s)', '"' + str256[:-1] + '"'), + ('tmwa::VString<255>("' + str256 + '"_s)', '"' + str256[:-1] + '"'), + ('tmwa::VString<255>("' + str256 + 'x"_s)', '"' + str256[:-1] + '"'), + ] diff --git a/src/strings/xstring.py b/src/strings/xstring.py index fa0abcb..d289485 100644 --- a/src/strings/xstring.py +++ b/src/strings/xstring.py @@ -1,6 +1,4 @@ class XString(object): - ''' print a XString - ''' __slots__ = ('_value') name = 'tmwa::strings::XString' enabled = True @@ -8,11 +6,22 @@ class XString(object): def __init__(self, value): self._value = value - def children(self): - yield 'base', self._value['_base'] - def to_string(self): b = self._value['_b']['_ptr'] e = self._value['_e']['_ptr'] d = e - b return b.lazy_string(length=d) + + def children(self): + yield 'base', self._value['_base'] + + str256 = '0123456789abcdef' * 16 + + tests = [ + ('tmwa::XString(""_s)', '"" = {base = 0x0}'), + ('tmwa::XString("Hello"_s)', '"Hello" = {base = 0x0}'), + ('tmwa::XString("' + str256[:-2] + '"_s)', '"' + str256[:-2] + '" = {base = 0x0}'), + ('tmwa::XString("' + str256[:-1] + '"_s)', '"' + str256[:-1] + '" = {base = 0x0}'), + ('tmwa::XString("' + str256 + '"_s)', '"' + str256 + '" = {base = 0x0}'), + ('tmwa::XString("' + str256 + 'x"_s)', '"' + str256 + 'x" = {base = 0x0}'), + ] diff --git a/src/strings/zstring.py b/src/strings/zstring.py index dca5f4e..7f9ea2a 100644 --- a/src/strings/zstring.py +++ b/src/strings/zstring.py @@ -1,6 +1,4 @@ class ZString(object): - ''' print a ZString - ''' __slots__ = ('_value') name = 'tmwa::strings::ZString' enabled = True @@ -8,11 +6,22 @@ class ZString(object): def __init__(self, value): self._value = value - def children(self): - yield 'base', self._value['_base'] - def to_string(self): b = self._value['_b']['_ptr'] e = self._value['_e']['_ptr'] d = e - b return b.lazy_string(length=d) + + def children(self): + yield 'base', self._value['_base'] + + str256 = '0123456789abcdef' * 16 + + tests = [ + ('tmwa::ZString(""_s)', '"" = {base = 0x0}'), + ('tmwa::ZString("Hello"_s)', '"Hello" = {base = 0x0}'), + ('tmwa::ZString("' + str256[:-2] + '"_s)', '"' + str256[:-2] + '" = {base = 0x0}'), + ('tmwa::ZString("' + str256[:-1] + '"_s)', '"' + str256[:-1] + '" = {base = 0x0}'), + ('tmwa::ZString("' + str256 + '"_s)', '"' + str256 + '" = {base = 0x0}'), + ('tmwa::ZString("' + str256 + 'x"_s)', '"' + str256 + 'x" = {base = 0x0}'), + ] diff --git a/tools/debug-debug-scripts b/tools/debug-debug-scripts new file mode 100755 index 0000000..79520e9 --- /dev/null +++ b/tools/debug-debug-scripts @@ -0,0 +1,99 @@ +#!/usr/bin/env python + +from __future__ import print_function + +import itertools +import os +import subprocess +import sys +import tempfile + +error = False + +def eprint(s): + print('Error:', s, file=sys.stderr) + +def get_classes_from_file(a): + global error + d = {} + execfile(a, d) + for (k, v) in sorted(d.items()): + try: + name = v.name + except AttributeError: + if hasattr(v, 'enabled') and hasattr(v, 'tests'): + name = 'None::' + k + else: + continue + else: + if name.split('::')[-1] != k: + eprint('Mismatch: class %s is for %s' % (k, name)) + error = True + if not v.enabled: + eprint('Disabled: %s' % name) + continue + + try: + tests = v.tests + except AttributeError: + eprint('Unimplemented tests for %s' % name) + error = True + continue + extra = getattr(v, 'test_extra', '').rstrip(' ') + yield (k, tests, extra) + +def c_quote(s): + s = s.replace('\\', '\\\\') + s = s.replace('"', '\\"') + return '"' + s + '"' + +def gen_test(name, expr, expected): + print('static') + print('void %s()' % name) + print('{') + print(' auto value = %s;' % expr) + print(' const char *expected = %s;' % c_quote(expected)) + print(' do_breakpoint(value, expected);') + print('}') + +def main(args): + print('// Generated by', __file__) + print('#include <cstdio>') + print() + print('template<class T>') + print('__attribute__((noinline))') + print('void do_breakpoint(const T& value, const char *expected)') + print('{') + print(' (void)value;') + print(' (void)expected;') + print(' if (!expected) printf("printer test: %p = %s\\n", &value, expected);') + print('}') + + names = [] + for a in args: + basename, ext = os.path.splitext(a) + assert ext == '.py' + print() + print('// Tests from', a) + header = basename + '.hpp' + print('#include "%s"' % header) + + for (k, tests, extra) in get_classes_from_file(a): + print() + print('// Tests for', k) + print(extra) + for (i, (expr, expected)) in enumerate(tests): + name = 'testset_%s_subtest_%d' % (k, i) + gen_test(name, expr, expected) + names.append(name) + print('int main()') + print('{') + for n in names: + print(' %s();' % n) + print('}') + if error and not os.getenv('TMWA_FORCE_GENERATE'): + sys.exit(1) + + +if __name__ == '__main__': + main(sys.argv[1:]) diff --git a/tools/debug-debug.gdb b/tools/debug-debug.gdb new file mode 100644 index 0000000..0389341 --- /dev/null +++ b/tools/debug-debug.gdb @@ -0,0 +1,35 @@ +# vim: ft=python +set logging file /dev/null +set logging redirect on +set logging off + +python +import sys + +def hit_breakpoint(): + sys.stdout.write('.') + value = str(gdb.parse_and_eval('*&value')) + expected = gdb.parse_and_eval('expected').string() + if value != expected: + print 'Error: mismatch, aborting ...' + print 'actual: %r' % value + print 'expect: %r' % str(expected) + gdb.execute('bt') + sys.exit(1) +end + +# register a pretty-printer for 'char *' instead +#set print address off +set print static-members off +set print elements unlimited +set print frame-arguments none + +set logging on +rbreak do_breakpoint +set logging off +commands +silent +python hit_breakpoint() +continue +end +run |