Exemplo n.º 1
0
 private void Start()
 {
     progress     = FindObjects.GameLogic.GetComponent <DungeonProgress>();
     progressData = FindObjects.GameLogic
                    .GetComponent <DungeonProgressData>();
     saveLoad = FindObjects.GameLogic.GetComponent <SaveLoadGame>();
 }
Exemplo n.º 2
0
    public void SetDungeonEvent(int num)//dp 의 index;
    {
        dp = DungeonData.Instance.dungeon_Progress[num];
        int dungeonNum = dp.d.num;

        DungeonEvent_Del[dungeonNum][dp.p.PrefaceDay - 1]();
    }
Exemplo n.º 3
0
    public void CreateDungeonEvents()
    {
        int value;

        foreach (DungeonProgress dp_ in DungeonData.Instance.dungeon_Progress)
        {
            dp = dp_;
            if (dp.isParty == true)
            {
                if (dp.p.dayIndex == 5) //보스일 경우 지정된 특별한 이벤트들 생성함.
                {
                    BattleEventDelegate[3]();
                }
                else if (dp.p.day >= 0) //보스가 아닌 일반..
                {
                    value = UnityEngine.Random.Range(0, 3);
                    BattleEventDelegate[value]();
                }
                else//Day가 -1 이니 탐색완료.
                {
                    dp.SetData(7);
                }
            }
        }
    }
Exemplo n.º 4
0
 private void ConnectDungeon(int[] array)
 {
     for (int i = 0; i < 8; i++)
     {
         Dungeon d = dungeons[array[i]];
         dungeon_Progress[i] = new DungeonProgress(d);
     }
 }
Exemplo n.º 5
0
 public int GetDungeonProgressIndex(DungeonProgress dp)
 {
     for (int i = 0; i < dungeon_Progress.Length; i++)
     {
         if (dp == dungeon_Progress[i])
         {
             return(i);
         }
     }
     return(0);
 }
Exemplo n.º 6
0
    /// <summary>
    /// 新規データ作成
    /// </summary>
    public static DungeonProgress CreateData(string name, Dungeon dungeonMaster)
    {
        Debug.Assert(msInstance != null);
        Debug.Assert(!msInstance.mDungeonProgressList.ContainsKey(name));

        var newData = new DungeonProgress(dungeonMaster);

        msInstance.mDungeonProgressList[name] = newData;

        return(newData);
    }
Exemplo n.º 7
0
 /// <summary>
 /// ダンジョン処理開始
 /// </summary>
 public void Start()
 {
     // 進行データがあれば取得
     mDungeonProgress = DungeonSaveData.GetData(mDungeonFileName);
     if (mDungeonProgress == null)
     {
         // 進行データを新規作成
         mDungeonProgress = DungeonSaveData.CreateData(mDungeonFileName, mDungeonMaster);
         // 開始位置を検索
         mPos = FindFloorSteps(mDungeonMaster.GetFloor(mFloorNumber), (int)Dungeon.Cell.EStepsValue.Up);
     }
 }
Exemplo n.º 8
0
    public void Initialize()
    {
        QuestSlots = new List <QuestSlot>(transform.Find("DungeonFrame")
                                          .Find("GeneratedQuests").GetComponentsInChildren <QuestSlot>());
        for (int i = 0; i < QuestSlots.Count; i++)
        {
            QuestSlots[i].Initialize();
            QuestSlots[i].EventQuestSelected += DungeonPanelQuestSelected;
        }

        dungeonProgressData       = DarkestDungeonManager.Campaign.Dungeons[dungeon];
        dangeonProgress.value     = dungeonProgressData.XpRatio;
        dangeonProgressLevel.text = dungeonProgressData.MasteryLevel.ToString();
    }
