コード例 #1
0
ファイル: Program.cs プロジェクト: Lat0ur/ReworkAllScripts
 private static void Drawing_OnDraw(EventArgs args)
 {
     if (!Game.IsInGame || me == null || me.ClassID != ClassID.CDOTA_Unit_Hero_EarthSpirit || Game.IsWatchingGame)
     {
         return;
     }
     if (Game.IsPaused)
     {
         return;
     }
     //TODO:TARGETMARKER
     if (e == null)
     {
         return;
     }
     if (e != null && e.IsValid && !e.IsIllusion && e.IsAlive && e.IsVisible && Menu.Item("others").IsActive())
     {
         DrawTarget();
     }
     else if (particleEffect != null)
     {
         particleEffect.Dispose();
         particleEffect = null;
     }
     else if (particleEffect != null && !Menu.Item("others").IsActive())
     {
         particleEffect.Dispose();
         particleEffect = null;
     }
     // TY  splinterjke.:)
 }
コード例 #2
0
        public static void OnValueChanged(object sender, OnValueChangeEventArgs args)
        {
            var oldOne = args.GetOldValue <KeyBind>().Active;
            var newOne = args.GetNewValue <KeyBind>().Active;

            if (oldOne == newOne)
            {
                return;
            }
            if (newOne)
            {
                _effect?.Dispose();
                _effect = Members.MyHero.AddParticleEffect("materials/ensage_ui/particles/line.vpcf");
                var frontPoint = Members.MyHero.InFront(1200);
                _effect.SetControlPoint(1, Members.MyHero.Position);
                _effect.SetControlPoint(2, frontPoint);
                _effect.SetControlPoint(3, new Vector3(255, 50, 0));
                _effect.SetControlPoint(4, new Vector3(255, 255, 255));
            }
            else
            {
                try
                {
                    _tks.Cancel();
                    _effect?.Dispose();
                }
                catch (Exception)
                {
                    // ignored
                }
            }
        }
コード例 #3
0
 public void PlayerExecution(Hero target)
 {
     if ((target == null || !target.IsAlive || !target.IsValid) && meToTargetParticleEffect != null)
     {
         meToTargetParticleEffect.Dispose();
         meToTargetParticleEffect = null;
     }
 }
コード例 #4
0
 static void Main(string[] args)
 {
     Game.OnUpdate += Game_OnUpdate;
     Orbwalking.Load();
     if (rangeDisplay == null)
     {
         return;
     }
     rangeDisplay.Dispose();
     rangeDisplay = null;
 }
コード例 #5
0
ファイル: SF.cs プロジェクト: aleksanmer/SFKEY
        private static void CastRaze(int number, Hero target)
        {
            var raze = shadowRaze[number];

            if (raze != null && raze.CanBeCasted() && me.CanCast() && Utils.SleepCheck("raze"))
            {
                if (onlyKills)
                {
                    var dmg = CheckRazeDamage(number, target);
                    if (!(dmg >= target.Health))
                    {
                        return;
                    }
                }
                //
                ParticleEffect eff = target.AddParticleEffect("particles/items_fx/aura_shivas.vpcf");
                new Timer(new TimerCallback(delegate(object e)
                {
                    eff.Dispose();
                }), null, 1000, 0);
                //
                me.Attack(target);
                raze.UseAbility();
                Utils.Sleep(800 + (Game.Ping / 1000), "raze");
            }
        }
コード例 #6
0
ファイル: Kunkka.cs プロジェクト: fl0wstream/Ensage-1
        public void OnDraw()
        {
            if (!menuManager.IsEnabled)
            {
                return;
            }

            if (!targetLocked)
            {
                target = TargetSelector.ClosestToMouse(hero, 600);
            }

            if (target == null || xMark.CastRange < hero.Distance2D(target) && !targetLocked || !hero.IsAlive ||
                target.IsLinkensProtected() || target.IsMagicImmune())
            {
                if (targetParticle != null)
                {
                    targetParticle.Dispose();
                    targetParticle = null;
                }
                target = null;
                return;
            }

            if (targetParticle == null)
            {
                targetParticle = new ParticleEffect(@"particles\ui_mouseactions\range_finder_tower_aoe.vpcf", target);
            }

            targetParticle.SetControlPoint(2, hero.Position);
            targetParticle.SetControlPoint(6, new Vector3(1, 0, 0));
            targetParticle.SetControlPoint(7, target.Position);
        }
