Exemplo n.º 1
0
 public bool TriggerWeakNewbieGuide(NewbieWeakGuideMainLineConf conf, NewbieGuideTriggerTimeType type, bool checkCondition)
 {
     if (conf != null && !this.IsWeakLineComplete(conf.dwID) && !Singleton <WatchController> .get_instance().IsWatching&& (!checkCondition || (this.CheckLevelLimit(conf) && this.CheckLevelLimitLower(conf) && this.CheckTriggerCondition(0u, conf.astTriggerCondition))))
     {
         uint weakStartIndexByMianLineConf = this.GetWeakStartIndexByMianLineConf(type, conf);
         return(this.TriggerWeakNewbieGuide(conf.dwID, weakStartIndexByMianLineConf));
     }
     return(false);
 }
Exemplo n.º 2
0
    public bool TriggerWeakNewbieGuide(NewbieWeakGuideMainLineConf conf, NewbieGuideTriggerTimeType type, bool checkCondition)
    {
        if ((((conf == null) || this.IsWeakLineComplete(conf.dwID)) || Singleton <WatchController> .instance.IsWatching) || (checkCondition && ((!this.CheckLevelLimit(conf) || !this.CheckLevelLimitLower(conf)) || !this.CheckTriggerCondition(0, conf.astTriggerCondition))))
        {
            return(false);
        }
        uint weakStartIndexByMianLineConf = this.GetWeakStartIndexByMianLineConf(type, conf);

        return(this.TriggerWeakNewbieGuide(conf.dwID, weakStartIndexByMianLineConf));
    }
Exemplo n.º 3
0
 private bool CheckTrigger(NewbieGuideTriggerTimeType type, NewbieGuideMainLineConf conf)
 {
     if (this.CheckTriggerTime(conf) && this.CheckTriggerCondition(conf.dwID, conf.astTriggerCondition))
     {
         int startIndexByTriggerTime = this.GetStartIndexByTriggerTime(type, conf);
         this.TriggerNewbieGuide(conf, startIndexByTriggerTime);
         return(true);
     }
     return(false);
 }
Exemplo n.º 4
0
    private int GetStartIndexByTriggerTime(NewbieGuideTriggerTimeType type, NewbieGuideMainLineConf conf)
    {
        int length = conf.astTriggerTime.Length;

        for (int i = 0; i < length; i++)
        {
            NewbieGuideTriggerTimeItem item = conf.astTriggerTime[i];
            if (type == ((NewbieGuideTriggerTimeType)item.wType))
            {
                return((int)item.dwStartIndex);
            }
        }
        return(0);
    }
Exemplo n.º 5
0
    public bool IsContainsTriggerTimeType(NewbieWeakGuideMainLineConf conf, NewbieGuideTriggerTimeType type, uint[] param)
    {
        int length = conf.astTriggerTime.Length;

        for (int i = 0; i < length; i++)
        {
            NewbieGuideTriggerTimeItem time = conf.astTriggerTime[i];
            if ((type == ((NewbieGuideTriggerTimeType)time.wType)) && NewbieGuideCheckTriggerTimeUtil.CheckTriggerTime(time, param))
            {
                return(true);
            }
        }
        return(false);
    }
Exemplo n.º 6
0
    public bool IsContainsTriggerTimeType(NewbieWeakGuideMainLineConf conf, NewbieGuideTriggerTimeType type, uint[] param)
    {
        int num = conf.astTriggerTime.Length;

        for (int i = 0; i < num; i++)
        {
            NewbieGuideTriggerTimeItem newbieGuideTriggerTimeItem = conf.astTriggerTime[i];
            if (type == (NewbieGuideTriggerTimeType)newbieGuideTriggerTimeItem.wType && NewbieGuideCheckTriggerTimeUtil.CheckTriggerTime(newbieGuideTriggerTimeItem, param))
            {
                return(true);
            }
        }
        return(false);
    }
Exemplo n.º 7
0
    private uint GetWeakStartIndexByMianLineConf(NewbieGuideTriggerTimeType type, NewbieWeakGuideMainLineConf conf)
    {
        uint dwStartIndex = 1;
        int  length       = conf.astTriggerTime.Length;

        for (int i = 0; i < length; i++)
        {
            NewbieGuideTriggerTimeItem item = conf.astTriggerTime[i];
            if ((((NewbieGuideTriggerTimeType)item.wType) == type) && (item.dwStartIndex > 0))
            {
                dwStartIndex = item.dwStartIndex;
            }
        }
        return(dwStartIndex);
    }
