mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
check if player already is member of any Arena-tream
This commit is contained in:
parent
ca1a012325
commit
5bc71a4542
@ -2576,6 +2576,9 @@ void PlayerbotFactory::InitArenaTeam()
|
||||
ObjectGuid capt = arenateam->GetCaptain();
|
||||
Player* botcaptain = ObjectAccessor::FindPlayer(capt);
|
||||
|
||||
if (sCharacterCache->GetCharacterArenaTeamIdByGuid(capt, arenateam->GetType()) != 0)
|
||||
return;
|
||||
|
||||
if (botcaptain && botcaptain->GetTeamId() == bot->GetTeamId()) //need?
|
||||
{
|
||||
arenateam->AddMember(bot->GetGUID());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user