82 #include "pol_global_config.h" 89 #include "../../clib/cfgelem.h" 90 #include "../../clib/cfgfile.h" 91 #include "../../clib/clib.h" 92 #include "../../clib/clib_endian.h" 93 #include "../../clib/esignal.h" 94 #include "../../clib/fileutil.h" 95 #include "../../clib/logfacility.h" 96 #include "../../clib/passert.h" 97 #include "../../clib/random.h" 98 #include "../../clib/stlutil.h" 99 #include "../../clib/streamsaver.h" 100 #include "../../plib/mapcell.h" 101 #include "../../plib/systemstate.h" 102 #include "../accounts/account.h" 103 #include "../accounts/accounts.h" 104 #include "../checkpnt.h" 105 #include "../clidata.h" 106 #include "../cmbtcfg.h" 107 #include "../cmdlevel.h" 108 #include "../containr.h" 110 #include "../extobj.h" 111 #include "../fnsearch.h" 112 #include "../globals/settings.h" 113 #include "../globals/state.h" 114 #include "../globals/uvars.h" 115 #include "../guardrgn.h" 116 #include "../guilds.h" 117 #include "../item/armor.h" 118 #include "../item/item.h" 119 #include "../item/itemdesc.h" 120 #include "../item/weapon.h" 121 #include "../item/wepntmpl.h" 122 #include "../layers.h" 123 #include "../mdelta.h" 124 #include "../miscrgn.h" 125 #include "../mkscrobj.h" 126 #include "../module/osmod.h" 127 #include "../module/uomod.h" 128 #include "../movecost.h" 129 #include "../multi/customhouses.h" 130 #include "../multi/house.h" 131 #include "../multi/multi.h" 132 #include "../multi/multidef.h" 133 #include "../musicrgn.h" 134 #include "../network/cgdata.h" 135 #include "../network/client.h" 136 #include "../network/cliface.h" 137 #include "../network/packetdefs.h" 138 #include "../network/packethelper.h" 139 #include "../network/packets.h" 140 #include "../objtype.h" 141 #include "../party.h" 142 #include "../pktdef.h" 143 #include "../polclass.h" 144 #include "../polsig.h" 145 #include "../polvar.h" 146 #include "../profile.h" 147 #include "../realms/WorldChangeReasons.h" 148 #include "../realms/realm.h" 149 #include "../schedule.h" 150 #include "../scrdef.h" 151 #include "../scrsched.h" 152 #include "../scrstore.h" 154 #include "../skilladv.h" 155 #include "../spelbook.h" 156 #include "../statmsg.h" 157 #include "../syshook.h" 158 #include "../ufunc.h" 159 #include "../ufuncstd.h" 160 #include "../uobjcnt.h" 161 #include "../uoexec.h" 162 #include "../uoscrobj.h" 163 #include "../uworld.h" 164 #include "../vital.h" 171 #pragma warning( disable : 4505 ) // unreferenced local function has been removed 192 ERROR_PRINT <<
"Couldn't find an Armor Zone in armrzone.cfg for layer " << layer <<
"\n";
193 throw std::runtime_error(
"Configuration file error" );
210 ERROR_PRINT <<
"Couldn't find an armrzone.cfg config elem named '" << zname <<
"'\n";
212 throw std::runtime_error(
"Configuration file error" );
219 INFO_PRINT <<
"File config/armrzone.cfg not found, skipping.\n";
228 while ( cf.
read( elem ) )
234 unsigned short in_layer;
239 ERROR_PRINT <<
"ArmorZone " << az.
name <<
": Layer " << in_layer <<
" is out of range.\n" 242 throw std::runtime_error(
"Configuration file error" );
244 az.
layers.push_back( in_layer );
260 :
UObject( objtype, uobj_class ),
263 weapon( Core::
gamestate.wrestling_weapon ),
265 armor_( Core::
gamestate.armorzones.size() ),
268 gotten_item_source( GOTTEN_ITEM_ON_GROUND ),
269 remote_containers_(),
276 move_reason( OTHER ),
281 opponent_( nullptr ),
283 swing_timer_start_clock_( 0 ),
284 swing_task( nullptr ),
286 disable_regeneration_until( 0 ),
287 attributes( Core::
gamestate.numAttributes ),
292 criminal_until_( 0 ),
293 repsys_task_( nullptr ),
298 party_decline_timeout_( nullptr ),
301 trading_with( nullptr ),
305 on_menu_selection( nullptr ),
306 on_popup_menu_selection( nullptr ),
307 script_ex( nullptr ),
308 spell_task( nullptr ),
312 _last_textcolor( 0 ),
329 registered_house( 0 ),
357 if (
acct->get_character( i ) == this )
359 acct->clear_character( i );
471 auto item = gotten_item();
472 if ( item !=
nullptr )
474 gotten_item(
nullptr );
475 item->inuse(
false );
488 if ( multi !=
nullptr )
515 unsigned int wt = 10 +
wornitems->weight();
516 if ( has_gotten_item() )
517 wt += gotten_item()->weight();
529 return static_cast<u16>( floor( ( 40 +
strength() * 7 / 2 + carrying_capacity_mod() ) *
535 if (
acct ==
nullptr )
540 if (
acct->get_character( i ) == this )
544 POLLOG_INFO <<
"Warning: Can't find charidx for Character 0x" << fmt::hexu(
serial ) <<
"\n";
553 if (
acct !=
nullptr )
575 sw() <<
"\tGender\t" <<
static_cast<int>(
gender ) <<
pf_endl;
576 sw() <<
"\tRace\t" <<
static_cast<int>(
race ) <<
pf_endl;
579 sw() <<
"\tDead\t" <<
static_cast<int>(
dead() ) <<
pf_endl;
585 sw() <<
"\tHidden\t" <<
static_cast<int>(
hidden() ) <<
pf_endl;
588 sw() <<
"\tFrozen\t" <<
static_cast<int>(
frozen() ) <<
pf_endl;
590 s16 value = fire_resist().mod;
592 sw() <<
"\tFireResistMod\t" <<
static_cast<int>( value ) <<
pf_endl;
593 value = cold_resist().mod;
595 sw() <<
"\tColdResistMod\t" <<
static_cast<int>( value ) <<
pf_endl;
596 value = energy_resist().mod;
598 sw() <<
"\tEnergyResistMod\t" <<
static_cast<int>( value ) <<
pf_endl;
599 value = poison_resist().mod;
601 sw() <<
"\tPoisonResistMod\t" <<
static_cast<int>( value ) <<
pf_endl;
602 value = physical_resist().mod;
604 sw() <<
"\tPhysicalResistMod\t" <<
static_cast<int>( value ) <<
pf_endl;
606 value = fire_damage().mod;
608 sw() <<
"\tFireDamageMod\t" <<
static_cast<int>( value ) <<
pf_endl;
609 value = cold_damage().mod;
611 sw() <<
"\tColdDamageMod\t" <<
static_cast<int>( value ) <<
pf_endl;
612 value = energy_damage().mod;
614 sw() <<
"\tEnergyDamageMod\t" <<
static_cast<int>( value ) <<
pf_endl;
615 value = poison_damage().mod;
617 sw() <<
"\tPoisonDamageMod\t" <<
static_cast<int>( value ) <<
pf_endl;
618 value = physical_damage().mod;
620 sw() <<
"\tPhysicalDamageMod\t" <<
static_cast<int>( value ) <<
pf_endl;
622 if ( has_movement_cost() )
624 auto movecost_value = movement_cost();
626 sw() <<
"\tMovementWalkMod\t" <<
static_cast<double>( movecost_value.walk ) <<
pf_endl;
628 sw() <<
"\tMovementRunMod\t" <<
static_cast<double>( movecost_value.run ) <<
pf_endl;
630 sw() <<
"\tMovementWalkMountedMod\t" <<
static_cast<double>( movecost_value.walk_mounted )
633 sw() <<
"\tMovementRunMountedMod\t" <<
static_cast<double>( movecost_value.run_mounted )
636 if ( has_carrying_capacity_mod() )
637 sw() <<
"\tCarryingCapacityMod\t" <<
static_cast<int>( carrying_capacity_mod() ) <<
pf_endl;
644 short lock = av.
lock();
645 unsigned cap = av.
cap();
647 if ( av.
base() || lock ||
648 cap != pAttr->default_cap )
650 unsigned ones = av.
base() / 10;
651 unsigned tenths = av.
base() % 10;
652 sw() <<
"\t" << pAttr->name <<
"\t" << ones;
654 sw() <<
"." << tenths;
656 if ( cap != pAttr->default_cap )
658 unsigned cap_ones = cap / 10;
659 unsigned cap_tenths = cap % 10;
661 sw() <<
":" << cap_ones;
663 sw() <<
"." << cap_tenths;
683 if ( has_skillstatcap() )
685 auto cap_value = skillstatcap();
687 sw() <<
"\tStatcap\t" <<
static_cast<int>( cap_value.statcap ) <<
pf_endl;
689 sw() <<
"\tSkillcap\t" <<
static_cast<int>( cap_value.skillcap ) <<
pf_endl;
693 sw() <<
"\tLuck\t" <<
static_cast<int>( luck() ) <<
pf_endl;
694 if ( has_followers() )
696 auto followers_value = followers();
698 sw() <<
"\tFollowersMax\t" <<
static_cast<int>( followers_value.followers_max ) <<
pf_endl;
700 sw() <<
"\tFollowers\t" <<
static_cast<int>( followers_value.followers ) <<
pf_endl;
703 sw() <<
"\tTithing\t" <<
static_cast<int>( tithing() ) <<
pf_endl;
720 if ( has_squelched_until() )
721 sw() <<
"\tSquelchedUntil\t" << squelched_until() <<
pf_endl;
722 if ( has_deafened_until() )
723 sw() <<
"\tDeafenedUntil\t" << deafened_until() <<
pf_endl;
725 if ( has_title_prefix() )
727 if ( has_title_suffix() )
729 if ( has_title_guild() )
731 if ( has_title_race() )
744 if ( corpse_obj !=
nullptr && !corpse_obj->
orphan() )
776 const auto not_found = std::string::npos;
777 if ( str.find(
'L' ) != not_found )
779 if ( str.find(
'S' ) != not_found )
781 if ( str.find(
'A' ) != not_found )
783 if ( str.find(
'F' ) != not_found )
811 throw std::runtime_error(
"Data integrity error" );
817 std::string acctname;
826 <<
"CHARIDX of " << charindex <<
" is too high for character serial (0x" 827 << fmt::hexu(
serial ) <<
")\n";
829 throw std::runtime_error(
"Data integrity error" );
832 if ( search_acct ==
nullptr )
835 <<
"Account '" << acctname <<
"' doesn't exist.\n";
836 throw std::runtime_error(
"Data integrity error" );
840 ERROR_PRINT <<
"Account " << acctname <<
" has two characters with CHARIDX of " << charindex
842 throw std::runtime_error(
"Data integrity error" );
846 acct->set_character( charindex,
this );
859 throw std::runtime_error(
"Data integrity error" );
865 std::string cmdaccstr = elem.
remove_string(
"CMDLEVEL",
"player" );
867 if ( cmdlevel_search ==
nullptr )
868 elem.
throw_error(
"Didn't understand cmdlevel of '" + cmdaccstr +
"'" );
892 if ( mod_value != 0 )
893 fire_resist( fire_resist().setAsMod( mod_value ) );
894 mod_value =
static_cast<s16>( elem.
remove_int(
"COLDRESISTMOD", 0 ) );
895 if ( mod_value != 0 )
896 cold_resist( cold_resist().setAsMod( mod_value ) );
897 mod_value =
static_cast<s16>( elem.
remove_int(
"ENERGYRESISTMOD", 0 ) );
898 if ( mod_value != 0 )
899 energy_resist( energy_resist().setAsMod( mod_value ) );
900 mod_value =
static_cast<s16>( elem.
remove_int(
"POISONRESISTMOD", 0 ) );
901 if ( mod_value != 0 )
902 poison_resist( poison_resist().setAsMod( mod_value ) );
903 mod_value =
static_cast<s16>( elem.
remove_int(
"PHYSICALRESISTMOD", 0 ) );
904 if ( mod_value != 0 )
905 physical_resist( physical_resist().setAsMod( mod_value ) );
907 mod_value =
static_cast<s16>( elem.
remove_int(
"FIREDAMAGEMOD", 0 ) );
908 if ( mod_value != 0 )
909 fire_damage( fire_damage().setAsMod( mod_value ) );
910 mod_value =
static_cast<s16>( elem.
remove_int(
"COLDDAMAGEMOD", 0 ) );
911 if ( mod_value != 0 )
912 cold_damage( cold_damage().setAsMod( mod_value ) );
913 mod_value =
static_cast<s16>( elem.
remove_int(
"ENERGYDAMAGEMOD", 0 ) );
914 if ( mod_value != 0 )
915 energy_damage( energy_damage().setAsMod( mod_value ) );
916 mod_value =
static_cast<s16>( elem.
remove_int(
"POISONDAMAGEMOD", 0 ) );
917 if ( mod_value != 0 )
918 poison_damage( poison_damage().setAsMod( mod_value ) );
919 mod_value =
static_cast<s16>( elem.
remove_int(
"PHYSICALDAMAGEMOD", 0 ) );
920 if ( mod_value != 0 )
921 physical_damage( physical_damage().setAsMod( mod_value ) );
929 carrying_capacity_mod( static_cast<s16>( elem.
remove_int(
"CarryingCapacityMod", 0 ) ) );
934 squelched_until( elem.
remove_ulong(
"SquelchedUntil", 0 ) );
935 deafened_until( elem.
remove_ulong(
"DeafenedUntil", 0 ) );
942 unsigned int tmp_guildid;
966 luck( static_cast<s16>( elem.
remove_int(
"LUCK", 0 ) ) );
987 for (
unsigned i = 0; i < pAttr->aliases.size(); ++i )
990 if ( elem.
remove_prop( pAttr->aliases[i].c_str(), &temp ) )
994 unsigned int cap = pAttr->default_cap;
995 unsigned char lock = 0;
999 unsigned int raw = strtoul( temp.c_str(),
nullptr, 10 );
1007 elem.
throw_error(
"Pol.txt 'System' element needs to specify CoreVersion" );
1010 const char* pval = temp.c_str();
1011 char* pdot =
nullptr;
1012 unsigned int ones = strtoul( pval, &pdot, 10 );
1013 unsigned int tenths = 0;
1014 if ( pdot && *pdot ==
'.' )
1015 tenths = strtoul( pdot + 1, &pdot, 10 );
1016 base = ones * 10 + tenths;
1019 if ( pdot && *pdot ==
':' )
1021 unsigned int cap_ones = strtoul( pdot + 1, &pdot, 10 );
1022 unsigned int cap_tenths = 0;
1025 if ( pdot && *pdot ==
'.' )
1026 cap_tenths = strtoul( pdot + 1, &pdot, 10 );
1028 cap = cap_ones * 10 + cap_tenths;
1031 if ( pdot && *pdot ==
';' )
1032 lock = (
unsigned char)strtoul( pdot + 1,
nullptr, 10 );
1037 pAttr->aliases[i] +
" is out of range" );
1038 av.
base( static_cast<unsigned short>( base ) );
1043 pAttr->aliases[i] +
" is out of range" );
1044 av.
cap( static_cast<unsigned short>( cap ) );
1049 pAttr->aliases[i] +
" has illegal lock state!" );
1064 for (
const auto& _i : pVital->aliases )
1074 " is out of range" );
1160 if ( value ==
false )
1211 const bool within_range = ( range < -1 ) ||
pol_distance(
this, item ) <= range;
1292 if ( cont !=
nullptr )
1312 if ( bp !=
nullptr )
1326 if ( bp !=
nullptr )
1334 return wornitems->GetItemOnLayer( layer );
1339 return (
wornitems->GetItemOnLayer( layer ) != nullptr );
1363 "\nWarning: Character 0x{:X} tried to mount Item 0x{:X}, but it doesn't have a mount " 1364 "graphic (current graphic: 0x{:X}). Check that the list of mounts in uoconvert.cfg is " 1365 "correct and re-run uoconvert if necessary.\n" )
1386 "\nWarning: Character 0x{:X} tried to mount Item 0x{:X}, but it doesn't have the mount " 1387 "objtype (as defined in extobj.cfg) and EnforceMountObjtype in pol.cfg is true.\n" )
1482 else if ( item ==
shield )
1506 if ( item->
serial == find_serial )
1519 item = cont->
find( find_serial );
1520 if ( item !=
nullptr )
1573 produce( pVital, vv, rr / 12 );
1577 consume( pVital, vv, -rr / 12 );
1661 if ( newgraphic < 1 ||
1795 bool send_damage_packet )
1804 if ( ( source ) && ( userepsys ) )
1814 if ( send_damage_packet && source )
1817 if ( amount > 6553500 )
1820 showdmg =
static_cast<u16>( amount / 100 );
1831 if ( vv.
current() - amount <= 99 )
1835 if ( ( source ) && ( userepsys ) )
1853 int absorbed = blocked / 2;
1855 blocked -= absorbed;
1859 if ( damage >= 2.0 )
1861 return static_cast<unsigned short>( damage * 0.5 );
1865 int dmg =
static_cast<int>( damage );
1867 return static_cast<unsigned short>( dmg );
1877 if ( armor !=
nullptr )
1887 bool send_damage_packet )
1891 INFO_PRINT <<
"Final damage: " << damage <<
"\n";
1894 send_damage_packet );
1900 unsigned short* rawdamage )
1909 *rawdamage =
static_cast<unsigned short>( damage );
1918 if ( prog.
get() == nullptr )
1923 ex->addModule( uoemod );
1925 unsigned short rawdamage = 0;
1926 unsigned short basedamage =
static_cast<unsigned short>( damage );
1943 ex->os_module->priority = 100;
1945 if ( ex->setProgram( prog.
get() ) )
1947 uoemod->controller_.set(
this );
2022 msg->Write<
u8>( 0x32u );
2052 ERROR_PRINT <<
"uh, trying to resurrect " <<
name() <<
", who isn't dead.\n";
2093 bool equip_death_robe =
true;
2101 death_shroud =
nullptr;
2106 equip_death_robe =
false;
2109 if ( equip_death_robe )
2113 equip( death_robe );
2126 send_remove_if_hidden_ghost( zonechr, client );
2143 equip( death_shroud );
2148 ERROR_PRINT.Format(
"Create Character: Failed to equip death shroud 0x{:X}\n" )
2289 corpse->
add( copy );
2291 auto _drop_item_to_world = [&](
Items::Item* _item ) {
2292 _item->x = corpse->
x;
2293 _item->y = corpse->
y;
2294 _item->z = corpse->
z;
2297 move_item( _item, corpse->
x, corpse->
y, corpse->
z,
nullptr );
2304 if ( item ==
nullptr )
2349 _drop_item_to_world( item );
2372 while ( !tmp.empty() )
2384 _drop_item_to_world( bp_item );
2392 else if ( corpse->
can_add( *bp_item ) )
2396 _drop_item_to_world( bp_item );
2407 _drop_item_to_world( bp_item );
2417 if ( item ==
nullptr )
2447 _drop_item_to_world( item );
2499 if ( item ==
nullptr )
2507 std::set<unsigned short> tmplzones = armor->
tmplzones();
2508 std::set<unsigned short>::iterator itr;
2509 for ( itr = tmplzones.begin(); itr != tmplzones.end(); ++itr )
2511 if ( (
armor_[*itr] ==
nullptr ) || ( armor->
ar() >
armor_[*itr]->ar() ) )
2519 double new_ar = 0.0;
2523 if ( armor !=
nullptr )
2543 short s_new_ar =
static_cast<short>( new_ar );
2544 if ( s_new_ar >= 0 )
2557 if ( item->has_fire_resist() )
2558 fire_resist( fire_resist().addToValue( item->fire_resist() ) );
2559 if ( item->has_cold_resist() )
2560 cold_resist( cold_resist().addToValue( item->cold_resist() ) );
2561 if ( item->has_energy_resist() )
2562 energy_resist( energy_resist().addToValue( item->energy_resist() ) );
2563 if ( item->has_poison_resist() )
2564 poison_resist( poison_resist().addToValue( item->poison_resist() ) );
2565 if ( item->has_physical_resist() )
2566 physical_resist( physical_resist().addToValue( item->physical_resist() ) );
2568 if ( item->has_fire_damage() )
2569 fire_damage( fire_damage().addToValue( item->fire_damage() ) );
2570 if ( item->has_cold_damage() )
2571 cold_damage( cold_damage().addToValue( item->cold_damage() ) );
2572 if ( item->has_energy_damage() )
2573 energy_damage( energy_damage().addToValue( item->energy_damage() ) );
2574 if ( item->has_poison_damage() )
2575 poison_damage( poison_damage().addToValue( item->poison_damage() ) );
2576 if ( item->has_physical_damage() )
2577 physical_damage( physical_damage().addToValue( item->physical_damage() ) );
2582 if ( has_fire_resist() )
2583 fire_resist( fire_resist().resetModAsValue() );
2584 if ( has_cold_resist() )
2585 cold_resist( cold_resist().resetModAsValue() );
2586 if ( has_energy_resist() )
2587 energy_resist( energy_resist().resetModAsValue() );
2588 if ( has_poison_resist() )
2589 poison_resist( poison_resist().resetModAsValue() );
2590 if ( has_physical_resist() )
2591 physical_resist( physical_resist().resetModAsValue() );
2593 if ( has_fire_damage() )
2594 fire_damage( fire_damage().resetModAsValue() );
2595 if ( has_cold_damage() )
2596 cold_damage( cold_damage().resetModAsValue() );
2597 if ( has_energy_damage() )
2598 energy_damage( energy_damage().resetModAsValue() );
2599 if ( has_poison_damage() )
2600 poison_damage( poison_damage().resetModAsValue() );
2601 if ( has_physical_damage() )
2602 physical_damage( physical_damage().resetModAsValue() );
2610 for (
unsigned i = 0; i <
armor_.size(); ++i )
2613 if (
armor_[i] ==
nullptr )
2616 text +=
armor_[i]->name();
2629 static bool in_here =
false;
2630 if ( !in_here &&
Core::gamestate.system_hooks.check_skill_hook !=
nullptr )
2660 if ( chr ==
nullptr )
2667 if ( chr->
realm != this->realm )
2685 using namespace Network;
2686 if ( chr ==
nullptr )
2699 if ( zonechr == chr )
2714 msgpoison.Send( client );
2717 msginvul.Send( client );
2732 msgpoison.Send( client );
2734 msginvul.Send( client );
2739 msgmove.
Send( client );
2741 msgpoison.Send( client );
2743 msginvul.Send( client );
2749 msgpoison.Send( client );
2751 msginvul.Send( client );
2758 Client* client = zonechr->client;
2759 if ( !zonechr->is_visible_to_me( chr ) )
2762 if ( Core::inrange( zonechr, chr ) )
2766 send_remove_character( client, chr, msgremove );
2797 if ( !weapon_delay )
2800 <<
dexterity() <<
"+100)*" << weapon_speed <<
")\n";
2803 clocks /= (
dexterity() + 100 ) * weapon_speed;
2807 int delay_sum = weapon_delay + delay_mod();
2808 if ( delay_sum < 0 )
2811 INFO_PRINT_TRACE( 19 ) <<
"clocks[delay] = ((" << weapon_delay <<
"+" << delay_mod() <<
"=" 2846 <<
") delay: " << clocks <<
"\n";
2884 << fmt::hexu( who->
serial ) <<
"): will be handled by combat hook.\n";
2890 << fmt::hexu( who->
serial ) <<
"):\n" 2891 <<
" who->dead: " << who->
dead() <<
"\n" 2893 <<
" hidden: " <<
hidden() <<
"\n" 2894 <<
" who->hidden: " << who->
hidden() <<
"\n" 2918 <<
"): checking opponent, 0x" << fmt::hexu(
opponent_->
serial ) <<
"\n";
2928 <<
"): checking opponent_of, 0x" << fmt::hexu( who->serial ) <<
"\n";
2944 if ( opponent !=
nullptr )
2997 << fmt::hex( new_opponent->
serial ) <<
")\n";
2998 if ( new_opponent !=
nullptr )
3000 if ( new_opponent->
dead() )
3013 if ( inform_old_opponent &&
opponent_ !=
nullptr )
3051 if ( new_opponent !=
nullptr )
3084 if ( i_warmode ==
false )
3255 bool projectile_check =
false;
3272 projectile_check =
true;
3280 if ( projectile_check ==
false )
3299 hit_chance += hitchance_mod() * 0.001f;
3300 hit_chance -= opponent->evasionchance_mod() * 0.001f;
3302 INFO_PRINT <<
"Chance to hit: " << hit_chance <<
": ";
3313 INFO_PRINT <<
"Base damage: " << damage <<
"\n";
3316 damage_multiplier +=
strength() * 0.20f;
3317 damage_multiplier *= 0.01f;
3319 damage *= damage_multiplier;
3322 INFO_PRINT <<
"Damage multiplier due to tactics/STR: " << damage_multiplier
3323 <<
" Result: " << damage <<
"\n";
3325 if ( opponent->
shield !=
nullptr )
3335 double parry_chance =
3338 INFO_PRINT <<
"Parry Chance: " << parry_chance <<
": ";
3387 <<
"): opponent is 0x" << fmt::hexu( opponent->
serial ) <<
"\n";
3388 if ( opponent !=
nullptr &&
3418 auto light_unil = lightoverride_until();
3421 lightoverride_until( 0 );
3422 lightoverride( -1 );
3425 !has_lightoverride() )
3429 if ( has_lightoverride() )
3430 newlightlevel = lightoverride();
3435 if ( light_region !=
nullptr )
3454 if ( cur_justice_region != new_justice_region )
3456 if ( cur_justice_region !=
nullptr )
3458 if ( new_justice_region !=
nullptr )
3463 if ( cur_justice_region !=
nullptr && new_justice_region !=
nullptr &&
3474 if ( printmsgs && cur_justice_region )
3476 const std::string& leavetext = cur_justice_region->
leavetext();
3477 if ( !leavetext.empty() )
3488 if ( ( opp2 !=
nullptr && opp2->
client ) )
3504 if ( printmsgs && new_justice_region )
3506 const std::string& entertext = new_justice_region->
entertext();
3507 if ( !entertext.empty() )
3521 if ( cur_music_region != new_music_region )
3524 if ( new_music_region !=
nullptr )
3546 if ( force || ( cur_weather_region != new_weather_region ) )
3548 if ( new_weather_region !=
nullptr && new_weather_region->
lightoverride != -1 &&
3549 !has_lightoverride() )
3563 if ( new_weather_region )
3566 new_weather_region->
aux );
3680 if ( ( flags & 1 ) == 0 )
3686 if ( i_facing !=
facing )
3688 setfacing( static_cast<u8>( i_facing ) );
3711 if ( multi !=
nullptr )
3714 if ( house !=
nullptr )
3717 if ( i_facing !=
facing )
3719 setfacing( static_cast<u8>( i_facing ) );
3726 s8 newz = house->
z +
3731 if ( newx > ( house->
x + def.
minrx ) && newx <= ( house->
x + def.
maxrx ) &&
3732 newy > ( house->
y + def.
minry ) && newy <= ( house->
y + def.
maxry ) )
3734 x =
static_cast<u16>( newx );
3735 y =
static_cast<u16>( newy );
3736 z =
static_cast<s8>( newz );
3770 if ( !
face( i_facing ) )
3780 u8 tmp_facing = (
facing + 1 ) & 0x7;
3786 realm->
walkheight(
this, tmp_newx, tmp_newy,
z, &new_z,
nullptr,
nullptr,
nullptr );
3788 tmp_facing = (
facing - 1 ) & 0x7;
3793 !
realm->
walkheight(
this, tmp_newx, tmp_newy,
z, &new_z,
nullptr,
nullptr,
nullptr ) )
3806 if ( !
realm->
walkheight(
this, newx, newy,
z, &newz, &supporting_multi, &walkon_item,
3833 x =
static_cast<u16>( newx );
3834 y =
static_cast<u16>( newy );
3835 z =
static_cast<s8>( newz );
3842 if ( supporting_multi !=
nullptr )
3850 if ( this_house !=
nullptr )
3859 if ( multi !=
nullptr )
3871 if ( walkon_item !=
nullptr )
3888 if ( (
lastz -
z ) > 21 )
3920 if ( has_gotten_item() )
3921 gotten_item()->realm =
realm;
3943 auto mobs = std::unique_ptr<Bscript::ObjArray>();
3947 if ( _chr->
z >=
z - 10 && _chr->
z <=
z + 10 && !_chr->
dead() &&
3983 for (
auto& chr : tmp )
3985 chr->check_attack_after_move();
3998 if ( isRemoteContainer )
3999 *isRemoteContainer =
false;
4005 if ( item->
serial == find_serial )
4007 if ( isRemoteContainer )
4008 *isRemoteContainer =
true;
4016 if ( isRemoteContainer )
4017 *isRemoteContainer =
false;
4033 if ( additional_item == item )
4045 if ( squelched == 0 )
4047 else if ( squelched == ~0u )
4056 const_cast<Character*
>( this )->squelched_until( 0 );
4064 if ( deafened == 0 )
4066 else if ( deafened == ~0u )
4075 const_cast<Character*
>( this )->deafened_until( 0 );
4179 return ( g !=
nullptr ) ? g->guildid() : 0;
4188 const std::vector<u32>& arguments )
4194 buffs_[icon] = {end, cl_name, cl_descr, arguments};
4208 auto b =
buffs_.find( icon );
4226 for (
auto it =
buffs_.begin(); it !=
buffs_.end(); ++it )
4239 for (
auto it =
buffs_.begin(); it !=
buffs_.end(); ++it )
4244 else if ( duration > 0xFFFF )
4247 send_buff_message(
this, it->first,
true, static_cast<u16>( duration ), it->second.cl_name,
4248 it->second.cl_descr, it->second.arguments );
4258 +
sizeof(
unsigned char )
4277 +
sizeof(
unsigned short )
4280 +
sizeof(
unsigned char )
4281 +
sizeof(
unsigned short )
4282 +
sizeof(
unsigned int )
4302 size += 3 *
sizeof(
void* ) +
opponent_of.size() * (
sizeof(
Character* ) + 3 *
sizeof(
void* ) );
4305 (
sizeof(
void* ) * 3 + 1 ) / 2 );
4307 (
sizeof(
void* ) * 3 + 1 ) / 2 );
4315 3 *
sizeof(
void* ) +
buffs_.size() * (
sizeof(
u16 ) +
sizeof(
Buff ) +
sizeof(
void* ) );
Contents::const_iterator const_iterator
const int VITAL_LOWEST_REGENRATE
ToBeReportableList to_be_reportable_
std::vector< unsigned short > layers
#define UOBJ_GARGOYLE_FEMALE
void register_with_supporting_multi(Item *item)
std::vector< Items::Item * > Contents
void check_weather_region_change(bool force=false)
const unsigned int VITAL_LOWEST_MAX_HUNDREDTHS
static Item * create(u32 objtype, u32 serial=0)
void unload_armor_zones()
virtual void walk_on(Mobile::Character *chr)
virtual void walk_on(Mobile::Character *chr) POL_OVERRIDE
bool setting_enabled(const char *setting) const
unsigned int tile_flags(unsigned short tilenum)
#define UOBJ_GARGOYLE_MALE
bool can_add_to_slot(u8 &slotIndex)
void select_opponent(u32 opp_serial)
unsigned int guildid() const
bool can_moveanydist() const
Core::gameclock_t created_at
ref_ptr< Bscript::EScriptProgram > find_script2(const ScriptDef &script, bool complain_if_not_found, bool cache_script)
static void swing_task_func(Character *chr)
virtual size_t estimatedSize() const POL_OVERRIDE
static const char custom_house_z_xlate_table[CUSTOM_HOUSE_NUM_PLANES]
Vital * FindVital(const std::string &str)
Character * get_attackable_opponent() const
unsigned int find_sumof_objtype_noninuse(u32 objtype) const
bool in_debugger_holdlist() const
#define UOBJ_DEATH_SHROUD
std::string remove_string(const char *propname)
bool has_active_prompt() const
void set_opponent(Character *opponent, bool inform_old_opponent=true)
virtual bool can_add(const Items::Item &item) const
u8 get_flag1(Network::Client *other_client) const
void add_item_to_world(Items::Item *item)
Core::UACTION mounted_anim() const
void send_remove_if_hidden_ghost(Character *chr, Network::Client *client)
unsigned short default_light_level
virtual void printSelfOn(Clib::StreamWriter &sw) const POL_OVERRIDE
void send_full_corpse(Client *client, const Item *item)
void set_vitals_to_maximum()
void on_swing_failure(Character *attacker)
unsigned char lock() const
unsigned char weathertype
Items::Item * create_backpack()
bool check_unequip_script()
#define UPDATE_CHECKPOINT()
unsigned char concealed() const
const u8 CHAR_FLAG1_FLYING
void PropagateMove(Character *chr)
bool call(Bscript::BObjectImp *p0)
void send_short_statmsg(Network::Client *client, Mobile::Character *chr)
unsigned short cap() const
void revoke_privilege(const char *priv)
void extract(Contents &cnt)
bool party_can_loot() const
std::map< u16, Buff > buffs_
MobileCont lawfully_damaged_
bool walkheight(unsigned short x, unsigned short y, short oldz, short *newz, Multi::UMulti **pmulti, Items::Item **pwalkon, bool doors_block, Core::MOVEMODE movemode, short *gradual_boost=nullptr)
bool consume_projectile(Core::UContainer *cont) const
unsigned char tilelayer(unsigned short tilenum)
void send_create_ghost(Character *chr, Network::Client *client)
#define SOUND_EFFECT_FEMALE_DEFENSE
bool strong_enough_to_equip(const Items::Item *item) const
unsigned short min_value(void) const
bool is_intrinsic() const
Tells eather an equipment is intrinsic or not Intrinsic equipment is, by example, NPCs "natural" weap...
Core::UOExecutor * script_ex
ExportedFunction * combat_advancement_hook
time_t disable_regeneration_until
bool check_unequiptest_scripts(Mobile::Character *chr)
Core::polclock_t polclock
unsigned short hit_sound() const
void add_remote_container(Items::Item *)
std::string all_privs() const
void grant_privilege(const char *priv)
bool target_cursor_busy() const
void printWornItems(Clib::StreamWriter &sw_pc, Clib::StreamWriter &sw_equip) const
static const SkillStatCap DEFAULT
virtual unsigned short ar() const
bool in_range(const Mobile::Character *wielder, const Mobile::Character *target) const
unsigned short base_str_req
void calc_single_attribute(const Attribute *pAttr)
virtual void on_facing_changed() POL_OVERRIDE
bool is_attackable(Character *who) const
ExportedFunction * warmode_change
void notify_resurrected(Mobile::Character &whoressed)
virtual void on_color_changed() POL_OVERRIDE
unsigned int remove_ulong(const char *propname)
void on_cmdlevel_changed()
Items::Item * find(u32 serial) const
bool is_visible_to_me(const Character *chr) const
void heal_damage_hundredths(unsigned int damage)
When a Mobile is Healed.
ref_ptr< Core::WornItemsContainer > wornitems
void calc_vital_stuff(bool i_mod=true, bool v_mod=true)
void add(const char *str)
bool has_active_client() const
void reduce_hp_from_hit()
bool enforce_mount_objtype
void do_hit_failure_effects()
bool get(ENUM flag) const
Mobile::Character * get_character(int index)
bool inrange(const UObject *c1, unsigned short x, unsigned short y)
void check_justice_region_change()
virtual void get_hitscript_params(double damage, Items::UArmor **parmor, unsigned short *rawdamage)
int remove_int(const char *propname)
unsigned char cmdlevel() const
Core::TargetCursor * tcursor2
unsigned short calc_thru_damage(double damage, unsigned short ar)
void check_attack_after_move()
void attack(Character *opponent)
#define THREAD_CHECKPOINT(thread, check)
Item * find_legal_item(const Character *chr, u32 serial, bool *additlegal, bool *isRemoteContainer)
Core::WeatherRegion * weather_region
virtual void Send(Client *client) POL_OVERRIDE
virtual void setfacing(u8 newfacing) POL_OVERRIDE
virtual bool can_be_renamed_by(const Character *chr) const
virtual void repsys_on_damage(Character *defender)
[14] Mobile (MA) Damages Mobile (MB)
bool use_insurance()
Returns current insurance value and resets it to false.
void send_light(Client *client, int lightlevel)
Items::Item * create_death_shroud()
static const ExtStatBarFollowers DEFAULT
#define FUNCTION_CHECKPOINT(func, check)
virtual double armor_absorb_damage(double damage)
void remove(const char *str)
std::vector< AttributeValue > attributes
virtual void register_object(UObject *obj)
Items::Item * create_death_robe()
bool gflag_in_system_load
static void InRange(u16 x, u16 y, const Realms::Realm *realm, unsigned range, F &&f)
std::vector< Items::UArmor * > armor_
const Mobile::Attribute & attribute() const
void readfrom(const std::string &str)
virtual Item * clone() const
void disable_regeneration_for(int seconds)
unsigned short max_weapon_damage() const
virtual T * getregion(xcoord x, ycoord y, Realms::Realm *realm)
const short ATTRIBUTE_MIN_INTRINSIC_MOD
virtual size_t estimatedSize() const
bool is_projectile() const
const u8 CHAR_FLAG1_INVISIBLE
void play_moving_effect(const UObject *src, const UObject *dst, u16 effect, u8 speed, u8 loop, u8 explode)
virtual void add(Items::Item *item)
static Core::MOVEMODE decode_movemode(const std::string &str)
virtual bool setgraphic(u16 newobjtype) POL_OVERRIDE
const WeaponDesc & descriptor() const
void send_item_to_inrange(const Item *item)
void set_setting(const char *setting, bool value)
bool can_rename(const Character *chr) const
#define passert_r(exp, reason)
bool can_freemove() const
#define ITEM_ELEM_PTR(elem)
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
unsigned short delay() const
const u8 CHAR_FLAG1_POISONED
void updateEquipableProperties(Items::Item *item)
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)
unsigned short projectile_sound() const
void addBuff(u16 icon, u16 duration, u32 cl_name, u32 cl_descr, const std::vector< u32 > &arguments)
bool consume(const Core::Vital *pVital, VitalValue &vv, unsigned int amt)
unsigned short getmidi() const
void undo_get_item(Mobile::Character *chr, Items::Item *item)
#define UOBJ_GARGOYLE_FEMALE_GHOST
double remove_double(const char *propname, double dflt)
int default_accessible_range
virtual bool script_isa(unsigned isatype) const POL_OVERRIDE
std::string hexint(unsigned short v)
bool valid_equip_layer(int layer)
const std::string & name() const
ExportedFunction * get_maximum_func
void send_remove_character(Client *client, const Character *chr)
void send_remove_character_to_nearby_cantsee(const Character *chr)
Core::UContainer * trade_container()
virtual const char * classname() const POL_OVERRIDE
POL_NORETURN void throw_error(const std::string &errmsg) const
void send_move_mobile_to_nearby_cansee(const Character *chr)
Multi::UMulti * system_find_multi(u32 serial)
void send_poisonhealthbar(Client *client, const Character *chr)
bool consume(unsigned int hamt)
virtual void repsys_on_attack(Character *defender)
[13] Mobile (MA) Attacks Mobile (MA)
void spend_gold(unsigned int amount)
void readCommonProperties(Clib::ConfigElem &elem)
void send_move(Client *client, const Character *chr)
void on_loggoff_party(Mobile::Character *chr)
virtual void cancel(void) POL_OVERRIDE
void send_midi(Client *client, u16 midi)
bool move(unsigned char dir)
void on_delete_from_account()
bool CustomHousingMove(unsigned char i_dir)
virtual class UHouse * as_house()
void unequip(Items::Item *item)
unsigned short get_random_damage() const
ExportedFunction * get_regenrate_func
bool face(Core::UFACING i_facing, int flags=0)
void send_goxyz(Client *client, const Character *chr)
UOExecutor * create_script_executor()
#define UOBJ_GARGOYLE_MALE_GHOST
bool can_hearghosts() const
bool mightsee(const Items::Item *item) const
const int VITAL_HIGHEST_REGENRATE
ref_ptr< Core::UContainer > trading_cont
Module::UOExecutorModule * prompt_uoemod
weak_ptr< Core::Menu > menu
void send_damage(Character *attacker, Character *defender, u16 damage)
Core::ExportedFunction * getintrinsicmod_func
Core::OneShotTask * repsys_task_
void send_feature_enable(Client *client)
void Send(Client *client, int len=-1) const
const AttributeValue & attribute(unsigned attrid) const
Core::MusicRegion * music_region
u32 UseCharSerialNumber(u32 serial)
unsigned short raw_to_base(unsigned int raw)
void play_sound_effect(const UObject *center, u16 effect)
Core::CharacterRef trading_with
virtual unsigned short ar() const
void check_concealment_level()
Character(u32 objtype, Core::UOBJ_CLASS uobj_class=Core::UOBJ_CLASS::CLASS_CHARACTER)
std::string getencodedquotedstring(const std::string &in)
#define UOBJ_HUMAN_MALE_GHOST
void refresh_cached_settings(bool update=true)
const unsigned POLCLASS_CONTAINER
virtual void readProperties(Clib::ConfigElem &elem) POL_OVERRIDE
bool has_los(const Core::ULWObject &att, const Core::ULWObject &tgt) const
bool has_privilege(const char *priv) const
#define MOVE_ITEM_FAILURE_UNKNOWN
virtual void inform_engaged(Character *engaged)
const short ATTRIBUTE_MAX_INTRINSIC_MOD
virtual void inform_moved(Character *moved)
void getpos_ifmove(Core::UFACING i_facing, unsigned short *px, unsigned short *py)
bool manual_set_swing_timer(int time)
ref_ptr< Mobile::Character > CharacterRef
virtual void inform_leftarea(Character *wholeft)
Core::polclock_t swing_timer_start_clock_
std::vector< Mobile::Attribute * > attributes
const char * zone_to_zone_name(unsigned short zone)
Core::UACTION anim() const
void setrealm(Item *item, void *arg)
virtual void printOn(Clib::StreamWriter &sw) const POL_OVERRIDE
void send_death_message(Character *chr_died, Item *corpse)
void calc_single_vital(const Core::Vital *pVital)
void send_highlight() const
void on_aos_ext_stat_changed()
unsigned short miss_sound() const
virtual const char * target_tag() const POL_OVERRIDE
void send_fight_occuring(Client *client, Character *opponent)
std::string extract() const
#define UOBJ_HUMAN_FEMALE_GHOST
void add_at_random_location(Items::Item *item)
void remove_mobile(const Mobile::Character &chr, WorldChangeReason reason)
#define CLEAR_CHECKPOINT()
bool RunEnterScript(Mobile::Character *chr)
Module::UnicodeExecutorModule * prompt_uniemod
ReportableList reportable_
Core::AttributeFlags< PRIV_FLAGS > cached_settings
Core::UContainer * container
unsigned char default_character_height
gameclock_t read_gameclock()
Reads the current value of the game clock.
Core::UACTION weapon_anim() const
#define GET_ITEM_PTR(itr)
void setname(const std::string &)
ExportedFunction * pushthrough_hook
void send_full_statmsg(Network::Client *client, Mobile::Character *chr)
bool can_be_heard_as_ghost() const
Mobile::Character * find_character(u32 serial)
void equip(Items::Item *item)
const u8 CHAR_FLAG1_WARMODE
virtual void Send(Client *client) POL_OVERRIDE
void send_realm_change(Client *client, Realms::Realm *realm)
void move_item(Item *item, UFACING facing)
const std::string & leavetext() const
bool is_house_editing() const
const Core::ScriptDef & hit_script() const
void consume_sumof_objtype_noninuse(u32 objtype, unsigned int amount)
bool cache_interactive_scripts
void on_concealed_changed()
#define UOBJ_ELF_MALE_GHOST
void set_current_ones(const Core::Vital *pVital, VitalValue &vv, unsigned int ones)
SettingsManager settingsManager
void do_hit_success_effects()
Core::AttributeFlags< MOB_FLAGS > mob_flags_
static void InVisualRange(const UObject *obj, F &&f)
bool is_concealed_from_me(const Character *chr) const
const std::string & entertext() const
bool contains(const char *str) const
virtual void destroy() POL_OVERRIDE
void commit_to_reportables()
const unsigned POLCLASS_SPELLBOOK
Character * get_opponent() const
void MoveCharacterWorldPosition(unsigned short oldx, unsigned short oldy, unsigned short newx, unsigned short newy, Mobile::Character *chr, Realms::Realm *oldrealm)
StateManager stateManager
const u8 CHAR_FLAG1_YELLOWHEALTH
Mobile::Character * system_find_mobile(u32 serial)
virtual void on_death(Items::Item *corpse)
virtual void inform_disengaged(Character *disengaged)
#define DECLARE_CHECKPOINT
void send_update_hits_to_inrange(Mobile::Character *chr)
bool remove_prop(const char *propname, std::string *value)
const unsigned ATTRIBUTE_MAX_BASE
ref_ptr< Items::Item > ItemRef
static const MovementCostMod DEFAULT
#define UOBJ_HUMAN_FEMALE
void send_weather(Client *client, u8 type, u8 severity, u8 aux)
void run_hit_script(Character *defender, double damage)
static Guild * FindOrCreateGuild(unsigned int guildid, unsigned int memberserial)
int intrinsic_mod() const
unsigned short movecost(const Mobile::Character *chr, int carry_perc, bool running, bool mounted)
void build_owncreate(const Character *chr, PktOut_78 *owncreate)
Core::JusticeRegion * justice_region
ref_ptr< Accounts::Account > AccountRef
virtual void printProperties(Clib::StreamWriter &sw) const POL_OVERRIDE
bool can_speedhack() const
#define PKTIN_02_DIR_RUNNING_BIT
Items::Item * system_find_item(u32 serial)
void send_buff_message(Character *chr, u16 icon, bool show, u16 duration, u32 cl_name, u32 cl_descr, std::vector< u32 > arguments)
#define PKTIN_02_FACING_MASK
unsigned short max_value(void) const
virtual void inform_criminal(Character *thecriminal)
virtual void printDebugProperties(Clib::StreamWriter &sw) const
Core::UContainer * backpack() const
void restart_decay_timer()
bool can_clothe(const Character *chr) const
#define INFO_PRINT_TRACE(n)
bool is_equipped(const Items::Item *item) const
Core::Spellbook * spellbook(u8 school) const
Module::UOExecutorModule * target_cursor_uoemod
void(* on_menu_selection)(Network::Client *client, Core::MenuItem *mi, Core::PKTIN_7D *msg)
Items::UArmor * choose_armor() const
unsigned short pol_distance(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2)
virtual void readProperties(Clib::ConfigElem &elem)
void position_changed(void)
void notify_unhid(Mobile::Character &whounhid)
bool RunLeaveScript(Mobile::Character *chr)
Items::Item * find_wornitem(u32 find_serial) const
const u8 CHAR_FLAG1_GENDER
void check_music_region_change()
#define SOUND_EFFECT_MALE_DEFENSE
static std::string encode_movemode(Core::MOVEMODE movemode)
CmdLevel * find_cmdlevel(const char *name)
virtual void printOn(Clib::StreamWriter &) const
unsigned short random_weapon_damage() const
bool can_face(Core::UFACING i_facing)
void set_warmode(bool warmode)
unsigned short remove_ushort(const char *propname)
virtual void printDebugProperties(Clib::StreamWriter &sw) const POL_OVERRIDE
double apply_damage(double damage, Character *source=nullptr, bool userepsys=true, bool send_damage_packet=false)
static bool RunNoCombatCheck(Network::Client *client)
void produce(const Core::Vital *pVital, VitalValue &vv, unsigned int amt)
Items::Item * search_remote_containers(u32 find_serial, bool *isRemoteContainer) const
void check_undamaged()
Clear a Mobile's ToBeReportable list when all of the following are true: 1) hits are at maximum 2) mo...
unsigned int gold_carried() const
unsigned short layer_to_zone(unsigned short layer)
void create_trade_container()
virtual void apply_raw_damage_hundredths(unsigned int damage, Character *source, bool userepsys=true, bool send_damage_packet=false)
virtual void inform_enteredarea(Character *whoentered)
bool isa(UOBJ_CLASS uobj_class) const
const VitalValue & vital(unsigned vitalid) const
void change(ENUM flag, bool value)
void clear_my_aggressors()
void send_wornitem_to_inrange(const Character *chr, const Item *item)
void clear_to_be_reportables()
Items::Item * wornitem(int layer) const
virtual void refresh_ar()
int call_long(Bscript::BObjectImp *p0)
Core::OneShotTask * swing_task
unsigned short carrying_capacity() const
A Mobile's carrying capacity is (40 + 3.5*STR + chr.carrying_capacity_mod)*ssopt.carrying_capacity_mo...
double random_double(double f)
void regen_vital(const Core::Vital *)
std::set< unsigned short > tmplzones()
void produce(unsigned int hamt)
unsigned short zone_name_to_zone(const char *zname)
bool can_move(const Items::Item *item) const
void schedule_executor(UOExecutor *ex)
double armor_zone_chance_sum
const MultiDef & multidef() const
virtual void printProperties(Clib::StreamWriter &sw) const
bool FileExists(const char *filename)
void send_remove_character_to_nearby_cansee(const Character *chr)
std::vector< Core::ItemRef > remote_containers_
void set_privs(const std::string &privlist)
const ItemDesc & itemdesc() const
u16 last_textcolor() const
bool read(ConfigElem &elem)
bool run(int argc, char **argv)
Items::UWeapon * wrestling_weapon
virtual unsigned int weight() const POL_OVERRIDE
A Mobile's weight is 10 stones + the weight of their equipment.
void readAttributesAndVitals(Clib::ConfigElem &elem)
void notify_moved(Mobile::Character &whomoved)
void clear_my_lawful_damagers()
void send_season_info(Client *client)
bool equippable(const Items::Item *item) const
unsigned short character_slots
Core::OneShotTask * party_decline_timeout_
void start_script(const char *filename, Bscript::BObjectImp *param0, Bscript::BObjectImp *param1)
virtual std::string name() const
virtual u16 get_damaged_sound() const
void send_owncreate(Client *client, const Character *chr)
Bscript::BObjectImp * make_mobileref(Mobile::Character *chr)
bool has_active_gump() const
virtual void unregister_object(UObject *obj)
void set_stealthsteps(unsigned short newval)
void send_create_mobile_to_nearby_cansee(const Character *chr)
std::string all_settings() const
bool check_skill(Core::USKILLID skillid, int difficulty, unsigned short pointvalue)
void resetEquipableProperties()
bool trade_accepted() const
void do_attack_effects(Character *target)
void cancel_trade(Mobile::Character *chr1)
size_t estimatedSize() const
#define UOBJ_ELF_FEMALE_GHOST
const AttributeValue & weapon_attribute() const
void send_map_difs(Client *client)
Sends number of maps used and number of map/static patches for each map.
bool layer_is_equipped(int layer) const
const polclock_t POLCLOCKS_PER_SEC
const unsigned VITAL_MAX_VALUE
boost_utils::object_name_flystring name_
const unsigned POLCLASS_NPC
unsigned remove_unsigned(const char *propname)
bool remove_bool(const char *propname)
static void tell_vital_changed(Mobile::Character *who, const Core::Vital *vital)
enum Pol::Mobile::Character::MOVEREASON move_reason
void disconnect_cleanup()
bool is_at_maximum() const
const unsigned int VITAL_HIGHEST_MAX_HUNDREDTHS
unsigned short min_weapon_damage() const
void copyprops(const UObject &obj)
std::atomic< bool > exit_signalled
virtual void add(Item *item) POL_OVERRIDE
unsigned short projectile_anim() const
ExportedFunction * parry_advancement_hook
bool can_access(const Items::Item *item, int range=-1) const
void set_current(const Core::Vital *pVital, VitalValue &vv, unsigned int ones)
void send_sysmessage(Network::Client *client, const char *text, unsigned short font, unsigned short color)
void check_light_region_change()
void check_region_changes()
ExportedFunction * check_skill_hook
Account * find_account(const char *acctname)
virtual Items::UWeapon * intrinsic_weapon()
void update_item_to_inrange(const Item *item)
Module::OSExecutorModule * os_module
unsigned short speed() const
static Attribute * FindAttribute(const std::string &str)
std::vector< VitalValue > vitals
bool take_contents_to_grave() const
void send_action_to_inrange(const Mobile::Character *obj, UACTION action, unsigned short framecount=0x05, unsigned short repeatcount=0x01, DIRECTION_FLAG_OLD backward=FORWARD, REPEAT_FLAG_OLD repeatflag=NOREPEAT, unsigned char delay=0x01)
void set_caps_to_default()
unsigned short default_cap
ExportedFunction * hitmiss_hook
virtual void inform_imoved(Character *chr)
#define INC_PROFILEVAR(counter)