| | |
| | | public const int DOGZDUNGEON_REDPOINT = 76009; |
| | | public const int DATA_MAPID = 1010010; |
| | | |
| | | |
| | | int m_SelectedBoss = 0; |
| | | public int selectedBoss { |
| | | get { |
| | |
| | | } |
| | | } |
| | | |
| | | int m_WearyValue = 0; |
| | | public int wearyValue { |
| | | get { return m_WearyValue; } |
| | | set { |
| | | if (m_WearyValue != value) |
| | | { |
| | | m_WearyValue = value; |
| | | if (bossWearyValueChangeEvent != null) |
| | | { |
| | | bossWearyValueChangeEvent(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | int m_BigBoxCollectCount = 0; |
| | | public int bigBoxCollectCount { |
| | | get { return m_BigBoxCollectCount; } |
| | | set { |
| | | if (m_BigBoxCollectCount != value) |
| | | { |
| | | m_BigBoxCollectCount = value; |
| | | if (bigBoxCollectCountChangeEvent != null) |
| | | { |
| | | bigBoxCollectCountChangeEvent(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public event Action<int> bossSelectedEvent; |
| | | public event Action bossWearyValueChangeEvent; |
| | | public event Action bigBoxCollectCountChangeEvent; |
| | | public event Action boxSurplusChangeEvent; |
| | | public event Action eliteSurplusChangeEvent; |
| | | |
| | | List<int> sortedBossIds = new List<int>(); |
| | | Dictionary<int, DogzDungeonBossData> bosses = new Dictionary<int, DogzDungeonBossData>(); |
| | | public DogzDungeonBox dogzDungeonBox = new DogzDungeonBox(); |
| | | public DogzDungeonGuard dogzDungeonGuard = new DogzDungeonGuard(); |
| | | Redpoint redpoint = new Redpoint(DOGZDUNGEON_REDPOINT); |
| | | |
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } } |
| | | |
| | |
| | | return new List<int>(bosses.Keys); |
| | | } |
| | | |
| | | public int GetLatestUnLockBoss() |
| | | public int GetRecommendBoss() |
| | | { |
| | | var playerLevel = PlayerDatas.Instance.baseData.LV; |
| | | for (int i = sortedBossIds.Count - 1; i >= 0; i--) |
| | | if (bigBoxCollectCount < 2) //未疲劳 |
| | | { |
| | | var bossId = sortedBossIds[i]; |
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId); |
| | | if (IsBossUnLocked(bossId) && findPreciousModel.IsBossAlive(bossId) && playerLevel >= npcConfig.NPCLV) |
| | | { |
| | | return bossId; |
| | | } |
| | | return 999;//大宝箱npc id |
| | | } |
| | | |
| | | return sortedBossIds[0]; |
| | | if (wearyValue < GeneralConfig.Instance.bossWearyValues[1]) |
| | | { |
| | | var playerLevel = PlayerDatas.Instance.baseData.LV; |
| | | for (int i = sortedBossIds.Count - 1; i >= 0; i--) |
| | | { |
| | | var bossId = sortedBossIds[i]; |
| | | var dogzConfig = ConfigManager.Instance.GetTemplate<DogzDungeonConfig>(bossId); |
| | | if (dogzConfig.MonsterType == 3 || dogzConfig.MonsterType == 4) |
| | | { |
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId); |
| | | if (IsBossUnLocked(bossId) && findPreciousModel.IsBossAlive(bossId) && playerLevel >= npcConfig.NPCLV) |
| | | { |
| | | return bossId; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return sortedBossIds[0]; |
| | | } |
| | | |
| | | return 999;//大宝箱 npcid |
| | | } |
| | | |
| | | public bool IsBossUnLocked(int _bossId) |
| | | { |
| | | return bosses.ContainsKey(_bossId) && bosses[_bossId].isUnLocked; |
| | | } |
| | | |
| | | public void UpdateBoxSurplusInfo() |
| | | { |
| | | |
| | | if (boxSurplusChangeEvent != null) |
| | | { |
| | | boxSurplusChangeEvent(); |
| | | } |
| | | } |
| | | |
| | | public void UpdateEliteSurplusInfo() |
| | | { |
| | | if (eliteSurplusChangeEvent != null) |
| | | { |
| | | eliteSurplusChangeEvent(); |
| | | } |
| | | } |
| | | |
| | | private void ParseConfig() |
| | |
| | | |
| | | sortedBossIds.Sort(DogzDungeonBossData.LevelCompare); |
| | | } |
| | | |
| | | } |
| | | |
| | | public class DogzDungeonBox |
| | | { |
| | | public int bigBoxSurplus; |
| | | public int smallBoxSurplus; |
| | | |
| | | public void UpdateBoxInfo(int _big, int _small) |
| | | { |
| | | bigBoxSurplus = _big; |
| | | smallBoxSurplus = _small; |
| | | } |
| | | } |
| | | |
| | | public class DogzDungeonGuard |
| | | { |
| | | public int guardSurplus; |
| | | |
| | | public void UpdateGuardInfo(int _surplus) |
| | | { |
| | | guardSurplus = _surplus; |
| | | } |
| | | } |
| | | |
| | | public class DogzDungeonBossData |
| | | { |