Example #1
0
    public bool IsContainsSkipConditionType(NewbieWeakGuideMainLineConf conf, NewbieGuideSkipConditionType type, uint[] param)
    {
        int length = conf.astSkipCondition.Length;

        for (int i = 0; i < length; i++)
        {
            NewbieGuideSkipConditionItem item = conf.astSkipCondition[i];
            if ((((NewbieGuideSkipConditionType)item.wType) == type) && NewbieGuideCheckSkipConditionUtil.CheckSkipCondition(item, param))
            {
                return(true);
            }
        }
        return(false);
    }
Example #2
0
    private void CheckWeakSkipCondition(NewbieGuideSkipConditionType type, params uint[] param)
    {
        ListView <NewbieWeakGuideMainLineConf> newbieGuideWeakMianLineConfListBySkipType = Singleton <NewbieGuideDataManager> .GetInstance().GetNewbieGuideWeakMianLineConfListBySkipType(type);

        int count = newbieGuideWeakMianLineConfListBySkipType.Count;

        for (int i = 0; i < count; i++)
        {
            NewbieWeakGuideMainLineConf conf = newbieGuideWeakMianLineConfListBySkipType[i];
            if (!this.IsWeakLineComplete(conf.dwID))
            {
                for (int j = 0; j < conf.astSkipCondition.Length; j++)
                {
                    NewbieGuideSkipConditionItem item = conf.astSkipCondition[j];
                    if ((((NewbieGuideSkipConditionType)item.wType) == type) && NewbieGuideCheckSkipConditionUtil.CheckSkipCondition(item, param))
                    {
                        this.SetWeakGuideComplete(conf.dwID, true);
                        break;
                    }
                }
            }
        }
    }
Example #3
0
    private void CheckForceSkipCondition(NewbieGuideSkipConditionType type, params uint[] param)
    {
        ListView <NewbieGuideMainLineConf> newbieGuideMainLineConfListBySkipType = Singleton <NewbieGuideDataManager> .GetInstance().GetNewbieGuideMainLineConfListBySkipType(type);

        int count = newbieGuideMainLineConfListBySkipType.Count;

        for (int i = 0; i < count; i++)
        {
            NewbieGuideMainLineConf conf = newbieGuideMainLineConfListBySkipType[i];
            if (!this.IsMianLineComplete(conf.dwID))
            {
                for (int j = 0; j < conf.astSkipCondition.Length; j++)
                {
                    if ((((NewbieGuideSkipConditionType)conf.astSkipCondition[j].wType) == type) && NewbieGuideCheckSkipConditionUtil.CheckSkipCondition(conf.astSkipCondition[j], param))
                    {
                        if (null != this.mCurrentScriptControl)
                        {
                            if (this.mCurrentScriptControl.currentMainLineId == conf.dwID)
                            {
                                continue;
                            }
                            this.SetNewbieGuideComplete(conf.dwID, false, false);
                        }
                        else
                        {
                            this.SetNewbieGuideComplete(conf.dwID, false, false);
                        }
                        break;
                    }
                }
            }
        }
    }
    public static bool CheckSkipCondition(NewbieGuideSkipConditionItem item, uint[] param)
    {
        switch (item.wType)
        {
        case 1:
        {
            bool result = false;
            if (param != null && param.Length > 0)
            {
                if (param[0] == item.Param[0])
                {
                    result = Singleton <CAdventureSys> .GetInstance().IsLevelFinished((int)param[0]);
                }
            }
            else
            {
                result = Singleton <CAdventureSys> .GetInstance().IsLevelFinished((int)item.Param[0]);
            }
            return(result);
        }

        case 2:
            return(MonoSingleton <NewbieGuideManager> .GetInstance().IsNewbieGuideComplete(item.Param[0]));

        case 3:
        case 4:
        case 5:
        case 6:
        case 7:
        case 8:
        case 9:
        case 11:
        case 12:
        case 13:
        case 14:
        case 15:
        case 16:
        case 17:
        case 18:
        case 19:
        case 20:
        case 21:
        case 22:
        case 23:
        case 24:
        case 31:
        case 32:
        case 33:
        case 34:
        case 35:
        case 36:
        case 37:
        case 38:
        case 40:
        case 41:
        case 45:
        case 46:
        case 47:
        case 48:
        case 51:
        {
            int num = NewbieGuideCheckSkipConditionUtil.TranslateFromSkipCond((NewbieGuideSkipConditionType)item.wType);
            return(num == -1 || Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(num));
        }

        case 30:
            return(MonoSingleton <NewbieGuideManager> .GetInstance().IsNewbieBitSet((int)item.Param[0]));

        case 42:
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo != null)
            {
                CUseableContainer useableContainer = masterRoleInfo.GetUseableContainer(enCONTAINER_TYPE.ITEM);
                if (useableContainer != null)
                {
                    int useableStackCount = useableContainer.GetUseableStackCount(COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL, item.Param[0]);
                    return(useableStackCount >= 2);
                }
            }
            return(false);
        }

        case 43:
        {
            int num2 = NewbieGuideCheckSkipConditionUtil.TranslateFromSkipCond((NewbieGuideSkipConditionType)item.wType);
            if (num2 == -1)
            {
                return(true);
            }
            if (item.Param[0] == 0u)
            {
                return(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(num2));
            }
            return(!Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsGuidedStateSet(num2));
        }

        case 44:
        {
            CRoleInfo masterRoleInfo2 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            return(masterRoleInfo2.IsNewbieAchieveSet((int)(item.Param[0] + (uint)NewbieGuideManager.WEAKGUIDE_BIT_OFFSET)));
        }

        case 49:
        {
            CRoleInfo masterRoleInfo3 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo3 == null)
            {
                return(false);
            }
            bool flag      = masterRoleInfo3.IsGuidedStateSet(89);
            bool flag2     = masterRoleInfo3.IsGuidedStateSet(90);
            bool arg_258_0 = flag || flag2;
            return(masterRoleInfo3.IsGuidedStateSet(89) || masterRoleInfo3.IsGuidedStateSet(90));
        }
        }
        return(true);
    }
    private void CheckForceSkipCondition(NewbieGuideSkipConditionType type, params uint[] param)
    {
        ListView <NewbieGuideMainLineConf> newbieGuideMainLineConfListBySkipType = Singleton <NewbieGuideDataManager> .GetInstance().GetNewbieGuideMainLineConfListBySkipType(type);

        int count = newbieGuideMainLineConfListBySkipType.get_Count();

        for (int i = 0; i < count; i++)
        {
            NewbieGuideMainLineConf newbieGuideMainLineConf = newbieGuideMainLineConfListBySkipType.get_Item(i);
            if (!this.IsMianLineComplete(newbieGuideMainLineConf.dwID))
            {
                for (int j = 0; j < newbieGuideMainLineConf.astSkipCondition.Length; j++)
                {
                    if ((NewbieGuideSkipConditionType)newbieGuideMainLineConf.astSkipCondition[j].wType == type && NewbieGuideCheckSkipConditionUtil.CheckSkipCondition(newbieGuideMainLineConf.astSkipCondition[j], param))
                    {
                        if (!(null != this.mCurrentScriptControl))
                        {
                            this.SetNewbieGuideComplete(newbieGuideMainLineConf.dwID, false, false, true);
                            break;
                        }
                        if (this.mCurrentScriptControl.currentMainLineId != newbieGuideMainLineConf.dwID)
                        {
                            this.SetNewbieGuideComplete(newbieGuideMainLineConf.dwID, false, false, true);
                            break;
                        }
                    }
                }
            }
        }
    }