From cf4f0f6dc770f24a628273b7bf635c081bb022c1 Mon Sep 17 00:00:00 2001 From: bash Date: Mon, 6 Oct 2025 21:07:43 +0200 Subject: [PATCH] renamed function name --- src/PlayerbotAI.cpp | 6 +++--- src/PlayerbotAI.h | 2 +- src/PlayerbotMgr.cpp | 2 +- src/RandomPlayerbotMgr.cpp | 8 ++++---- src/strategy/actions/LeaveGroupAction.cpp | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index aa161734..9a670961 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -378,7 +378,7 @@ void PlayerbotAI::UpdateAIGroupMembership() PlayerbotAI* leaderAI = GET_PLAYERBOT_AI(leader); if (leaderAI && !leaderAI->IsRealPlayer()) { - RemoveFromGroup(); + LeaveOrDisbandGroup(); } } } @@ -402,7 +402,7 @@ void PlayerbotAI::UpdateAIGroupMembership() } if (!hasRealPlayer) { - RemoveFromGroup(); + LeaveOrDisbandGroup(); } } } @@ -785,7 +785,7 @@ void PlayerbotAI::Reset(bool full) } } -void PlayerbotAI::RemoveFromGroup() +void PlayerbotAI::LeaveOrDisbandGroup() { if (!bot || !bot->GetGroup() || IsRealPlayer()) return; diff --git a/src/PlayerbotAI.h b/src/PlayerbotAI.h index a5ac2bd8..3ae3eaf2 100644 --- a/src/PlayerbotAI.h +++ b/src/PlayerbotAI.h @@ -415,7 +415,7 @@ public: void ResetStrategies(bool load = false); void ReInitCurrentEngine(); void Reset(bool full = false); - void RemoveFromGroup(); + void LeaveOrDisbandGroup(); static bool IsTank(Player* player, bool bySpec = false); static bool IsHeal(Player* player, bool bySpec = false); static bool IsDps(Player* player, bool bySpec = false); diff --git a/src/PlayerbotMgr.cpp b/src/PlayerbotMgr.cpp index f5aefe45..074c7a3b 100644 --- a/src/PlayerbotMgr.cpp +++ b/src/PlayerbotMgr.cpp @@ -514,7 +514,7 @@ void PlayerbotHolder::OnBotLogin(Player* const bot) if (!groupValid) { - botAI->RemoveFromGroup(); + botAI->LeaveOrDisbandGroup(); } } diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index ebab628f..1a28e40c 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1559,7 +1559,7 @@ bool RandomPlayerbotMgr::ProcessBot(Player* bot) Group* group = bot->GetGroup(); if (group && !group->isLFGGroup() && IsRandomBot(group->GetLeader())) { - botAI->RemoveFromGroup(); + botAI->LeaveOrDisbandGroup(); LOG_INFO("playerbots", "Bot {} remove from group since leader is random bot.", bot->GetName().c_str()); } @@ -2463,7 +2463,7 @@ void RandomPlayerbotMgr::RandomizeFirst(Player* bot) botAI->Reset(true); if (bot->GetGroup()) - botAI->RemoveFromGroup(); + botAI->LeaveOrDisbandGroup(); if (pmo) pmo->finish(); @@ -2504,7 +2504,7 @@ void RandomPlayerbotMgr::RandomizeMin(Player* bot) botAI->Reset(true); if (bot->GetGroup()) - botAI->RemoveFromGroup(); + botAI->LeaveOrDisbandGroup(); if (pmo) pmo->finish(); @@ -2586,7 +2586,7 @@ void RandomPlayerbotMgr::Refresh(Player* bot) bot->SetMoney(money + 500 * sqrt(urand(1, bot->GetLevel() * 5))); if (bot->GetGroup()) - botAI->RemoveFromGroup(); + botAI->LeaveOrDisbandGroup(); if (pmo) pmo->finish(); diff --git a/src/strategy/actions/LeaveGroupAction.cpp b/src/strategy/actions/LeaveGroupAction.cpp index 172bf399..88567b1d 100644 --- a/src/strategy/actions/LeaveGroupAction.cpp +++ b/src/strategy/actions/LeaveGroupAction.cpp @@ -86,7 +86,7 @@ bool LeaveGroupAction::Leave(Player* player) bool shouldStay = randomBot && bot->GetGroup() && player == bot; if (!shouldStay) { - botAI->RemoveFromGroup(); + botAI->LeaveOrDisbandGroup(); } if (randomBot)