[Bots] Fix unresponsive bots in groups upon group wipe (#4712)

- Bots were failing to recall their group after dying due to the way it was grabbing the group from entity list.
This commit is contained in:
nytmyr 2025-02-28 16:10:46 -06:00 committed by GitHub
parent eb6ac25540
commit 805757ba87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3728,7 +3728,7 @@ bool Bot::Spawn(Client* botCharacterOwner) {
SetVerifiedRaid(true);
}
}
else if (auto group = entity_list.GetGroupByMob(this)) {
else if (auto group = entity_list.GetGroupByMobName(GetName())) {
// Safety Check to confirm we have a valid group
auto owner = GetBotOwner();
if (owner && !group->IsGroupMember(owner->GetCleanName())) {
@ -3744,7 +3744,7 @@ bool Bot::Spawn(Client* botCharacterOwner) {
if (RuleB(Bots, RunSpellTypeChecksOnSpawn)) {
OwnerMessage("Running SpellType checks. There may be some spells that are mislabeled as incorrect. Use this as a loose guideline.");
CheckBotSpells(); //This runs through a serious of checks and outputs any spells that are set to the wrong spell type in the database
CheckBotSpells(); //This runs through a series of checks and outputs any spells that are set to the wrong spell type in the database
}
if (IsBotRanged()) {