15 #include "../../clib/cfgelem.h" 16 #include "../../clib/clib_MD5.h" 17 #include "../../clib/rawtypes.h" 18 #include "../../clib/streamsaver.h" 19 #include "../../plib/systemstate.h" 20 #include "../cmdlevel.h" 21 #include "../globals/uvars.h" 22 #include "../mobile/charactr.h" 23 #include "../network/client.h" 24 #include "../polcfg.h" 25 #include "../uobject.h" 33 name_( elem.remove_string(
"NAME" ) ),
36 props_( Core::CPropProfiler::Type::ACCOUNT ),
37 default_cmdlevel_( 0 )
60 else if ( elem.
has_prop(
"PasswordHash" ) )
73 std::string cmdaccstr = elem.
remove_string(
"DefaultCmdLevel",
"player" );
75 if ( cmdlevel_search !=
nullptr )
78 elem.
throw_error(
"Didn't understand cmdlevel of '" + cmdaccstr +
"'" );
111 sw() <<
"}" << pf_endl <<
pf_endl;
195 return name_.c_str();
242 const auto not_found = std::string::npos;
244 if ( expansion.find(
"TOL" ) != not_found )
246 else if ( expansion.find(
"HSA" ) != not_found )
248 else if ( expansion.find(
"SA" ) != not_found )
250 else if ( expansion.find(
"KR" ) != not_found )
252 else if ( expansion.find(
"ML" ) != not_found )
254 else if ( expansion.find(
"SE" ) != not_found )
256 else if ( expansion.find(
"AOS" ) != not_found )
258 else if ( expansion.find(
"LBR" ) != not_found )
260 else if ( expansion.find(
"T2A" ) != not_found )
void printProperties(Clib::StreamWriter &sw) const
bool MD5_Encrypt(const std::string &in, std::string &out)
void set_character(int index, Mobile::Character *chr)
std::string remove_string(const char *propname)
static unsigned short convert_uo_expansion(const std::string &expansion)
void clear_character(int index)
void readfrom(Clib::ConfigElem &elem)
size_t estimatedSize() const
Mobile::Character * get_character(int index)
Core::PropertyList props_
size_t estimatedSize() const
bool has_active_characters()
Returns true if at least one character from this account is already logged in.
void readfrom(const std::string &str)
int getnextfreeslot() const
POL_NORETURN void throw_error(const std::string &errmsg) const
const std::string password() const
void add_prop(std::string propname, std::string propval)
const char * name() const
std::string passwordhash_
Clib::StringSet default_privs_
ref_ptr< Mobile::Character > CharacterRef
const std::string passwordhash() const
unsigned char default_cmdlevel_
void readProperties(Clib::ConfigElem &elem)
std::string extract() const
std::vector< Core::CharacterRef > characters_
unsigned short uo_expansion_
unsigned short uo_expansion_flag() const
bool has_prop(const char *propname) const
CmdLevel * find_cmdlevel(const char *name)
std::string default_privlist() const
void writeto(Clib::StreamWriter &sw) const
unsigned short character_slots
const std::string uo_expansion() const
Account(Clib::ConfigElem &elem)
unsigned char default_cmdlevel() const
size_t estimatedSize() const
bool remove_bool(const char *propname)