コード例 #7
0
        private void DrawRange(bool update = false, bool force = false)
        {
            if (!Program.Menu.Item("enabledRanges").GetValue <bool>() && !force)
            {
                return;
            }

            if (update)
            {
                ParticleEffect.Dispose();
            }

            ParticleEffect = new ParticleEffect("particles/ui_mouseactions/drag_selected_ring.vpcf", Position);

            var range = 1790;
            var red   = "red";
            var green = "green";
            var blue  = "blue";

            if (WardType == ClassID.CDOTA_NPC_Observer_Ward_TrueSight)
            {
                range  = 950;
                red   += "S";
                green += "S";
                blue  += "S";
            }

            ParticleEffect.SetControlPoint(1, new Vector3(
                                               Program.GetMenuSliderValue(red),
                                               Program.GetMenuSliderValue(green),
                                               Program.GetMenuSliderValue(blue)));

            ParticleEffect.SetControlPoint(2, new Vector3(range * -1, 255, 0));
        }
コード例 #8
0
ファイル: ShowMeMore.cs プロジェクト: venthorne/EnsageSharp
        private void OnNewParticle(Entity sender, ParticleEffectAddedEventArgs args)
        {
            var name = args.Name;

            if (name.Contains("particles/units/heroes/hero_invoker/invoker_emp.vpcf"))
            {
                DelayAction.Add(10, async() =>
                {
                    var effect      = args.ParticleEffect;
                    var a           = effect.GetControlPoint(0);
                    var rangeEffect = new ParticleEffect("materials/ensage_ui/particles/range_display_mod.vpcf", a);
                    var range       = 675;
                    rangeEffect.SetControlPoint(1, new Vector3(range, 255, 0));
                    rangeEffect.SetControlPoint(2, new Vector3(139, 0, 255));
                    //EmpRanger.Add(effect, rangeEffect);
                    await Task.Delay(2900);
                    rangeEffect.Dispose();
                });
            }
            if (name == "particles/units/heroes/hero_ancient_apparition/ancient_apparition_cold_feet.vpcf")
            {
                DelayAction.Add(10, async() =>
                {
                    var effect      = args.ParticleEffect;
                    var a           = effect.GetControlPoint(0);
                    var rangeEffect = new ParticleEffect("materials/ensage_ui/particles/range_display_mod.vpcf", a);
                    var range       = 740;
                    rangeEffect.SetControlPoint(1, new Vector3(range, 255, 0));
                    rangeEffect.SetControlPoint(2, new Vector3(0, 155, 255));
                    await Task.Delay(4000);
                    rangeEffect.Dispose();
                });
            }
        }
コード例 #9
0
        // Token: 0x06000102 RID: 258 RVA: 0x0000A2FC File Offset: 0x000084FC
        private void OnAddEntity(EntityEventArgs args)
        {
            Unit unit = args.Entity as Unit;

            if (unit == null || unit.Team == this.ownerTeam || unit.DayVision != 0u || unit.Name != "npc_dota_thinker")
            {
                return;
            }
            if (unit.IsVisible)
            {
                if (unit.Modifiers.All((Modifier x) => x.Name != "modifier_radar_thinker"))
                {
                    return;
                }
            }
            this.scanPosition = unit.Position;
            if (this.showOnMap)
            {
                this.scanRadius = new ParticleEffect("particles/ui_mouseactions/drag_selected_ring.vpcf", this.scanPosition);
                this.scanRadius.SetControlPoint(1u, new Vector3(255f, 0f, 0f));
                this.scanRadius.SetControlPoint(2u, new Vector3(-900f, 255f, 0f));
            }
            ObjectManager.OnAddEntity  -= this.OnAddEntity;
            this.context.Renderer.Draw += this.OnDrawPosition;
            UpdateManager.BeginInvoke(delegate
            {
                this.context.Renderer.Draw   -= this.OnDrawPosition;
                ParticleEffect particleEffect = this.scanRadius;
                if (particleEffect == null)
                {
                    return;
                }
                particleEffect.Dispose();
            }, 8000);
        }
コード例 #10
0
        public void SaveSettings(int?red = null, int?green = null, int?blue = null, bool?radiusOnly = null)
        {
            if (red != null)
            {
                Red = red.Value;
            }

            if (green != null)
            {
                Green = green.Value;
            }

            if (blue != null)
            {
                Blue = blue.Value;
            }

            if (radiusOnly != null)
            {
                RadiusOnly = radiusOnly.Value;
                ParticleEffect?.Dispose();
                ParticleEffect = null;
            }

            ParticleEffect?.SetControlPoint(1, new Vector3(Red, Green, Blue));
        }
