Example #1
0
 private static void SpellDetector_OnSpellCast(BattleRight.SDK.EventsArgs.SpellCastArgs args)
 {
     if (args.Caster.Name != LocalPlayer.Instance.Name)
     {
         return;
     }
     _isCasting = true;
     _castingId = args.Caster.AbilitySystem.CastingAbilityId;
 }
        private static void SpellDetector_OnSpellCast(BattleRight.SDK.EventsArgs.SpellCastArgs args)
        {
            if (!_logEnabled)
            {
                return;
            }
            if (_onlyLogLocal && args.Caster.Name != LocalPlayer.Instance.Name)
            {
                return;
            }

            var absys = args.Caster.AbilitySystem;

            Console.WriteLine("New Cast:");
            Console.WriteLine("Owner: " + args.Caster.CharName);
            Console.WriteLine("Name: " + args.Caster.AbilitySystem.CastingAbilityName);
            Console.WriteLine("Id: " + absys.CastingAbilityId);
            Console.WriteLine("Index: " + args.AbilityIndex);
            Console.WriteLine("----");
        }