Exemplo n.º 1
0
 public static bool cb(CSVReader csv_reader, QuestTableData data, ref uint key)
 {
     data.questID = key;
     csv_reader.Pop(ref data.questType);
     csv_reader.Pop(ref data.questStyle);
     csv_reader.PopEnum(ref data.rarity, RARITY_TYPE.D);
     csv_reader.Pop(ref data.level);
     csv_reader.Pop(ref data.getType);
     csv_reader.Pop(ref data.eventId);
     csv_reader.Pop(ref data.grade);
     csv_reader.Pop(ref data.difficulty);
     csv_reader.Pop(ref data.sortPriority);
     csv_reader.Pop(ref data.locationNumber);
     csv_reader.Pop(ref data.questNumber);
     csv_reader.Pop(ref data.questText);
     csv_reader.Pop(ref data.appearQuestId);
     csv_reader.Pop(ref data.appearDeliveryId);
     csv_reader.Pop(ref data.rushId);
     csv_reader.Pop(ref data.rushIconId);
     csv_reader.Pop(ref data.mapId);
     for (int i = 0; i < 1; i++)
     {
         csv_reader.Pop(ref data.stageName[i]);
     }
     for (int j = 0; j < 1; j++)
     {
         csv_reader.Pop(ref data.enemyID[j]);
         csv_reader.Pop(ref data.enemyLv[j]);
     }
     for (int k = 0; k < 1; k++)
     {
         csv_reader.Pop(ref data.bgmID[k]);
     }
     csv_reader.Pop(ref data.limitTime);
     csv_reader.Pop(ref data.missionID[0]);
     csv_reader.Pop(ref data.missionID[1]);
     csv_reader.Pop(ref data.missionID[2]);
     csv_reader.Pop(ref data.cantSale);
     csv_reader.Pop(ref data.forceDefeat);
     csv_reader.Pop(ref data.storyId);
     if (data.sortPriority == 0)
     {
         data.sortPriority = (int)key;
     }
     if (string.IsNullOrEmpty(data.locationNumber))
     {
         data.locationNumber = (data.questID / 100u % 1000u).ToString();
     }
     if (string.IsNullOrEmpty(data.questNumber))
     {
         data.questNumber = (data.questID % 100u).ToString();
     }
     data.seriesNum = 0;
     for (int l = 0; l < 1 && data.enemyID[l] != 0; l++)
     {
         data.seriesNum++;
     }
     return(true);
 }
Exemplo n.º 2
0
    public static int GetQuestNum(QuestTableData q)
    {
        if (q.questType != QUEST_TYPE.ORDER)
        {
            return(-1);
        }
        QuestItemInfo questItem = MonoBehaviourSingleton <InventoryManager> .I.GetQuestItem(q.questID);

        if (questItem == null)
        {
            return(0);
        }
        return(GetQuestNum(questItem));
    }
Exemplo n.º 3
0
    public QuestTableData GetQuestData(uint id)
    {
        if (!Singleton <QuestTable> .IsValid())
        {
            return(null);
        }
        QuestTableData questTableData = questTable.Get(id);

        if (questTableData == null)
        {
            Log.TableError(this, id);
            questTableData           = new QuestTableData();
            questTableData.questText = Log.NON_DATA_NAME;
        }
        return(questTableData);
    }
Exemplo n.º 4
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            QuestTableData questTableData = obj as QuestTableData;

            if (questTableData == null)
            {
                return(false);
            }
            bool flag = questID == questTableData.questID && questType == questTableData.questType && questStyle == questTableData.questStyle && rarity == questTableData.rarity && getType == questTableData.getType && eventId == questTableData.eventId && grade == questTableData.grade && difficulty == questTableData.difficulty && sortPriority == questTableData.sortPriority && locationNumber == questTableData.locationNumber && questNumber == questTableData.questNumber && questText == questTableData.questText && appearQuestId == questTableData.appearQuestId && appearDeliveryId == questTableData.appearDeliveryId && mapId == questTableData.mapId && limitTime == questTableData.limitTime && cantSale == questTableData.cantSale && forceDefeat == questTableData.forceDefeat && storyId == questTableData.storyId && seriesNum == questTableData.seriesNum;

            for (int i = 0; i < stageName.Length; i++)
            {
                flag = (flag && stageName[i] == questTableData.stageName[i]);
            }
            for (int j = 0; j < enemyID.Length; j++)
            {
                flag = (flag && enemyID[j] == questTableData.enemyID[j]);
            }
            for (int k = 0; k < enemyLv.Length; k++)
            {
                flag = (flag && enemyLv[k] == questTableData.enemyLv[k]);
            }
            for (int l = 0; l < bgmID.Length; l++)
            {
                flag = (flag && bgmID[l] == questTableData.bgmID[l]);
            }
            for (int m = 0; m < missionID.Length; m++)
            {
                flag = (flag && missionID[m] == questTableData.missionID[m]);
            }
            return(flag);
        }