Exemplo n.º 8
0
    private uint GetWeakStartIndexByMianLineConf(NewbieGuideTriggerTimeType type, NewbieWeakGuideMainLineConf conf)
    {
        uint result = 1u;
        int  num    = conf.astTriggerTime.Length;

        for (int i = 0; i < num; i++)
        {
            NewbieGuideTriggerTimeItem newbieGuideTriggerTimeItem = conf.astTriggerTime[i];
            if ((NewbieGuideTriggerTimeType)newbieGuideTriggerTimeItem.wType == type && newbieGuideTriggerTimeItem.dwStartIndex > 0u)
            {
                result = newbieGuideTriggerTimeItem.dwStartIndex;
            }
        }
        return(result);
    }
Exemplo n.º 9
0
    public bool CheckTriggerTime(NewbieGuideTriggerTimeType type, params uint[] param)
    {
        if (!this.newbieGuideEnable)
        {
            return(false);
        }
        if (!this.m_IsCheckSkip)
        {
            return(false);
        }
        if (this.currentNewbieGuideId == 0u)
        {
            ListView <NewbieGuideMainLineConf> newbieGuideMainLineConfListByTriggerTimeType = Singleton <NewbieGuideDataManager> .GetInstance().GetNewbieGuideMainLineConfListByTriggerTimeType(type, param);

            int count = newbieGuideMainLineConfListByTriggerTimeType.get_Count();
            for (int i = 0; i < count; i++)
            {
                NewbieGuideMainLineConf conf = newbieGuideMainLineConfListByTriggerTimeType.get_Item(i);
                if (this.CheckTrigger(type, conf))
                {
                    if (Singleton <NewbieWeakGuideControl> .get_instance().isGuiding)
                    {
                        Singleton <NewbieWeakGuideControl> .get_instance().RemoveAllEffect();
                    }
                    return(true);
                }
            }
            ListView <NewbieWeakGuideMainLineConf> newBieGuideWeakMainLineConfListByTiggerTimeType = Singleton <NewbieGuideDataManager> .GetInstance().GetNewBieGuideWeakMainLineConfListByTiggerTimeType(type, param);

            count = newBieGuideWeakMainLineConfListByTiggerTimeType.get_Count();
            for (int j = 0; j < count; j++)
            {
                NewbieWeakGuideMainLineConf conf2 = newBieGuideWeakMainLineConfListByTiggerTimeType.get_Item(j);
                if (this.TriggerWeakNewbieGuide(conf2, type, true))
                {
                    return(true);
                }
            }
        }
        return(false);
    }
Exemplo n.º 10
0
    public static bool CheckTriggerTime(NewbieGuideTriggerTimeItem time, uint[] param)
    {
        NewbieGuideTriggerTimeType wType = (NewbieGuideTriggerTimeType)time.wType;

        switch (wType)
        {
        case NewbieGuideTriggerTimeType.onTalentLevelChange:
        {
            bool flag = true;
            if (time.Param[0] > 0u)
            {
                flag &= (time.Param[0] == param[0]);
            }
            if (time.Param[1] > 0u)
            {
                flag &= (time.Param[1] == param[1]);
            }
            return(flag);
        }

        case NewbieGuideTriggerTimeType.onEnterTaskForm:
        case NewbieGuideTriggerTimeType.onEnterExploreForm:
        case NewbieGuideTriggerTimeType.onEnterSymbolForm:
        case NewbieGuideTriggerTimeType.PvPShareFin:
IL_30:
            switch (wType)
            {
            case NewbieGuideTriggerTimeType.preNewbieGuideComplete:
                return(NewbieGuideCheckTriggerTimeUtil.CheckPreNewbieGuideCompleteTime(time, param));

            case NewbieGuideTriggerTimeType.battleFin:
            {
                bool flag2 = true;
                if (time.Param[0] > 0u)
                {
                    flag2 &= (time.Param[0] == param[0]);
                }
                if (time.Param[1] > 0u)
                {
                    flag2 &= (time.Param[1] == param[1]);
                }
                if (time.Param[2] > 0u)
                {
                    flag2 &= (time.Param[2] == param[2]);
                }
                if (time.Param[3] > 0u)
                {
                    flag2 &= (time.Param[3] == param[3]);
                }
                return(flag2);
            }

            case NewbieGuideTriggerTimeType.equipSuccess:
                return(false);

            default:
                switch (wType)
                {
                case NewbieGuideTriggerTimeType.pvpFin:
                    if (time.Param[0] > 0u)
                    {
                        return(time.Param[0] == param[0]);
                    }
                    return(time.Param[1] <= 0u || time.Param[1] == param[1]);

                case NewbieGuideTriggerTimeType.heroSelectedForBattle:
                    return((time.Param[0] == 0u && param[0] > 0u) || (time.Param[0] == param[0] && param[0] > 0u));
                }
                for (int i = 0; i < param.Length; i++)
                {
                    if (param[i] != time.Param[i])
                    {
                        return(false);
                    }
                }
                return(true);
            }
            break;

        case NewbieGuideTriggerTimeType.preNewBieWeakGuideStepComplete:
            return(time.Param[0] > 0u && time.Param[0] == param[0]);

        case NewbieGuideTriggerTimeType.preNewBieWeakGuideComleteAll:
            return(time.Param[0] > 0u && time.Param[0] == param[0]);

        case NewbieGuideTriggerTimeType.PvPShowKDA:
            if (time.Param[0] > 0u)
            {
                return(time.Param[0] == param[0]);
            }
            return(time.Param[1] <= 0u || time.Param[1] == param[1]);
        }
        goto IL_30;
    }
