private bool ListenLevelBuffState(EvtLevelBuffState evt)
 {
     if (evt.levelBuff != this.config.LevelBuff)
     {
         return(false);
     }
     if (evt.state == LevelBuffState.Start)
     {
         if (this.config.OnModifierName != null)
         {
             base.actor.abilityPlugin.ApplyModifier(base.instancedAbility, this.config.OnModifierName);
         }
         if (this.config.OffModifierName != null)
         {
             base.actor.abilityPlugin.TryRemoveModifier(base.instancedAbility, this.config.OffModifierName);
         }
     }
     else if (evt.state == LevelBuffState.Stop)
     {
         if (this.config.OnModifierName != null)
         {
             base.actor.abilityPlugin.TryRemoveModifier(base.instancedAbility, this.config.OnModifierName);
         }
         if (this.config.OffModifierName != null)
         {
             base.actor.abilityPlugin.ApplyModifier(base.instancedAbility, this.config.OffModifierName);
         }
     }
     return(true);
 }
Пример #2
0
 private bool ListenLevelBuffState(EvtLevelBuffState evt)
 {
     if (this.isUpdating && (evt.levelBuff == LevelBuffType.WitchTime))
     {
         if (this.GetAvatarStastics(evt.sourceId) != null)
         {
         }
         this.evadeEffectTimes++;
     }
     return(true);
 }
Пример #3
0
 private bool ListenLevelBuffState(EvtLevelBuffState evt)
 {
     if ((evt.state == LevelBuffState.Start) && (evt.levelBuff == LevelBuffType.WitchTime))
     {
         this.StartStastics();
     }
     if ((evt.state == LevelBuffState.Stop) && (evt.levelBuff == LevelBuffType.WitchTime))
     {
         this.StopStastics();
     }
     return(false);
 }
Пример #4
0
 private bool OnLevelBuffState(EvtLevelBuffState evt)
 {
     if (evt.levelBuff == LevelBuffType.WitchTime)
     {
         if (evt.state == LevelBuffState.Start)
         {
             return(this.OnWitchTimeStart());
         }
         if (evt.state == LevelBuffState.Stop)
         {
             return(this.OnWitchTimeStop());
         }
     }
     return(false);
 }
Пример #5
0
 private bool OnLevelBuffStateChange(EvtLevelBuffState evt)
 {
     if (evt.state == LevelBuffState.Start)
     {
         this.AttachCurrent(evt.sourceId);
         this._state = State.WaitingForEnd;
     }
     else if (evt.state == LevelBuffState.Stop)
     {
         this.DetachCurrent();
         this._state = State.WaitingForStart;
     }
     else if (evt.state == LevelBuffState.Switch)
     {
         this.DetachCurrent();
         this.AttachCurrent(evt.sourceId);
     }
     return(false);
 }
Пример #6
0
        private bool OnLevelBuffState(EvtLevelBuffState evt)
        {
            if (evt.state == LevelBuffState.Stop)
            {
                List <ActorModifier> list = this._levelBuffAttachedModifiers[(int)evt.levelBuff];
                for (int i = 0; i < list.Count; i++)
                {
                    ActorModifier modifier = list[i];
                    if (modifier.owner != null)
                    {
                        modifier.owner.abilityPlugin.TryRemoveModifier(modifier);
                    }
                }
                list.Clear();
                if (this._attachedLevelBuffEffect[(int)evt.levelBuff] != null)
                {
                    Singleton <EffectManager> .Instance.SetDestroyUniqueIndexedEffectPattern(evt.levelBuff.ToString());

                    this._attachedLevelBuffEffect[(int)evt.levelBuff] = null;
                }
            }
            return(true);
        }