Update PlayerbotFactory.cpp

This commit is contained in:
Bogir[rus]
2022-04-09 15:06:32 +05:00
committed by GitHub
parent 76155fc2ca
commit ba8f6fd119

View File

@@ -2576,8 +2576,7 @@ void PlayerbotFactory::InitArenaTeam()
ObjectGuid capt = arenateam->GetCaptain();
Player* botcaptain = ObjectAccessor::FindPlayer(capt);
if (sCharacterCache->GetCharacterArenaTeamIdByGuid(capt, arenateam->GetType()) != 0 || botcaptain->GetArenaTeamId(arenateam->GetType()))
return;
if ((bot && bot->GetArenaTeamId(arenateam->GetSlot())) || sCharacterCache->GetCharacterArenaTeamIdByGuid(bot->GetGUID(), arenateam->GetSlot()) != 0)
if (botcaptain && botcaptain->GetTeamId() == bot->GetTeamId()) //need?
{