Exemplo n.º 9
0
    private void LoadBattleData()
    {
        //1-1 . 데이타 로드.
        //      -  몬스터 위치 지정은 그냥 순서대로 4명 씩 Load함.
        //      -  모든 기사와 몬스터의 요소를 Thing(ArrayList)에 집어넣음
        dp          = EventData.Instance.battle_dp;
        knightCount = dp.p.k.Length;

        int cnt = dp.p.k.Length;

        thing.Clear();
        for (int i = 0; i < cnt; i++)
        {
            KnightState ks = dp.p.knightStates[i];

            if (ks.s.Hp > 0)
            {
                thing.Add(ks.s);
                kps[i].SetData(ks, i);
                ks.s.SetBKP(kps[i]);
                thingTarget.Add(i);
            }
        }
        for (int i = cnt; i < 4; i++)
        {
            kps[i].gameObject.SetActive(false);
        }
        //1-1-2 스킬 폼을 세팅해줌.
        ColController.Instance.SetForm();

        //1-1-3 dp(Battle)에서 m은 int로 저장되있다. monsterArr를 생성해 직접 Monster를 삽입한다.
        int size = dp.m.Length;

        Monster[] monsterArr = new Monster[size];
        for (int i = 0; i < size; i++)
        {
            monsterArr[i] = MonsterData.Instance.monsters[dp.m[i]];
        }
        foreach (Monster m in monsterArr)
        {
            monsterList.Add(m);
        }

        //1-2 . 던전에 따른 세팅 (데코part)

        //---------- 필드 세팅 완료 -----------
        //1-3. 전투 턴, 페이즈 초기화 및 전투개시.
        State = BattleState.로드;
    }
Exemplo n.º 10
0
    /// <summary>
    /// セーブデータ取得
    /// </summary>
    public static DungeonProgress GetData(string name)
    {
        if (msInstance == null)
        {
            return(null);
        }

        DungeonProgress result = null;

        if (msInstance.mDungeonProgressList.TryGetValue(name, out result))
        {
            return(result);
        }
        return(null);
    }
Exemplo n.º 11
0
    public void SetForm()
    {
        DungeonProgress dp = EventData.Instance.battle_dp;

        formObj = new GameObject[dp.p.k.Length];

        int index = 0;

        foreach (int kNum in dp.p.k)
        {
            formObj[index] = CodeBox.AddChildInParent(BattleUI.transform, basicForm);

            formObj[index].GetComponent <Form>().SetData(battle.kps[index]);
            formObj[index++].SetActive(false);
        }
    }
Exemplo n.º 12
0
        private void Start()
        {
            schedule = FindObjects.GameLogic.GetComponent <SchedulingSystem>();
            progress = FindObjects.GameLogic.GetComponent <DungeonProgress>();
            progressData
                       = FindObjects.GameLogic.GetComponent <DungeonProgressData>();
            color      = FindObjects.GameLogic.GetComponent <GameColor>();
            modeline   = FindObjects.GameLogic.GetComponent <UIModeline>();
            message    = FindObjects.GameLogic.GetComponent <UIMessage>();
            actorData  = FindObjects.GameLogic.GetComponent <ActorData>();
            potionData = FindObjects.GameLogic.GetComponent <PotionData>();
            coord      = FindObjects.GameLogic.GetComponent <ConvertCoordinates>();
            fungus     = FindObjects.GameLogic.GetComponent <NourishFungus>();
            text       = FindObjects.GameLogic.GetComponent <GameText>();

            getActor = FindObjects.GetStaticActor;
        }
