Beispiel #1
0
 public void UpdateInfo()
 {
     try
     {
         // fix
         var extraDelayBuffer = ObjectCache.menuCache.cache["ExtraPingBuffer"].As <MenuSlider>().Value;
         serverPos2D      = hero.ServerPosition.To2D(); //CalculatedPosition.GetPosition(hero, Game.Ping);
         serverPos2DExtra = EvadeUtils.GetGamePosition(hero, Game.Ping + extraDelayBuffer);
         serverPos2DPing  = EvadeUtils.GetGamePosition(hero, Game.Ping);
         //CalculatedPosition.GetPosition(hero, Game.Ping + extraDelayBuffer);
         currentPosition = hero.Position.To2D(); //CalculatedPosition.GetPosition(hero, 0);
         boundingRadius  = hero.BoundingRadius;
         moveSpeed       = hero.MoveSpeed;
         HasPath         = hero.HasPath;
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
Beispiel #2
0
        private void Game_OnCastSpell(Obj_AI_Base sender, SpellBookCastSpellEventArgs e)
        {
            checkPing = false;

            if (!sender.IsMe)
            {
                return;
            }

            lastSpellCastArgs = e;


            if (myHero.HasPath && myHero.Path.Count() > 0)
            {
                lastSpellCastServerPos = EvadeUtils.GetGamePosition(myHero, Game.Ping);
                lastSpellCastEndPos    = myHero.Path.Last().To2D();
                checkPing = true;

                RenderObjects.Add(new RenderCircle(lastSpellCastServerPos, 1000, Color.Green, 10));
            }
        }