コード例 #1
0
 public void LoadFromBinary(BinaryTableReader reader, ref uint key)
 {
     questID          = key;
     questType        = (QUEST_TYPE)reader.ReadInt32(0);
     questStyle       = (QUEST_STYLE)reader.ReadInt32(0);
     rarity           = (RARITY_TYPE)reader.ReadInt32(0);
     getType          = (GET_TYPE)reader.ReadInt32(0);
     eventId          = reader.ReadInt32(0);
     grade            = reader.ReadInt32(0);
     difficulty       = (DIFFICULTY_TYPE)reader.ReadInt32(0);
     sortPriority     = reader.ReadInt32(0);
     locationNumber   = reader.ReadString(string.Empty);
     questNumber      = reader.ReadString(string.Empty);
     questText        = reader.ReadString(string.Empty);
     appearQuestId    = reader.ReadUInt32(0u);
     appearDeliveryId = reader.ReadUInt32(0u);
     rushId           = reader.ReadUInt32(0u);
     mapId            = reader.ReadUInt32(0u);
     for (int i = 0; i < 1; i++)
     {
         stageName[i] = reader.ReadString(string.Empty);
     }
     for (int j = 0; j < 1; j++)
     {
         enemyID[j] = reader.ReadInt32(0);
         enemyLv[j] = reader.ReadInt32(0);
     }
     for (int k = 0; k < 1; k++)
     {
         bgmID[k] = reader.ReadInt32(0);
     }
     limitTime    = reader.ReadSingle(0f);
     missionID[0] = reader.ReadUInt32(0u);
     missionID[1] = reader.ReadUInt32(0u);
     missionID[2] = reader.ReadUInt32(0u);
     cantSale     = reader.ReadBoolean(false);
     forceDefeat  = reader.ReadBoolean(false);
     storyId      = reader.ReadInt32(0);
     if (sortPriority == 0)
     {
         sortPriority = (int)key;
     }
     if (string.IsNullOrEmpty(locationNumber))
     {
         locationNumber = (questID / 100u % 1000u).ToString();
     }
     if (string.IsNullOrEmpty(questNumber))
     {
         questNumber = (questID % 100u).ToString();
     }
     seriesNum = 0;
     for (int l = 0; l < 1 && enemyID[l] != 0; l++)
     {
         seriesNum++;
     }
 }
コード例 #2
0
 private void TEST_PLAY(RARITY_TYPE rarity, DIFFICULTY_TYPE difficulty)
 {
     if (rarity <= RARITY_TYPE.C)
     {
         PlayTween((Enum)UI.OBJ_RARITY_LIGHT, true, (EventDelegate.Callback)null, false, 0);
     }
     PlayTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, true, (EventDelegate.Callback)null, false, 0);
     PlayTween((Enum)rarityAnimRoot[(int)rarity], true, (EventDelegate.Callback) delegate
     {
         PlayTween((Enum)UI.OBJ_DIFFICULTY_ROOT, true, (EventDelegate.Callback)null, false, 0);
     }, false, 0);
     if (AnimationDirector.I is QuestGachaDirectorBase)
     {
         (AnimationDirector.I as QuestGachaDirectorBase).PlayUIRarityEffect(rarity, GetCtrl(UI.OBJ_RARITY_ROOT), GetCtrl(rarityAnimRoot[(int)rarity]));
     }
 }
コード例 #3
0
    private void TEST_RESET(RARITY_TYPE rarity, DIFFICULTY_TYPE difficulty)
    {
        RARITY_TYPE[] array    = (RARITY_TYPE[])Enum.GetValues(typeof(RARITY_TYPE));
        int           star_num = (int)(difficulty + 1);
        int           i        = 0;

        for (int num = array.Length; i < num; i++)
        {
            SetActive((Enum)rarityAnimRoot[i], rarity == array[i]);
        }
        SetGachaQuestDifficulty(UI.OBJ_DIFFICULTY_ROOT, star_num);
        ResetTween((Enum)UI.OBJ_DIFFICULTY_ROOT, 0);
        ResetTween((Enum)rarityAnimRoot[(int)rarity], 0);
        ResetTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, 0);
        if (rarity <= RARITY_TYPE.C)
        {
            ResetTween((Enum)UI.OBJ_RARITY_LIGHT, 0);
        }
    }
