11 #include "../../clib/logfacility.h" 12 #include "../../clib/rawtypes.h" 13 #include "../../plib/maptile.h" 14 #include "../dynproperties.h" 15 #include "../globals/uvars.h" 16 #include "../network/packethelper.h" 17 #include "../realms/realm.h" 41 INFO_PRINT <<
"size " << h.estimateSizeDynProps() <<
"\n";
42 INFO_PRINT <<
"ar " << h.armod() <<
" " << h.has_armod() <<
"\n";
44 INFO_PRINT <<
"ar " << h.armod() <<
" " << h.has_armod() <<
"\n";
46 INFO_PRINT <<
"ar " << h.armod() <<
" " << h.has_armod() <<
"\n";
47 INFO_PRINT <<
"size " << h.estimateSizeDynProps() <<
"\n";
48 INFO_PRINT <<
"name " << h.itemname() <<
" " << h.has_itemname() <<
"\n";
49 h.itemname(
"hello world" );
50 INFO_PRINT <<
"name " << h.itemname() <<
" " << h.has_itemname() <<
"\n";
52 INFO_PRINT <<
"name " << h.itemname() <<
" " << h.has_itemname() <<
"\n";
53 INFO_PRINT <<
"size " << h.estimateSizeDynProps() <<
"\n";
58 using namespace Network;
59 using namespace Network::PktHelper;
62 for (
const u8& c : p->buffer )
64 w << fmt::hex( c ) <<
" ";
70 if ( std::equal( std::begin( p->buffer ), std::end( p->buffer ), std::begin( a ) ) )
77 for (
const u8& c : a )
79 w << fmt::hex( c ) <<
" ";
87 p->Write<
u8>( 0x21u );
88 p->WriteFlipped<
s8>( 0x12 );
89 p->WriteFlipped<
u8>( 0x21u );
92 std::array<s8, 10> a{{0x2f, 0x12, 0x21, 0x12, 0x21, 0, 0, 0, 0, 0}};
97 p->Write<
s16>( 0x1234 );
98 p->Write<
u16>( 0x4321u );
99 p->WriteFlipped<
s16>( 0x1234 );
100 p->WriteFlipped<
u16>( 0x4321u );
103 std::array<s8, 10> a{{0x2f, 0x34, 0x12, 0x21, 0x43, 0x12, 0x34, 0x43, 0x21, 0}};
108 p->Write<
s32>( 0x12344321 );
109 p->Write<
u32>( 0x12344321u );
112 std::array<s8, 10> a{{0x2f, 0x21, 0x43, 0x34, 0x12, 0x21, 0x43, 0x34, 0x12, 0}};
117 p->WriteFlipped<
s32>( 0x12344321 );
118 p->WriteFlipped<
u32>( 0x12344321u );
121 std::array<s8, 10> a{{0x2f, 0x12, 0x34, 0x43, 0x21, 0x12, 0x34, 0x43, 0x21, 0}};
126 std::string s(
"1234" );
127 p->Write( s.c_str(), 4, false );
128 u8 b[] = {0x12, 0x34, 0x43, 0x21};
132 std::array<s8, 10> a{{0x2f, 0x31, 0x32, 0x33, 0x34, 0x12, 0x34, 0x43, 0x21, 0}};
137 u16 b[] = {0x12, 0x34};
138 p->Write( &b[0], 2,
false );
139 p->WriteFlipped( &b[0], 2,
false );
142 std::array<s8, 10> a{{0x2f, 0x12, 0, 0x34, 0, 0, 0x12, 0, 0x34, 0}};
144 u8*
data =
reinterpret_cast<u8*
>( &( p->buffer[1] ) );
146 std::memcpy( &d, &( p->buffer[1] ), 1 );
149 u32* data1 =
reinterpret_cast<u32*
>( &( p->buffer[1] ) );
151 std::memcpy( &d1, &( p->buffer[1] ), 4 );
152 INFO_PRINT << ( *data1 ) <<
" " << d1 <<
"\n";
std::unordered_map< u64, ScriptDiffData > data
#define DYN_PROPERTY(name, type, id, defaultvalue)
Plib::MAPTILE_CELL getmaptile(unsigned short x, unsigned short y) const
Realms::Realm * main_realm