Core/RBAC: Create new permissions related to character creation

- 'Skips character creation team mask check'
- 'Skips character creation class mask check'
- 'Skips character creation race mask check'
- 'Skips character creation reserved name check'
- 'Skips character creation heroic min level check'
- 'Creation of two side faction characters in same account' (Affected by global config option)
This commit is contained in:
Spp
2013-02-25 15:48:19 +01:00
parent f67330e2ad
commit 019770dddb
5 changed files with 130 additions and 76 deletions
+2 -1
View File
@@ -16774,7 +16774,8 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
// check name limitations
if (ObjectMgr::CheckPlayerName(m_name) != CHAR_NAME_SUCCESS ||
(AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()) && sObjectMgr->IsReservedName(m_name)))
(!GetSession()->HasPermission(RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME) &&
sObjectMgr->IsReservedName(m_name)))
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
stmt->setUInt16(0, uint16(AT_LOGIN_RENAME));