コード例 #11
0
ファイル: OrbWalker.cs プロジェクト: kj2a/QQENSAGEW
 public static void Target_esp(EventArgs args)
 {
     if (!Game.IsInGame || Game.IsWatchingGame)
     {
         return;
     }
     me = ObjectMgr.LocalHero;
     if (me == null)
     {
         return;
     }
     if (targetParticle == null && target != null)
     {
         targetParticle = new ParticleEffect(@"particles\ui_mouseactions\range_finder_tower_aoe.vpcf", target);
     }
     if ((target == null || !target.IsVisible || !target.IsAlive) && targetParticle != null)
     {
         targetParticle.Dispose();
         targetParticle = null;
     }
     if (target != null && targetParticle != null)
     {
         targetParticle.SetControlPoint(2, me.Position);
         targetParticle.SetControlPoint(6, new Vector3(1, 0, 0));
         targetParticle.SetControlPoint(7, target.Position);
     }
 }
コード例 #12
0
        public void OnDraw()
        {
            if (!menuManager.IsEnabled)
            {
                return;
            }

            if (!target.Locked)
            {
                target.NewTarget(TargetSelector.ClosestToMouse(hero, 600));
            }

            if (!target.IsValid() || hero.Distance2D(target.GetPosition()) > 1400 && !target.Locked || !hero.IsAlive)
            {
                if (targetParticle != null)
                {
                    targetParticle.Dispose();
                    targetParticle = null;
                }
                return;
            }

            if (targetParticle == null)
            {
                targetParticle = new ParticleEffect(
                    @"particles\ui_mouseactions\range_finder_tower_aoe.vpcf",
                    target.GetPosition(true));
            }

            targetParticle.SetControlPoint(2, heroPosition = hero.Position);
            targetParticle.SetControlPoint(6, new Vector3(1, 0, 0));
            targetParticle.SetControlPoint(7, target.GetPosition(true));
        }
コード例 #13
0
 public static void SmartBlink(EventArgs args)
 {
     if (!Game.IsInGame || Game.IsWatchingGame)
     {
         return;
     }
     me = ObjectMgr.LocalHero;
     if (me == null)
     {
         return;
     }
     if (me.ClassID != ClassID.CDOTA_Unit_Hero_Tinker)
     {
         return;
     }
     if (((Game.IsKeyDown(Menu.Item("Smart Blink").GetValue <KeyBind>().Key)) && !Game.IsChatOpen) && Utils.SleepCheck("SmartblinkTime"))
     {
         smartblink_option = !smartblink_option;
         Blink             = me.FindItem("item_blink");
         Utils.Sleep(300, "SmartblinkTime");
         mousepos = Game.MousePosition;
         if (SmartBlinkEffect != null)
         {
             SmartBlinkEffect.Dispose();
         }
         SmartBlinkEffect = new ParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf", mousepos);
     }
     if (smartblink_option)
     {
         SmartBlinkEffect.SetControlPoint(2, new Vector3(50, 255, 400));
         SmartBlinkEffect.SetControlPoint(1, new Vector3(200, 34, 76));
         if (Blink != null && Blink.CanBeCasted() && !me.IsChanneling() && !me.Spellbook.Spells.Any(x => x.IsInAbilityPhase) && Utils.SleepCheck("blink"))
         {
             Blink.UseAbility(me.Distance2D(mousepos) < 1200 ? mousepos : new Vector3(me.NetworkPosition.X + 1150 * (float)Math.Cos(me.NetworkPosition.ToVector2().FindAngleBetween(mousepos.ToVector2(), true)), me.NetworkPosition.Y + 1150 * (float)Math.Sin(me.NetworkPosition.ToVector2().FindAngleBetween(mousepos.ToVector2(), true)), 100), false);
             Utils.Sleep(50, "blink");
         }
         if (Blink.Cooldown >= 11.5)
         {
             smartblink_option = false;
         }
     }
     else if (SmartBlinkEffect != null)
     {
         SmartBlinkEffect.Dispose();
     }
 }
コード例 #14
0
ファイル: Drawings.cs プロジェクト: LimbViolencer/Ensage-1
        public static void DisposeDestroeydTowers()
        {
            var towers = ObjectMgr.GetEntities <Unit>().Where(x => x.ClassID == ClassID.CDOTA_BaseNPC_Tower).ToList();

            foreach (var tower in towers)
            {
                ParticleDictionary.TryGetValue(tower.Handle.ToString(), out particleEffect);

                if (tower.IsAlive || particleEffect == null)
                {
                    continue;
                }

                particleEffect.Dispose();
                ParticleDictionary.Remove(tower.Handle.ToString());
            }
        }
