// Token: 0x06000640 RID: 1600 RVA: 0x0002132C File Offset: 0x0001F52C
 private void OnParticleEffectAdded(Entity sender, ParticleEffectAddedEventArgs args)
 {
     try
     {
         if (!(args.ParticleEffect.Name != "particles/items_fx/immunity_sphere.vpcf"))
         {
             SpellBlockTalent spellBlockTalent = this.linkensSphereTalent;
             if (spellBlockTalent != null && spellBlockTalent.IsValid && this.linkensSphereTalent.Level > 0u)
             {
                 UpdateManager.BeginInvoke(delegate
                 {
                     try
                     {
                         if (this.IsValid && this.IsVisible && this.Distance(args.ParticleEffect.GetControlPoint(0u)) < 15f)
                         {
                             this.talentSleeper.Sleep(this.linkensSphereTalent.SpellBlockCooldown);
                         }
                     }
                     catch (Exception exception2)
                     {
                         Logger.Error(exception2, null);
                     }
                 }, 0);
             }
         }
     }
     catch (Exception exception)
     {
         Logger.Error(exception, null);
         Entity.OnParticleEffectAdded -= this.OnParticleEffectAdded;
     }
 }
示例#2
0
        internal override void Ability(Ability9 ability, bool added)
        {
            base.Ability(ability, added);

            if (added && ability.Id == AbilityId.special_bonus_spell_block_15)
            {
                this.linkensSphereTalent       = (SpellBlockTalent)ability;
                ParticleManager.ParticleAdded += this.OnParticleAdded;
            }
        }