// Token: 0x060008DB RID: 2267 RVA: 0x000226F8 File Offset: 0x000208F8
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.zuus_static_field)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability != null)
            {
                this.staticField = (StaticField)EntityManager9.AddAbility(ability);
            }
            ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.zuus_lightning_bolt)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });
            if (ability != null)
            {
                this.lightningBolt = (LightningBolt)EntityManager9.AddAbility(ability);
            }
        }
Beispiel #2
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.juggernaut_omni_slash && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                return;
            }

            this.omnislash = (Omnislash)EntityManager9.AddAbility(ability);
        }
Beispiel #3
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.ancient_apparition_ice_blast_release && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.iceBlastRelease));
            }

            this.iceBlastRelease = (IceBlastRelease)EntityManager9.AddAbility(ability);
        }
Beispiel #4
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.earthshaker_aftershock && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                return;
            }

            this.aftershock = (Aftershock)EntityManager9.AddAbility(ability);
        }
Beispiel #5
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.morphling_morph_agi && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.AttributeShiftAgilityGain));
            }

            this.AttributeShiftAgilityGain = (AttributeShiftAgilityGain)EntityManager9.AddAbility(ability);
        }
Beispiel #6
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.zuus_static_field && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                return;
            }

            this.staticField = (StaticField)EntityManager9.AddAbility(ability);
        }
Beispiel #7
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.monkey_king_untransform && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.revertForm));
            }

            this.revertForm = (RevertForm)EntityManager9.AddAbility(ability);
        }
Beispiel #8
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.phoenix_fire_spirits && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.fireSpirits));
            }

            this.fireSpirits = (FireSpirits)EntityManager9.AddAbility(ability);
        }
Beispiel #9
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.phoenix_icarus_dive_stop && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.icarusDiveStop));
            }

            this.icarusDiveStop = (IcarusDiveStop)EntityManager9.AddAbility(ability);
        }
Beispiel #10
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.tusk_launch_snowball && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.launch));
            }

            this.launch = (LaunchSnowball)EntityManager9.AddAbility(ability);
        }
Beispiel #11
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.alchemist_unstable_concoction && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.unstableConcoction));
            }

            this.unstableConcoction = (UnstableConcoction)EntityManager9.AddAbility(ability);
        }
Beispiel #12
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.riki_backstab && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                return;
            }

            this.cloakAndDagger = (CloakAndDagger)EntityManager9.AddAbility(ability);
        }
Beispiel #13
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == (this.Id == AbilityId.shredder_chakram
                                  ? AbilityId.shredder_return_chakram
                                  : AbilityId.shredder_return_chakram_2) && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.ReturnChakram));
            }

            this.ReturnChakram = (ReturnChakram)EntityManager9.AddAbility(ability);
        }
Beispiel #14
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.shadow_demon_shadow_poison && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.shadowPoison));
            }

            this.shadowPoison       = (ShadowPoison)EntityManager9.AddAbility(ability);
            this.DamageData         = new SpecialData(this.shadowPoison.BaseAbility, "stack_damage");
            this.maxStacksData      = new SpecialData(this.shadowPoison.BaseAbility, "max_multiply_stacks");
            this.overflowDamageData = new SpecialData(this.shadowPoison.BaseAbility, "bonus_stack_damage");
        }
        // Token: 0x060009E9 RID: 2537 RVA: 0x000237B8 File Offset: 0x000219B8
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.morphling_morph_agi)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                throw new ArgumentNullException("AttributeShiftAgilityGain");
            }
            this.AttributeShiftAgilityGain = (AttributeShiftAgilityGain)EntityManager9.AddAbility(ability);
        }
        // Token: 0x06000C96 RID: 3222 RVA: 0x00025A94 File Offset: 0x00023C94
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.sniper_headshot)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                return;
            }
            this.headshot = (Headshot)EntityManager9.AddAbility(ability);
        }
        // Token: 0x06000C0D RID: 3085 RVA: 0x00025454 File Offset: 0x00023654
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == ((this.Id == AbilityId.shredder_chakram) ? AbilityId.shredder_return_chakram : AbilityId.shredder_return_chakram_2))
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                throw new ArgumentNullException("ReturnChakram");
            }
            this.ReturnChakram = (ReturnChakram)EntityManager9.AddAbility(ability);
        }
Beispiel #18
0
        // Token: 0x06001055 RID: 4181 RVA: 0x00028C20 File Offset: 0x00026E20
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.alchemist_unstable_concoction)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                throw new ArgumentNullException("unstableConcoction");
            }
            this.unstableConcoction = (UnstableConcoction)EntityManager9.AddAbility(ability);
        }
