BG BotFill : bypass du check de nom pour les sessions bots au login
Player::LoadFromDB refusait silencieusement les persos bots (noms avec chiffres type Bot5951) et posait AT_LOGIN_RENAME en boucle. Les 181 bots ont ete renommes en base via ai_playerbot_names, et les sessions bots ne passent plus par CheckPlayerName. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -18624,8 +18624,11 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder const& hol
|
|||||||
m_name = fields[2].GetString();
|
m_name = fields[2].GetString();
|
||||||
|
|
||||||
// check name limitations
|
// check name limitations
|
||||||
if (ObjectMgr::CheckPlayerName(m_name, GetSession()->GetSessionDbcLocale()) != CHAR_NAME_SUCCESS ||
|
// SylvaniaCore (module BG BotFill): les sessions bots ne sont pas soumises au check de
|
||||||
(!GetSession()->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME) && sObjectMgr->IsReservedName(m_name)))
|
// nom - sinon echec de login silencieux (return false) + flag rename pose en boucle
|
||||||
|
if (!GetSession()->IsBotSession() &&
|
||||||
|
(ObjectMgr::CheckPlayerName(m_name, GetSession()->GetSessionDbcLocale()) != CHAR_NAME_SUCCESS ||
|
||||||
|
(!GetSession()->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME) && sObjectMgr->IsReservedName(m_name))))
|
||||||
{
|
{
|
||||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||||
stmt->setUInt16(0, uint16(AT_LOGIN_RENAME));
|
stmt->setUInt16(0, uint16(AT_LOGIN_RENAME));
|
||||||
|
|||||||
Reference in New Issue
Block a user