49 #include "../clib/clib_endian.h" 50 #include "../clib/logfacility.h" 51 #include "../clib/passert.h" 52 #include "../plib/mapcell.h" 53 #include "../plib/systemstate.h" 90 using namespace Network;
92 using namespace Items;
155 msg->WriteFlipped<
u16>( chr->
color );
157 msg->WriteFlipped<
u16>( chr->
x );
158 msg->WriteFlipped<
u16>( chr->
y );
160 msg->Write<
u8>( 0x80u | chr->
facing );
161 msg->Write<
s8>( chr->
z );
177 msgmove.
Send( client );
201 chr->
serial_ext, Network::HealthBarStatusUpdate::Color::YELLOW, chr->
invul() );
209 owncreate->offset += 2;
212 owncreate->WriteFlipped<
u16>( chr->
x );
213 owncreate->WriteFlipped<
u16>( chr->
y );
214 owncreate->Write<
s8>( chr->
z );
215 owncreate->Write<
u8>( chr->
facing );
216 owncreate->WriteFlipped<
u16>( chr->
color );
223 if ( item ==
nullptr )
234 owncreate->WriteFlipped<
u16>( item->
graphic );
235 owncreate->Write<
u8>(
static_cast<u8>( layer ) );
236 owncreate->WriteFlipped<
u16>( item->
color );
238 else if ( item->
color )
241 owncreate->WriteFlipped<
u16>( 0x8000u | item->
graphic );
242 owncreate->Write<
u8>(
static_cast<u8>( layer ) );
243 owncreate->WriteFlipped<
u16>( item->
color );
248 owncreate->WriteFlipped<
u16>( item->
graphic );
249 owncreate->Write<
u8>(
static_cast<u8>( layer ) );
252 owncreate->offset += 4;
253 u16 len = owncreate->offset;
254 owncreate->offset = 1;
255 owncreate->WriteFlipped<
u16>( len );
257 owncreate.
Send( client, len );
267 if ( item ==
nullptr )
302 if ( item ==
nullptr )
314 owncreate->
Write<
u8>(
static_cast<u16>( layer ) );
317 else if ( item->
color )
321 owncreate->
Write<
u8>(
static_cast<u8>( layer ) );
328 owncreate->
Write<
u8>(
static_cast<u8>( layer ) );
346 if ( item ==
nullptr )
357 if ( !client->
ready )
361 if ( client->
chr == chr )
364 msgremove.
Send( client );
370 if ( !client->
ready )
374 if ( client->
chr == chr )
383 if ( zonechr == chr )
393 if ( zonechr == chr )
411 if ( !client->
ready )
417 msgremove.
Send( client );
422 if ( client ==
nullptr || !client->
ready )
425 msgremove.
Send( client );
437 if ( !client->
ready )
445 return ( ( c1->
realm == c2->
realm ) && ( abs( c1->
x - c2->
x ) <= maxdist ) &&
446 ( abs( c1->
y - c2->
y ) <= maxdist ) );
451 return ( ( abs( c1->
x - x ) <= maxdist ) && ( abs( c1->
y - y ) <= maxdist ) );
481 unsigned short pol_distance(
unsigned short x1,
unsigned short y1,
unsigned short x2,
484 int xd = abs( x1 - x2 );
485 int yd = abs( y1 - y2 );
487 return static_cast<unsigned short>( xd );
489 return static_cast<unsigned short>( yd );
496 int xd = abs( c1->
x - obj->
x );
497 int yd = abs( c1->
y - obj->
y );
499 return static_cast<unsigned short>( xd );
501 return static_cast<unsigned short>( yd );
517 bool inrange(
unsigned short x1,
unsigned short y1,
unsigned short x2,
unsigned short y2 )
522 bool multi_inrange(
unsigned short x1,
unsigned short y1,
unsigned short x2,
unsigned short y2 )
550 if ( !client2->ready )
554 if ( client2->chr->mightsee( item->
container ) )
558 pkt_rev.
Send( client2 );
594 msg->Write<
u8>( item2->
layer );
599 u16 len = msg->offset;
601 msg->WriteFlipped<
u16>( len );
603 msg.
Send( client, len );
628 msg->WriteFlipped<
u16>( item->
x );
629 msg->WriteFlipped<
u16>( item->
y );
633 msg->WriteFlipped<
u16>( item->
color );
637 u16 len = msg->offset;
639 msg->WriteFlipped<
u16>( len );
640 msg->WriteFlipped<
u16>( count );
641 msg.
Send( client, len );
723 pkt.updateFlags( flags );
724 pkt.Send( zonechr->
client );
732 pkt_rev.Send( zonechr->
client );
752 POLLOG_ERROR.Format(
"Ack! update_item_to_inrange: character 0x{:X} doesn't exist!\n" )
779 msg->Write<
u8>( type );
780 msg->Write<
u8>( severity );
781 msg->Write<
u8>( aux );
789 if ( !client->
ready )
806 if ( client->
chr == chr )
821 msg->Write<
u8>( reason );
833 msg->WriteFlipped<
u16>( item->
color );
850 msg->WriteFlipped<
u16>( item->
color );
859 if ( chr !=
nullptr )
869 msg->WriteFlipped<
u16>( item->
color );
883 if ( item->
serial == serial )
898 if ( serial == cont->
serial )
919 if ( worn_cont !=
nullptr )
930 for (
unsigned short wx = wxL; wx <=
wxH; ++wx )
932 for (
unsigned short wy = wyL; wy <=
wyH; ++wy )
939 if ( serial == cont->
serial )
952 return static_cast<UContainer*>( item );
961 if ( backpack !=
nullptr && backpack->
serial == serial )
973 if ( item !=
nullptr )
976 if ( backpack !=
nullptr )
978 item = backpack->
find( serial );
979 if ( item !=
nullptr )
987 for (
unsigned short wx = wxL; wx <=
wxH; ++wx )
989 for (
unsigned short wy = wyL; wy <=
wyH; ++wy )
995 if ( _item->serial == serial )
1002 item = ( (
const UContainer*)_item )->find( serial );
1003 if ( item !=
nullptr )
1010 if ( additlegal !=
nullptr )
1043 msg.
movingEffect( src, dst, effect, speed, loop, explode );
1049 if ( !
inrange( zonechr, src ) )
1050 msg.
Send( zonechr->client );
1058 msg.
movingEffect( xs, ys, zs, xd, yd, zd, effect, speed, loop, explode );
1064 if ( !
inrange( zonechr, xs, ys ) )
1099 msg.
stationaryEffect( x, y, z, effect, speed, duration, hue, render, effect3d );
1108 msg.
followEffect( center, effect, speed, duration, hue, render, layer, effect3d );
1114 u8 duration,
u32 hue,
u32 render,
u8 direction,
u8 explode,
1115 u16 effect3d,
u16 effect3dexplode,
u16 effect3dsound )
1118 msg.
movingEffect( src, dst, effect, speed, duration, hue, render, direction, explode, effect3d,
1119 effect3dexplode, effect3dsound );
1124 if ( !
inrange( zonechr, src ) )
1131 u8 explode,
u16 effect3d,
u16 effect3dexplode,
u16 effect3dsound )
1134 msg.
movingEffect( xs, ys, zs, xd, yd, zd, effect, speed, duration, hue, render, direction,
1135 explode, effect3d, effect3dexplode, effect3dsound );
1141 if ( !
inrange( zonechr, xs, ys ) )
1148 unsigned short color )
1151 u16 textlen =
static_cast<u16>( strlen( text ) + 1 );
1156 msg->Write<
u32>( 0x01010101u );
1157 msg->Write<
u16>( 0x0101u );
1159 msg->WriteFlipped<
u16>( color );
1160 msg->WriteFlipped<
u16>( font );
1161 msg->Write(
"System", 30 );
1162 msg->Write( text, textlen );
1163 u16 len = msg->offset;
1165 msg->WriteFlipped<
u16>( len );
1166 msg.
Send( client, len );
1171 unsigned short font,
unsigned short color )
1173 unsigned textlen = 0;
1175 while ( wtext[textlen] != L
'\0' )
1182 msg->Write<
u32>( 0x01010101u );
1183 msg->Write<
u16>( 0x0101u );
1185 msg->WriteFlipped<
u16>( color );
1186 msg->WriteFlipped<
u16>( font );
1187 msg->Write( lang, 4 );
1188 msg->Write(
"System", 30 );
1189 msg->WriteFlipped( &wtext[0], static_cast<u16>( textlen ) );
1190 u16 len = msg->offset;
1192 msg->WriteFlipped<
u16>( len );
1193 msg.
Send( client, len );
1197 unsigned short color )
1203 unsigned short font,
unsigned short color )
1207 for (
size_t i = 0; i < wtext.length(); i++ )
1208 uctext[i] = static_cast<u16>( wtext[i] );
1209 uctext[wtext.length()] = 0x00;
1213 void broadcast(
const char* text,
unsigned short font,
unsigned short color,
1214 unsigned short requiredCmdLevel )
1218 if ( !client->ready || client->chr->cmdlevel_ < requiredCmdLevel )
1225 void broadcast(
const u16* wtext,
const char lang[4],
unsigned short font,
unsigned short color,
1226 unsigned short requiredCmdLevel )
1230 if ( !client->ready || client->chr->cmdlevel_ < requiredCmdLevel )
1240 u16 textlen =
static_cast<u16>( str.length() + 1 );
1246 msg->Write<
u16>( 0x0101u );
1249 msg->WriteFlipped<
u16>( 3u );
1250 msg->Write( str.c_str(), 30 );
1251 msg->Write( str.c_str(), textlen );
1252 u16 len = msg->offset;
1254 msg->WriteFlipped<
u16>( len );
1255 msg.
Send( client, len );
1258 bool say_above(
const UObject* obj,
const char* text,
unsigned short font,
unsigned short color,
1259 unsigned int journal_print )
1262 u16 textlen =
static_cast<u16>( strlen( text ) + 1 );
1270 msg->WriteFlipped<
u16>( color );
1271 msg->WriteFlipped<
u16>( font );
1272 switch ( journal_print )
1275 msg->Write(
"You see", 30 );
1282 msg->Write( text, textlen );
1283 u16 len = msg->offset;
1285 msg->WriteFlipped<
u16>( len );
1292 unsigned short color,
unsigned int journal_print )
1294 unsigned textlen = 0;
1296 while ( wtext[textlen] != L
'\0' )
1306 msg->WriteFlipped<
u16>( color );
1307 msg->WriteFlipped<
u16>( font );
1308 msg->Write( lang, 4 );
1309 switch ( journal_print )
1312 msg->Write(
"You see", 30 );
1319 msg->WriteFlipped( &wtext[0], static_cast<u16>( textlen ) );
1320 u16 len = msg->offset;
1322 msg->WriteFlipped<
u16>( len );
1329 unsigned short color,
unsigned int journal_print )
1331 if ( chr->
client ==
nullptr )
1334 u16 textlen =
static_cast<u16>( strlen( text ) + 1 );
1342 msg->WriteFlipped<
u16>( color );
1343 msg->WriteFlipped<
u16>( font );
1344 switch ( journal_print )
1347 msg->Write(
"You see", 30 );
1354 msg->Write( text, textlen );
1355 u16 len = msg->offset;
1357 msg->WriteFlipped<
u16>( len );
1363 unsigned short font,
unsigned short color,
unsigned int journal_print )
1365 unsigned textlen = 0;
1367 while ( wtext[textlen] != L
'\0' )
1371 if ( chr->
client ==
nullptr )
1379 msg->WriteFlipped<
u16>( color );
1380 msg->WriteFlipped<
u16>( font );
1381 msg->Write( lang, 4 );
1382 switch ( journal_print )
1385 msg->Write(
"You see", 30 );
1392 msg->WriteFlipped( &wtext[0], static_cast<u16>( textlen ) );
1393 u16 len = msg->offset;
1395 msg->WriteFlipped<
u16>( len );
1401 unsigned short color )
1403 if ( chr->
client ==
nullptr )
1406 u16 textlen =
static_cast<u16>( strlen( text ) + 1 );
1414 msg->WriteFlipped<
u16>( color );
1415 msg->WriteFlipped<
u16>( 3u );
1417 msg->Write( text, textlen );
1418 u16 len = msg->offset;
1420 msg->WriteFlipped<
u16>( len );
1435 msg->WriteFlipped<
u16>( 0x03B2u );
1436 msg->WriteFlipped<
u16>( 3u );
1437 msg->Write(
"System", 30 );
1438 msg->Write( item->
description().c_str(), textlen );
1439 u16 len = msg->offset;
1441 msg->WriteFlipped<
u16>( len );
1442 msg.
Send( client, len );
1457 msg->WriteFlipped<
u16>(
static_cast<u16>( v ) );
1462 msg->WriteFlipped<
u16>(
static_cast<u16>( v ) );
1483 msg->WriteFlipped<
u16>(
static_cast<u16>( v ) );
1488 msg->WriteFlipped<
u16>(
static_cast<u16>( v ) );
1505 if ( zonechr == chr_died )
1522 if ( zonechr == center )
1532 if ( owner !=
nullptr )
1542 POLLOG_ERROR.Format(
"destroy {}: {}, orphan! (old serial: 0x{:X})\n" )
1559 if ( !item->has_gotten_by() )
1574 item->
realm = realm;
1580 if ( item->
realm == realm )
1617 if ( !inrange( zonechr, item ) )
1618 msgremove.Send( zonechr->client );
1627 void move_item(
Item* item,
unsigned short newx,
unsigned short newy,
signed char newz,
1647 if ( !
inrange( zonechr, item ) )
1648 msgremove.Send( zonechr->
client );
1655 multi->
z, multi->
color );
1662 multi->
z, multi->
color );
1670 if ( !client->
ready )
1685 if ( !client->
ready )
1688 auto light_until = client->
chr->lightoverride_until();
1691 client->
chr->lightoverride_until( 0 );
1692 client->
chr->lightoverride( -1 );
1696 !client->
chr->has_lightoverride() )
1700 if ( client->
chr->has_lightoverride() )
1701 newlightlevel = client->
chr->lightoverride();
1707 if ( light_region !=
nullptr )
1717 if ( newlightlevel != lightlevel )
1720 msg->Write<
u8>(
static_cast<u8>( newlightlevel ) );
1735 if ( !client->
ready )
1748 unsigned aux,
int lightoverride )
1750 weatherregion->
weathertype =
static_cast<unsigned char>( type );
1751 weatherregion->
severity =
static_cast<unsigned char>( severity );
1752 weatherregion->
aux =
static_cast<unsigned char>( aux );
1765 if ( !client->ready )
1768 client->chr->check_weather_region_change();
1769 client->chr->check_light_region_change();
1787 unsigned short amount,
const std::string suffix )
1794 sprintf( s,
"%hu ", amount );
1812 const char* src = descdef.c_str();
1813 int singular = ( amount == 1 );
1814 int plural_handled = 0;
1817 while (
'\0' != ( ch = *src ) )
1831 else if ( phase == 1 )
1835 else if ( ch ==
'/' )
1837 else if ( !singular )
1840 else if ( phase == 2 )
1844 else if ( singular )
1858 if ( !singular && !plural_handled )
1861 if ( !suffix.empty() )
1862 desc +=
" " + suffix;
1870 msg->WriteFlipped<
u16>( midi );
1888 if ( client->
ready &&
1898 if ( zonechr == chr )
1909 if ( zonechr == chr )
1919 if ( chr_owner !=
nullptr && chr_owner->
client !=
nullptr )
1930 if ( chr_owner !=
nullptr )
1944 return ( c->
chr !=
nullptr );
1959 clientflag = 0x7387DF;
1965 clientflag = 0x387DF;
1971 clientflag = 0x187DF;
1976 clientflag = 0x86DB;
1981 clientflag = 0x80DB;
1985 clientflag = 0x805B;
1989 clientflag = 0x801B;
1993 clientflag = 0x0002;
1997 clientflag = 0x0001;
2009 clientflag |= 0x1000;
2010 clientflag &= ~0x0004;
2014 clientflag |= 0x0020;
2015 clientflag &= ~0x0004;
2023 clientflag |= 0x2000;
2028 msg->WriteFlipped<
u32>( clientflag & 0xFFFFFFFFu );
2030 msg->WriteFlipped<
u16>( clientflag & 0xFFFFu );
2037 msg->WriteFlipped<
u16>( 6u );
2055 std::map<u32, mapdiff> mapinfo;
2058 mapdiff md = {( *it )->getNumStaticPatches(), ( *it )->getNumMapPatches()};
2059 mapinfo.insert( std::pair<u32, mapdiff>( ( *it )->getUOMapID(), md ) );
2062 u32 max_map_id = mapinfo.rbegin()->first;
2066 msg->WriteFlipped<
u32>( max_map_id + 1 );
2067 for (
u32 i = 0; i <= max_map_id; i++ )
2069 auto it = mapinfo.find( i );
2070 if ( it == mapinfo.end() )
2073 msg->WriteFlipped<
u32>( 0u );
2074 msg->WriteFlipped<
u32>( 0u );
2078 msg->WriteFlipped<
u32>( mapinfo.at( i ).static_patches );
2079 msg->WriteFlipped<
u32>( mapinfo.at( i ).map_patches );
2082 u16 len = msg->offset;
2084 msg->WriteFlipped<
u16>( len );
2085 msg.
Send( client, len );
2101 !client->
chr->has_lightoverride() )
2112 msg->WriteFlipped<
u16>( client->
chr->
x );
2113 msg->WriteFlipped<
u16>( client->
chr->
y );
2114 msg->WriteFlipped<
u16>(
static_cast<u16>( client->
chr->
z ) );
2133 if ( attacker->
client !=
nullptr )
2135 if ( ( defender->
client !=
nullptr ) && ( attacker != defender ) )
2144 size_t newulen = 0, newelen = 0, titlelen;
2146 while ( utext[newulen] != L
'\0' )
2149 while ( etext[newelen] != L
'\0' )
2152 titlelen = strlen( title );
2166 msg->Write( title, static_cast<u16>( titlelen + 1 ) );
2167 msg->WriteFlipped( utext, static_cast<u16>( newulen ) );
2168 msg->WriteFlipped( etext, static_cast<u16>( newelen ) );
2169 u16 len = msg->offset;
2171 msg->WriteFlipped<
u16>( len );
2189 u32 cl_descr, std::vector<u32> arguments )
2194 msg->WriteFlipped<
u16>( icon );
2195 msg->Write<
u8>( 0u );
2196 msg->Write<
u8>( show ? 1u : 0u );
2199 msg->Write<
u32>( 0u );
2200 msg->WriteFlipped<
u16>( icon );
2201 msg->Write<
u8>( 0u );
2202 msg->Write<
u8>( 1u );
2203 msg->Write<
u32>( 0u );
2204 msg->WriteFlipped<
u16>( duration );
2205 msg->Write<
u16>( 0u );
2206 msg->Write<
u8>( 0u );
2207 msg->WriteFlipped<
u32>( cl_name );
2208 msg->WriteFlipped<
u32>( cl_descr );
2209 msg->Write<
u32>( 0u );
2210 msg->Write<
u8>( 0u );
2211 msg->Write<
u8>( 1u );
2212 msg->Write<
u16>( 20u );
2213 msg->Write<
u16>( 20u );
2214 for (
auto it = arguments.begin(); it != arguments.end(); ++it )
2215 msg->Write<
u16>( *it );
2216 msg->Write<
u16>( 0u );
2219 u16 len = msg->offset;
2221 msg->WriteFlipped<
u16>( len );
void play_moving_effect2(u16 xs, u16 ys, s8 zs, u16 xd, u16 yd, s8 zd, u16 effect, u8 speed, u8 loop, u8 explode, Realms::Realm *realm)
VersionDetailStruct getversiondetail() const
std::string format_description(unsigned int polflags, const std::string &descdef, unsigned short amount, const std::string suffix)
void register_with_supporting_multi(Item *item)
void check_weather_region_change(bool force=false)
const int JOURNAL_PRINT_NAME
void movingEffect(const Core::UObject *src, const Core::UObject *dst, u16 effect, u8 speed, u8 duration, u32 hue, u32 render, u8 direction, u8 explode, u16 effect3d, u16 effect3dexplode, u16 effect3dsound)
virtual std::string description() const POL_OVERRIDE
void broadcast(const char *text, unsigned short font, unsigned short color, unsigned short requiredCmdLevel)
void login_complete(Client *c)
UContainer * find_container(u32 serial) const
void subamount(u16 amount_subtract)
void send_invulhealthbar(Client *client, const Character *chr)
virtual void Send(Client *client) POL_OVERRIDE
void send_multi(Network::Client *client, const Multi::UMulti *multi)
Character * chr_from_wornitems(UContainer *wornitems)
#define ITEM_FLAG_FORCE_MOVABLE
void send_remove_character_to_nearby(const Character *chr)
std::enable_if< std::is_same< T, N >::value, void >::type Write(N x)
u8 get_flag1(Network::Client *other_client) const
void SetCurrentCharSerialNumber(u32 serial)
unsigned short default_light_level
void send_full_corpse(Client *client, const Item *item)
unsigned char weathertype
u32 GetNextUnusedItemSerial()
void send_nametext(Client *client, const Character *chr, const std::string &str)
bool check_unequip_script()
virtual void Send(Client *client) POL_OVERRIDE
void send_mana_level(Client *client)
#define RANGE_VISUAL_LARGE_BUILDINGS
bool VALID_LIGHTLEVEL(int lightlevel)
virtual Mobile::Character * get_chr_owner()
void update_all_weatherregions()
Items::Item * GetItemOnLayer(unsigned idx) const
bool check_unequiptest_scripts(Mobile::Character *chr)
u32 GetNextSerialNumber(void)
unsigned short whisper_range
void transmit_to_inrange(const UObject *center, const void *msg, unsigned msglen)
unsigned getUOMapID() const
unsigned short yell_range
#define PKTOUT_54_FLAG_SINGLEPLAY
Items::Item * find(u32 serial) const
bool is_visible_to_me(const Character *chr) const
void SetRegionWeatherLevel(WeatherRegion *weatherregion, unsigned type, unsigned severity, unsigned aux, int lightoverride)
bool inrange(const UObject *c1, unsigned short x, unsigned short y)
void lightningBold(const Core::UObject *center)
bool private_say_above_ex(Mobile::Character *chr, const UObject *obj, const char *text, unsigned short color)
Character * UpdateCharacterWeight(Item *item)
void send_new_subserver(Client *client)
Item * find_legal_item(const Character *chr, u32 serial, bool *additlegal, bool *isRemoteContainer)
Core::WeatherRegion * weather_region
virtual void Send(Client *client) POL_OVERRIDE
void play_moving_effect2_ex(u16 xs, u16 ys, s8 zs, u16 xd, u16 yd, s8 zd, Realms::Realm *realm, u16 effect, u8 speed, u8 duration, u32 hue, u32 render, u8 direction, u8 explode, u16 effect3d, u16 effect3dexplode, u16 effect3dsound)
void send_light(Client *client, int lightlevel)
void send_multi_to_inrange(const Multi::UMulti *multi)
void send_create_mobile_if_nearby_cansee(Client *client, const Character *chr)
virtual void register_object(UObject *obj)
int lightlevel(unsigned short x, unsigned short y)
static void InRange(u16 x, u16 y, const Realms::Realm *realm, unsigned range, F &&f)
void send_remove_object_if_inrange(Client *client, const Item *item)
virtual void Send(Client *client) POL_OVERRIDE
virtual T * getregion(xcoord x, ycoord y, Realms::Realm *realm)
virtual unsigned short name_color(const Character *seen_by) const
void send_put_in_container_to_inrange(const Item *item)
void followEffect(const Core::UObject *center, u16 effect, u8 speed, u8 duration, u32 hue, u32 render, u8 layer, u16 effect3d)
void play_moving_effect(const UObject *src, const UObject *dst, u16 effect, u8 speed, u8 loop, u8 explode)
bool can_seeinvisitems() const
void remove_item_from_world(Items::Item *item)
virtual void Send(Client *client) POL_OVERRIDE
void send_item_to_inrange(const Item *item)
virtual u16 get_senditem_amount() const
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
virtual const char * classname() const POL_OVERRIDE
void send_item_move_failure(Network::Client *client, u8 reason)
bool private_say_above(Character *chr, const UObject *obj, const char *text, unsigned short font, unsigned short color, unsigned int journal_print)
void zone_convert_clip(int x, int y, const Realms::Realm *realm, unsigned short *wx, unsigned short *wy)
void send_remove_character(Client *client, const Character *chr)
void send_remove_character_to_nearby_cantsee(const Character *chr)
void send_corpse(Client *client, const Item *item)
void stationaryEffect(u16 x, u16 y, s8 z, u16 effect, u8 speed, u8 duration, u32 hue, u32 render, u16 effect3d)
void play_stationary_effect_ex(u16 x, u16 y, s8 z, Realms::Realm *realm, u16 effect, u8 speed, u8 duration, u32 hue, u32 render, u16 effect3d)
virtual void Send(Client *client) POL_OVERRIDE
void send_move_mobile_to_nearby_cansee(const Character *chr)
void send_poisonhealthbar(Client *client, const Character *chr)
bool in_whisper_range(const Character *c1, const Character *c2)
std::unique_ptr< Network::ClientTransmit > clientTransmit
void send_move(Client *client, const Character *chr)
void send_midi(Client *client, u16 midi)
std::enable_if< std::is_same< T, N >::value, void >::type WriteFlipped(N x)
bool in_say_range(const Character *c1, const Character *c2)
void destroy_item(Item *item)
void send_goxyz(Client *client, const Character *chr)
void play_object_centered_effect_ex(const UObject *center, u16 effect, u8 speed, u8 duration, u32 hue, u32 render, u8 layer, u16 effect3d)
std::vector< Realms::Realm * > Realms
u32 GetNewItemSerialNumber(void)
NetworkManager networkManager
void send_damage(Character *attacker, Character *defender, u16 damage)
bool is_a_parent(const Item *item, u32 serial)
unsigned short height() const
void send_feature_enable(Client *client)
void send_remove_object(Client *client, const UObject *object)
void Send(Client *client, int len=-1) const
u32 UseCharSerialNumber(u32 serial)
void update_wornitem_to_inrange(const Character *chr, const Item *item)
void play_sound_effect(const UObject *center, u16 effect)
void play_sound_effect_xyz(u16 cx, u16 cy, s8 cz, u16 effect, Realms::Realm *realm)
const unsigned POLCLASS_CONTAINER
u32 UseItemSerialNumber(u32 serial)
UContainer * find_legal_container(const Character *chr, u32 serial)
void setrealm(Item *item, void *arg)
void send_death_message(Character *chr_died, Item *corpse)
virtual unsigned char hilite_color_idx(const Character *seen_by) const
void send_fight_occuring(Client *client, Character *opponent)
void send_corpse_equip_inrange(const Item *item)
virtual void Send(Client *client) POL_OVERRIDE
virtual UObject * toplevel_owner()
Core::UContainer * container
void stationaryEffect(u16 xs, u16 ys, s8 zs, u16 effect, u8 speed, u8 loop, u8 explode)
unsigned short speech_range
gameclock_t read_gameclock()
Reads the current value of the game clock.
void send_remove_object_to_inrange(const UObject *centerObject)
const int JOURNAL_PRINT_YOU_SEE
virtual void Send(Client *client) POL_OVERRIDE
void send_full_statmsg(Network::Client *client, Mobile::Character *chr)
Mobile::Character * find_character(u32 serial)
virtual void Send(Client *client) POL_OVERRIDE
void send_realm_change(Client *client, Realms::Realm *realm)
void move_item(Item *item, UFACING facing)
void send_stamina_level(Client *client)
void send_wornitem(Client *client, const Character *chr, const Item *item)
SettingsManager settingsManager
static void InVisualRange(const UObject *obj, F &&f)
virtual void Send(Client *client) POL_OVERRIDE
void SetRegionLightLevel(LightRegion *lightregion, int lightlevel)
virtual void Send(Client *client) POL_OVERRIDE
u32 GetCurrentItemSerialNumber(void)
StateManager stateManager
void play_object_centered_effect(const UObject *center, u16 effect, u8 speed, u8 loop)
void send_item(Client *client, const Item *item)
void send_weather(Client *client, u8 type, u8 severity, u8 aux)
void send_corpse_equip(Client *client, const UCorpse *corpse)
void build_owncreate(const Character *chr, PktOut_78 *owncreate)
void movingEffect(const Core::UObject *src, const Core::UObject *dst, u16 effect, u8 speed, u8 loop, u8 explode)
bool IsCharacter(u32 serial)
bool in_yell_range(const Character *c1, const Character *c2)
void send_buff_message(Character *chr, u16 icon, bool show, u16 duration, u32 cl_name, u32 cl_descr, std::vector< u32 > arguments)
void send_corpse_contents(Client *client, const UCorpse *corpse)
unsigned char support_faces
void subtract_amount_from_item(Item *item, unsigned short amount)
Core::UContainer * backpack() const
void restart_decay_timer()
void update_weatherregion(Client *client, WeatherRegion *weatherregion)
unsigned short uo_expansion_flag() const
void setrealmif(Item *item, void *arg)
bool is_equipped(const Items::Item *item) const
void play_sound_effect_private(const UObject *center, u16 effect, Character *forchr)
unsigned short pol_distance(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2)
void send_container_contents(Network::Client *client, const UContainer &cont)
u32 GetCurrentCharSerialNumber(void)
Items::Item * find_wornitem(u32 find_serial) const
ObjectStorageManager objStorageManager
unsigned short width() const
void SetCurrentItemSerialNumber(u32 serial)
Items::Item * search_remote_containers(u32 find_serial, bool *isRemoteContainer) const
bool isa(UOBJ_CLASS uobj_class) const
const VitalValue & vital(unsigned vitalid) const
void send_wornitem_to_inrange(const Character *chr, const Item *item)
Items::Item * wornitem(int layer) const
void sendCharProfile(Character *chr, Character *of_who, const char *title, const u16 *utext, const u16 *etext)
void UpdateCharacterOnDestroyItem(Item *item)
u32 GetNextUnusedCharSerial()
bool can_move(const Items::Item *item) const
void update_lightregion(Client *client, LightRegion *)
void send_client_char_data(Mobile::Character *chr, Network::Client *client)
void send_char_data(Client *client, Character *chr)
const MultiDef & multidef() const
void send_remove_character_to_nearby_cansee(const Character *chr)
void send_season_info(Client *client)
bool clientHasCharacter(Client *c)
#define passert_always(exp)
void send_object_cache_to_inrange(const UObject *obj)
bool inrangex(const Character *c1, const Character *c2, int maxdist)
void send_object_cache(Network::Client *client, const UObject *obj)
virtual std::string description() const
Multi::UMulti * find_supporting_multi(unsigned short x, unsigned short y, short z) const
void play_stationary_effect(u16 x, u16 y, s8 z, u16 effect, u8 speed, u8 loop, u8 explode, Realms::Realm *realm)
bool use_tile_flag_prefix
void send_owncreate(Client *client, const Character *chr)
Mobile::Character * GetCharacterOwner()
void send_create_mobile_to_nearby_cansee(const Character *chr)
void transmit_to_others_inrange(Character *center, const void *msg, unsigned msglen)
void MoveItemWorldPosition(unsigned short oldx, unsigned short oldy, Items::Item *item, Realms::Realm *oldrealm)
void play_moving_effect_ex(const UObject *src, const UObject *dst, u16 effect, u8 speed, u8 duration, u32 hue, u32 render, u8 direction, u8 explode, u16 effect3d, u16 effect3dexplode, u16 effect3dsound)
void followEffect(const Core::UObject *center, u16 effect, u8 speed, u8 loop)
bool say_above(const UObject *obj, const char *text, unsigned short font, unsigned short color, unsigned int journal_print)
void play_lightning_bolt_effect(const UObject *center)
void send_map_difs(Client *client)
Sends number of maps used and number of map/static patches for each map.
bool can_see_on_corpse(const Client *client, const Item *item)
void send_sysmessage(Network::Client *client, const char *text, unsigned short font, unsigned short color)
void check_light_region_change()
void send_objdesc(Client *client, Item *item)
void send_put_in_container(Client *client, const Item *item)
void update_item_to_inrange(const Item *item)
UoClientGeneral uoclient_general
bool multi_inrange(const Mobile::Character *c1, const Multi::UMulti *obj)