Exemplo n.º 13
0
    //랜덤 몬스터 로직..
    public void GetRandomMonster(Dungeon d)
    {
        dp = DungeonData.Instance.dungeon_Progress[d.num];

        int cnt = UnityEngine.Random.Range(UnityEngine.Random.Range(1, 3), 5);

        int[] array = new int[cnt];


        int level = dp.SearchP < 25 ? 0 : dp.SearchP < 50 ? 1 : dp.SearchP < 75 ? 2 : dp.SearchP < 100 ? 3 : 4;

        for (int i = 0; i < cnt; i++)
        {
            int m         = 0;
            int randomNum = UnityEngine.Random.Range(1, 11);
            switch (level)
            {
            case 0:      // 0:1 = 7:3;
                m = randomNum <= 7 ? 0 : 1;
                break;

            case 1:      // 0:1:2 = 2:6:2
                m = randomNum <= 2 ? 0 : randomNum <= 8 ? 1 : 2;
                break;

            case 2:      // 1:2:3 = 5:4:1
                m = randomNum <= 5 ? 1 : randomNum <= 9 ? 2 : 3;
                break;

            case 3:      //1:2:3 = 3:5:2
                m = randomNum <= 3 ? 1 : randomNum <= 8 ? 2 : 3;
                break;

            case 4:      //2:3 = 7:3
                m = randomNum <= 7 ? 2 : 3;
                break;

            default: break;
            }
            array[i] = d.monsters[m];
        }

        SetBattle(array);
    }
Exemplo n.º 14
0
    };                                      //한가지 선택지를 가지는 이벤트으 인텍스
    public void SetData(int index)
    {
        gameObject.SetActive(true);
        dp   = DungeonData.Instance.dungeon_Progress[index];
        type = dp.choice_Event_Type;

        //화면 세팅
        text.text    = TextData.Instance.choice_Event_Ment[type];
        image.sprite = event_Sprite_Array[type];

        bt2.SetActive(true);
        if (answer_1.Contains(type))
        {
            bt2.SetActive(false);
            bt1.GetComponentInChildren <Text>().text = TextData.Instance.choice_Event_Answer[type, 0];
        }
        else//답변이 두개임
        {
            bt1.GetComponentInChildren <Text>().text = TextData.Instance.choice_Event_Answer[type, 0];
            bt2.GetComponentInChildren <Text>().text = TextData.Instance.choice_Event_Answer[type, 1];
        }
    }
Exemplo n.º 15
0
    //던전 클리어_ WorkListController _ 7 번에서 호출.
    public void Dungeon_Clear(int dpNum)
    {
        DungeonProgress dp = DungeonData.Instance.dungeon_Progress[dpNum];

        //보상등록
        Dungeon_Reward dr = DungeonData.Instance.dungeon_Rewards[dp.p.dayIndex];

        PlayerData.Instance.Gold += dp.Get_Dungeon_Reward_Gold();
        dp.SearchP += (int)dr.search;

        //파티해제
        foreach (int k in dp.p.k)
        {
            UnitData.Instance.knights[k].teaming = false;
        }
        UnitData.Instance.partys.Remove(dp.p);

        //모드 변경
        dp.Dungeon_Reset();
        GameController.Instance.world.WorkList_Update();//화면 업뎃

        GameController.Instance.EventCheck();
    }
Exemplo n.º 16
0
 public void SetData(DungeonProgress _dp, int _index)
 {
     dp    = _dp;
     index = _index;
     UpdateText();
 }
Exemplo n.º 17
0
    public DungeonProgress battle_dp;//이멘트 보내기 전투 데이타.

    public void SetBattleData(int index)
    {
        battle_dp = DungeonData.Instance.dungeon_Progress[index];
    }