Beispiel #19
0
        // Token: 0x06000B20 RID: 2848 RVA: 0x00024BAC File Offset: 0x00022DAC
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.ancient_apparition_ice_blast_release)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                throw new ArgumentNullException("iceBlastRelease");
            }
            this.iceBlastRelease = (IceBlastRelease)EntityManager9.AddAbility(ability);
        }
Beispiel #20
0
        // Token: 0x06000D21 RID: 3361 RVA: 0x00026400 File Offset: 0x00024600
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.phoenix_fire_spirits)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                throw new ArgumentNullException("fireSpirits");
            }
            this.fireSpirits = (FireSpirits)EntityManager9.AddAbility(ability);
        }
Beispiel #21
0
        // Token: 0x06000BB7 RID: 2999 RVA: 0x00025108 File Offset: 0x00023308
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.tusk_launch_snowball)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                throw new ArgumentNullException("launch");
            }
            this.launch = (LaunchSnowball)EntityManager9.AddAbility(ability);
        }
        // Token: 0x06000CEC RID: 3308 RVA: 0x00025F30 File Offset: 0x00024130
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.riki_permanent_invisibility)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                return;
            }
            this.cloakAndDagger = (CloakAndDagger)EntityManager9.AddAbility(ability);
        }
Beispiel #23
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.zuus_static_field && x.Owner?.Handle == owner.Handle);

            if (ability != null)
            {
                this.staticField = (StaticField)EntityManager9.AddAbility(ability);
            }

            ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.zuus_lightning_bolt && x.Owner?.Handle == owner.Handle);

            if (ability != null)
            {
                this.lightningBolt = (LightningBolt)EntityManager9.AddAbility(ability);
            }
        }
        // Token: 0x06000DE4 RID: 3556 RVA: 0x00026FFC File Offset: 0x000251FC
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.monkey_king_untransform)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                throw new ArgumentNullException("revertForm");
            }
            this.revertForm = (RevertForm)EntityManager9.AddAbility(ability);
        }
Beispiel #25
0
        public void SetOwner(Unit9 newOwner)
        {
            this.owner = newOwner;

            var wexAbility = newOwner.GetAbilityById(AbilityId.invoker_wex)
                             ?? ObjectManager.GetEntitiesFast <Ability>().FirstOrDefault(x => x.Id == AbilityId.invoker_wex);

            if (wexAbility != null)
            {
                this.Wex = (Wex)EntityManager9.AddAbility(wexAbility);
                this.orbModifiers.Add(this.Wex.ModifierName, this.Wex.Id);
                this.myOrbs.Add(this.Wex);
            }

            var quasAbility = newOwner.GetAbilityById(AbilityId.invoker_quas)
                              ?? ObjectManager.GetEntitiesFast <Ability>().FirstOrDefault(x => x.Id == AbilityId.invoker_quas);

            if (quasAbility != null)
            {
                this.Quas = (Quas)EntityManager9.AddAbility(quasAbility);
                this.orbModifiers.Add(this.Quas.ModifierName, this.Quas.Id);
                this.myOrbs.Add(this.Quas);
            }

            var exortAbility = newOwner.GetAbilityById(AbilityId.invoker_exort)
                               ?? ObjectManager.GetEntitiesFast <Ability>().FirstOrDefault(x => x.Id == AbilityId.invoker_exort);

            if (exortAbility != null)
            {
                this.Exort = (Exort)EntityManager9.AddAbility(exortAbility);
                this.orbModifiers.Add(this.Exort.ModifierName, this.Exort.Id);
                this.myOrbs.Add(this.Exort);
            }

            var invokeAbility = newOwner.GetAbilityById(AbilityId.invoker_invoke);

            if (invokeAbility != null)
            {
                this.invoke = (Invoke)EntityManager9.AddAbility(invokeAbility);
            }
        }
        // Token: 0x06000D38 RID: 3384 RVA: 0x00026624 File Offset: 0x00024824
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.phoenix_sun_ray_stop)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                throw new ArgumentNullException("sunRayStop");
            }
            this.sunRayStop = (SunRayStop)EntityManager9.AddAbility(ability);
            ability         = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.phoenix_sun_ray_toggle_move)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });
            if (ability == null)
            {
                throw new ArgumentNullException("sunRayToggleMovement");
            }
            this.sunRayToggleMovement = (SunRayToggleMovement)EntityManager9.AddAbility(ability);
            if (owner.IsControllable)
            {
                Player.OnExecuteOrder += this.OnExecuteOrder;
            }
        }
        // Token: 0x0600098F RID: 2447 RVA: 0x000233E4 File Offset: 0x000215E4
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == AbilityId.shadow_demon_shadow_poison)
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                throw new ArgumentNullException("shadowPoison");
            }
            this.shadowPoison       = (ShadowPoison)EntityManager9.AddAbility(ability);
            this.DamageData         = new SpecialData(this.shadowPoison.BaseAbility, "stack_damage");
            this.maxStacksData      = new SpecialData(this.shadowPoison.BaseAbility, "max_multiply_stacks");
            this.overflowDamageData = new SpecialData(this.shadowPoison.BaseAbility, "bonus_stack_damage");
        }
