Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-09-21 09:42:10 -06:00
committed by GitHub
27 changed files with 327 additions and 72 deletions

View File

@@ -422,7 +422,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
std::function<void(PreparedQueryResult)> finalizeCharacterCreation = [this, createInfo](PreparedQueryResult result)
{
if (!sScriptMgr->CanAccountCreateCharacter(createInfo, GetAccountId()))
if (!sScriptMgr->CanAccountCreateCharacter(GetAccountId(), createInfo->Race, createInfo->Class))
{
SendCharCreate(CHAR_CREATE_DISABLED);
return;
@@ -948,7 +948,11 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
// Set FFA PvP for non GM in non-rest mode
if (sWorld->IsFFAPvPRealm() && !pCurrChar->IsGameMaster() && !pCurrChar->HasPlayerFlag(PLAYER_FLAGS_RESTING))
pCurrChar->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
if (!pCurrChar->HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
{
sScriptMgr->OnFfaPvpStateUpdate(pCurrChar,true);
pCurrChar->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
}
if (pCurrChar->HasPlayerFlag(PLAYER_FLAGS_CONTESTED_PVP))
{