Rename groupmaster to groupleader and related variables. (#1875)

Fix the naming conventions. 
Master should be reserved to identify a bots Master. 
groupleaders are not necessarily group masters and it should be clear
what the bot is looking for. (In most solo cases leader=master)
This commit is contained in:
Keleborn
2025-12-03 04:25:01 -08:00
committed by GitHub
parent 38e2d8584b
commit 52c3e96641
29 changed files with 101 additions and 101 deletions

View File

@@ -420,7 +420,7 @@ void PlayerbotAI::UpdateAIGroupAndMaster()
{
botAI->ChangeStrategy("+follow", BOT_STATE_NON_COMBAT);
if (botAI->GetMaster() == botAI->GetGroupMaster())
if (botAI->GetMaster() == botAI->GetGroupLeader())
botAI->TellMaster("Hello, I follow you!");
else
botAI->TellMaster(!urand(0, 2) ? "Hello!" : "Hi!");
@@ -4093,7 +4093,7 @@ Player* PlayerbotAI::FindNewMaster()
if (!group)
return nullptr;
Player* groupLeader = GetGroupMaster();
Player* groupLeader = GetGroupLeader();
PlayerbotAI* leaderBotAI = GET_PLAYERBOT_AI(groupLeader);
if (!leaderBotAI || leaderBotAI->IsRealPlayer())
return groupLeader;
@@ -4144,7 +4144,7 @@ bool PlayerbotAI::HasActivePlayerMaster() { return master && !GET_PLAYERBOT_AI(m
bool PlayerbotAI::IsAlt() { return HasRealPlayerMaster() && !sRandomPlayerbotMgr->IsRandomBot(bot); }
Player* PlayerbotAI::GetGroupMaster()
Player* PlayerbotAI::GetGroupLeader()
{
if (!bot->InBattleground())
if (Group* group = bot->GetGroup())