Exemplo n.º 18
0
    public void SelectDungeon(int _index)
    {
        //기본 던전 정보
        index = _index;

        gameObject.SetActive(true);

        DungeonProgress dp = DungeonData.Instance.dungeon_Progress [index];

        dungeon_Name_Text.text          = dp.d.name;
        dungeon_Level_Text.text         = index < 2 ? "LV.1" : index < 5 ? "LV.2" : index < 7 ? "LV.3" : "LV.4";
        dungoen_SearchPer_Text.text     = string.Format("{0}%", dp.SearchP);
        dungeon_SaturationPer_Text.text = string.Format("{0}%", dp.Saturation);

        type = DungeonData.Instance.dungeon_Progress[index].eventType;

        //화면 세팅

        /* 0 : none(출전가능한)
         * 1 : 전투
         * 2 : NON Event (그냥 탐색.)
         * 3 : Choice Event(선택지 이벤트, dp - choice_Event_Type 값 참조)
         *
         * n : 자연지형에 의한 선택지
         * n : 동료간 대화에 의한 선택지
         * n : 기록의 발견(SearchPer 첫달성시)
         *
         * 7 : 일정대로 진행 후 귀환함.
         * 8 : 0의 제외한 이벤트 후 귀환 요청이 가능한 화면
         */
        for (int i = 0; i < 9; i++)
        {
            workTypeObj[i].SetActive(false);
        }

        workTypeObj[type].SetActive(true);

        switch (type)
        {
        case 1:
            workTypeObj[type].GetComponentInChildren <Text>().text = string.Format("X {0}", dp.m.Length);
            break;

        case 7:
            reward_Gold_Text.text      = string.Format("{0}G", dp.Get_Dungeon_Reward_Gold());
            reward_SearchPer_Text.text = string.Format("+{0}%", dp.Get_Dungeon_Reward_SearchPer());
            break;

        default:
            break;
        }
        workTypeObj[type].SetActive(true);
        //멘트

        button_Ment_Text.text = TextData.Instance.workList_Button_Ment_Text[type];
        info_Ment_Text.text   = TextData.Instance.workList_Info_Ment_Text[type];
        // button.Interactable = n ==

        CodeBox.ClearList(partyInfo_ListTr);
        partyInfo_Obj.SetActive(type != 0);
        if (type != 0)
        {
            party_Gold_Text.text = string.Format("{0}G", dp.Reward);
            party_Turn_Text.text = string.Format("{0}T", dp.p.day);
        }
        if (type != 0 && type != 7)
        {
            PartyInfoViewer();
        }
    }
