Beispiel #1
0
 public void Deserialize(JSON_QuestDropParam json)
 {
     this.mSimpleDropTables.Clear();
     this.mSimpleLocalMaps.Clear();
     this.mSimpleQuestDrops.Clear();
     if (json.simpleDropTable != null)
     {
         for (int index = 0; index < json.simpleDropTable.Length; ++index)
         {
             SimpleDropTableParam simpleDropTableParam = new SimpleDropTableParam();
             if (simpleDropTableParam.Deserialize(json.simpleDropTable[index]))
             {
                 this.mSimpleDropTables.Add(simpleDropTableParam);
             }
         }
     }
     if (json.simpleLocalMaps != null)
     {
         for (int index = 0; index < json.simpleLocalMaps.Length; ++index)
         {
             SimpleLocalMapsParam simpleLocalMapsParam = new SimpleLocalMapsParam();
             if (simpleLocalMapsParam.Deserialize(json.simpleLocalMaps[index]))
             {
                 this.mSimpleLocalMaps.Add(simpleLocalMapsParam);
             }
         }
     }
     if (json.simpleQuestDrops != null)
     {
         for (int index = 0; index < json.simpleQuestDrops.Length; ++index)
         {
             SimpleQuestDropParam simpleQuestDropParam = new SimpleQuestDropParam();
             if (simpleQuestDropParam.Deserialize(json.simpleQuestDrops[index]))
             {
                 this.mSimpleQuestDrops.Add(simpleQuestDropParam);
             }
         }
     }
     this.mIsLoaded = true;
 }
Beispiel #2
0
        public List <QuestParam> GetItemDropQuestList(ItemParam item, DateTime date_time)
        {
            List <QuestParam> questParamList1 = new List <QuestParam>();
            List <QuestParam> questParamList2 = new List <QuestParam>();

            this.CompleteLoading();
            using (List <SimpleQuestDropParam> .Enumerator enumerator = this.mSimpleQuestDrops.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    SimpleQuestDropParam current = enumerator.Current;
                    if (current.item_iname == item.iname)
                    {
                        foreach (string iname in current.questlist)
                        {
                            QuestParam quest = MonoSingleton <GameManager> .Instance.FindQuest(iname);

                            if (quest != null)
                            {
                                questParamList2.Add(quest);
                            }
                        }
                        break;
                    }
                }
            }
            using (List <QuestParam> .Enumerator enumerator1 = questParamList2.GetEnumerator())
            {
                while (enumerator1.MoveNext())
                {
                    QuestParam current = enumerator1.Current;
                    if (!current.notSearch)
                    {
                        QuestTypes type = current.type;
                        switch (type)
                        {
                        case QuestTypes.Story:
                        case QuestTypes.Free:
                        case QuestTypes.Event:
label_15:
                            using (List <ItemParam> .Enumerator enumerator2 = this.GetQuestDropList(current.iname, date_time).GetEnumerator())
                            {
                                while (enumerator2.MoveNext())
                                {
                                    if (enumerator2.Current == item)
                                    {
                                        questParamList1.Add(current);
                                        break;
                                    }
                                }
                                continue;
                            }

                        default:
                            switch (type - (byte)10)
                            {
                            case QuestTypes.Story:
                            case QuestTypes.Multi:
                            case QuestTypes.Tutorial:
                                goto label_15;

                            default:
                                continue;
                            }
                        }
                    }
                }
            }
            return(questParamList1);
        }