| System/BlastFurnace/PrayDrugCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/BlastFurnace/PrayForDurgModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/BlastFurnace/PrayforDrugGetItemWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/BlastFurnace/PrayforDrugGetItemWin.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/BlastFurnace/PrayforDrugWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/FindPrecious/FindPreciousModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeatureNoticeWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FeaturesType2.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/FunctionForecastTip.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/MainInterfacePanel/LowSettingTip.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Team/MyTeamWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/BlastFurnace/PrayDrugCell.cs
@@ -41,12 +41,12 @@ } itemBaisc.gameObject.SetActive(true); ItemCellModel cellModel = new ItemCellModel(itemId); ItemCellModel cellModel = new ItemCellModel(itemId,false,0,1); itemBaisc.Init(cellModel); itemBaisc.cellBtn.RemoveAllListeners(); itemBaisc.cellBtn.AddListener(()=> { ItemAttrData attrData = new ItemAttrData(itemId); ItemAttrData attrData = new ItemAttrData(itemId,false,0,-1,1); tipsModel.SetItemTipsModel(attrData); }); } System/BlastFurnace/PrayForDurgModel.cs
@@ -6,7 +6,7 @@ namespace Snxxz.UI { public class PrayForDurgModel : Model public class PrayForDurgModel : Model,IBeforePlayerDataInitialize,IAfterPlayerDataInitialize,IPlayerLoginOk { BlastFurnaceModel blastModel { get { return ModelCenter.Instance.GetModel<BlastFurnaceModel>(); } } PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } } @@ -23,14 +23,50 @@ } public void OnBeforePlayerDataInitialize() { PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= RefreshPlayeLv; FuncOpen.Instance.OnFuncStateChangeEvent -= UpdateFuncState; } public void OnAfterPlayerDataInitialize() { } public void OnPlayerLoginOk() { PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshPlayeLv; FuncOpen.Instance.OnFuncStateChangeEvent += UpdateFuncState; UpdatePrayDanRedpoint(); } private void UpdateFuncState(int funcId) { if (funcId != (int)FuncOpenEnum.BlastFurnace) return; UpdatePrayDanRedpoint(); } private void RefreshPlayeLv(PlayerDataRefresh type) { if (type != PlayerDataRefresh.LV) return; UpdatePrayDanRedpoint(); } #region 读取本地配置 public int costMoney { get; private set; } public int everyDayNum { get; private set; } public int prayPushLv { get; private set;} private void SetPrayDrugCondi() { FuncConfigConfig func = Config.Instance.Get<FuncConfigConfig>("GodAlchemy"); costMoney = int.Parse(func.Numerical2); everyDayNum = int.Parse(func.Numerical3); func = Config.Instance.Get<FuncConfigConfig>("GodAlchemyShow"); prayPushLv = int.Parse(func.Numerical2); } /// <summary> /// 得到所有祈求丹药数据 @@ -66,10 +102,20 @@ #region 协议 public int itemId { get; private set; } public int alreadyPrayNum { get; private set;} public event Action RefreshPrayEvent; public void SetPrayResult(HA321_tagMCPrayElixirResult elixirResult) { itemId = (int)elixirResult.ItemID; alreadyPrayNum = elixirResult.PrayCnt; if(itemId != 0) { WindowCenter.Instance.Open<PrayforDrugGetItemWin>(); } UpdatePrayDanRedpoint(); if(RefreshPrayEvent != null) { RefreshPrayEvent(); } } public void SendPrayElixir() @@ -112,5 +158,23 @@ prayDrugDict.TryGetValue(drugId,out effectId); return effectId; } #region 红点 public const int PRAYDRUGREDPOINT_KEY = 110011001; private Redpoint prayRedpoint = new Redpoint(BlastFurnaceModel.LINGDANREDPOINT_KEY, PRAYDRUGREDPOINT_KEY); public void UpdatePrayDanRedpoint() { if (PlayerDatas.Instance.baseData.LV < prayPushLv || !FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace) || alreadyPrayNum >= everyDayNum) { prayRedpoint.state = RedPointState.None; return; } prayRedpoint.state = RedPointState.Simple; } #endregion } } System/BlastFurnace/PrayforDrugGetItemWin.cs
New file @@ -0,0 +1,54 @@ using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { public class PrayforDrugGetItemWin : Window { [SerializeField] Button sureBtn; [SerializeField] CommonItemBaisc itemBaisc; PrayForDurgModel prayModel { get { return ModelCenter.Instance.GetModel<PrayForDurgModel>(); } } ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } protected override void BindController() { } protected override void AddListeners() { sureBtn.AddListener(CloseClick); } protected override void OnPreOpen() { SetDisplayUI(); } protected override void OnAfterOpen() { } protected override void OnPreClose() { } protected override void OnAfterClose() { } private void SetDisplayUI() { ItemCellModel cellModel = new ItemCellModel(prayModel.itemId,false,1,1); itemBaisc.Init(cellModel); itemBaisc.cellBtn.RemoveAllListeners(); itemBaisc.cellBtn.AddListener(()=> { ItemAttrData attrData = new ItemAttrData(prayModel.itemId,false,1,-1,1); tipsModel.SetItemTipsModel(attrData); }); } } } System/BlastFurnace/PrayforDrugGetItemWin.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 2ce8b7c45f5b3964191f025f929f0399 timeCreated: 1536720996 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/BlastFurnace/PrayforDrugWin.cs
@@ -9,6 +9,7 @@ { [SerializeField] ScrollerController ctrl; [SerializeField] Button prayBtn; [SerializeField] Image prayBtnImg; [SerializeField] Text costText; [SerializeField] Button closeBtn; [Header("最大格子数")] @@ -27,13 +28,15 @@ protected override void AddListeners() { closeBtn.AddListener(CloseClick); prayBtn.AddListener(ClickPrayBtn); } protected override void OnPreOpen() { praylist = PrayModel.GetPrayDruglist(); PrayModel.RefreshPrayEvent += UpdatePrayBtn; UpdatePrayPack(); SetDisplayUI(); } protected override void OnAfterOpen() @@ -43,7 +46,7 @@ protected override void OnPreClose() { PrayModel.RefreshPrayEvent -= UpdatePrayBtn; } protected override void OnAfterClose() @@ -54,14 +57,27 @@ private void SetDisplayUI() { costText.text = PrayModel.costMoney.ToString(); UpdatePrayBtn(); } private void UpdatePrayBtn() { prayBtn.RemoveAllListeners(); if (PrayModel.alreadyPrayNum >= PrayModel.everyDayNum) { prayBtnImg.material = MaterialUtility.GetDefaultSpriteGrayMaterial(); } else { prayBtn.AddListener(ClickPrayBtn); prayBtnImg.material = MaterialUtility.GetUIDefaultGraphicMaterial(); } } private void ClickPrayBtn() { if(PrayModel.alreadyPrayNum >= PrayModel.everyDayNum) { MessageWin.Inst.ShowFixedTip("今日祈福次数已满"); return; } System/FindPrecious/FindPreciousModel.cs
@@ -14,8 +14,7 @@ Redpoint findPreciousRedpoint = new Redpoint(FINDPRECIOUS_REDPOINTID); int m_ViewKillRecordsBoss = 0; public int ViewKillRecordsBoss { public int ViewKillRecordsBoss { get { return this.m_ViewKillRecordsBoss; } set { this.m_ViewKillRecordsBoss = value; } } @@ -24,11 +23,9 @@ List<int> bossNotifies = new List<int>(); int m_CurrentBossNotify = 0; public int currentBossNotify { public int currentBossNotify { get { return m_CurrentBossNotify; } private set { private set { if (m_CurrentBossNotify != value) { m_CurrentBossNotify = value; @@ -51,7 +48,6 @@ DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } } WorldBossModel worldBossModel { get { return ModelCenter.Instance.GetModel<WorldBossModel>(); } } BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } } PersonalBossModel personalBossModel { get { return ModelCenter.Instance.GetModel<PersonalBossModel>(); } } @@ -60,7 +56,6 @@ { DTCA003_tagUniversalGameRecInfo.onGetUniversalGameInfo += OnPreciousDropRecordUpdate; FindPreciousTimer.Instance.bossRebornNotifyEvent += OnBossRebornUpComing; RedpointCenter.Instance.redpointValueChangeEvent += UpdateRedpoint; } @@ -68,7 +63,6 @@ { DTCA003_tagUniversalGameRecInfo.onGetUniversalGameInfo -= OnPreciousDropRecordUpdate; FindPreciousTimer.Instance.bossRebornNotifyEvent -= OnBossRebornUpComing; RedpointCenter.Instance.redpointValueChangeEvent -= UpdateRedpoint; } @@ -122,33 +116,23 @@ } bossDropRecords.Clear(); for (int i = 0; i < _serverInfo.Count; i++) foreach (var item in _serverInfo.UniversalGameRec) { var serverRecord = _serverInfo.UniversalGameRec[i]; bossDropRecords.Add(new DropRecord(serverRecord)); bossDropRecords.Add(new DropRecord(item)); } bossDropRecords.Sort(DropRecord.Compare); if (bossDropRecords.Count > 5) { var records1 = new List<DropRecord>(); for (int i = 0; i < 5; i++) { records1.Add(bossDropRecords[i]); } var records2 = new List<DropRecord>(); for (int i = 5; i < bossDropRecords.Count; i++) for (int i = bossDropRecords.Count - 1; i >= 5; i--) { records2.Add(bossDropRecords[i]); bossDropRecords.RemoveAt(i); } records2.Sort(DropRecord.Compare2); bossDropRecords.Clear(); bossDropRecords.AddRange(records1); bossDropRecords.AddRange(records2); } System/MainInterfacePanel/FeatureNoticeWin.cs
@@ -22,8 +22,15 @@ [SerializeField] Text m_TextShowD;//显示内容4 [SerializeField] ScrollerController m_ScrollerController; [SerializeField] Button m_CloseButton; [SerializeField] Text m_TextTurnedOn;//已开启 [SerializeField] Text m_TextUnopened;//未开启 [SerializeField] Text m_Textschedule;//进度 [SerializeField] Button m_ButtonGoto; List<FunctionForecastConfig> FunctionList = new List<FunctionForecastConfig>(); TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } } #region Built-in private int ClickFuncID = 0; protected override void BindController() { } @@ -35,20 +42,55 @@ protected override void OnPreOpen() { AddList(); m_ScrollerController.OnRefreshCell += OnRefreshGridCell; AddList();//添加数组列表 DefaultSelection();//获取默认选择 m_ScrollerController.OnRefreshCell += OnRefreshGridCell; OnCreateGridLineCell(m_ScrollerController); ContentDisplay(); m_ScrollerController.JumpIndex(JumpIndex()); } protected override void OnAfterOpen() { } FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent; PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnPlayersUpLV; treasureModel.treasureStateChangeEvent += treasureStateChangeEvent; treasureModel.treasureStageUpEvent += treasureStageUpEvent; } protected override void OnPreClose() { m_ScrollerController.OnRefreshCell -= OnRefreshGridCell; PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnPlayersUpLV; FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent; m_ScrollerController.OnRefreshCell -= OnRefreshGridCell; treasureModel.treasureStateChangeEvent -= treasureStateChangeEvent; treasureModel.treasureStageUpEvent -= treasureStageUpEvent; } private void treasureStageUpEvent(int obj) { ContentDisplay(); m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见 } private void treasureStateChangeEvent(int obj) { ContentDisplay(); m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见 } private void OnFuncStateChangeEvent(int obj) { ContentDisplay(); m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见 } private void OnPlayersUpLV(PlayerDataRefresh obj) { if (obj == PlayerDataRefresh.LV) { ContentDisplay(); m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见 } } void OnCreateGridLineCell(ScrollerController gridCtrl) { gridCtrl.Refresh(); @@ -72,11 +114,45 @@ { FeaturesType1 featuresType1 = cell.GetComponent<FeaturesType1>(); featuresType1.GetTheFeatureID(funcId); if (funcId == ClickFuncID) { featuresType1.ImageSelected.SetActive(true); } else { featuresType1.ImageSelected.SetActive(false); } featuresType1.Button.SetListener(()=> { if (funcId != ClickFuncID) { ClickFuncID = funcId; ContentDisplay(); m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见 } }); } else if (type == ScrollerDataType.Normal) { FeaturesType2 featuresType2 = cell.GetComponent<FeaturesType2>(); featuresType2.GetTheFeatureID(funcId); if (funcId == ClickFuncID) { featuresType2.ImageSelected.SetActive(true); } else { featuresType2.ImageSelected.SetActive(false); } featuresType2.Button.SetListener(() => { if (funcId != ClickFuncID) { ClickFuncID = funcId; ContentDisplay(); m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见 } }); } } @@ -84,7 +160,7 @@ { } #endregion private void AddList() private void AddList()//添加列表信息 { if (FunctionList.Count <= 0) { @@ -96,8 +172,142 @@ { FunctionList.Add(functionForecastConfig); } } } } private void DefaultSelection()//获取默认选择 { var configs = Config.Instance.GetAllValues<FunctionForecastConfig>(); foreach (var config in configs) { int openTag = config.FuncId; if (!FuncOpen.Instance.IsFuncOpen(openTag)) { ClickFuncID = openTag; return; } } if (ClickFuncID == 0) { ClickFuncID = FunctionList[0].FuncId; } } private int JumpIndex()//Jump选中 { int Index = 0; Index = FunctionList.FindIndex((x)=> { return x.FuncId == ClickFuncID; }); return Index; } private void ContentDisplay()//内容显示 { var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID); if (functionForecastConfig == null) { return; } m_TextAdvanceName.text = functionForecastConfig.FuncName; m_FeaturesImage.SetSprite(functionForecastConfig.Icon); string[] StrList = ConfigParse.GetMultipleStr(functionForecastConfig.Content); if (StrList.Length > 0) { m_Text_ShowA.text = StrList[0]; m_TextShowB.text = StrList[1]; m_TextShowC.text = StrList[2]; m_TextShowD.text = StrList[3]; } if (FuncOpen.Instance.IsFuncOpen(ClickFuncID)) { m_TextTurnedOn.gameObject.SetActive(true); m_TextUnopened.gameObject.SetActive(false); m_Textschedule.gameObject.SetActive(false); m_ButtonGoto.gameObject.SetActive(false); } else { TrailerClassification(ClickFuncID); } } void TrailerClassification(int funcID)//预告分类 { m_TextTurnedOn.gameObject.SetActive(false); m_TextUnopened.gameObject.SetActive(false); m_Textschedule.gameObject.SetActive(false); m_ButtonGoto.gameObject.SetActive(false); FuncOpenLVConfig funcoPenConfig = Config.Instance.Get<FuncOpenLVConfig>(funcID); if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0) { if (funcoPenConfig.LimitMagicWeapon != 0)//法宝 { int faBaoID = funcoPenConfig.LimitMagicWeapon / 100; MagicWeapon(faBaoID); } else if (funcoPenConfig.LimitMissionID != 0)//任务 { m_TextUnopened.gameObject.SetActive(true); m_TextUnopened.text= string.Format(Language.Get("TaskFuncOpen"), funcoPenConfig.LimitLV); return; } } else//等级 { m_TextUnopened.gameObject.SetActive(true); m_TextUnopened.text= string.Format(Language.Get("FuncLevelOpen"), funcoPenConfig.LimitLV); return; } } private void MagicWeapon(int fabaoID) { m_ButtonGoto.gameObject.SetActive(true); Treasure treasure; TreasureConfig _treasure = Config.Instance.Get<TreasureConfig>(fabaoID); m_ButtonGoto.SetListener(()=> { var config = Config.Instance.Get<TreasureConfig>(fabaoID); treasureModel.selectedTreasure = fabaoID; treasureModel.currentCategory = (TreasureCategory)config.Category; WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.TreasureCollectSoul); }); if (treasureModel.TryGetTreasure(fabaoID, out treasure) && treasure.state == TreasureState.Collected) { m_Textschedule.gameObject.SetActive(true); var list = treasure.treasureStages; var funcStage = 0; for (int i = 0; i < list.Count; i++) { if (list[i].unlockType == TreasureStageUnlock.Func && list[i].func == ClickFuncID) { funcStage = i; break; } } if (treasure.stage < funcStage) { if (treasure.stage == funcStage - 1 || funcStage == 0) { m_Textschedule.text = (float)treasure.exp / treasure.treasureStages[funcStage].exp+"%"; } else { m_Textschedule.text = 0+" %"; } } } else { m_TextUnopened.gameObject.SetActive(true); m_TextUnopened.text = string.Format(Language.Get("FuncFBOpen"), _treasure.Name); } } } System/MainInterfacePanel/FeaturesType2.cs
@@ -38,6 +38,14 @@ m_FunctionName.text = functionForecastConfig.FuncName; m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString(); m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey); if (FuncOpen.Instance.IsFuncOpen(funcId)) { m_SelectedBar.SetActive(true); } else { m_SelectedBar.SetActive(false); } } System/MainInterfacePanel/FunctionForecastTip.cs
@@ -115,7 +115,6 @@ void FunctionIconBtn()//面板开启 { // WindowCenter.Instance.Open<FunctionForecastWin>(); WindowCenter.Instance.Open<FeatureNoticeWin>(); } } System/MainInterfacePanel/LowSettingTip.cs
@@ -88,8 +88,8 @@ } private void GodBeastBtn() { SysNotifyMgr.Instance.ShowTip("FuncNextVersion");//信息提示 return; //SysNotifyMgr.Instance.ShowTip("FuncNextVersion");//信息提示 //return; WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<DogzWin>(); } System/Team/MyTeamWin.cs
@@ -178,7 +178,8 @@ } else { if (model.myTeam.mission.mapId == TeamModel.NONE_MISSION) var mission = model.myTeam.inTeam ? model.myTeam.mission : model.missionBuf; if (mission.mapId == TeamModel.NONE_MISSION) { SysNotifyMgr.Instance.ShowTip("AutoMatchingNoTarget"); }