24 using namespace Network;
27 unsigned int cliloc_num,
const u16* arguments,
unsigned short font,
28 unsigned short color )
34 if ( arguments !=
nullptr )
36 while ( arguments[textlen] != L
'\0' )
43 msg->Write<
u32>( 0xFFFFFFFFu );
44 msg->Write<
u16>( 0xFFFFu );
46 msg->WriteFlipped<
u16>( color );
47 msg->WriteFlipped<
u16>( font );
48 msg->WriteFlipped<
u32>( cliloc_num );
49 msg->Write(
"System", 30,
false );
50 if ( arguments !=
nullptr )
51 msg->Write( arguments, static_cast<u16>( textlen ),
true );
54 u16 len = msg->offset;
56 msg->WriteFlipped<
u16>( len );
57 msg.
Send( client, len );
61 unsigned short color )
67 if ( arguments !=
nullptr )
69 while ( arguments[textlen] != L
'\0' )
79 msg->WriteFlipped<
u16>( color );
80 msg->WriteFlipped<
u16>( font );
81 msg->WriteFlipped<
u32>( cliloc_num );
82 msg->Write( obj->
description().c_str(), 30, false );
83 if ( arguments !=
nullptr )
84 msg->Write( arguments, static_cast<u16>( textlen ),
true );
87 u16 len = msg->offset;
89 msg->WriteFlipped<
u16>( len );
95 const u16* arguments,
unsigned short font,
unsigned short color )
101 if ( arguments !=
nullptr )
103 while ( arguments[textlen] != L
'\0' )
112 msg->Write<
u8>( 7u );
113 msg->WriteFlipped<
u16>( color );
114 msg->WriteFlipped<
u16>( font );
115 msg->WriteFlipped<
u32>( cliloc_num );
116 msg->Write( obj->
description().c_str(), 30, false );
117 if ( arguments !=
nullptr )
118 msg->Write( arguments, static_cast<u16>( textlen ),
true );
121 u16 len = msg->offset;
123 msg->WriteFlipped<
u16>( len );
129 bool prepend,
const u16* arguments,
unsigned short font,
130 unsigned short color )
134 unsigned textlen = 0, affix_len = 0;
136 if ( arguments !=
nullptr )
138 while ( arguments[textlen] != L
'\0' )
141 affix_len =
static_cast<unsigned>( strlen( affix ) + 1 );
148 msg->Write<
u32>( 0xFFFFFFFFu );
149 msg->Write<
u16>( 0xFFFFu );
150 msg->Write<
u8>( 6u );
151 msg->WriteFlipped<
u16>( color );
152 msg->WriteFlipped<
u16>( font );
153 msg->WriteFlipped<
u32>( cliloc_num );
154 msg->Write<
u8>( ( prepend ) ? 1u : 0u );
155 msg->Write(
"System", 30,
false );
156 msg->Write( affix, static_cast<u16>( affix_len ) );
157 if ( arguments !=
nullptr )
158 msg->WriteFlipped( arguments, static_cast<u16>( textlen ),
true );
161 u16 len = msg->offset;
163 msg->WriteFlipped<
u16>( len );
164 msg.
Send( client, len );
168 const u16* arguments,
unsigned short font,
unsigned short color )
172 unsigned textlen = 0, affix_len = 0;
174 if ( arguments !=
nullptr )
176 while ( arguments[textlen] != L
'\0' )
179 affix_len =
static_cast<unsigned>( strlen( affix ) + 1 );
188 msg->Write<
u8>( 7u );
189 msg->WriteFlipped<
u16>( color );
190 msg->WriteFlipped<
u16>( font );
191 msg->WriteFlipped<
u32>( cliloc_num );
192 msg->Write<
u8>( ( prepend ) ? 1u : 0u );
193 msg->Write( obj->
description().c_str(), 30, false );
194 msg->Write( affix, static_cast<u16>( affix_len ) );
195 if ( arguments !=
nullptr )
196 msg->WriteFlipped( arguments, static_cast<u16>( textlen ),
true );
199 u16 len = msg->offset;
201 msg->WriteFlipped<
u16>( len );
208 unsigned int cliloc_num,
const char* affix,
bool prepend,
209 const u16* arguments,
unsigned short font,
unsigned short color )
213 unsigned textlen = 0, affix_len = 0;
215 if ( arguments !=
nullptr )
217 while ( arguments[textlen] != L
'\0' )
220 affix_len =
static_cast<unsigned>( strlen( affix ) + 1 );
229 msg->Write<
u8>( 7u );
230 msg->WriteFlipped<
u16>( color );
231 msg->WriteFlipped<
u16>( font );
232 msg->WriteFlipped<
u32>( cliloc_num );
233 msg->Write<
u8>( ( prepend ) ? 1u : 0u );
234 msg->Write( obj->
description().c_str(), 30, false );
235 msg->Write( affix, static_cast<u16>( affix_len ) );
236 if ( arguments !=
nullptr )
237 msg->WriteFlipped( arguments, static_cast<u16>( textlen ),
true );
240 u16 len = msg->offset;
242 msg->WriteFlipped<
u16>( len );
248 unsigned short font,
unsigned short color )
251 unsigned textlen = 0;
253 if ( arguments !=
nullptr )
255 while ( arguments[textlen] != L
'\0' )
268 msg->
Write(
"System", 30,
false );
269 if ( arguments !=
nullptr )
270 msg->
Write( arguments, static_cast<u16>( textlen ),
true );
280 bool prepend,
const u16* arguments,
unsigned short font,
281 unsigned short color )
284 unsigned textlen = 0, affix_len = 0;
286 if ( arguments !=
nullptr )
288 while ( arguments[textlen] != L
'\0' )
291 affix_len =
static_cast<unsigned>( strlen( affix ) + 1 );
304 msg->
Write<
u8>( ( prepend ) ? 1u : 0u );
305 msg->
Write(
"System", 30,
false );
306 msg->
Write( affix, static_cast<u16>( affix_len ) );
307 if ( arguments !=
nullptr )
308 msg->
WriteFlipped( arguments, static_cast<u16>( textlen ),
true );
void private_say_above_cl_affix(Mobile::Character *chr, const UObject *obj, unsigned int cliloc_num, const char *affix, bool prepend, const u16 *arguments, unsigned short font, unsigned short color)
void build_sysmessage_cl_affix(PktOut_CC *msg, unsigned int cliloc_num, const char *affix, bool prepend, const u16 *arguments, unsigned short font, unsigned short color)
void send_sysmessage_cl(Client *client, unsigned int cliloc_num, const u16 *arguments, unsigned short font, unsigned short color)
std::enable_if< std::is_same< T, N >::value, void >::type Write(N x)
void transmit_to_inrange(const UObject *center, const void *msg, unsigned msglen)
void build_sysmessage_cl(PktOut_C1 *msg, unsigned int cliloc_num, const u16 *arguments, unsigned short font, unsigned short color)
std::enable_if< std::is_same< T, N >::value, void >::type WriteFlipped(N x)
void Send(Client *client, int len=-1) const
void say_above_cl_affix(UObject *obj, unsigned int cliloc_num, const char *affix, bool prepend, const u16 *arguments, unsigned short font, unsigned short color)
void send_sysmessage_cl_affix(Client *client, unsigned int cliloc_num, const char *affix, bool prepend, const u16 *arguments, unsigned short font, unsigned short color)
virtual std::string description() const
void say_above_cl(UObject *obj, unsigned int cliloc_num, const u16 *arguments, unsigned short font, unsigned short color)
void private_say_above_cl(Mobile::Character *chr, const UObject *obj, unsigned int cliloc_num, const u16 *arguments, unsigned short font, unsigned short color)