mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
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:
@@ -39,6 +39,10 @@ void WorldSession::SendAuthResponse(uint8 code, bool queued, uint32 queuePos)
|
||||
// Send current home realm. Also there is no need to send it later in realm queries.
|
||||
response.SuccessInfo.Value.VirtualRealms.emplace_back(GetVirtualRealmAddress(), true, false, realmName, realmName);
|
||||
|
||||
if (HasPermission(rbac::RBAC_PERM_USE_CHARACTER_TEMPLATES))
|
||||
for (auto& templ : sObjectMgr->GetCharacterTemplates())
|
||||
response.SuccessInfo.Value.Templates.emplace_back(templ.second);
|
||||
|
||||
response.SuccessInfo.Value.AvailableClasses = &sObjectMgr->GetClassExpansionRequirements();
|
||||
response.SuccessInfo.Value.AvailableRaces = &sObjectMgr->GetRaceExpansionRequirements();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user