private void TurnOnModifier()
        {
            base.actor.abilityPlugin.ApplyModifier(base.instancedAbility, this.config.OnModifierName);
            if (this.config.OffModifierName != null)
            {
                base.actor.abilityPlugin.TryRemoveModifier(base.instancedAbility, this.config.OffModifierName);
            }
            if (!string.IsNullOrEmpty(this.config.SkillButtonID))
            {
                AvatarActor actor = base.actor as AvatarActor;
                actor.GetSkillInfo(this.config.SkillButtonID).costSP          = (SafeFloat)this.config.OnModifierReplaceCostSP;
                actor.GetSkillInfo(this.config.SkillButtonID).needSP          = (SafeFloat)this.config.OnModifierReplaceCostSP;
                actor.GetSkillInfo(this.config.SkillButtonID).iconPath        = this.config.OnModifierReplaceIconPath;
                actor.GetSkillInfo(this.config.SkillButtonID).muteHighlighted = true;
                Singleton <MainUIManager> .Instance.GetInLevelUICanvas().mainPageContext.GetSkillButtonBySkillID(this.config.SkillButtonID).RefreshSkillInfo();

                if (this.config.OnModifierSwitchToInstantTrigger)
                {
                    actor.config.Skills[this.config.SkillButtonID].IsInstantTrigger    = true;
                    actor.config.Skills[this.config.SkillButtonID].InstantTriggerEvent = this.config.OnModifierInstantTriggerEvent;
                }
            }
            this._timer.Reset(true);
            this._state = true;
        }
        public override void OnRemoved()
        {
            AvatarActor actor = base.actor as AvatarActor;

            if (actor.GetSkillInfo(this.config.SkillID) != null)
            {
                actor.GetSkillInfo(this.config.SkillID).muted        = false;
                actor.GetSkillInfo(this.config.SkillID).maskIconPath = null;
                if (Singleton <AvatarManager> .Instance.IsLocalAvatar(base.actor.entity.GetRuntimeID()))
                {
                    Singleton <MainUIManager> .Instance.GetInLevelUICanvas().mainPageContext.GetSkillButtonBySkillID(this.config.SkillID).RefreshSkillInfo();
                }
            }
        }
        public override void OnAdded()
        {
            if (this.config.OffModifierName != null)
            {
                base.actor.abilityPlugin.ApplyModifier(base.instancedAbility, this.config.OffModifierName);
            }
            AvatarActor actor = base.actor as AvatarActor;

            if (!string.IsNullOrEmpty(this.config.SkillButtonID))
            {
                this._originSpCost   = (float)actor.GetSkillInfo(this.config.SkillButtonID).costSP;
                this._originSpNeed   = (float)actor.GetSkillInfo(this.config.SkillButtonID).needSP;
                this._originIconPath = actor.GetSkillInfo(this.config.SkillButtonID).iconPath;
            }
        }