| | |
| | | {
|
| | | CheckActivity();
|
| | | TimeMgr.Instance.OnMinuteEvent -= CheckActivity;
|
| | | TimeMgr.Instance.OnMinuteEvent += CheckActivity; |
| | | TimeMgr.Instance.OnMinuteEvent += CheckActivity;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | ancientRandomName.Clear();
|
| | | firstNameRandoms.Clear();
|
| | | secondNameRandoms.Clear();
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_StageLoad()
|
| | |
| | | {
|
| | | return false;
|
| | | }
|
| | | if (type == (int)DailyQuestType.FairyGrabBoss)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | DailyQuestConfig cfg = Config.Instance.Get<DailyQuestConfig>(type);
|
| | | if (cfg == null)
|
| | | {
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | private bool CheckLimit(int type)
|
| | | public bool CheckLimit(int type)
|
| | | {
|
| | | DailyQuestConfig cfg = Config.Instance.Get<DailyQuestConfig>(type);
|
| | | DailyQuestConfig config = Config.Instance.Get<DailyQuestConfig>(type);
|
| | | switch ((DailyQuestType)type)
|
| | | {
|
| | | case DailyQuestType.FairyGrabBoss:
|
| | |
| | | }
|
| | | break;
|
| | | }
|
| | | if (cfg.UnLockFuncID != 0)
|
| | | if (config.UnLockFuncID != 0)
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen(cfg.UnLockFuncID))
|
| | | if (!FuncOpen.Instance.IsFuncOpen(config.UnLockFuncID))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | |
|
| | | int entertimes = dailyQuestModel.GetDailyQuestCompletedTimes(type);
|
| | | if (dailyQuestModel.GetDailyQuestTotalTimes(cfg.ID) <= entertimes)
|
| | | if (dailyQuestModel.GetDailyQuestTotalTimes(config.ID) <= entertimes)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | | public string Icon;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | Dictionary<int, Dictionary<int, string>> ancientRandomName = new Dictionary<int, Dictionary<int, string>>();
|
| | | List<int> firstNameRandoms = new List<int>();
|
| | | List<int> secondNameRandoms = new List<int>();
|
| | | public string GetAncientRobotName(int objId, int npcId)
|
| | | {
|
| | | if (ancientRandomName.ContainsKey(objId)
|
| | | && ancientRandomName[objId].ContainsKey(npcId))
|
| | | {
|
| | | return ancientRandomName[objId][npcId];
|
| | | }
|
| | | var firstName = RandomNameConfig.GetFirstName(ref firstNameRandoms);
|
| | | var secondName = RandomNameConfig.GetSecondName(ref secondNameRandoms);
|
| | | var name = StringUtility.Contact(firstName, secondName);
|
| | | Dictionary<int, string> dict;
|
| | | if (!ancientRandomName.ContainsKey(objId))
|
| | | {
|
| | | dict = new Dictionary<int, string>();
|
| | | dict.Add(npcId, name);
|
| | | ancientRandomName.Add(objId, dict);
|
| | | }
|
| | | else
|
| | | {
|
| | | ancientRandomName[objId].Add(npcId, name);
|
| | | }
|
| | | return name;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|