[Crash] Fix raid/group crash regression (#4671)

This commit is contained in:
Chris Miles 2025-02-11 23:25:29 -06:00 committed by GitHub
parent c228604255
commit ac4ffefa09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2686,7 +2686,11 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
}
}
} else if (spell_target->IsRaidGrouped() && spell_target->IsOfClientBot()) {
Raid *target_raid = (IsClient() ? entity_list.GetRaidByClient(spell_target->CastToClient()) : entity_list.GetRaidByBot(spell_target->CastToBot()));
Raid *target_raid = entity_list.GetRaidByClient(spell_target->CastToClient());
if (IsBot()) {
target_raid = entity_list.GetRaidByBot(spell_target->CastToBot());
}
uint32 gid = 0xFFFFFFFF;
if (target_raid) {
gid = target_raid->GetGroup(spell_target->GetName());