示例#1
0
        public static void UpdateSpellInfo(this Spell spell)
        {
            spell.CurrentSpellPosition    = spell.GetCurrentSpellPosition();
            spell.CurrentNegativePosition = spell.GetCurrentSpellPosition(true, 0);

            spell.Dangerlevel = spell.GetSpellDangerLevel();
            //spell.radius = spell.GetSpellRadius();
        }
示例#2
0
        public static float GetSpellHitTime(this Spell spell, Vector2 pos)
        {
            if (spell.SpellType == SpellType.Line)
            {
                if (spell.Info.ProjectileSpeed == float.MaxValue)
                {
                    return(Math.Max(0, spell.EndTime - EvadeUtils.TickCount - Game.Ping));
                }

                var spellPos = spell.GetCurrentSpellPosition(true, Game.Ping);
                return(1000 * spellPos.Distance(pos) / spell.Info.ProjectileSpeed);
            }
            else if (spell.SpellType == SpellType.Circular)
            {
                return(Math.Max(0, spell.EndTime - EvadeUtils.TickCount - Game.Ping));
            }

            return(float.MaxValue);
        }