// Token: 0x060003A4 RID: 932 RVA: 0x0001C404 File Offset: 0x0001A604
        public UnitMonitor()
        {
            Dictionary <string, Action <Unit9, bool> > dictionary = new Dictionary <string, Action <Unit9, bool> >();

            dictionary.Add("modifier_teleporting", delegate(Unit9 x, bool value)
            {
                x.IsTeleporting = value;
            });
            dictionary.Add("modifier_treant_natures_guise_invis", delegate(Unit9 x, bool value)
            {
                x.CanUseAbilitiesInInvisibility = value;
            });
            dictionary.Add("modifier_riki_permanent_invisibility", delegate(Unit9 x, bool value)
            {
                x.CanUseAbilitiesInInvisibility = value;
            });
            dictionary.Add("modifier_ice_blast", delegate(Unit9 x, bool value)
            {
                x.CanBeHealed = !value;
            });
            dictionary.Add("modifier_item_aegis", delegate(Unit9 x, bool value)
            {
                x.HasAegis = value;
            });
            dictionary.Add("modifier_necrolyte_sadist_active", delegate(Unit9 x, bool value)
            {
                x.IsEthereal = value;
            });
            dictionary.Add("modifier_pugna_decrepify", delegate(Unit9 x, bool value)
            {
                x.IsEthereal = value;
            });
            dictionary.Add("modifier_item_ethereal_blade_ethereal", delegate(Unit9 x, bool value)
            {
                x.IsEthereal = value;
            });
            dictionary.Add("modifier_ghost_state", delegate(Unit9 x, bool value)
            {
                x.IsEthereal = value;
            });
            dictionary.Add("modifier_item_lotus_orb_active", delegate(Unit9 x, bool value)
            {
                x.IsLotusProtected = value;
            });
            dictionary.Add("modifier_antimage_counterspell", delegate(Unit9 x, bool value)
            {
                x.IsSpellShieldProtected = value;
            });
            dictionary.Add("modifier_item_sphere_target", delegate(Unit9 x, bool value)
            {
                x.IsLinkensTargetProtected = value;
            });
            dictionary.Add("modifier_item_blade_mail_reflect", delegate(Unit9 x, bool value)
            {
                x.IsReflectingDamage = value;
            });
            dictionary.Add("modifier_item_ultimate_scepter", delegate(Unit9 x, bool value)
            {
                x.HasAghanimsScepter = value;
            });
            dictionary.Add("modifier_item_ultimate_scepter_consumed", delegate(Unit9 x, bool value)
            {
                x.HasAghanimsScepter = value;
            });
            dictionary.Add("modifier_wisp_tether_scepter", delegate(Unit9 x, bool value)
            {
                x.HasAghanimsScepter = value;
            });
            dictionary.Add("modifier_slark_dark_pact", delegate(Unit9 x, bool value)
            {
                x.IsDarkPactProtected = value;
            });
            dictionary.Add("modifier_bloodseeker_rupture", delegate(Unit9 x, bool value)
            {
                x.IsRuptured = value;
            });
            dictionary.Add("modifier_spirit_breaker_charge_of_darkness", delegate(Unit9 x, bool value)
            {
                x.IsCharging = value;
            });
            dictionary.Add("modifier_dragon_knight_dragon_form", delegate(Unit9 x, bool value)
            {
                x.IsRanged = (value || x.BaseUnit.IsRanged);
            });
            dictionary.Add("modifier_terrorblade_metamorphosis", delegate(Unit9 x, bool value)
            {
                x.IsRanged = (value || x.BaseUnit.IsRanged);
            });
            dictionary.Add("modifier_troll_warlord_berserkers_rage", delegate(Unit9 x, bool value)
            {
                x.IsRanged = (!value || x.BaseUnit.IsRanged);
            });
            dictionary.Add("modifier_lone_druid_true_form", delegate(Unit9 x, bool value)
            {
                x.IsRanged = (!value || x.BaseUnit.IsRanged);
            });
            dictionary.Add("modifier_slark_shadow_dance_visual", delegate(Unit9 x, bool value)
            {
                Slark slark = x.Owner as Slark;
                if (slark == null)
                {
                    return;
                }
                slark.ShadowDanced(value);
            });
            dictionary.Add("modifier_morphling_replicate", delegate(Unit9 x, bool value)
            {
                Morphling morphling = x as Morphling;
                if (morphling == null)
                {
                    return;
                }
                morphling.Morphed(value);
            });
            dictionary.Add("modifier_morphling_replicate_manager", delegate(Unit9 x, bool value)
            {
                Morphling morphling = x as Morphling;
                if (morphling == null)
                {
                    return;
                }
                morphling.Replicated(value);
            });
            dictionary.Add("modifier_alchemist_chemical_rage", delegate(Unit9 x, bool value)
            {
                Alchemist alchemist = x as Alchemist;
                if (alchemist == null)
                {
                    return;
                }
                alchemist.Raged(value);
            });
            this.specialModifiers = dictionary;
            base..ctor();
            this.damageFactory            = new DamageFactory();
            this.rangeFactory             = new RangeFactory();
            Entity.OnInt64PropertyChange += this.OnInt64PropertyChange;
            Entity.OnInt32PropertyChange += this.OnInt32PropertyChange;
            Entity.OnAnimationChanged    += this.OnAnimationChanged;
            Unit.OnModifierAdded         += this.OnModifierAdded;
            Unit.OnModifierRemoved       += this.OnModifierRemoved;
            Player.OnExecuteOrder        += this.OnExecuteOrder;
            Drawing.OnDraw += UnitMonitor.OnUpdate;
        }
Exemple #2
0
 public SlarkCombo(Slark hero)
     : base(hero)
 {
     this.Slark       = hero;
     this.UltiHandler = UpdateManager.Run(this.OnUpdate);
 }