Exemplo n.º 19
0
    public void LoadXml()
    {
        //0. Check
        string text = xmlDoc.SelectSingleNode("PlayerData/DataSave").InnerText;

        if (!(text == "Done"))
        {
            Debug.Log("이 전 Save에서 비정상적인 종료 확인됨.");
        }
        //1. PlayerData
        XmlNode node = xmlDoc.SelectSingleNode("PlayerData/Player");

        player.Day    = LoadNode <int>(node, "Day");
        player.Gold   = LoadNode <int>(node, "Gold");
        player.Stress = LoadNode <int>(node, "Stress");

        //2. DungeonProgress;
        XmlNodeList nodes = xmlDoc.SelectNodes("PlayerData/DungeonInfo/Dungeon");
        int         index = 0;

        foreach (XmlNode _node in nodes)
        {
            DungeonProgress dp = new DungeonProgress();

            dp.d = dungeon.dungeons[LoadNode <int>(_node, "Num")];
            LoadNode(ref dp.isClear, _node, "IsClear");
            dp.Saturation = LoadNode <double>(_node, "Saturation");
            dp.SearchP    = LoadNode <double>(_node, "SearchP");
            LoadNode(ref dp.eventType, _node, "Type");
            switch (dp.eventType)
            {
            case 1:
                LoadNodeArray(ref dp.m, _node, "Info");
                break;

            case 3:
                LoadNode(ref dp.choice_Event_Type, _node, "Info");
                break;

            case 4:
                LoadNodeArray(ref dp.m, _node, "Info");
                break;

            default:    break;
            }
            dp.Reward = LoadNode <int>(_node, "Reward");
            LoadNode(ref dp.experPoint, _node, "ExperPoint");

            dungeon.dungeon_Progress[index++] = dp;
        }

        //3-1. Unit - Knight
        nodes = xmlDoc.SelectNodes("PlayerData/KnightInfo/Knight");
        foreach (XmlNode _node in nodes)
        {
            Knight k = new Knight();

            LoadNode(ref k.num, _node, "Num");
            LoadNode(ref k.name, _node, "Name");
            LoadNode(ref k.job, _node, "Job");
            LoadNode(ref k.level, _node, "Level");
            LoadNode(ref k.exper, _node, "Exper");
            LoadNode(ref k.favor, _node, "Favor");
            LoadNode(ref k.day, _node, "Day");
            LoadNodeArray(ref k.skinArr, _node, "Skin");

            LoadNode(ref k.isAlive, _node, "IsAlive");
            LoadNode(ref k.hp, _node, "Hp");
            LoadNode(ref k.stress, _node, "Stress");
            LoadNodeArray(ref k.uni, _node, "Uni");

            /*
             * int[] array = new int[3];
             * LoadNodeArray(array, _node, "Personality");
             * k.personality.type = array[0];
             * k.personality.despair = array[1];
             * k.personality.positive = array[2];
             * LoadNode(k.mentalLevel, _node, "MentalLevel");
             */
            k.Load();
            unit.knights.Add(k);
        }

        //3-2. Unit - Party
        nodes = xmlDoc.SelectNodes("PlayerData/PartyInfo/Party");
        foreach (XmlNode _node in nodes)
        {
            Party p = new Party();
            LoadNode(ref p.dungeonNum, _node, "Dungeon");
            LoadNodeArray(ref p.k, _node, "Knight");
            LoadNode(ref p.day, _node, "Day");
            p.PrefaceDay = LoadNode <int>(_node, "PDay");
            LoadNode(ref p.dayIndex, _node, "DayIndex");
            UnitData.Instance.partys.Add(p);
            p.Load();
        }
        //4 EventInfo(Admin, Office)

        //5 Info
        //  5-1 RandomKnightInfo - Knight
        nodes = xmlDoc.SelectNodes("PlayerData/Info/RandomKnightInfo/Knight");
        index = 0;
        foreach (XmlNode _node in nodes)
        {
            RandomKnight rk = new RandomKnight();

            LoadNode(ref rk.name, _node, "Name");
            LoadNode(ref rk.job, _node, "Job");
            LoadNode(ref rk.level, _node, "Level");
            LoadNodeArray(ref rk.skinNum, _node, "Skin");

            unit.randomKnightList[index++] = rk;
        }

        //7 Office
        node = xmlDoc.SelectSingleNode("PlayerData/Office");
        LoadNode(ref office.officePoint, node, "OfficePoint");
        office.OfficeGage = LoadNode <int>(node, "OfficeGage");

        //8 NPC
        nodes = xmlDoc.SelectNodes("PlayerData/NpcInfo/Npc");
        index = 0;
        foreach (XmlNode _node in nodes)
        {
            NpcData.Instance.npcArray[index++].SetData(
                LoadNode <int>(_node, "Favor"),
                LoadNode <bool>(_node, "Unlock")
                );
        }
        //N. End
        ConnectData();
    }
