Implement new mangos.conf setting HeroicCharactersPerRealm for set cstiom (default 1) amount heroic class chanarcters for account per realm.

Note: set option to 0 disable heroic characters creating.
Also non-player account not have now any limits (except 10 clinet limit) for heroic characters creating.
This commit is contained in:
VladimirMangos 2008-12-21 04:40:40 +03:00
parent 4090872bfa
commit c1ae939fb1
5 changed files with 48 additions and 8 deletions

View file

@ -633,6 +633,13 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_CHARACTERS_PER_REALM] = 10;
}
m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = sConfig.GetIntDefault("HeroicCharactersPerRealm", 1);
if(m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] < 0 || m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] > 10)
{
sLog.outError("HeroicCharactersPerRealm (%i) must be in range 0..10. Set to 1.",m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]);
m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = 1;
}
// must be after CONFIG_CHARACTERS_PER_REALM
m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = sConfig.GetIntDefault("CharactersPerAccount", 50);
if(m_configs[CONFIG_CHARACTERS_PER_ACCOUNT] < m_configs[CONFIG_CHARACTERS_PER_REALM])