11 #include "../bscript/bobject.h" 12 #include "../bscript/impstr.h" 13 #include "../clib/cfgelem.h" 27 guarded_( elem.remove_bool(
"Guarded", false ) ),
28 nocombat_( elem.remove_bool(
"NoCombat", false ) ),
29 region_name_( elem.rest() ),
30 entertext_( elem.remove_string(
"EnterText",
"" ) ),
31 leavetext_( elem.remove_string(
"LeaveText",
"" ) ),
32 enter_script_( elem.remove_string(
"EnterScript",
"" ) ),
33 leave_script_( elem.remove_string(
"LeaveScript",
"" ) )
41 "regions/justice.cfg",
42 "regions/regions.cfg",
43 "JusticeRegion Region" );
49 size += 2 *
sizeof( bool );
92 if ( client !=
nullptr && client->
gd !=
nullptr )
95 bool no_combat =
false;
96 if ( cur_justice_region !=
nullptr )
97 no_combat = cur_justice_region->
nocombat_;
void read_region_data(RegionGroupBase &grp, const char *preferred_filename, const char *other_filename, const char *tags_expected)
JusticeRegion(Clib::ConfigElem &elem, RegionId id)
bool config_nodie(const std::string &name, const Plib::Package *pkg, const char *mainpfx)
void read_justice_zones()
std::string enter_script_
virtual size_t estimateSize() const POL_OVERRIDE
virtual bool isTrue() const
virtual size_t estimateSize() const
std::string leave_script_
bool RunEnterScript(Mobile::Character *chr)
RegionGroup< JusticeRegion > JusticeDef
Core::JusticeRegion * justice_region
bool RunLeaveScript(Mobile::Character *chr)
static bool RunNoCombatCheck(Network::Client *client)
bool run_script_to_completion(const char *filename, Bscript::BObjectImp *parameter)