Exemplo n.º 11
0
    public ListView <NewbieWeakGuideMainLineConf> GetNewBieGuideWeakMainLineConfListByTiggerTimeType(NewbieGuideTriggerTimeType type, uint[] param)
    {
        this.mCacheWeakSourceList.Clear();
        this.mCacheWeakSourceList.AddRange(this.mWeakMainLineCacheArr);
        this.mCacheWeakTargetList.Clear();
        int count = this.mCacheWeakSourceList.Count;

        for (int i = 0; i < count; i++)
        {
            NewbieWeakGuideMainLineConf conf = this.mCacheWeakSourceList[i];
            if (this.IsContainsTriggerTimeType(conf, type, param))
            {
                this.mCacheWeakTargetList.Add(conf);
            }
        }
        return(this.mCacheWeakTargetList);
    }
Exemplo n.º 12
0
    public ListView <NewbieGuideMainLineConf> GetNewbieGuideMainLineConfListByTriggerTimeType(NewbieGuideTriggerTimeType type, uint[] param)
    {
        this.mCacheMainLineSourceList.Clear();
        this.mCacheMainLineSourceList.AddRange(this.mMainLineCacheArr);
        this.mCacheMainLineTargetList.Clear();
        int count = this.mCacheMainLineSourceList.Count;

        for (int i = 0; i < count; i++)
        {
            NewbieGuideMainLineConf data = this.mCacheMainLineSourceList[i];
            if (this.IsContainsTriggerTimeType(data, type, param))
            {
                this.mCacheMainLineTargetList.Add(data);
            }
        }
        return(this.mCacheMainLineTargetList);
    }
Exemplo n.º 13
0
    public static bool CheckTriggerTime(NewbieGuideTriggerTimeItem time, uint[] param)
    {
        NewbieGuideTriggerTimeType wType = (NewbieGuideTriggerTimeType)time.wType;

        switch (wType)
        {
        case NewbieGuideTriggerTimeType.onTalentLevelChange:
        {
            bool flag2 = true;
            if (time.Param[0] > 0)
            {
                flag2 &= time.Param[0] == param[0];
            }
            if (time.Param[1] > 0)
            {
                flag2 &= time.Param[1] == param[1];
            }
            return(flag2);
        }

        case NewbieGuideTriggerTimeType.preNewBieWeakGuideStepComplete:
            if (time.Param[0] <= 0)
            {
                return(false);
            }
            return(time.Param[0] == param[0]);

        case NewbieGuideTriggerTimeType.preNewBieWeakGuideComleteAll:
            if (time.Param[0] <= 0)
            {
                return(false);
            }
            return(time.Param[0] == param[0]);

        case NewbieGuideTriggerTimeType.PvPShowKDA:
            if (time.Param[0] <= 0)
            {
                if (time.Param[1] > 0)
                {
                    return(time.Param[1] == param[1]);
                }
                return(true);
            }
            return(time.Param[0] == param[0]);
        }
        switch (wType)
        {
        case NewbieGuideTriggerTimeType.preNewbieGuideComplete:
            return(CheckPreNewbieGuideCompleteTime(time, param));

        case NewbieGuideTriggerTimeType.battleFin:
        {
            bool flag = true;
            if (time.Param[0] > 0)
            {
                flag &= time.Param[0] == param[0];
            }
            if (time.Param[1] > 0)
            {
                flag &= time.Param[1] == param[1];
            }
            if (time.Param[2] > 0)
            {
                flag &= time.Param[2] == param[2];
            }
            if (time.Param[3] > 0)
            {
                flag &= time.Param[3] == param[3];
            }
            return(flag);
        }

        case NewbieGuideTriggerTimeType.equipSuccess:
            return(false);

        default:
            switch (wType)
            {
            case NewbieGuideTriggerTimeType.pvpFin:
                if (time.Param[0] <= 0)
                {
                    if (time.Param[1] > 0)
                    {
                        return(time.Param[1] == param[1]);
                    }
                    return(true);
                }
                return(time.Param[0] == param[0]);

            case NewbieGuideTriggerTimeType.heroSelectedForBattle:
                if ((time.Param[0] != 0) || (param[0] <= 0))
                {
                    return((time.Param[0] == param[0]) && (param[0] > 0));
                }
                return(true);
            }
            break;
        }
        for (int i = 0; i < param.Length; i++)
        {
            if (param[i] != time.Param[i])
            {
                return(false);
            }
        }
        return(true);
    }