| | |
| | | } |
| | | } |
| | | |
| | | public int bigBoxCollectCount { |
| | | get { return dogzDungeonModel.bigBoxCollectCount; } |
| | | } |
| | | |
| | | public int smallBoxCollectCount { |
| | | get { return dogzDungeonModel.smallBoxCollectCount; } |
| | | } |
| | | |
| | | int m_WearyValue = 0; |
| | | public int wearyValue { |
| | | get { |
| | | return dogzDungeonModel.wearyValue; |
| | | get { return m_WearyValue; } |
| | | set { |
| | | if (m_WearyValue != value) |
| | | { |
| | | m_WearyValue = value; |
| | | UpdateRedpoint(); |
| | | if (bossWearyValueChangeEvent != null) |
| | | { |
| | | bossWearyValueChangeEvent(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | int m_BigBoxCollectCount = 0; |
| | | public int bigBoxCollectCount { |
| | | get { return m_BigBoxCollectCount; } |
| | | set { |
| | | if (m_BigBoxCollectCount != value) |
| | | { |
| | | m_BigBoxCollectCount = value; |
| | | UpdateRedpoint(); |
| | | if (bigBoxCollectCountChangeEvent != null) |
| | | { |
| | | bigBoxCollectCountChangeEvent(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | int m_SmallBoxCollectCount = 0; |
| | | public int smallBoxCollectCount { |
| | | get { return m_SmallBoxCollectCount; } |
| | | set { m_SmallBoxCollectCount = value; } |
| | | } |
| | | |
| | | public event Action bossWearyValueChangeEvent; |
| | | public event Action<int> bossSelectedEvent; |
| | | public event Action bigBoxCollectCountChangeEvent; |
| | | public event Action boxSurplusChangeEvent; |
| | | public event Action eliteSurplusChangeEvent; |
| | | |
| | | public DogzDungeonBox dogzDungeonBox = new DogzDungeonBox(); |
| | | public DogzDungeonElite dogzDungeonElite = new DogzDungeonElite(); |
| | | public CrossServerBossBox boxInfo = new CrossServerBossBox(); |
| | | public CrossServerBossElite eliteInfo = new CrossServerBossElite(); |
| | | public Redpoint redpoint = new Redpoint(FindPreciousModel.LOOTPRECIOUs_REDPOINTID, REDPOINT); |
| | | |
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } } |
| | | DogzDungeonModel dogzDungeonModel { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } |
| | | TeamModel teamModel { get { return ModelCenter.Instance.GetModel<TeamModel>(); } } |
| | | |
| | | public override void Init() |
| | |
| | | return false; |
| | | } |
| | | |
| | | var config = CrossServerBossConfig.Get(selectedBoss); |
| | | if (config.MonsterType == 4 && !findPreciousModel.IsRealmEnoughToKillBoss(selectedBoss)) |
| | | { |
| | | error = 6; |
| | | return false; |
| | | } |
| | | |
| | | error = 0; |
| | | return true; |
| | | } |
| | |
| | | case 5: |
| | | SysNotifyMgr.Instance.ShowTip("CrossMap4"); |
| | | break; |
| | | case 6: |
| | | SysNotifyMgr.Instance.ShowTip("BossRealmHint2", NPCConfig.Get(selectedBoss).Realm); |
| | | break; |
| | | } |
| | | } |
| | | |
| | |
| | | var npcIds = new List<int>(); |
| | | npcIds.Add(bigBoxNpcId); |
| | | npcIds.Add(eliteMonsters[0]); |
| | | npcIds.AddRange(bosses.Keys); |
| | | |
| | | foreach (var bossId in bosses.Keys) |
| | | { |
| | | if (findPreciousModel.IsBossUnlock(bossId)) |
| | | { |
| | | npcIds.Add(bossId); |
| | | } |
| | | } |
| | | |
| | | return npcIds; |
| | | } |
| | | |
| | | public List<int> GetBosses() |
| | | public List<int> GetShowBosses() |
| | | { |
| | | return new List<int>(bosses.Keys); |
| | | var showBosses = new List<int>(); |
| | | foreach (var bossId in bosses.Keys) |
| | | { |
| | | if (findPreciousModel.IsBossUnlock(bossId)) |
| | | { |
| | | showBosses.Add(bossId); |
| | | } |
| | | } |
| | | |
| | | return showBosses; |
| | | } |
| | | |
| | | public int GetRecommendNpc() |
| | |
| | | |
| | | if (wearyValue < GeneralDefine.bossWearyValues[2]) |
| | | { |
| | | var playerLevel = PlayerDatas.Instance.baseData.LV; |
| | | for (int i = sortedBossIds.Count - 1; i >= 0; i--) |
| | | { |
| | | var bossId = sortedBossIds[i]; |
| | | var npcConfig = NPCConfig.Get(bossId); |
| | | if (IsBossUnLocked(bossId) && findPreciousModel.IsBossAlive(bossId) && playerLevel >= npcConfig.NPCLV) |
| | | if (IsBossUnLocked(bossId) && findPreciousModel.IsBossAlive(bossId)) |
| | | { |
| | | return bossId; |
| | | } |
| | |
| | | |
| | | public int GetRecommendKillElite() |
| | | { |
| | | var Elite = dogzDungeonElite.GetAliveElite(); |
| | | var Elite = eliteInfo.GetAliveElite(); |
| | | if (Elite == 0) |
| | | { |
| | | Elite = eliteMonsters[0]; |
| | |
| | | return Elite; |
| | | } |
| | | |
| | | public bool IsBossUnLocked(int _bossId) |
| | | public bool IsBossUnLocked(int bossId) |
| | | { |
| | | if (_bossId == bigBoxNpcId || _bossId == smallBoxNpcId) |
| | | if (bossId == bigBoxNpcId || bossId == smallBoxNpcId) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | if (eliteMonsters.Contains(_bossId)) |
| | | if (eliteMonsters.Contains(bossId)) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | return bosses.ContainsKey(_bossId) && bosses[_bossId].isUnLocked; |
| | | return bosses.ContainsKey(bossId) && findPreciousModel.IsBossUnlock(bossId); |
| | | } |
| | | |
| | | public void RequestBoxAndEliteSurplusInfo() |
| | |
| | | var npcInfo = _npcInfoes.NPCInfoList[i]; |
| | | if (npcInfo.NPCID == bigBoxNpcId) |
| | | { |
| | | dogzDungeonBox.bigBoxSurplus = (int)npcInfo.Cnt; |
| | | boxInfo.bigBoxSurplus = (int)npcInfo.Cnt; |
| | | updatedBigBox = true; |
| | | } |
| | | |
| | | if (npcInfo.NPCID == smallBoxNpcId) |
| | | { |
| | | dogzDungeonBox.smallBoxSurplus = (int)npcInfo.Cnt; |
| | | boxInfo.smallBoxSurplus = (int)npcInfo.Cnt; |
| | | updatedSmallBox = true; |
| | | } |
| | | |
| | | if (eliteMonsters.Contains((int)npcInfo.NPCID)) |
| | | { |
| | | dogzDungeonElite.UpdateEliteInfo((int)npcInfo.NPCID, (int)npcInfo.Cnt); |
| | | eliteInfo.UpdateEliteInfo((int)npcInfo.NPCID, (int)npcInfo.Cnt); |
| | | updatedEliteNpcIds.Add((int)npcInfo.NPCID); |
| | | } |
| | | } |
| | | |
| | | if (!updatedBigBox) |
| | | { |
| | | dogzDungeonBox.bigBoxSurplus = 0; |
| | | boxInfo.bigBoxSurplus = 0; |
| | | } |
| | | |
| | | if (!updatedSmallBox) |
| | | { |
| | | dogzDungeonBox.smallBoxSurplus = 0; |
| | | boxInfo.smallBoxSurplus = 0; |
| | | } |
| | | |
| | | if (boxSurplusChangeEvent != null) |
| | |
| | | { |
| | | if (!updatedEliteNpcIds.Contains(item)) |
| | | { |
| | | dogzDungeonElite.UpdateEliteInfo(item, 0); |
| | | eliteInfo.UpdateEliteInfo(item, 0); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (containBox) |
| | | { |
| | | dogzDungeonBox.UpdateBoxRefreshTime(boxRefreshSecond); |
| | | boxInfo.UpdateBoxRefreshTime(boxRefreshSecond); |
| | | } |
| | | |
| | | if (containElite) |
| | | { |
| | | dogzDungeonElite.UpdateEliteRefreshTime(eliteRefreshSecond); |
| | | eliteInfo.UpdateEliteRefreshTime(eliteRefreshSecond); |
| | | } |
| | | |
| | | if (WindowCenter.Instance.IsOpen("CrossServerBossWin")) |
| | |
| | | public class CrossServerBossData |
| | | { |
| | | public int id { get; private set; } |
| | | public bool isUnLocked { |
| | | get { |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | public CrossServerBossData(int _id) |
| | | { |
| | | this.id = _id; |