Esempio n. 1
0
 public WonderMail(PlayerDataJobListItem baseJobItem)
 {
     this.baseJobItem = baseJobItem;
 }
        public static void LoadPlayerMissionBoardMissions(MySql database, PlayerData playerData)
        {
            string query = "SELECT mission_board_missions.Slot, " +
                "mission_board_missions.ClientIndex, mission_board_missions.TargetIndex, mission_board_missions.RewardIndex, mission_board_missions.MissionType, " +
                "mission_board_missions.Data1, mission_board_missions.Data2, mission_board_missions.DungeonIndex, mission_board_missions.Goal, " +
                "mission_board_missions.RDungeon, mission_board_missions.StartScript, mission_board_missions.WinScript, mission_board_missions.LoseScript " +
               "FROM mission_board_missions " +
               "WHERE mission_board_missions.CharID = \'" + playerData.CharID + "\' " +
               "ORDER BY mission_board_missions.Slot";

            foreach (DataColumnCollection columnCollection in database.RetrieveRowsEnumerable(query)) {
                int slot = columnCollection["Slot"].ValueString.ToInt();
                PlayerDataJobListItem job = new PlayerDataJobListItem();
                job.MissionClientIndex = columnCollection["ClientIndex"].ValueString.ToInt();
                job.TargetIndex = columnCollection["TargetIndex"].ValueString.ToInt();
                job.RewardIndex = columnCollection["RewardIndex"].ValueString.ToInt();
                job.MissionType = columnCollection["MissionType"].ValueString.ToInt();
                job.Data1 = columnCollection["Data1"].ValueString.ToInt();
                job.Data2 = columnCollection["Data2"].ValueString.ToInt();
                job.DungeonIndex = columnCollection["DungeonIndex"].ValueString.ToInt();
                job.GoalMapIndex = columnCollection["Goal"].ValueString.ToInt();
                job.RDungeon = columnCollection["RDungeon"].ValueString.ToBool();
                job.StartStoryScript = columnCollection["StartScript"].ValueString.ToInt();
                job.WinStoryScript = columnCollection["WinScript"].ValueString.ToInt();
                job.LoseStoryScript = columnCollection["LoseScript"].ValueString.ToInt();
                playerData.MissionBoardMissions.Add(job);
            }
        }
Esempio n. 3
0
 public WonderMailJob(PlayerDataJobListItem baseJobItem)
 {
     mission = new WonderMail(baseJobItem);
 }
        public static void LoadPlayerJobList(MySql database, PlayerData playerData)
        {
            string query = "SELECT job_list.Accepted, job_list.SendsRemaining, " +
                "job_list.ClientIndex, job_list.TargetIndex, job_list.RewardIndex, job_list.MissionType, " +
                "job_list.Data1, job_list.Data2, job_list.DungeonIndex, job_list.Goal, " +
                "job_list.RDungeon, job_list.StartScript, job_list.WinScript, job_list.LoseScript " +
                "FROM job_list " +
                "WHERE job_list.CharID = \'" + playerData.CharID + "\' " +
                "ORDER BY job_list.JobListSlot";

            foreach (DataColumnCollection columnCollection in database.RetrieveRowsEnumerable(query)) {
                PlayerDataJobListItem jobItem = new PlayerDataJobListItem();

                jobItem.Accepted = columnCollection["Accepted"].ValueString.ToInt();
                jobItem.SendsRemaining = columnCollection["SendsRemaining"].ValueString.ToInt();
                jobItem.MissionClientIndex = columnCollection["ClientIndex"].ValueString.ToInt();
                jobItem.TargetIndex = columnCollection["TargetIndex"].ValueString.ToInt();
                jobItem.RewardIndex = columnCollection["RewardIndex"].ValueString.ToInt();
                jobItem.MissionType = columnCollection["MissionType"].ValueString.ToInt();
                jobItem.Data1 = columnCollection["Data1"].ValueString.ToInt();
                jobItem.Data2 = columnCollection["Data2"].ValueString.ToInt();
                jobItem.DungeonIndex = columnCollection["DungeonIndex"].ValueString.ToInt();
                jobItem.GoalMapIndex = columnCollection["Goal"].ValueString.ToInt();
                jobItem.RDungeon = columnCollection["RDungeon"].ValueString.ToBool();
                jobItem.StartStoryScript = columnCollection["StartScript"].ValueString.ToInt();
                jobItem.WinStoryScript = columnCollection["WinScript"].ValueString.ToInt();
                jobItem.LoseStoryScript = columnCollection["LoseScript"].ValueString.ToInt();

                playerData.JobList.Add(jobItem);
            }
        }