Pol  Revision:cb584c9
miscmsg.cpp
Go to the documentation of this file.
1 
22 /* MISCMSG.CPP: Miscellaneous message handlers. Handlers shouldn't stay here long,
23  only until they find a better home - but this is better than putting them in POL.CPP. */
24 
25 #include <cstddef>
26 #include <ctype.h>
27 #include <string>
28 
29 #include <format/format.h>
30 #include "../bscript/eprog.h"
31 #include "../clib/clib_endian.h"
32 #include "../clib/fdump.h"
33 #include "../clib/logfacility.h"
34 #include "../clib/rawtypes.h"
35 #include "../clib/refptr.h"
36 #include "../clib/stlutil.h"
37 #include "../plib/systemstate.h"
38 #include "accounts/account.h"
39 #include "cmbtcfg.h"
40 #include "fnsearch.h"
41 #include "gameclck.h"
42 #include "globals/settings.h"
43 #include "globals/uvars.h"
44 #include "mobile/attribute.h"
45 #include "mobile/charactr.h"
46 #include "multi/customhouses.h"
47 #include "multi/multi.h"
48 #include "network/client.h"
49 #include "network/packethelper.h"
50 #include "network/packets.h"
51 #include "pktboth.h"
52 #include "pktdef.h"
53 #include "pktin.h"
54 #include "scrstore.h"
55 #include "sockio.h"
56 #include "spells.h"
57 #include "tooltips.h"
58 #include "uconst.h"
59 #include "ufunc.h"
60 #include "unicode.h"
61 #include "uobject.h"
62 #include "uoscrobj.h"
63 
64 namespace Pol
65 {
66 namespace Module
67 {
68 void character_race_changer_handler( Network::Client* client, Core::PKTBI_BF* msg );
69 }
70 namespace Core
71 {
72 using namespace Network;
73 
74 void handle_unknown_packet( Client* client );
75 
76 void party_cmd_handler( Client* client, PKTBI_BF* msg );
77 
78 void OnGuildButton( Client* client );
79 void OnQuestButton( Client* client );
80 void OnChatButton( Client* client );
81 
82 void handle_bulletin_boards( Client* client, PKTBI_71* /*msg*/ )
83 {
84  handle_unknown_packet( client );
85 }
86 
87 void handle_mode_set( Client* client, PKTBI_72* msg )
88 {
89  if ( client->chr->warmode_wait > read_gameclock() )
90  {
91  send_move( client, client->chr );
92  return;
93  }
94  else
95  {
97  }
98 
99  bool msg_warmode = msg->warmode ? true : false;
100 
101  // FIXME: Should reply with 0x77 packet!? (so says various docs!) [TJ]
102  transmit( client, msg, sizeof *msg );
103 
104  client->chr->set_warmode( msg_warmode );
105 }
106 
107 void handle_rename_char( Client* client, PKTIN_75* msg )
108 {
110  if ( chr != nullptr )
111  {
112  if ( client->chr->can_rename( chr ) )
113  {
114  msg->name[sizeof msg->name - 1] = '\0';
115  // check for legal characters
116  for ( char* p = msg->name; *p; p++ )
117  {
118  // only allow: a-z, A-Z & spaces
119  if ( *p != ' ' && !isalpha( *p ) )
120  {
121  fmt::Writer tmp;
122  tmp.Format( "Client#{} (account {}) attempted an invalid rename (packet 0x{:X}):\n{}\n" )
123  << client->instance_
124  << ( ( client->acct != nullptr ) ? client->acct->name() : "unknown" )
125  << (int)msg->msgtype << msg->name;
126  Clib::fdump( tmp, msg->name, static_cast<int>( strlen( msg->name ) ) );
127  POLLOG_INFO << tmp.str();
128  *p = '\0';
129  send_sysmessage( client, "Invalid name!" );
130  return; // dave 12/26 if invalid name, do not apply to chr!
131  }
132  }
133  chr->setname( msg->name );
134  }
135  else
136  {
137  send_sysmessage( client, "I can't rename that." );
138  }
139  }
140  else
141  {
142  send_sysmessage( client, "I can't find that." );
143  }
144 }
145 
146 void handle_msg_B5( Client* client, PKTIN_B5* /*msg*/ )
147 {
148  OnChatButton( client );
149 }
150 
152 {
154  find_script( "misc/charprofile", true, Plib::systemstate.config.cache_interactive_scripts );
155  if ( prog.get() != nullptr )
156  {
157  Mobile::Character* mobile;
158 
159  if ( msg->mode == msg->MODE_REQUEST )
160  {
161  mobile = system_find_mobile( cfBEu32( msg->profile_request.serial ) );
162  if ( mobile == nullptr )
163  return;
164  client->chr->start_script( prog.get(), false, new Module::ECharacterRefObjImp( mobile ),
165  new Bscript::BLong( msg->mode ), new Bscript::BLong( 0 ) );
166  }
167  else if ( msg->mode == msg->MODE_UPDATE )
168  {
169  mobile = system_find_mobile( cfBEu32( msg->profile_update.serial ) );
170  if ( mobile == nullptr )
171  return;
172  u16* themsg = msg->profile_update.wtext;
173  int intextlen = ( cfBEu16( msg->msglen ) - 12 ) / sizeof( msg->profile_update.wtext[0] );
174 
175  int i = 0;
176 
177  u16 wtextbuf[SPEECH_MAX_LEN];
178  u32 wtextbuflen;
179 
180  // Preprocess the text into a sanity-checked, printable form in textbuf
181  if ( intextlen < 0 )
182  intextlen = 0;
183  if ( intextlen > SPEECH_MAX_LEN )
184  intextlen = SPEECH_MAX_LEN;
185 
186  wtextbuflen = 0;
187  for ( i = 0; i < intextlen; i++ )
188  {
189  u16 wc = cfBEu16( themsg[i] );
190  if ( wc == 0 )
191  break; // quit early on embedded nulls
192  if ( wc == L'~' )
193  continue; // skip unprintable tildes.
194  wtextbuf[wtextbuflen++] = ctBEu16( wc );
195  }
196 
197  Bscript::ObjArray* arr;
198 
199  if ( Core::convertUCtoArray( wtextbuf, arr, wtextbuflen,
200  true ) ) // convert back with ctBEu16()
201  client->chr->start_script( prog.get(), false, new Module::ECharacterRefObjImp( mobile ),
202  new Bscript::BLong( msg->mode ), arr );
203  }
204  }
205 }
206 
207 void handle_msg_BB( Client* client, PKTBI_BB* /*msg*/ )
208 {
209  handle_unknown_packet( client );
210 }
211 
212 void handle_client_version( Client* client, PKTBI_BD* msg )
213 {
214  u16 len = cfBEu16( msg->msglen ) - 3;
215  if ( len < 100 )
216  {
217  int c = 0;
218  char ch;
219  std::string ver2 = "";
220  while ( c < len )
221  {
222  ch = msg->version[c];
223  if ( ch == 0 )
224  break; // seems to be null-terminated
225  ver2 += ch;
226  ++c;
227  }
228  client->setversion( ver2 );
229 
230  VersionDetailStruct vers_det;
231  client->itemizeclientversion( ver2, vers_det );
232  client->setversiondetail( vers_det );
233 
234  if ( client->compareVersion( CLIENT_VER_70331 ) )
235  client->setClientType( CLIENTTYPE_70331 );
236  else if ( client->compareVersion( CLIENT_VER_70300 ) )
237  client->setClientType( CLIENTTYPE_70300 );
238  else if ( client->compareVersion( CLIENT_VER_70130 ) )
239  client->setClientType( CLIENTTYPE_70130 );
240  else if ( client->compareVersion( CLIENT_VER_7090 ) )
241  client->setClientType( CLIENTTYPE_7090 );
242  else if ( client->compareVersion( CLIENT_VER_7000 ) )
243  client->setClientType( CLIENTTYPE_7000 );
244  else if ( client->compareVersion( CLIENT_VER_60142 ) )
245  client->setClientType( CLIENTTYPE_60142 );
246  else if ( client->compareVersion( CLIENT_VER_6017 ) ) // Grid-loc support
247  client->setClientType( CLIENTTYPE_6017 );
248  else if ( client->compareVersion( CLIENT_VER_5020 ) )
249  client->setClientType( CLIENTTYPE_5020 );
250  else if ( client->compareVersion( CLIENT_VER_5000 ) )
251  client->setClientType( CLIENTTYPE_5000 );
252  else if ( client->compareVersion( CLIENT_VER_4070 ) )
253  client->setClientType( CLIENTTYPE_4070 );
254  else if ( client->compareVersion( CLIENT_VER_4000 ) )
255  client->setClientType( CLIENTTYPE_4000 );
256 
259  client ); // Scott 10/11/2007 added for login fixes and handling 1.x clients.
260  // Season info needs to check client version to keep from crashing 1.x
261  // version not set until shortly after login complete.
262  // send_feature_enable(client); //dave commented out 8/21/03, unexpected problems with people
263  // sending B9 via script with this too.
264  if ( ( client->UOExpansionFlag & AOS ) )
265  {
266  send_object_cache( client, client->chr );
267  }
268  }
269  else
270  {
271  POLLOG_INFO << "Suspect string length in PKTBI_BD packet: " << len << "\n";
272  }
273 }
274 
275 void ext_stats_in( Client* client, PKTBI_BF* msg )
276 {
278  {
279  const Mobile::Attribute* attrib = nullptr;
280  switch ( msg->extstatin.stat )
281  {
283  attrib = gamestate.pAttrStrength;
284  break;
286  attrib = gamestate.pAttrDexterity;
287  break;
289  attrib = gamestate.pAttrIntelligence;
290  break;
291  default: // sent an illegal stat. Should report to console?
292  return;
293  }
294 
295  if ( attrib == nullptr ) // there's no attribute for this (?)
296  return;
297 
298  u8 state = msg->extstatin.mode;
299  if ( state > 2 ) // FIXME hard-coded value
300  return;
301 
302  client->chr->attribute( attrib->attrid ).lock( state );
303  }
304 }
305 
306 void handle_msg_BF( Client* client, PKTBI_BF* msg )
307 {
308  UObject* obj = nullptr;
309  Multi::UMulti* multi = nullptr;
310  Multi::UHouse* house = nullptr;
311  switch ( cfBEu16( msg->subcmd ) )
312  {
314  client->chr->uclang = Clib::strlower( msg->client_lang );
315  break;
317  if ( ( client->UOExpansionFlag & AOS ) == 0 )
318  return;
320  if ( multi != nullptr )
321  {
322  house = multi->as_house();
323  if ( house != nullptr )
324  {
325  if ( client->UOExpansionFlag & AOS )
326  {
327  send_object_cache( client, (UObject*)( house ) );
328  }
329  // consider sending working design to certain players, to assist building, or GM help
331  }
332  }
333  break;
335  if ( ( client->UOExpansionFlag & AOS ) == 0 )
336  return;
337  obj = system_find_object( cfBEu32( msg->objectcache.serial ) );
338  if ( obj != nullptr )
339  {
340  SendAOSTooltip( client, obj );
341  }
342  break;
344  return;
345  break;
347  do_cast( client, cfBEu16( msg->spellselect.selected_spell ) );
348  break;
351  break;
353  party_cmd_handler( client, msg );
354  break;
356  ext_stats_in( client, msg );
357  break;
359  return;
360  break;
362  return;
363  break;
365  if ( client->chr->race == RACE_GARGOYLE )
366  {
367  // FIXME: add checks if its possible to stand with new movemode
368  client->chr->movemode = ( MOVEMODE )( client->chr->movemode ^ MOVEMODE_FLY );
370  send_goxyz( client, client->chr );
371  }
372  break;
375  break;
377  {
379  find_script( "misc/popupmenu", true, Plib::systemstate.config.cache_interactive_scripts );
380  if ( prog.get() == nullptr )
381  break;
382  u32 serial = cfBEu32( msg->serial_request_popup_menu );
383  if ( IsCharacter( serial ) )
384  {
386  if ( chr == nullptr )
387  break;
388  client->chr->start_script( prog.get(), false, new Pol::Module::ECharacterRefObjImp( chr ) );
389  }
390  else
391  {
392  Pol::Items::Item* item = system_find_item( serial );
393  if ( item == nullptr )
394  break;
395  client->chr->start_script( prog.get(), false, item->make_ref() );
396  }
397  break;
398  }
400  {
401  if ( client->chr->on_popup_menu_selection == nullptr )
402  {
403  POLLOG_INFO.Format( "{}/{} tried to use a popup menu, but none was active.\n" )
404  << client->acct->name() << client->chr->name();
405  break;
406  }
407 
408  u32 serial = cfBEu32( msg->popupselect.serial );
409  u16 id = cfBEu16( msg->popupselect.entry_tag );
410  client->chr->on_popup_menu_selection( client, serial, id );
411  break;
412  }
413  default:
414  handle_unknown_packet( client );
415  }
416 }
417 
418 void handle_unknown_C4( Client* client, PKTOUT_C4* /*msg*/ )
419 {
420  handle_unknown_packet( client );
421 }
422 
423 void handle_update_range_change( Client* client, PKTBI_C8* /*msg*/ )
424 {
425  handle_unknown_packet( client );
426 }
427 
428 void handle_allnames( Client* client, PKTBI_98_IN* msg )
429 {
430  u32 serial = cfBEu32( msg->serial );
431  Mobile::Character* the_mob = find_character( serial );
432  if ( the_mob != nullptr )
433  {
434  if ( !client->chr->is_visible_to_me( the_mob ) )
435  {
436  return;
437  }
438  if ( pol_distance( client->chr->x, client->chr->y, the_mob->x, the_mob->y ) > 20 )
439  {
440  return;
441  }
442 
444  msgOut->WriteFlipped<u16>( 37u ); // static length
445  msgOut->Write<u32>( the_mob->serial_ext );
446  msgOut->Write( the_mob->name().c_str(), 30, false );
447  msgOut.Send( client );
448  }
449  else
450  {
451  return;
452  }
453 }
454 
455 void handle_se_object_list( Client* client, PKTBI_D6_IN* msgin )
456 {
457  UObject* obj = nullptr;
458  int length = cfBEu16( msgin->msglen ) - 3;
459  if ( length < 0 || ( length % 4 ) != 0 )
460  return;
461  int count = length / 4;
462 
463  for ( int i = 0; i < count; ++i )
464  {
465  obj = system_find_object( cfBEu32( msgin->serials[i].serial ) );
466  if ( obj != nullptr )
467  SendAOSTooltip( client, obj );
468  }
469 }
470 
471 void handle_ef_seed( Client* client, PKTIN_EF* msg )
472 {
473  VersionDetailStruct detail;
474  detail.major = cfBEu32( msg->ver_Major );
475  detail.minor = cfBEu32( msg->ver_Minor );
476  detail.rev = cfBEu32( msg->ver_Revision );
477  detail.patch = cfBEu32( msg->ver_Patch );
478  client->setversiondetail( detail );
479  if ( client->compareVersion( CLIENT_VER_70331 ) )
480  client->setClientType( CLIENTTYPE_70331 );
481  else if ( client->compareVersion( CLIENT_VER_70300 ) )
482  client->setClientType( CLIENTTYPE_70300 );
483  else if ( client->compareVersion( CLIENT_VER_70130 ) )
484  client->setClientType( CLIENTTYPE_70130 );
485  else if ( client->compareVersion( CLIENT_VER_7090 ) )
486  client->setClientType( CLIENTTYPE_7090 );
487  else if ( client->compareVersion( CLIENT_VER_7000 ) )
488  client->setClientType( CLIENTTYPE_7000 );
489  else if ( client->compareVersion( CLIENT_VER_60142 ) )
490  client->setClientType( CLIENTTYPE_60142 );
491  else if ( client->compareVersion( CLIENT_VER_6017 ) ) // Grid-loc support
492  client->setClientType( CLIENTTYPE_6017 );
493  else if ( client->compareVersion( CLIENT_VER_5020 ) )
494  client->setClientType( CLIENTTYPE_5020 );
495  else if ( client->compareVersion( CLIENT_VER_5000 ) )
496  client->setClientType( CLIENTTYPE_5000 );
497  else if ( client->compareVersion( CLIENT_VER_4070 ) )
498  client->setClientType( CLIENTTYPE_4070 );
499  else if ( client->compareVersion( CLIENT_VER_4000 ) )
500  client->setClientType( CLIENTTYPE_4000 );
501 
502  // detail->patch is since 5.0.7 always numeric, so no need to make it complicated
503  OSTRINGSTREAM os;
504  os << detail.major << "." << detail.minor << "." << detail.rev << "." << detail.patch;
505  client->setversion( OSTRINGSTREAM_STR( os ) );
506 }
507 
508 void handle_e1_clienttype( Client* client, PKTIN_E1* msg )
509 {
510  switch ( cfBEu32( msg->clienttype ) )
511  {
513  client->setClientType( CLIENTTYPE_UOKR );
514  break;
516  client->setClientType( CLIENTTYPE_UOSA );
517  break;
518  default:
519  INFO_PRINT << "Unknown client type send with packet 0xE1 : 0x"
520  << fmt::hexu( static_cast<unsigned long>( cfBEu32( msg->clienttype ) ) ) << "\n";
521  break;
522  }
523 }
524 
525 
529 void handle_aos_commands( Client* client, PKTBI_D7* msg )
530 {
531  // nullptr prevention, no need to disturb if client or character is not found
532  if ( client == nullptr || client->chr == nullptr )
533  return;
534 
536  u32 serial = cfBEu32( msg->serial );
537  if ( client && client->chr && client->chr->serial != serial )
538  {
539  INFO_PRINT << "Ignoring spoofed packet 0xD7 from character 0x"
540  << fmt::hexu( client->chr->serial ) << " trying to spoof 0x" << fmt::hexu( serial )
541  << "\n";
542  return;
543  }
544 
545  switch ( cfBEu16( msg->subcmd ) )
546  {
549  break;
550 
553  break;
554 
557  break;
558 
561  break;
562 
564  Multi::CustomHousesAdd( msg );
565  break;
566 
569  break;
570 
573  break;
574 
577  break;
578 
581  break;
582 
585  break;
586 
589  break;
592  break;
595  break;
597  OnGuildButton( client );
598  break;
600  OnQuestButton( client );
601  break;
602  // missing combat book abilities
603  default:
604  handle_unknown_packet( client );
605  }
606 }
607 
608 void OnGuildButton( Client* client )
609 {
611  find_script( "misc/guildbutton", true, Plib::systemstate.config.cache_interactive_scripts );
612  if ( prog.get() != nullptr )
613  {
614  client->chr->start_script( prog.get(), false );
615  }
616 }
617 
618 void OnQuestButton( Client* client )
619 {
621  find_script( "misc/questbutton", true, Plib::systemstate.config.cache_interactive_scripts );
622  if ( prog.get() != nullptr )
623  {
624  client->chr->start_script( prog.get(), false );
625  }
626 }
627 
628 void OnChatButton( Client* client )
629 {
631  find_script( "misc/chatbutton", true, Plib::systemstate.config.cache_interactive_scripts );
632  if ( prog.get() != nullptr )
633  {
634  client->chr->start_script( prog.get(), false );
635  }
636 }
637 }
638 }
unsigned char u8
Definition: rawtypes.h:25
PKTBI_BF_0F clienttype
Definition: pktboth.h:857
virtual Bscript::BObjectImp * make_ref() POL_OVERRIDE
Definition: uoscrobj.cpp:1628
const struct VersionDetailStruct CLIENT_VER_60142
Definition: client.h:104
void handle_msg_BB(Client *client, PKTBI_BB *)
Definition: miscmsg.cpp:207
UObject * system_find_object(u32 serial)
Definition: fnsearch.cpp:23
const struct VersionDetailStruct CLIENT_VER_70130
Definition: client.h:107
const struct VersionDetailStruct CLIENT_VER_5020
Definition: client.h:102
void party_cmd_handler(Client *client, PKTBI_BF *msg)
Definition: party.cpp:956
void handle_mode_set(Client *client, PKTBI_72 *msg)
Definition: miscmsg.cpp:87
unsigned char lock() const
Definition: charactr.h:174
const struct VersionDetailStruct CLIENT_VER_7090
Definition: client.h:106
void CustomHousesErase(Core::PKTBI_D7 *msg)
SystemState systemstate
Definition: systemstate.cpp:12
PKTBI_BF_15 popupselect
Definition: pktboth.h:861
PKTBI_BF_1C spellselect
Definition: pktboth.h:868
Accounts::Account * acct
Definition: client.h:181
void handle_char_profile_request(Client *client, PKTBI_B8_IN *msg)
Definition: miscmsg.cpp:151
void handle_msg_BF(Client *client, PKTBI_BF *msg)
Definition: miscmsg.cpp:306
void CustomHousesSynch(Core::PKTBI_D7 *msg)
#define cfBEu32(x)
Definition: clib_endian.h:43
T * get() const
Definition: refptr.h:176
#define SPEECH_MAX_LEN
Definition: pktdef.h:27
#define POLLOG_INFO
Definition: logfacility.h:213
void handle_unknown_packet(Client *client)
void OnChatButton(Client *client)
Definition: miscmsg.cpp:628
struct Pol::Core::PKTBI_D6_IN::@40 serials[1]
bool is_visible_to_me(const Character *chr) const
Definition: charactr.cpp:2658
#define ctBEu16(x)
Definition: clib_endian.h:46
const struct VersionDetailStruct CLIENT_VER_4070
Definition: client.h:100
#define OSTRINGSTREAM_STR(x)
Definition: stlutil.h:76
void transmit(Client *client, const void *data, int len)
Definition: clientio.cpp:291
std::string uclang
Definition: charactr.h:872
void fdump(fmt::Writer &writer, const void *data, int len)
Definition: fdump.cpp:40
char client_lang[3]
Definition: pktboth.h:855
PKTBI_B8_IN_UPDATE profile_update
Definition: pktboth.h:478
void(* on_popup_menu_selection)(Network::Client *client, u32 serial, u16 id)
Definition: charactr.h:864
void CustomHousesCommit(Core::PKTBI_D7 *msg)
u32 serial_request_popup_menu
Definition: pktboth.h:859
Mobile::Character * chr
Definition: client.h:182
void OnGuildButton(Client *client)
Definition: miscmsg.cpp:608
char name[30]
Definition: pktin.h:242
bool can_rename(const Character *chr) const
Definition: charactr.cpp:1236
bool core_sends_season
Definition: ssopt.h:78
MOVEMODE
Definition: uconst.h:79
PKTBI_BF_1E reqfullcustomhouse
Definition: pktboth.h:870
PKTBI_BF_10 objectcache
Definition: pktboth.h:858
void do_cast(Network::Client *client, u16 spellid)
Definition: spells.cpp:278
void handle_ef_seed(Client *client, PKTIN_EF *msg)
Definition: miscmsg.cpp:471
void ext_stats_in(Client *client, PKTBI_BF *msg)
Definition: miscmsg.cpp:275
unsigned short u16
Definition: rawtypes.h:26
void handle_client_version(Client *client, PKTBI_BD *msg)
Definition: miscmsg.cpp:212
unsigned int u32
Definition: rawtypes.h:27
const u16 AOS
Definition: client.h:75
void handle_e1_clienttype(Client *client, PKTIN_E1 *msg)
Definition: miscmsg.cpp:508
void send_move_mobile_to_nearby_cansee(const Character *chr)
Definition: ufunc.cpp:1905
Multi::UMulti * system_find_multi(u32 serial)
Definition: fnsearch.cpp:50
void send_move(Client *client, const Character *chr)
Definition: ufunc.cpp:174
virtual class UHouse * as_house()
Definition: multis.cpp:55
void handle_allnames(Client *client, PKTBI_98_IN *msg)
Definition: miscmsg.cpp:428
void send_goxyz(Client *client, const Character *chr)
Definition: ufunc.cpp:149
const Mobile::Attribute * pAttrStrength
Definition: uvars.h:179
void CustomHousesQuit(Core::PKTBI_D7 *msg)
void Send(Client *client, int len=-1) const
Definition: packethelper.h:69
const AttributeValue & attribute(unsigned attrid) const
Definition: charactr.h:1051
const char * name() const
Definition: account.cpp:193
void CustomHousesRoofRemove(Core::PKTBI_D7 *msg)
void handle_bulletin_boards(Client *client, PKTBI_71 *)
Definition: miscmsg.cpp:82
void SendAOSTooltip(Network::Client *client, UObject *obj, bool vendor_content)
Definition: tooltips.cpp:93
#define OSTRINGSTREAM
Definition: stlutil.h:75
const struct VersionDetailStruct CLIENT_VER_6017
Definition: client.h:103
void OnQuestButton(Client *client)
Definition: miscmsg.cpp:618
const struct VersionDetailStruct CLIENT_VER_4000
Definition: client.h:99
const struct VersionDetailStruct CLIENT_VER_70331
Definition: client.h:109
const struct VersionDetailStruct CLIENT_VER_70300
Definition: client.h:108
Core::MOVEMODE movemode
Definition: charactr.h:811
PKTBI_BF_1A extstatin
Definition: pktboth.h:866
#define cfBEu16(x)
Definition: clib_endian.h:44
void handle_rename_char(Client *client, PKTIN_75 *msg)
Definition: miscmsg.cpp:107
bool convertUCtoArray(const u16 *in_wtext, Bscript::ObjArray *&out_text, size_t textlen, bool ConvFromBE)
Definition: unicode.cpp:46
gameclock_t read_gameclock()
Reads the current value of the game clock.
Definition: gameclck.cpp:57
Core::URACE race
Definition: charactr.h:919
void setname(const std::string &)
Definition: uobject.cpp:206
GameState gamestate
Definition: uvars.cpp:74
Mobile::Character * find_character(u32 serial)
Definition: fnsearch.cpp:60
bool compareVersion(const std::string &ver)
Definition: client.cpp:340
#define ctBEu32(x)
Definition: clib_endian.h:45
SettingsManager settingsManager
Definition: settings.cpp:14
void setversiondetail(VersionDetailStruct &detail)
Definition: client.h:165
Mobile::Character * system_find_mobile(u32 serial)
Definition: fnsearch.cpp:32
void setversion(const std::string &ver)
Definition: client.h:162
CombatConfig combat_config
Definition: settings.h:28
void handle_msg_B5(Client *client, PKTIN_B5 *)
Definition: miscmsg.cpp:146
const struct VersionDetailStruct CLIENT_VER_5000
Definition: client.h:101
bool IsCharacter(u32 serial)
Definition: uobject.h:311
Items::Item * system_find_item(u32 serial)
Definition: fnsearch.cpp:41
void setClientType(ClientTypeFlag type)
Definition: client.cpp:371
const Mobile::Attribute * pAttrIntelligence
Definition: uvars.h:180
void CustomHousesBackup(Core::PKTBI_D7 *msg)
unsigned short pol_distance(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2)
Definition: ufunc.cpp:481
std::string strlower(const std::string &str)
Definition: strutil.cpp:276
bool core_handled_locks
Definition: ssopt.h:65
void set_warmode(bool warmode)
Definition: charactr.cpp:3072
u32 UOExpansionFlagClient
Definition: client.h:259
bool start_script(Bscript::EScriptProgram *prog, bool start_attached, Bscript::BObjectImp *param2=nullptr, Bscript::BObjectImp *param3=nullptr, Bscript::BObjectImp *param4=nullptr)
Definition: chrituse.cpp:30
void CustomHousesClear(Core::PKTBI_D7 *msg)
void CustomHousesSelectFloor(Core::PKTBI_D7 *msg)
const Mobile::Attribute * pAttrDexterity
Definition: uvars.h:181
void CustomHousesSendFull(UHouse *house, Network::Client *client, int design)
ref_ptr< Bscript::EScriptProgram > find_script(const std::string &name, bool complain_if_not_found, bool cache_script)
Definition: scrstore.cpp:38
void CustomHousesRestore(Core::PKTBI_D7 *msg)
void handle_update_range_change(Client *client, PKTBI_C8 *)
Definition: miscmsg.cpp:423
void send_season_info(Client *client)
Definition: ufunc.cpp:2090
#define INFO_PRINT
Definition: logfacility.h:223
void send_object_cache(Network::Client *client, const UObject *obj)
Definition: tooltips.cpp:68
const struct VersionDetailStruct CLIENT_VER_7000
Definition: client.h:105
virtual std::string name() const
Definition: uobject.cpp:196
void CustomHousesAdd(Core::PKTBI_D7 *msg)
void handle_unknown_C4(Client *client, PKTOUT_C4 *)
Definition: miscmsg.cpp:418
Definition: berror.cpp:12
void CustomHousesRoofSelect(Core::PKTBI_D7 *msg)
unsigned int warmode_delay
Definition: cmbtcfg.h:20
void CustomHousesRevert(Core::PKTBI_D7 *msg)
void handle_se_object_list(Client *client, PKTBI_D6_IN *msgin)
Definition: miscmsg.cpp:455
unsigned int instance_
Definition: client.h:253
void handle_aos_commands(Client *client, PKTBI_D7 *msg)
Definition: miscmsg.cpp:529
void CustomHousesAddMulti(Core::PKTBI_D7 *msg)
void send_sysmessage(Network::Client *client, const char *text, unsigned short font, unsigned short color)
Definition: ufunc.cpp:1147
void character_race_changer_handler(Network::Client *client, Core::PKTBI_BF *msg)
Definition: uomod2.cpp:2565
static void itemizeclientversion(const std::string &ver, VersionDetailStruct &detail)
Definition: client.cpp:299
PKTBI_B8_IN_REQUEST profile_request
Definition: pktboth.h:477