Example #1
0
    /** 获取buff使用等级 */
    private int getBuffUseLevel(BuffConfig config, int level)
    {
        foreach (int v in config.groups)
        {
            level += _buffLevelUpDic.getOrDefault(v, 0);
        }

        return(level);
    }
Example #2
0
    /** 获取buff时机使用时间 */
    private int getBuffUseLastTime(BuffData data)
    {
        int re = data.levelConfig.lastTime;

        foreach (int v in data.config.groups)
        {
            re += _buffLastTimeAddDic.getOrDefault(v, 0);
        }

        return(re);
    }
Example #3
0
    /** 获取技能实际使用等级 */
    public int getSkillUseLevel(int skillID, int level)
    {
        SkillConfig config = SkillConfig.get(skillID);

        foreach (int v in config.groups)
        {
            level += _skillLevelUpDic.getOrDefault(v, 0);
        }

        //if(level<1)
        //	level=1;

        return(level);
    }
Example #4
0
    /** 统计所有可接任务列表 */
    private void countWaitAcceptQuests()
    {
        IntObjectMap <QuestConfig> dic = QuestConfig.getDic();

        if (dic == null)
        {
            return;
        }

        IntObjectMap <QuestConfig> waitAcceptQuests = _waitAcceptQuests;

        waitAcceptQuests.clear();

        IntObjectMap <QuestData> accepts = _d.accepts;
        IntSet completeIDs = _d.completeIDs;
        IntObjectMap <QuestCompleteData> completeQuestsDic = _d.completeQuestsDic;
        IntIntMap completeLines = _d.completeLines;

        QuestConfig[] values;
        QuestConfig   v;
        int           questID;
        DIntData      line;

        for (int i = (values = dic.getValues()).Length - 1; i >= 0; --i)
        {
            if ((v = values[i]) != null)
            {
                //可主动接
                if (v.acceptType != QuestAcceptType.Passive)
                {
                    questID = v.id;

                    //已接
                    if (accepts.contains(questID))
                    {
                        continue;
                    }

                    //完成
                    if (completeIDs.contains(questID))
                    {
                        continue;
                    }

                    //周期完成
                    if (completeQuestsDic.contains(questID))
                    {
                        continue;
                    }

                    //链完成
                    if (!(line = v.questLine).isEmpty() && line.value <= completeLines.getOrDefault(line.key, -1))
                    {
                        continue;
                    }

                    //前置未完成
                    if (!checkQuestPreAllComplete(v))
                    {
                        continue;
                    }

                    waitAcceptQuests.put(v.id, v);
                }
            }
        }
    }