コード例 #15
0
        private async void OnNewModifier(Unit sender, ModifierChangedEventArgs args)
        {
            var mod  = args.Modifier;
            var name = mod.Name;

            if (name == "modifier_spirit_breaker_charge_of_darkness_vision")
            {
                if (sender.Team == Config.Main.Owner.Team)
                {
                    var effectName = "materials/ensage_ui/particles/spirit_breaker_charge_target.vpcf";
                    if (!(sender is Hero))
                    {
                        effectName = "particles/units/heroes/hero_spirit_breaker/spirit_breaker_charge_target.vpcf";
                    }
                    else
                    {
                        Program.GenerateSideMessage(sender.Name,
                                                    AbilityId.spirit_breaker_charge_of_darkness.ToString());
                    }
                    var effect   = new ParticleEffect(effectName, sender, ParticleAttachment.OverheadFollow);
                    var wasLocal = false;
                    if (sender.Equals(ObjectManager.LocalHero))
                    {
                        wasLocal        = true;
                        Drawing.OnDraw += DrawingOnOnDraw;
                    }

                    while (mod.IsValid)
                    {
                        await Task.Delay(100);
                    }
                    if (wasLocal)
                    {
                        Drawing.OnDraw -= DrawingOnOnDraw;
                    }
                    effect.Dispose();
                }
            }
            else if (name == "modifier_life_stealer_infest_effect")
            {
                var effectName = "materials/ensage_ui/particles/life_stealer_infested_unit.vpcf";
                if (!(sender is Hero))
                {
                    effectName = "particles/units/heroes/hero_life_stealer/life_stealer_infested_unit.vpcf";
                }
                else
                {
                    Program.GenerateSideMessage(sender.Name, AbilityId.life_stealer_infest.ToString());
                }

                var effect = new ParticleEffect(effectName, sender, ParticleAttachment.OverheadFollow);
                while (mod.IsValid)
                {
                    await Task.Delay(100);
                }
                effect.Dispose();
            }
        }
コード例 #16
0
ファイル: EXP_RANGE.cs プロジェクト: rivaillle/EnsageSharp
 public static void Tick(EventArgs args)
 {
     if (!Game.IsInGame || Game.IsWatchingGame)
     {
         return;
     }
     me = ObjectMgr.LocalHero;
     if (me == null)
     {
         return;
     }
     if (me.ClassID == ClassID.CDOTA_Unit_Hero_Meepo)
     {
         List <Hero> meepo = ObjectMgr.GetEntities <Hero>().Where(x => x.Team == me.Team && x.Name == me.Name).ToList();
         uint        i     = 0;
         foreach (Hero m in meepo)
         {
             i++;
             if (m.IsAlive)
             {
                 if (rangedisplay_meepo[i] == null)
                 {
                     rangedisplay_meepo[i] = m.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
                 }
                 if (rangedisplay_meepo[i].GetHighestControlPoint() != 2)
                 {
                     rangedisplay_meepo[i] = m.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
                     rangedisplay_meepo[i].SetControlPoint(1, new Vector3(255, 255, 0));
                     rangedisplay_meepo[i].SetControlPoint(2, new Vector3(_range_exp, 255, 0));
                 }
             }
             else
             {
                 rangedisplay_meepo[i].Dispose();
             }
         }
     }
     else
     {
         if (me.IsAlive)
         {
             if (rangedisplay == null)
             {
                 rangedisplay = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
             }
             if (rangedisplay.GetHighestControlPoint() != 2)
             {
                 rangedisplay = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
                 rangedisplay.SetControlPoint(1, new Vector3(255, 255, 0));
                 rangedisplay.SetControlPoint(2, new Vector3(_range_exp, 255, 0));
             }
         }
         else
         {
             rangedisplay.Dispose();
         }
     }
 }
コード例 #17
0
 public void OnClose()
 {
     menuManager.OnClose();
     allSpells.Clear();
     targetParticle?.Dispose();
     targetParticle = null;
     target         = null;
     targetLocked   = false;
 }
