/// <summary> /// Fired when the game processes the spell cast. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="GameObjectProcessSpellCastEventArgs" /> instance containing the event data.</param> private static void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (sender is Obj_AI_Base) { var entry = new LastCastedSpellEntry(args.SData.Name, Utils.TickCount, ObjectManager.Player); if (CastedSpells.ContainsKey(sender.NetworkId)) { CastedSpells[sender.NetworkId] = entry; } else { CastedSpells.Add(sender.NetworkId, entry); } } }