private void Obj_AI_Base_OnCreate(GameObject sender, EventArgs args)
{
if (!IsActive())
{
return;
}
foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>())
{
if (hero.IsEnemy)
{
foreach (var ability in Abilities)
{
if (sender.Name.Contains(ability.Key.SpellName))
{
ability.Key.Casted = true;
ability.Key.TimeCasted = (int)Game.ClockTime;
if (SpellTimer.GetMenuItem("SAssembliesTimersSpellSpeech").GetValue <bool>())
{
Speech.Speak(ability.Key.Name + " casted on " + hero.ChampionName);
}
CreateText(ability.Key, hero, sender);
}
}
}
}
}