[Crash fix] Target IsInWorld check

This commit is contained in:
Yunfan Li
2024-06-04 09:47:40 +08:00
parent 78f35f1b50
commit 55eecba11b
4 changed files with 14 additions and 3 deletions

View File

@@ -3090,6 +3090,10 @@ bool PlayerbotAI::IsInterruptableSpellCasting(Unit* target, std::string const sp
bool PlayerbotAI::HasAuraToDispel(Unit* target, uint32 dispelType)
{
if (!target->IsInWorld())
{
return false;
}
bool isFriend = bot->IsFriendlyTo(target);
for (uint32 type = SPELL_AURA_NONE; type < TOTAL_AURAS; ++type)
{