| | |
| | | Dictionary<int, List<int>> treasureInductionTasks = new Dictionary<int, List<int>>();
|
| | | List<int> eightFurnacesAchievements = new List<int>();
|
| | | List<int> treasureUnOpens = new List<int>();
|
| | |
|
| | | Dictionary<int, Int2> awardsToFaboClue = new Dictionary<int, Int2>(); //奖励对应的法宝和线索
|
| | | List<int> awardsSort = new List<int>(); // 奖励排序
|
| | | public const int CLIENTDATAMAP = 4000;
|
| | | public const int TREASURE_DATAMAPID = 41110;
|
| | | public const int TREASURE_MAPID = 41110;
|
| | |
| | | public int displayInductionId { get; private set; }
|
| | |
|
| | | TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
|
| | | RoleModel roleModel { get { return ModelCenter.Instance.GetModel<RoleModel>(); } }
|
| | |
|
| | | VIPKillNPCTreasure m_VIPKillNPCTreasure;
|
| | | public VIPKillNPCTreasure vipKillNPCTreasure
|
| | |
| | | bool playerLevelRefresh = false;
|
| | | bool needDisplayReguluLevelUp = false;
|
| | |
|
| | | public int m_jumpAwardID; //跳转奖励ID ,快速领取的奖励ID
|
| | | public int gotoAwardClue; //跳转奖励线索
|
| | | public bool quickGetAward = false; //是否快速领取奖励
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | GlobalTimeEvent.Instance.secondEvent += PerSecond;
|
| | | TaskModel.Event_MainlineTask += OnTaskRefresh;
|
| | | roleModel.OnCustomAwardsEvent += OnCustomAwardsEvent;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | {
|
| | | treasureDungeon.currentLevel = 0;
|
| | | }
|
| | | m_jumpAwardID = -1;
|
| | | gotoAwardClue = -1;
|
| | | quickGetAward = false;
|
| | | }
|
| | |
|
| | | public void OnAfterPlayerDataInitialize()
|
| | |
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | GlobalTimeEvent.Instance.secondEvent -= PerSecond;
|
| | | TaskModel.Event_MainlineTask -= OnTaskRefresh;
|
| | | roleModel.OnCustomAwardsEvent -= OnCustomAwardsEvent;
|
| | | }
|
| | |
|
| | | private void PerSecond()
|
| | |
| | | treasureTasks.Add(config.FabaoID, tasks);
|
| | | }
|
| | | tasks.Add(config.TaskID);
|
| | |
|
| | | awardsToFaboClue[config.AwardID] = new Int2(config.FabaoID, config.clue);
|
| | | awardsSort.Add(config.AwardID);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | RefreshTreasureCollectState();
|
| | | }
|
| | |
|
| | |
|
| | | void OnCustomAwardsEvent()
|
| | | {
|
| | | m_jumpAwardID = -1;
|
| | | foreach (var awardID in awardsSort)
|
| | | {
|
| | | if (roleModel.GetCustomAwardState(awardID) == 1)
|
| | | {
|
| | | m_jumpAwardID = awardID;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public Int2 GetFabaoAwardInfo(int awardID)
|
| | | {
|
| | | Int2 fabaoInfo;
|
| | | if (awardsToFaboClue.TryGetValue(awardID, out fabaoInfo))
|
| | | {
|
| | | return fabaoInfo;
|
| | | }
|
| | | return new Int2(0, 0);
|
| | | }
|
| | |
|
| | |
|
| | | private void OnTaskRefresh(int MissionID, int MissionState)
|
| | | {
|
| | | RefreshTreasureCollectState(TreasureCategory.Human);
|