Core/AI: Implement OnAuraApplied and OnAuraRemoved hooks

Port From (https://github.com/TrinityCore/TrinityCore/commit/d1e07ac6553c7ae1e3296fc044247f0d0f95d267)
This commit is contained in:
Hondacrx
2025-12-08 15:10:55 -05:00
parent a478baf421
commit 6da69c8263
6 changed files with 40 additions and 1 deletions
+13
View File
@@ -1486,6 +1486,19 @@ namespace Game.Spells
}
break;
}
Creature creature = target.ToCreature();
if (creature != null)
{
var ai = creature.GetAI();
if (ai != null)
{
if (apply)
ai.OnAuraApplied(aurApp);
else
ai.OnAuraRemoved(aurApp);
}
}
}
bool CanBeAppliedOn(Unit target)