Exemple #1
0
 /// <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 AIHeroClient)
     {
         var entry = new LastCastedSpellEntry(args.SData.Name, TumbleExtensions.GameTickCount,
                                              ObjectManager.Player);
         if (CastedSpells.ContainsKey(sender.NetworkId))
         {
             CastedSpells[sender.NetworkId] = entry;
         }
         else
         {
             CastedSpells.Add(sender.NetworkId, entry);
         }
     }
 }
Exemple #2
0
 /// <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 AIHeroClient)
     {
         var entry = new LastCastedSpellEntry(args.SData.Name, TumbleExtensions.GameTickCount,
             ObjectManager.Player);
         if (CastedSpells.ContainsKey(sender.NetworkId))
         {
             CastedSpells[sender.NetworkId] = entry;
         }
         else
         {
             CastedSpells.Add(sender.NetworkId, entry);
         }
     }
 }