Exemplo n.º 20
0
    public bool SaveXml()
    {
        XmlNode     playerDataNode = xmlDoc.SelectSingleNode("PlayerData");
        XmlNode     node;
        XmlNodeList nodes;

        //0 dataSave
        UpdateNode("DataSave", playerDataNode, "Saving");

        node = playerDataNode.SelectSingleNode("Player");
        //1 Player day,gold, stress
        UpdateNode("Day", node, ToString(player.Day));
        UpdateNode("Gold", node, ToString(player.Gold));
        UpdateNode("Stress", node, ToString(player.Stress));

        //2 KnightInfo - Knight -상세
        //  2-1 기존Knight 업데이트
        int index = 0;

        foreach (XmlNode node_ in playerDataNode.SelectNodes("KnightInfo/Knight"))
        {
            if (System.Convert.ToInt32(node_.SelectSingleNode("Num").InnerText) != index)
            {
                Debug.Log("Knight 번호 매칭 오류");
                return(true);
            }
            Knight k = UnitData.Instance.knights[index];
            UpdateNode("Job", node_, ToString <int>(k.job));
            UpdateNode("Level", node_, ToString <int>(k.level));
            UpdateNode("Exper", node_, ToString <int>(k.exper));
            UpdateNode("Favor", node_, ToString <int>(k.favor));
            UpdateNode("Day", node_, ToString <int>(k.day));
            UpdateNode("Skin", node_, ToStringArray <int>(k.skinArr));

            UpdateNode("IsAlive", node_, ToString <bool>(k.isAlive));
            UpdateNode("Hp", node_, ToString <int>(k.Hp));
            UpdateNode("Stress", node_, ToString <int>(k.Stress));
            UpdateNode("Uni", node_, ToStringArray <int>(k.uni));

            /* 수정필요
             * UpdateNode("Personality", node_, string.Format( "{0},{1},{2}", k.personality.type, k.personality.despair, k.personality.positive));
             * UpdateNode("MentalLevel", node_, ToString<int>(k.mentalLevel));
             */
            index++;
        }
        //  2-2 신규Knight 등록
        node = playerDataNode.SelectSingleNode("KnightInfo");
        for (int i = index; i < UnitData.Instance.knights.Count; i++)
        {
            Knight  k     = UnitData.Instance.knights[i];
            XmlNode child = CreateNode("Knight", node);

            // * 기본적인 인포
            CreateNode("Num", child, ToString <int>(k.num));
            CreateNode("Name", child, k.name);
            CreateNode("Job", child, ToString <int>(k.job));
            CreateNode("Level", child, ToString <int>(k.level));
            CreateNode("Exper", child, ToString <int>(k.exper));
            CreateNode("Favor", child, ToString <int>(k.favor));
            CreateNode("Day", child, ToString <int>(k.day));
            CreateNode("Skin", child, ToStringArray <int>(k.skinArr));
            //  ---- 전투관련정보
            CreateNode("IsAlive", child, ToString <bool>(k.isAlive));
            CreateNode("Hp", child, ToString <int>(k.hp));
            CreateNode("Stress", child, ToString <int>(k.stress));
            CreateNode("Uni", child, ToStringArray <int>(k.uni));
            //  ---- 성격관련정보

            /* 수정 필요
             * CreateNode("Personality", child, string.Format("{0},{1},{2}", k.personality.type, k.personality.despair, k.personality.positive));
             * CreateNode("MentalLevel", child, ToString<int>(k.mentalLevel));
             */
        }

        nodes = playerDataNode.SelectNodes("PartyInfo/Party");
        //3 Party -- Dungeon정보를 기반으로 기존정보 생성 및 업데이트 후 이외는 삭제
        for (int i = 0; i < 8; i++)
        {
            DungeonProgress dp    = dungeon.dungeon_Progress[i];
            int             value = Check_InValue(nodes, "Dungeon", System.Convert.ToString(i));
            if (dp.isParty)
            {
                // 3-1 ---- Node생성 _ Xml에 데이타 없어서 신규 Node 생성 필요
                if (value == -1)
                {
                    XmlNode child = CreateNode("Party", xmlDoc.SelectSingleNode("PlayerData/PartyInfo"));

                    CreateNode("Dungeon", child, ToString <int>(dp.p.dungeonNum));
                    CreateNode("Knight", child, ToStringArray <int>(dp.p.k));
                    CreateNode("Day", child, ToString <int>(dp.p.day));
                    CreateNode("PDay", child, ToString <int>(dp.p.PrefaceDay));
                    CreateNode("DayIndex", child, ToString <int>(dp.p.dayIndex));
                }
                // 3-2 ---- Node업데이트
                else
                {
                    UpdateNode("Day", nodes[value], ToString <int>(dp.p.day));
                    UpdateNode("PDay", nodes[value], ToString <int>(dp.p.PrefaceDay));
                    UpdateNode("DayIndex", nodes[value], ToString <int>(dp.p.dayIndex));
                    UpdateNode("Knight", nodes[value], ToStringArray <int>(dp.p.k));
                }
            }
            else
            {
                // 3-3 ---- Node삭제
                if (value != -1)
                {
                    RemoveNode(nodes[value], playerDataNode.SelectSingleNode("PartyInfo"));
                }
            }
        }
        //4 EventInfo (Admin, Office)
        //5 Info
        //  5-1 RandomKnightInfo - Knight
        RandomKnight[] rk = unit.randomKnightList;
        node = playerDataNode.SelectSingleNode("Info/RandomKnightInfo");

        nodes = node.SelectNodes("Knight");
        if (nodes != null)
        {
            foreach (XmlNode node_ in nodes)
            {
                node.RemoveChild(node_);
            }
        }
        for (int i = 0; i < rk.Length; i++)
        {
            XmlNode child = CreateNode("Knight", node);
            CreateNode("Name", child, rk[i].name);
            CreateNode("Job", child, ToString <int>(rk[i].job));
            CreateNode("Level", child, ToString <int>(rk[i].level));
            CreateNode("Skin", child, ToStringArray <int>(rk[i].skinNum));
        }

        //6 DungeonInfo Dungeon - 여러개, Type(유동)
        index = 0;
        nodes = playerDataNode.SelectNodes("DungeonInfo/Dungeon");
        if (nodes.Count == 0)
        {   //6-1 Create Dungeon
            for (int i = 0; i < 8; i++)
            {
                XmlNode child = CreateNode("Dungeon", playerDataNode.SelectSingleNode("DungeonInfo"));
                CreateNode("Num", child, ToString(DungeonData.Instance.dungeon_Progress[i].d.num));
            }
            nodes = playerDataNode.SelectNodes("DungeonInfo/Dungeon");
        }
        foreach (DungeonProgress dp in DungeonData.Instance.dungeon_Progress)
        {
            UpdateNode("IsClear", nodes[index], ToString <bool>(dp.isClear));
            UpdateNode("Saturation", nodes[index], ToString <double>(dp.Saturation));
            UpdateNode("SearchP", nodes[index], ToString <double>(dp.SearchP));
            UpdateNode("Type", nodes[index], ToString <int>(dp.eventType));
            switch (dp.eventType)
            {
            case 1:     //배틀
                UpdateNode("Info", nodes[index], ToStringArray(dp.m));
                break;

            case 3:     //선택이벤트
                UpdateNode("Info", nodes[index], ToString <int>(dp.choice_Event_Type));
                break;

            case 4:     //보스
                UpdateNode("Info", nodes[index], ToStringArray(dp.m));
                break;

            default:
                break;
            }
            UpdateNode("Reward", nodes[index], ToString <int>(dp.Reward));
            UpdateNode("ExperPoint", nodes[index], ToString <int>(dp.experPoint));

            index++;
        }
        //7 Office - 정책, OfficeGage, Point
        node = playerDataNode.SelectSingleNode("Office");
        UpdateNode("OfficePoint", node, ToString(OfficeData.Instance.officePoint));
        UpdateNode("OfficeGage", node, ToString(OfficeData.Instance.OfficeGage));

        //8 NPC - Favor 과 unlock정보만..
        node  = playerDataNode.SelectSingleNode("NpcInfo");
        nodes = playerDataNode.SelectNodes("NpcInfo/Npc");
        if (nodes.Count == 0)
        {
            for (int i = 0; i < 8; i++)
            {
                XmlNode child = CreateNode("Npc", node);
            }
            nodes = playerDataNode.SelectNodes("NpcInfo/Npc");
        }
        index = 0;
        foreach (Npc npc in NpcData.Instance.npcArray)
        {
            UpdateNode("Unlock", nodes[index], ToString(npc.Unlock));
            UpdateNode("Favor", nodes[index++], ToString(npc.Favor));
        }

        //n-1 Game - Retry, Dungeon, Challenge(도전과제)

        //n dataSave-Done
        UpdateNode("DataSave", playerDataNode, "Done");

        StartCoroutine("SaveXml_");

        return(true);
    }