Core/Player: Added character templates

* Characters with predefined levels can be created
* Avaiable factions and classes can be configured
* Valid values for `factionGroup` in table `character_template_class` are 3 (Alliance) or 5 (Horde)
* Added new permission RBAC_PERM_USE_CHARACTER_TEMPLATES - has to be set, to allow the usage of the templates

Closes #13952
This commit is contained in:
Carbenium
2015-04-19 23:37:29 +02:00
parent 4208c0d839
commit bba6eb8d3d
13 changed files with 180 additions and 21 deletions

View File

@@ -76,6 +76,7 @@ public:
{ "areatrigger_teleport", rbac::RBAC_PERM_COMMAND_RELOAD_AREATRIGGER_TELEPORT, true, &HandleReloadAreaTriggerTeleportCommand, "", NULL },
{ "autobroadcast", rbac::RBAC_PERM_COMMAND_RELOAD_AUTOBROADCAST, true, &HandleReloadAutobroadcastCommand, "", NULL },
{ "battleground_template", rbac::RBAC_PERM_COMMAND_RELOAD_BATTLEGROUND_TEMPLATE, true, &HandleReloadBattlegroundTemplate, "", NULL },
{ "character_template", rbac::RBAC_PERM_COMMAND_RELOAD_CHARACTER_TEMPLATE, true, &HandleReloadCharacterTemplate, "", NULL },
{ "command", rbac::RBAC_PERM_COMMAND_RELOAD_COMMAND, true, &HandleReloadCommandCommand, "", NULL },
{ "conditions", rbac::RBAC_PERM_COMMAND_RELOAD_CONDITIONS, true, &HandleReloadConditions, "", NULL },
{ "config", rbac::RBAC_PERM_COMMAND_RELOAD_CONFIG, true, &HandleReloadConfigCommand, "", NULL },
@@ -202,6 +203,7 @@ public:
HandleReloadAutobroadcastCommand(handler, "");
HandleReloadBattlegroundTemplate(handler, "");
HandleReloadCharacterTemplate(handler, "");
return true;
}
@@ -383,6 +385,14 @@ public:
return true;
}
static bool HandleReloadCharacterTemplate(ChatHandler* handler, char const* /*args*/)
{
TC_LOG_INFO("misc", "Re-Loading Character Templates...");
sObjectMgr->LoadCharacterTemplates();
handler->SendGlobalGMSysMessage("DB table `character_template` and `character_template_class` reloaded.");
return true;
}
static bool HandleReloadCommandCommand(ChatHandler* handler, const char* /*args*/)
{
handler->SetLoadCommandTable(true);