Core/AI: Implement OnAuraApplied and OnAuraRemoved hooks
Port From (https://github.com/TrinityCore/TrinityCore/commit/d1e07ac6553c7ae1e3296fc044247f0d0f95d267)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user