| System/FindPrecious/DemonJarBriefInfoBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/FindPrecious/DemonJarModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/FindPrecious/DemonJarWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/FindPrecious/DemonJarBriefInfoBehaviour.cs
@@ -16,6 +16,9 @@ [SerializeField] ItemBehaviour m_ItemBehaviour; [SerializeField] Text m_Participant; [SerializeField] Transform m_Attention; [SerializeField] RectTransform m_ContainerRealmUnlock; [SerializeField] RectTransform m_ContainerLevelUnlock; [SerializeField] Text m_UnlockLevel; DemonJarModel model { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } } @@ -27,7 +30,7 @@ protected override InteractorableState interactorableState { get { var selected = selectedBossId == bossId; var dieOrLocked = !findPreciousModel.IsBossUnlock(bossId) || !findPreciousModel.IsBossAlive(bossId); var dieOrLocked = !model.IsBossUnlock(bossId) || !findPreciousModel.IsBossAlive(bossId); if (!dieOrLocked) { @@ -45,8 +48,12 @@ protected override bool isRebornRightNow { get { return findPreciousModel.IsBossUnlock(bossId) && base.isRebornRightNow; return model.IsBossUnlock(bossId) && base.isRebornRightNow; } } protected override bool isUnLocked { get { return model.IsBossUnlock(bossId); } } public override void Display(object _data) @@ -119,6 +126,53 @@ m_Participant.text = Language.Get("FindPrecious_8", bossData.participant); } protected override void DrawBossBaseInfo(string icon, string name, int level, int realm) { m_Portrait.SetSprite(icon); m_Portrait.SetNativeSize(); this.m_BossName.text = name; m_BossLevel.text = Language.Get("Z1024", level); m_RealmContainer.gameObject.SetActive(isUnLocked); m_UnLockCondition.gameObject.SetActive(!isUnLocked); if (!isUnLocked) { var realmOk = model.IsPlayerRealmEnough(bossId); m_ContainerRealmUnlock.gameObject.SetActive(!realmOk); m_ContainerLevelUnlock.gameObject.SetActive(realmOk); if (!realmOk) { var unLockRealm = findPreciousModel.GetBossUnLockRealm(bossId); var config = RealmConfig.Get(unLockRealm); m_UnLockRealm.SetSprite(config.Img); } else { m_UnlockLevel.text = Language.Get("DemonJarBossUnlockCondition2", level); } } else { if (m_Realm != null && m_RealmContainer != null) { if (realm > 0 && RealmConfig.Has(realm)) { m_RealmContainer.gameObject.SetActive(true); var realmConfig = RealmConfig.Get(realm); if (realmConfig != null) { m_Realm.SetSprite(realmConfig.Img); } } else { m_RealmContainer.gameObject.SetActive(false); } } } } } } System/FindPrecious/DemonJarModel.cs
@@ -2,12 +2,9 @@ // [Author]: 第二世界 // [ Date ]: Thursday, December 21, 2017 //-------------------------------------------------------- using UnityEngine; using System.Collections; using System.Collections.Generic; using System; using LitJson; using System; using System.Collections.Generic; namespace Snxxz.UI { @@ -192,6 +189,23 @@ return bosses; } public bool IsBossUnlock(int bossId) { return findPreciousModel.IsBossUnlock(bossId) && IsPlayerLevelEnough(bossId); } public bool IsPlayerLevelEnough(int bossId) { var config = NPCConfig.Get(bossId); return PlayerDatas.Instance.baseData.LV >= config.NPCLV; } public bool IsPlayerRealmEnough(int bossId) { var config = NPCConfig.Get(bossId); return PlayerDatas.Instance.baseData.realmLevel >= config.Realm; } public int GetBossIdByLine(int _line) { if (lineToBoss.ContainsKey(_line)) @@ -212,7 +226,7 @@ for (int i = sortedBossIds.Count - 1; i >= 0; i--) { var bossId = sortedBossIds[i]; if (findPreciousModel.IsBossUnlock(bossId)) if (IsBossUnlock(bossId)) { if (preferBoss == 0) { @@ -244,7 +258,7 @@ for (int i = sortedBossIds.Count - 1; i >= 0; i--) { var bossId = sortedBossIds[i]; if (findPreciousModel.IsBossUnlock(bossId)) if (IsBossUnlock(bossId)) { return bossId; } @@ -370,6 +384,13 @@ var bossId = GetLastUnlockBoss(); AutoSubscribeLastUnLockBoss(bossId); } break; case PlayerDataType.LV: if (FuncOpen.Instance.IsFuncOpen(76)) { var bossId = GetLastUnlockBoss(); AutoSubscribeLastUnLockBoss(bossId); } if (PlayerDatas.Instance.baseData.LV == GeneralDefine.demonJarRedPoint) { System/FindPrecious/DemonJarWin.cs
@@ -193,13 +193,8 @@ switch (error) { case 1: DemonJarBossData bossData = null; if (model.TryGetBossData(model.selectedBoss, out bossData)) { var config = NPCConfig.Get(model.selectedBoss); var realmConfig = RealmConfig.Get(config.Realm); SysNotifyMgr.Instance.ShowTip("DemonJarLvChallenge", realmConfig.Name); } var npcConfig = NPCConfig.Get(model.selectedBoss); SysNotifyMgr.Instance.ShowTip("BossRealmHint3", npcConfig.NPCLV); break; case 2: dungeonModel.currentDungeon = new Dungeon(DemonJarModel.DATA_MAPID, 0); @@ -221,8 +216,8 @@ { if (_ok) { var config = DemonJarConfig.Get(model.selectedBoss); dungeonModel.SingleChallenge(DemonJarModel.DATA_MAPID, config.LineID); var demonJarConfig = DemonJarConfig.Get(model.selectedBoss); dungeonModel.SingleChallenge(DemonJarModel.DATA_MAPID, demonJarConfig.LineID); } if (_toggle) @@ -287,14 +282,13 @@ { if (!findPreciousModel.IsBossUnlock(model.selectedBoss)) { _error = 6; return false; } if (!model.IsPlayerRealmEnough(model.selectedBoss)) { _error = 6; return false; } DemonJarBossData bossData = null; if (model.TryGetBossData(model.selectedBoss, out bossData)) { if (!findPreciousModel.IsBossUnlock(model.selectedBoss)) if (!model.IsPlayerLevelEnough(model.selectedBoss)) { _error = 1; return false;