Beispiel #28
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.phoenix_sun_ray_stop && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.sunRayStop));
            }

            this.sunRayStop = (SunRayStop)EntityManager9.AddAbility(ability);

            ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == AbilityId.phoenix_sun_ray_toggle_move && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.sunRayToggleMovement));
            }

            this.sunRayToggleMovement = (SunRayToggleMovement)EntityManager9.AddAbility(ability);
        }
Beispiel #29
0
        private void GameOnUpdate2()
        {
            //hack
            try
            {
                foreach (var unit in EntityManager9.Units.Where(x => x.IsVisible))
                {
                    var inventory = unit.BaseUnit?.Inventory;
                    if (inventory == null)
                    {
                        continue;
                    }

                    var checkedItems = new List <uint>();

                    foreach (var handle in this.GetInventoryItems(inventory).Select(x => x.Handle))
                    {
                        var item = EntityManager9.GetAbilityFast(handle);
                        if (item == null)
                        {
                            continue;
                        }

                        checkedItems.Add(handle);

                        if (item.Owner == unit)
                        {
                            item.IsAvailable = true;
                            continue;
                        }

                        EntityManager9.RemoveAbility(item.BaseAbility);
                        EntityManager9.AddAbility(item.BaseAbility);
                    }


                    foreach (var handle in this.GetStashItems(inventory).Select(x => x.Handle))
                    {
                        var item = EntityManager9.GetAbilityFast(handle);
                        if (item == null)
                        {
                            continue;
                        }

                        checkedItems.Add(handle);

                        if (item.Owner == unit)
                        {
                            item.IsAvailable = false;
                            continue;
                        }

                        EntityManager9.RemoveAbility(item.BaseAbility);
                        EntityManager9.AddAbility(item.BaseAbility);
                    }

                    // stashed neutral items
                    foreach (var item in unit.AbilitiesFast.Where(
                                 x => x.IsItem && x.IsAvailable && !checkedItems.Contains(x.Handle)))
                    {
                        item.IsAvailable = false;
                    }
                }
            }
            catch (Exception e)
            {
                Logger.Error(e);
            }
        }