コード例 #18
0
ファイル: FarmUnit.cs プロジェクト: Mej0/a
        public void RemoveFarmActiveEffect()
        {
            if (_farmActiveEffect == null)
            {
                return;
            }

            _farmActiveEffect.Dispose();
            _farmActiveEffect = null;
        }
コード例 #19
0
        // Token: 0x06000337 RID: 823 RVA: 0x00004144 File Offset: 0x00002344
        public virtual void RemoveRange()
        {
            ParticleEffect rangeParticle = this.RangeParticle;

            if (rangeParticle == null)
            {
                return;
            }
            rangeParticle.Dispose();
        }
コード例 #20
0
ファイル: FarmUnit.cs プロジェクト: Mej0/a
        public void RemoveRangeEffect()
        {
            if (RangeEffect == null)
            {
                return;
            }

            RangeEffect.Dispose();
            RangeEffect = null;
        }
コード例 #21
0
ファイル: Drawer.cs プロジェクト: vana41203/O9K
        public static void Dispose()
        {
            foreach (var particleEffect in Particles)
            {
                particleEffect?.Dispose();
            }

            greenParticle?.Dispose();
            redParticle?.Dispose();
        }
コード例 #22
0
        public static void DisposeRange(string key)
        {
            ParticleDictionary.TryGetValue(key, out particleEffect);

            if (particleEffect == null)
            {
                return;
            }

            particleEffect.Dispose();
            ParticleDictionary.Remove(key);
        }
コード例 #23
0
        public static void OnValueChanged(object sender, OnValueChangeEventArgs args)
        {
            var oldOne = args.GetOldValue <KeyBind>().Active;
            var newOne = args.GetNewValue <KeyBind>().Active;

            if (oldOne == newOne || newOne)
            {
                return;
            }
            try
            {
                _tks.Cancel();
                _globalTarget = null;
                _targetEffect?.Dispose();
                _targetEffect = null;
            }
            catch (Exception)
            {
                // ignored
            }
        }
コード例 #24
0
        // Token: 0x0600006D RID: 109 RVA: 0x00009074 File Offset: 0x00007274
        public void Disable()
        {
            ParticleEffect particleEffect = this.targetParticleEffect;

            if (particleEffect != null)
            {
                particleEffect.Dispose();
            }
            UpdateManager.Unsubscribe(new Action(this.OnUpdate));
            EntityManager9.UnitAdded   -= new EntityManager9.EventHandler <Unit9>(this.OnUnitAdded);
            EntityManager9.UnitRemoved -= new EntityManager9.EventHandler <Unit9>(this.OnUnitRemoved);
        }
コード例 #25
0
        // Token: 0x06000195 RID: 405 RVA: 0x0000DC00 File Offset: 0x0000BE00
        public void Dispose()
        {
            EntityManager9.AbilityAdded -= this.OnAbilityAdded;
            this.show.ValueChange       -= this.ShowOnValueChange;
            Unit.OnModifierAdded        -= this.OnModifierAdded;
            ParticleEffect particleEffect = this.effect;

            if (particleEffect == null)
            {
                return;
            }
            particleEffect.Dispose();
        }
コード例 #26
0
        // Token: 0x06000060 RID: 96 RVA: 0x0000239C File Offset: 0x0000059C
        public void Dispose()
        {
            ParticleEffect particleEffect = this.particleEffect;

            if (particleEffect != null)
            {
                particleEffect.Dispose();
            }
            this.particleEffect = null;
            this.enabled        = false;
            this.Range          = 0f;
            this.DrawRange      = 0f;
        }
コード例 #27
0
        private static void OnParticleEvent(Entity hero, ParticleEffectAddedEventArgs args)
        {
            if (hero.Name.Contains("npc_dota_neutral_") && Menu.Item("enable").GetValue <bool>())
            {
                DelayAction.Add(50, () =>
                {
                    var GetControlPoint     = args.ParticleEffect.GetControlPoint(0);
                    List <Vector2> Position = new List <Vector2>();

                    if (!args.ParticleEffect.Owner.IsVisible)
                    {
                        Position.Add(HUDInfo.WorldToMinimap(GetControlPoint));
                        DelayAction.Add(1000, () =>
                        {
                            Position.RemoveAt(0);
                        });

                        Drawing.OnEndScene += argst =>
                        {
                            if (Drawing.Direct3DDevice9 == null)
                            {
                                return;
                            }
                            foreach (var pos in Position.ToList())
                            {
                                if (!pos.IsZero && Menu.Item("enableminimap").GetValue <bool>())
                                {
                                    Font.DrawText(null, "○", (int)pos.X - 15 + 2, (int)pos.Y - 30 + 2, Color.White);
                                    Font.DrawText(null, "○", (int)pos.X - 15, (int)pos.Y - 30, Color.White);
                                }
                            }
                        };
                        if (!GetControlPoint.IsZero && Menu.Item("enableradius").GetValue <bool>())
                        {
                            ParticleEffect range = new ParticleEffect(@"materials\ensage_ui\particles\junglescanplus.vpcf", GetControlPoint);
                            range.SetControlPoint(1, new Vector3(500, 255, 0));
                            range.SetControlPoint(2, new Vector3(255, 0, 0));
                            DelayAction.Add(500, () =>
                            {
                                if (range != null)
                                {
                                    range.Dispose();
                                    range = null;
                                }
                            });
                        }
                    }
                });
            }
        }
