Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -306,7 +306,7 @@ #endregion #region 境界 Register(typeof(HA311_tagMCSyncRealmFBIsOpen), typeof(DTCA311_tagMCSyncRealmFBIsOpen)); Register(typeof(HA311_tagMCSyncRealmInfo), typeof(DTCA311_tagMCSyncRealmInfo)); Register(typeof(HA908_tagGCRealmFBHelpInfo), typeof(DTCA908_tagGCRealmFBHelpInfo)); Register(typeof(H0411_tagPlayerSit), typeof(DTC0411_tagPlayerSit)); Register(typeof(H0812_tagBeginPrepare), typeof(DTC0812_tagBeginPrepare)); Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmFBIsOpen.cs
File was deleted Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmInfo.cs
New file @@ -0,0 +1,11 @@ using UnityEngine; using System.Collections; using Snxxz.UI; // A3 11 通知玩家境界信息 #tagMCSyncRealmInfo public class DTCA311_tagMCSyncRealmInfo : DtcBasic { public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); HA311_tagMCSyncRealmInfo vNetData = vNetPack as HA311_tagMCSyncRealmInfo; ModelCenter.Instance.GetModel<RealmModel>().ReceivePackage(vNetData); } } Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmInfo.cs.meta
File was renamed from Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmFBIsOpen.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: e1fa273c4dbb8cf44a9d52c5e7960db0 timeCreated: 1507694356 licenseType: Free guid: 49f4b5ca7f4a21b47ad40ecdf0363120 timeCreated: 1552296188 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmFBIsOpen.cs
File was deleted Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmInfo.cs
New file @@ -0,0 +1,17 @@ using UnityEngine; using System.Collections; // A3 11 通知玩家境界信息 #tagMCSyncRealmInfo public class HA311_tagMCSyncRealmInfo : GameNetPackBasic { public byte IsPass; //是否通关副本 public HA311_tagMCSyncRealmInfo () { _cmd = (ushort)0xA311; } public override void ReadFromBytes (byte[] vBytes) { TransBytes (out IsPass, vBytes, NetDataType.BYTE); } } Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmInfo.cs.meta
File was renamed from Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmFBIsOpen.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: daacba5d821d03541848c53c631a0f03 timeCreated: 1507694365 licenseType: Free guid: 4904fcbdde518cd4c8dbc1a9f00a3300 timeCreated: 1552296188 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] System/MainInterfacePanel/ChatFrame.cs
@@ -193,7 +193,7 @@ public void CheckRealmSfx() { var _model = ModelCenter.Instance.GetModel<RealmModel>(); if (realmModel.redpoint.state == RedPointState.Simple) if (realmModel.levelUpRedpoint.state == RedPointState.Simple) { m_RealmRed.gameObject.SetActive(false); if (!m_RealmSfx.IsPlaying) @@ -265,7 +265,7 @@ private void RedpointValueChangeEvent(int _id) { if (_id == realmModel.redpoint.id) if (_id == realmModel.levelUpRedpoint.id) { CheckRealmSfx(); } System/Realm/RealmBriefBehaviour.cs
New file @@ -0,0 +1,104 @@ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { public class RealmBriefBehaviour : MonoBehaviour { [SerializeField] Image m_Icon; [SerializeField] PropertyBehaviour m_ClonePropertyBeha; [SerializeField] Transform m_PropertyRoot; [SerializeField] List<PropertyBehaviour> m_Properties; [SerializeField] Transform m_ContainerUnlockEquip; [SerializeField] Text m_UnlockEquip; [SerializeField] Button m_Preview; int realmLevel = 0; RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } } private void Awake() { m_Preview.AddListener(GotoEquip); } public void Display(int realmLevel) { this.realmLevel = realmLevel; CreatePropertyBehaviour(); DisplayBase(); DisplayProperty(); DisplayEquip(); } void DisplayBase() { var config = RealmConfig.Get(realmLevel); m_Icon.SetSprite(config.Img); } void DisplayProperty() { var index = 0; Dictionary<int, int> propertyDict; if (model.TryGetRealmProperty(realmLevel, out propertyDict)) { var keys = propertyDict.Keys; foreach (var property in keys) { m_Properties[index].gameObject.SetActive(true); m_Properties[index].Display(property, propertyDict[property]); index++; } } for (int i = index; i < m_Properties.Count; i++) { m_Properties[i].gameObject.SetActive(false); } } void DisplayEquip() { var level = 0; if (model.IsUnlockEquipRealm(realmLevel, out level)) { m_ContainerUnlockEquip.gameObject.SetActive(true); } else { m_ContainerUnlockEquip.gameObject.SetActive(false); } } void CreatePropertyBehaviour() { Dictionary<int, int> propertyDict; var requireBehaCount = 0; if (model.TryGetRealmProperty(realmLevel, out propertyDict)) { requireBehaCount = propertyDict.Count; } if (requireBehaCount > m_Properties.Count) { var start = m_Properties.Count; for (int i = start; i < requireBehaCount; i++) { var clone = GameObject.Instantiate<PropertyBehaviour>(m_ClonePropertyBeha, Vector3.zero, Quaternion.identity); clone.transform.SetParent(m_PropertyRoot); clone.transform.localScale = Vector3.one; clone.gameObject.SetActive(false); m_Properties.Add(clone); } } } private void GotoEquip() { } } } System/Realm/RealmBriefBehaviour.cs.meta
File was renamed from System/Realm/RealmSitWin.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 9ccf283b485a72440a6e3ae29c54373f timeCreated: 1507866222 licenseType: Free guid: f06b05882f781f94c92d48a2906a3236 timeCreated: 1552297489 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] System/Realm/RealmModel.cs
@@ -12,11 +12,15 @@ { Dictionary<int, Dictionary<int, int>> m_RealmProperties = new Dictionary<int, Dictionary<int, int>>(); public int realmMaxLevel { get; private set; } public bool isDungeonPass { get; private set; } public bool isDemonsPass { get; private set; } public const int REALM_DUNGEON_ID = 31110; public readonly Redpoint redpoint = new Redpoint(114, 11401); public readonly Redpoint levelUpRedpoint = new Redpoint(114, 11401); public readonly Redpoint challengeRedpoint = new Redpoint(114, 11402); EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } public override void Init() { @@ -25,6 +29,7 @@ public void OnBeforePlayerDataInitialize() { isDemonsPass = false; } public void OnPlayerLoginOk() @@ -45,13 +50,54 @@ { realmMaxLevel = config.Lv; } if (config.AddAttrType != null && config.AddAttrType.Length > 0) { Dictionary<int, int> dict = new Dictionary<int, int>(); for (int i = 0; i < config.AddAttrType.Length; i++) { dict.Add(config.AddAttrType[i], config.AddAttrNum[i]); } m_RealmProperties.Add(config.Lv, dict); } } } bool TryLevelUp(out int error) public bool TryGetRealmProperty(int level, out Dictionary<int, int> propertyDict) { error = 0; return true; return m_RealmProperties.TryGetValue(level, out propertyDict); } public bool IsUnlockEquipRealm(int realmLevel, out int level) { level = 0; var equipSets = equipModel.GetAllEquipSets(); var index = equipSets.FindIndex((x) => { var equipSet = equipModel.GetEquipSet(x); if (equipSet != null) { return equipSet.realm == realmLevel; } return false; }); if (index != -1) { level = equipSets[index]; return true; } return false; } public void SendLevelUpRealm() { CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp(); GameNetSystem.Instance.SendInfo(pak); } public void ReceivePackage(HA311_tagMCSyncRealmInfo package) { isDemonsPass = package.IsPass == 1; } } } System/Realm/RealmSitWin.cs
File was deleted System/Realm/RealmWin.cs
@@ -14,15 +14,14 @@ public class RealmWin : Window { [SerializeField] FunctionButton realmUpTitleBtn; [SerializeField] Button closeBtn; [SerializeField] RealmBriefBehaviour m_RealmBrief; [SerializeField] Button m_Close; RealmModel m_Model; RealmModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<RealmModel>()); return ModelCenter.Instance.GetModel<RealmModel>(); } } @@ -33,26 +32,12 @@ protected override void AddListeners() { realmUpTitleBtn.onClick.AddListener(OnRealmUp); closeBtn.onClick.AddListener(CloseClick); } private void OnRealmUp() { CloseChildWin(); WindowCenter.Instance.Open<RealmUpWin>(); functionOrder = 0; m_Close.onClick.AddListener(CloseClick); } protected override void OnPreOpen() { realmUpTitleBtn.state = TitleBtnState.Click; } protected override void OnActived() { base.OnActived(); OnRealmUp(); } protected override void OnAfterOpen() @@ -61,7 +46,6 @@ protected override void OnPreClose() { CloseChildWin(); } protected override void OnAfterClose() @@ -71,16 +55,8 @@ WindowCenter.Instance.Open<MainInterfaceWin>(); } } #endregion private void CloseChildWin() { var children = WindowConfig.Get().FindChildWindows("RealmWin"); foreach (var window in children) { WindowCenter.Instance.Close(window); } } #endregion } } System/RolePromote/RolePromoteModel.cs
@@ -492,7 +492,7 @@ _id == runeModel.runeMosaicRedpoint.id || _id == magicianModel.magicianRedpoint.id || _id == methodData.fairyHeartRedpoint.id || _id == realmModel.redpoint.id || _id == realmModel.levelUpRedpoint.id || _id == gemModel.gemTagRedPoint.id || _id == rolePointModel.redpoint.id) {