Beispiel #30
0
        private void OnNetworkPropertyChanged(Entity sender, NetworkPropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
            case "m_bToggleState":
            {
                var newValue = e.NewValue.GetBoolean();
                if (!newValue || newValue == e.OldValue.GetBoolean())
                {
                    break;
                }

                UpdateManager.BeginInvoke(() =>
                    {
                        var ability = EntityManager9.GetAbilityFast(sender.Handle);
                        if (ability == null)
                        {
                            return;
                        }

                        this.AbilityCasted?.Invoke(ability);
                    });
            }
            break;

            case "m_bInAbilityPhase":
            {
                var newValue = e.NewValue.GetBoolean();
                if (newValue == e.OldValue.GetBoolean())
                {
                    break;
                }

                UpdateManager.BeginInvoke(() =>
                    {
                        var ability = EntityManager9.GetAbilityFast(sender.Handle);
                        if (ability == null)
                        {
                            return;
                        }

                        ability.IsCasting       = newValue;
                        ability.Owner.IsCasting = newValue;

                        this.AbilityCastChange?.Invoke(ability);
                    });
            }
            break;

            case "m_flEnableTime":
            {
                var newValue = e.NewValue.GetSingle();
                if (newValue == e.OldValue.GetSingle())
                {
                    break;
                }

                UpdateManager.BeginInvoke(() =>
                    {
                        var ability = EntityManager9.GetAbilityFast(sender.Handle);
                        if (ability == null)
                        {
                            return;
                        }

                        ability.ItemEnableTimeSleeper.SleepUntil(newValue);
                    });
            }
            break;

            case "m_flCastStartTime":
            {
                var newValue = e.NewValue.GetSingle();
                var oldValue = e.OldValue.GetSingle();
                if (newValue == oldValue)
                {
                    break;
                }

                UpdateManager.BeginInvoke(() =>
                    {
                        if (this.AbilityCasted == null)
                        {
                            return;
                        }

                        var ability = EntityManager9.GetAbilityFast(sender.Handle);
                        if (ability == null)
                        {
                            return;
                        }

                        if (!ability.IsDisplayingCharges)
                        {
                            return;
                        }

                        var castTime = newValue - oldValue;
                        if (castTime < 0 || oldValue < 0)
                        {
                            return;
                        }

                        var visibleTime = GameManager.RawGameTime - ability.Owner.LastNotVisibleTime;
                        if (visibleTime < 0.05f)
                        {
                            return;
                        }

                        if (ability.CastPoint <= 0)
                        {
                            this.AbilityCasted(ability);
                        }
                        else
                        {
                            if (Math.Abs(ability.CastPoint - castTime) < 0.03f)
                            {
                                this.AbilityCasted(ability);
                            }
                        }
                    });
            }
            break;

            case "m_fCooldown":
            {
                var newValue = e.NewValue.GetSingle();
                var oldValue = e.OldValue.GetSingle();
                if (newValue == oldValue)
                {
                    break;
                }

                UpdateManager.BeginInvoke(() =>
                    {
                        if (this.AbilityCasted == null)
                        {
                            return;
                        }

                        if (newValue <= oldValue || oldValue > 0)
                        {
                            return;
                        }

                        var ability = EntityManager9.GetAbilityFast(sender.Handle);
                        if (ability == null)
                        {
                            return;
                        }

                        var visibleTime = GameManager.RawGameTime - ability.Owner.LastNotVisibleTime;
                        if (visibleTime < 0.05f)
                        {
                            return;
                        }

                        this.AbilityCasted(ability);
                    });
            }
            break;

            case "m_flChannelStartTime":
            {
                var newValue = e.NewValue.GetSingle();
                if (newValue == e.OldValue.GetSingle())
                {
                    break;
                }

                UpdateManager.BeginInvoke(() =>
                    {
                        var ability = EntityManager9.GetAbilityFast(sender.Handle);
                        if (ability == null)
                        {
                            return;
                        }

                        if (!(ability is IChanneled channeled))
                        {
                            return;
                        }

                        if (newValue > 0)
                        {
                            ability.IsChanneling                   = true;
                            channeled.Owner.ChannelEndTime         = newValue + channeled.ChannelTime;
                            channeled.Owner.ChannelActivatesOnCast = channeled.IsActivatesOnChannelStart;

                            this.AbilityChannel?.Invoke(ability);
                        }
                        else
                        {
                            ability.IsChanneling                   = false;
                            channeled.Owner.ChannelEndTime         = 0;
                            channeled.Owner.ChannelActivatesOnCast = false;
                        }
                    });
            }
            break;

            case "m_iParity":
            {
                if (e.NewValue.GetInt32() == e.OldValue.GetInt32())
                {
                    break;
                }

                UpdateManager.BeginInvoke(() =>
                    {
                        var owner = EntityManager9.GetUnitFast(sender.Handle);

                        if (owner == null)
                        {
                            return;
                        }

                        var inventory    = owner.BaseInventory;
                        var checkedItems = new List <uint>();

                        foreach (var handle in this.GetInventoryItems(inventory).Select(x => x.Handle))
                        {
                            var item = EntityManager9.GetAbilityFast(handle);
                            if (item == null)
                            {
                                continue;
                            }

                            checkedItems.Add(handle);

                            if (item.Owner == owner)
                            {
                                item.IsAvailable = true;
                                //UpdateManager.BeginInvoke(100, () => InventoryChanged?.Invoke(null, EventArgs.Empty));
                                continue;
                            }

                            EntityManager9.RemoveAbility(item.BaseAbility);
                            EntityManager9.AddAbility(item.BaseAbility);
                        }

                        foreach (var handle in this.GetStashItems(inventory).Select(x => x.Handle))
                        {
                            var item = EntityManager9.GetAbilityFast(handle);
                            if (item == null)
                            {
                                continue;
                            }

                            checkedItems.Add(handle);

                            if (item.Owner == owner)
                            {
                                item.IsAvailable = false;
                                //UpdateManager.BeginInvoke(100, () => InventoryChanged?.Invoke(null, EventArgs.Empty));
                                continue;
                            }

                            EntityManager9.RemoveAbility(item.BaseAbility);
                            EntityManager9.AddAbility(item.BaseAbility);
                        }

                        // stashed neutral items
                        foreach (var item in owner.AbilitiesFast.Where(x => x.IsItem && x.IsAvailable && !checkedItems.Contains(x.Handle)))
                        {
                            item.IsAvailable = false;
                            //UpdateManager.BeginInvoke(100, () => InventoryChanged?.Invoke(null, EventArgs.Empty));
                        }
                    });
            }
            break;
            }
        }