From 5bc71a454244f89242aeb065648ceaa527014d31 Mon Sep 17 00:00:00 2001 From: "Bogir[rus]" Date: Fri, 8 Apr 2022 18:24:34 +0500 Subject: [PATCH] check if player already is member of any Arena-tream --- src/PlayerbotFactory.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index 0c9eb975..1cf346ec 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -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());