// 기본정보셋팅 public ContentsEventGroup(Hashtable data) { EventInfoList.Clear(); // 셋팅 Name = data["name"].ToString(); EventKey = uint.Parse(data["eventKey"].ToString()); uint contentsId = uint.Parse(data["eventType"].ToString()); ContentsType = (EContentsEvent)contentsId; OpenDungeon = DataDungeon.GetByID(data["openDungeonID"].ToString()); StartDate = DateTime.ParseExact((string)data["startDateTime"], PARSE_STRING_DATE, null); EndDate = DateTime.ParseExact((string)data["endDateTime"], PARSE_STRING_DATE, null); // 기간별 셋팅 Hashtable dayTable = hash["dayTable"] as Hashtable; for (int day = (int)EDayCountOfWeek.Day1; day <= (int)EDayCountOfWeek.Day7; day++) { // 해당 요일 이벤트 체크 if (dayTable.ContainsKey(day.ToString()) == false) { continue; } ContentsEventInfo eventInfo = new ContentsEventInfo(key, dayTable[day.ToString()]); EventInfoList.Add(eventInfo); } }
// FUNCTIONS // // Constructor public DataMain() { playerData = new DataPlayer(); dungeonData = new DataDungeon(); IsLoadedGame = false; IsNewGame = true; }
// 튜토리얼 선행 조건 체크 static public bool CheckCondition(TutorialInfo info) { ETutorialCondition conditionType = (ETutorialCondition)info.GetStartData().GetCONDITION_TYPE(); string conditionValue = info.GetStartData().GetCONDITION_VALUE(); switch (conditionType) { case ETutorialCondition.EnterDungeon: // 던전 입장시 DataDungeon enterData = DataDungeon.GetByEnumID(conditionValue); if (enterData != null && BattleInfo != null) { return(enterData == BattleInfo.DataDungeon); } break; case ETutorialCondition.ClearDungeon: // 던전 클리어 DataDungeon clearData = DataDungeon.GetByEnumID(conditionValue); if (clearData != null) { return(DungeonHelper.GetDungeonRating(clearData) > 0); } break; case ETutorialCondition.ClearTutorial: // 튜토리얼 클리어 DataTutorial tutorialData = DataTutorial.GetByEnumID(conditionValue); if (tutorialData != null) { ETutorialGroup group = (ETutorialGroup)tutorialData.GetGROUP_TYPE(); return(IsClearByGroup(group)); } break; case ETutorialCondition.ClearCompletion: // 컴플리션 클리어 DataCompletion completionData = DataCompletion.GetByEnumID(conditionValue); if (completionData != null) { CompletionInfo completeInfo = CompletionHelper.GetMyCompletion(completionData.GetID()); if (completeInfo != null) { return(CompletionHelper.IsComplete(completeInfo)); } } break; case ETutorialCondition.None: return(true); } return(false); }
int CallProcInsertDungeonEntry(MySqlConnection connection, MySqlTransaction transaction, DataWorld world, DataDungeon dungeon) { using (MySqlCommand command = new MySqlCommand("insert_dungeon_entry", connection, transaction)) { command.CommandType = System.Data.CommandType.StoredProcedure; command.Parameters.AddWithValue("@did", dungeon.Id); command.Parameters.AddWithValue("@world_id", world.Id); command.Parameters.AddWithValue("@series_id", dungeon.SeriesId); command.Parameters.AddWithValue("@dname", dungeon.Name); command.Parameters.AddWithValue("@dtype", dungeon.Type); command.Parameters.AddWithValue("@ddiff", dungeon.Difficulty); return(command.ExecuteNonQuery()); } }