コード例 #4
0
    public void GetTargetEnemyData(int delivery_id, out uint jump_quest_id, out uint jump_map_id, out string map_name, out string enemy_name, out DIFFICULTY_TYPE?difficulty, out int[] targetPortalID)
    {
        jump_quest_id  = 0u;
        jump_map_id    = 0u;
        map_name       = string.Empty;
        enemy_name     = string.Empty;
        difficulty     = null;
        targetPortalID = null;
        DeliveryTable.DeliveryData deliveryTableData = Singleton <DeliveryTable> .I.GetDeliveryTableData((uint)delivery_id);

        if (deliveryTableData != null)
        {
            uint enemy_id = deliveryTableData.GetEnemyID(0u);
            uint mapID    = deliveryTableData.GetMapID(0u);
            int  num      = (int)Singleton <FieldMapTable> .I.GetTargetEnemyPopMapID(enemy_id);

            if (num != 0)
            {
                if (deliveryTableData.jumpMapID < 0)
                {
                    num = -1;
                }
                else
                {
                    if (mapID != 0)
                    {
                        num = (int)mapID;
                    }
                    if (deliveryTableData.jumpMapID > 0)
                    {
                        num = deliveryTableData.jumpMapID;
                    }
                    FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData((uint)num);

                    if (fieldMapData != null)
                    {
                        map_name    = fieldMapData.mapName;
                        jump_map_id = (uint)num;
                    }
                    else
                    {
                        num = -1;
                    }
                }
                if (num == -1)
                {
                    map_name    = "????????";
                    jump_map_id = 0u;
                }
            }
            else if (deliveryTableData.jumpMapID > 0)
            {
                FieldMapTable.FieldMapTableData fieldMapData2 = Singleton <FieldMapTable> .I.GetFieldMapData((uint)deliveryTableData.jumpMapID);

                if (fieldMapData2 != null)
                {
                    map_name       = fieldMapData2.mapName;
                    targetPortalID = deliveryTableData.targetPortalID;
                    if (targetPortalID != null)
                    {
                        bool flag = false;
                        int  i    = 0;
                        for (int num2 = targetPortalID.Length; i < num2; i++)
                        {
                            if (targetPortalID[i] != 0)
                            {
                                flag = true;
                                break;
                            }
                        }
                        if (flag)
                        {
                            map_name = string.Format(StringTable.Get(STRING_CATEGORY.QUEST_DELIVERY, 2u), map_name);
                        }
                    }
                    jump_map_id = (uint)deliveryTableData.jumpMapID;
                    enemy_name  = StringTable.Get(STRING_CATEGORY.QUEST_DELIVERY, 1u);
                }
                else
                {
                    map_name    = "????????";
                    jump_map_id = 0u;
                }
            }
            else
            {
                bool            is_find        = false;
                string          tmp_name       = string.Empty;
                uint            tmp_quest_id   = 0u;
                DIFFICULTY_TYPE tmp_difficulty = DIFFICULTY_TYPE.LV1;
                Singleton <QuestTable> .I.AllQuestData(delegate(QuestTable.QuestTableData data)
                {
                    if (!is_find)
                    {
                        for (int j = 0; j < data.seriesNum; j++)
                        {
                            if (data.enemyID[j] == (int)enemy_id)
                            {
                                is_find        = true;
                                tmp_name       = data.questText;
                                tmp_difficulty = data.difficulty;
                                tmp_quest_id   = data.questID;
                            }
                        }
                    }
                });

                if (is_find)
                {
                    map_name      = tmp_name;
                    difficulty    = tmp_difficulty;
                    jump_quest_id = tmp_quest_id;
                }
            }
            if (!string.IsNullOrEmpty(deliveryTableData.placeName))
            {
                map_name = deliveryTableData.placeName;
            }
            if (!string.IsNullOrEmpty(deliveryTableData.enemyName))
            {
                enemy_name = deliveryTableData.enemyName;
            }
            if (string.IsNullOrEmpty(enemy_name))
            {
                EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData(enemy_id);

                if (enemyData != null)
                {
                    enemy_name = enemyData.name;
                }
                if (enemy_id == 0 && mapID != 0)
                {
                    enemy_name = StringTable.Get(STRING_CATEGORY.QUEST_DELIVERY, 0u);
                }
            }
        }
    }