コード例 #28
0
ファイル: Program.cs プロジェクト: maycuatroi/ensagexxx
 private static void On_Close(object sender, EventArgs e)
 {
     if (menuadded)
     {
         Menu.RemoveFromMainMenu();
     }
     if (Effect.TryGetValue(1, out effect))
     {
         effect.Dispose();
         Effect.Remove(1);
     }
     if (Effect.TryGetValue(2, out effect))
     {
         effect.Dispose();
         Effect.Remove(2);
     }
     if (Effect.TryGetValue(3, out effect))
     {
         effect.Dispose();
         Effect.Remove(3);
     }
     menuadded = false;
 }
コード例 #29
0
        // Token: 0x06000175 RID: 373 RVA: 0x0000D2E0 File Offset: 0x0000B4E0
        public void Dispose()
        {
            EntityManager9.AbilityAdded  -= this.OnAbilityAdded;
            this.show.ValueChange        -= this.ShowOnValueChange;
            Entity.OnParticleEffectAdded -= this.OnParticleEffectAdded;
            ObjectManager.OnAddEntity    -= this.OnAddEntity;
            ParticleEffect particleEffect = this.effect;

            if (particleEffect == null)
            {
                return;
            }
            particleEffect.Dispose();
        }
コード例 #30
0
 // Token: 0x06000178 RID: 376 RVA: 0x0000D4B4 File Offset: 0x0000B6B4
 private void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args)
 {
     try
     {
         string name = args.Name;
         if (!(name == "particles/units/heroes/hero_ancient_apparition/ancient_apparition_ice_blast_final.vpcf") && !(name == "particles/econ/items/ancient_apparition/aa_blast_ti_5/ancient_apparition_ice_blast_final_ti5.vpcf"))
         {
             if (name == "particles/econ/items/ancient_apparition/aa_blast_ti_5/ancient_apparition_ice_blast_explode_ti5.vpcf" || name == "particles/units/heroes/hero_ancient_apparition/ancient_apparition_ice_blast_explode.vpcf")
             {
                 Entity.OnParticleEffectAdded -= this.OnParticleEffectAdded;
                 ParticleEffect particleEffect = this.effect;
                 if (particleEffect != null)
                 {
                     particleEffect.Dispose();
                 }
             }
         }
         else
         {
             float time = Game.RawGameTime - Game.Ping / 1000f;
             UpdateManager.BeginInvoke(delegate
             {
                 try
                 {
                     ParticleEffect particleEffect2 = args.ParticleEffect;
                     if (particleEffect2.IsValid)
                     {
                         Vector3 controlPoint  = particleEffect2.GetControlPoint(0u);
                         Vector3 controlPoint2 = particleEffect2.GetControlPoint(1u);
                         float num             = time - this.unitAddTime;
                         Vector3 to            = controlPoint + controlPoint2;
                         Vector3 v             = controlPoint.Extend2D(to, num * this.speed.GetValue(1u));
                         float num2            = Math.Min(this.maxRadius.GetValue(1u), Math.Max(num * this.growRadius.GetValue(1u) + this.minRadius.GetValue(1u), this.minRadius.GetValue(1u)));
                         this.effect           = new ParticleEffect("particles/units/heroes/hero_ancient_apparition/ancient_apparition_ice_blast_marker.vpcf", v.SetZ(new float?((float)384)));
                         this.effect.SetControlPoint(1u, new Vector3(num2, 1f, 1f));
                     }
                 }
                 catch (Exception exception2)
                 {
                     Logger.Error(exception2, null);
                 }
             }, 0);
         }
     }
     catch (Exception exception)
     {
         Logger.Error(exception, null);
     }
 }