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/GameEngine/Model/Config/RealmConfig.cs
@@ -1,257 +1,248 @@ //-------------------------------------------------------- // [Author]: Fish // [ Date ]: Thursday, February 14, 2019 //-------------------------------------------------------- using System.Collections.Generic; using System.IO; using System.Threading; using System; using UnityEngine; [XLua.LuaCallCSharp] public partial class RealmConfig { //-------------------------------------------------------- // [Author]: Fish // [ Date ]: Monday, March 11, 2019 //-------------------------------------------------------- using System.Collections.Generic; using System.IO; using System.Threading; using System; using UnityEngine; [XLua.LuaCallCSharp] public partial class RealmConfig { public readonly int Lv; public readonly string Name; public readonly int IsBigRealm; public readonly int NeedPoint; public readonly int NeedLV; public readonly int NeedGood; public readonly int NeedNum; public readonly string NeedActiveTreasure; public readonly int[] AddAttrType; public readonly int[] AddAttrNum; public readonly int BossID; public readonly string Img; public readonly string SitTime; public readonly int Quality; public readonly int FightPower; public readonly int specialProperty; public readonly int effectId; public readonly int requireIconEffect; public RealmConfig() { } public RealmConfig(string input) { try { var tables = input.Split('\t'); public readonly int requireIconEffect; public RealmConfig() { } public RealmConfig(string input) { try { var tables = input.Split('\t'); int.TryParse(tables[0],out Lv); Name = tables[1]; int.TryParse(tables[2],out IsBigRealm); int.TryParse(tables[2],out NeedLV); int.TryParse(tables[3],out NeedPoint); int.TryParse(tables[3],out NeedGood); int.TryParse(tables[4],out NeedGood); int.TryParse(tables[4],out NeedNum); int.TryParse(tables[5],out NeedNum); NeedActiveTreasure = tables[6]; string[] AddAttrTypeStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); string[] AddAttrTypeStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); AddAttrType = new int[AddAttrTypeStringArray.Length]; for (int i=0;i<AddAttrTypeStringArray.Length;i++) { int.TryParse(AddAttrTypeStringArray[i],out AddAttrType[i]); } string[] AddAttrNumStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); string[] AddAttrNumStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); AddAttrNum = new int[AddAttrNumStringArray.Length]; for (int i=0;i<AddAttrNumStringArray.Length;i++) { int.TryParse(AddAttrNumStringArray[i],out AddAttrNum[i]); } int.TryParse(tables[9],out BossID); int.TryParse(tables[7],out BossID); Img = tables[10]; Img = tables[8]; SitTime = tables[11]; int.TryParse(tables[9],out Quality); int.TryParse(tables[12],out Quality); int.TryParse(tables[10],out FightPower); int.TryParse(tables[13],out FightPower); int.TryParse(tables[11],out specialProperty); int.TryParse(tables[14],out specialProperty); int.TryParse(tables[12],out effectId); int.TryParse(tables[15],out effectId); int.TryParse(tables[16],out requireIconEffect); } catch (Exception ex) { DebugEx.Log(ex); } } static Dictionary<string, RealmConfig> configs = new Dictionary<string, RealmConfig>(); public static RealmConfig Get(string id) { if (!inited) { Debug.Log("RealmConfig 还未完成初始化。"); return null; } if (configs.ContainsKey(id)) { return configs[id]; } RealmConfig config = null; if (rawDatas.ContainsKey(id)) { config = configs[id] = new RealmConfig(rawDatas[id]); rawDatas.Remove(id); } return config; } public static RealmConfig Get(int id) { return Get(id.ToString()); } public static List<string> GetKeys() { var keys = new List<string>(); keys.AddRange(configs.Keys); keys.AddRange(rawDatas.Keys); return keys; } public static List<RealmConfig> GetValues() { var values = new List<RealmConfig>(); values.AddRange(configs.Values); var keys = new List<string>(rawDatas.Keys); foreach (var key in keys) { values.Add(Get(key)); } return values; } public static bool Has(string id) { return configs.ContainsKey(id) || rawDatas.ContainsKey(id); } public static bool Has(int id) { return Has(id.ToString()); } public static bool inited { get; private set; } protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>(); public static void Init(bool sync=false) { inited = false; var path = string.Empty; if (AssetSource.refdataFromEditor) { path = ResourcesPath.CONFIG_FODLER +"/Realm.txt"; } else { path = AssetVersionUtility.GetAssetFilePath("config/Realm.txt"); } var tempConfig = new RealmConfig(); var preParse = tempConfig is IConfigPostProcess; if (sync) { var lines = File.ReadAllLines(path); if (!preParse) { rawDatas = new Dictionary<string, string>(lines.Length - 3); } for (int i = 3; i < lines.Length; i++) { try { var line = lines[i]; var index = line.IndexOf("\t"); if (index == -1) { continue; } var id = line.Substring(0, index); if (preParse) { var config = new RealmConfig(line); configs[id] = config; (config as IConfigPostProcess).OnConfigParseCompleted(); } else { rawDatas[id] = line; } } catch (System.Exception ex) { Debug.LogError(ex); } } inited = true; } else { ThreadPool.QueueUserWorkItem((object _object) => { var lines = File.ReadAllLines(path); if (!preParse) { rawDatas = new Dictionary<string, string>(lines.Length - 3); } for (int i = 3; i < lines.Length; i++) { try { var line = lines[i]; var index = line.IndexOf("\t"); if (index == -1) { continue; } var id = line.Substring(0, index); if (preParse) { var config = new RealmConfig(line); configs[id] = config; (config as IConfigPostProcess).OnConfigParseCompleted(); } else { rawDatas[id] = line; } } catch (System.Exception ex) { Debug.LogError(ex); } } inited = true; }); } } } int.TryParse(tables[13],out requireIconEffect); } catch (Exception ex) { DebugEx.Log(ex); } } static Dictionary<string, RealmConfig> configs = new Dictionary<string, RealmConfig>(); public static RealmConfig Get(string id) { if (!inited) { Debug.Log("RealmConfig 还未完成初始化。"); return null; } if (configs.ContainsKey(id)) { return configs[id]; } RealmConfig config = null; if (rawDatas.ContainsKey(id)) { config = configs[id] = new RealmConfig(rawDatas[id]); rawDatas.Remove(id); } return config; } public static RealmConfig Get(int id) { return Get(id.ToString()); } public static List<string> GetKeys() { var keys = new List<string>(); keys.AddRange(configs.Keys); keys.AddRange(rawDatas.Keys); return keys; } public static List<RealmConfig> GetValues() { var values = new List<RealmConfig>(); values.AddRange(configs.Values); var keys = new List<string>(rawDatas.Keys); foreach (var key in keys) { values.Add(Get(key)); } return values; } public static bool Has(string id) { return configs.ContainsKey(id) || rawDatas.ContainsKey(id); } public static bool Has(int id) { return Has(id.ToString()); } public static bool inited { get; private set; } protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>(); public static void Init(bool sync=false) { inited = false; var path = string.Empty; if (AssetSource.refdataFromEditor) { path = ResourcesPath.CONFIG_FODLER +"/Realm.txt"; } else { path = AssetVersionUtility.GetAssetFilePath("config/Realm.txt"); } var tempConfig = new RealmConfig(); var preParse = tempConfig is IConfigPostProcess; if (sync) { var lines = File.ReadAllLines(path); if (!preParse) { rawDatas = new Dictionary<string, string>(lines.Length - 3); } for (int i = 3; i < lines.Length; i++) { try { var line = lines[i]; var index = line.IndexOf("\t"); if (index == -1) { continue; } var id = line.Substring(0, index); if (preParse) { var config = new RealmConfig(line); configs[id] = config; (config as IConfigPostProcess).OnConfigParseCompleted(); } else { rawDatas[id] = line; } } catch (System.Exception ex) { Debug.LogError(ex); } } inited = true; } else { ThreadPool.QueueUserWorkItem((object _object) => { var lines = File.ReadAllLines(path); if (!preParse) { rawDatas = new Dictionary<string, string>(lines.Length - 3); } for (int i = 3; i < lines.Length; i++) { try { var line = lines[i]; var index = line.IndexOf("\t"); if (index == -1) { continue; } var id = line.Substring(0, index); if (preParse) { var config = new RealmConfig(line); configs[id] = config; (config as IConfigPostProcess).OnConfigParseCompleted(); } else { rawDatas[id] = line; } } catch (System.Exception ex) { Debug.LogError(ex); } } inited = true; }); } } } Core/GameEngine/Model/Config/RealmConfig.cs.meta
@@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: d49ca04ff4a91bc4fb645c417f9ef0b3 timeCreated: 1550121380 timeCreated: 1552295065 licenseType: Pro MonoImporter: serializedVersion: 2 Core/GameEngine/Model/Player/Equip.meta
File was deleted Core/GameEngine/Model/Player/PlayerDatas.cs
@@ -18,7 +18,6 @@ public PlayerExtersionData extersion { get { return m_Extersion; } } public PlayerFairyData fairyData = new PlayerFairyData(); public PlayerRealmData realm = new PlayerRealmData(); PlayerSkillDatas m_Skill = new PlayerSkillDatas(); public PlayerSkillDatas skill { get { return m_Skill; } } Core/GameEngine/Model/Player/Realm.meta
File was deleted Core/GameEngine/Model/Player/Realm/PlayerRealmData.cs
File was deleted Core/GameEngine/Model/Player/Realm/PlayerRealmData.cs.meta
File was deleted Core/GameEngine/Model/Player/Realm/RealmModel.cs
File was deleted Core/NetworkPackage/DTCFile/ClientPack.meta
File was deleted Core/NetworkPackage/DTCFile/ServerPack/H03_MainCharacter/DTC0319_tagFBHelp.cs
@@ -20,11 +20,6 @@ switch (PlayerDatas.Instance.baseData.MapID) { case 31110: { //渡劫副本 PlayerDatas.Instance.realm.OnRefreshData(vNetData); } break; case 31230: break; Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmFBIsOpen.cs
File was deleted Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmFBIsOpen.cs.meta
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.metacopy from System/Realm/SecondPraTypeCell.cs.meta copy to Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmInfo.cs.meta
File was copied from System/Realm/SecondPraTypeCell.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: ac27f012a5377e740809237c25859fd4 timeCreated: 1524465087 guid: 49f4b5ca7f4a21b47ad40ecdf0363120 timeCreated: 1552296188 licenseType: Pro MonoImporter: serializedVersion: 2 Core/NetworkPackage/DTCFile/ServerPack/HA9_Function/DTCA908_tagGCRealmFBHelpInfo.cs
@@ -12,9 +12,6 @@ base.Done(vNetPack); HA908_tagGCRealmFBHelpInfo vNetData = vNetPack as HA908_tagGCRealmFBHelpInfo; if (vNetData != null) { PlayerDatas.Instance.realm.OnRefreshData(vNetData); } } } Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmFBIsOpen.cs
File was deleted Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmFBIsOpen.cs.meta
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.metacopy from System/Realm/SecondPraTypeCell.cs.meta copy to Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmInfo.cs.meta
File was copied from System/Realm/SecondPraTypeCell.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: ac27f012a5377e740809237c25859fd4 timeCreated: 1524465087 guid: 4904fcbdde518cd4c8dbc1a9f00a3300 timeCreated: 1552296188 licenseType: Pro MonoImporter: serializedVersion: 2 Fight/Stage/Dungeon/DungeonStage.cs
@@ -204,16 +204,6 @@ var mapId = PlayerDatas.Instance.baseData.MapID; switch (mapId) { case 31110: var cfg = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); if (cfg != null) { if (cfg.IsBigRealm != 1) { WindowCenter.Instance.Open<RealmDungeonWin>(); } } break; case 31080: { if (!WindowCenter.Instance.IsOpen<DungeonFairyLandWin>()) Lua/Gen/PlayerDatasWrap.cs
@@ -56,7 +56,6 @@ Utils.RegisterFunc(L, Utils.GETTER_IDX, "hero", _g_get_hero); Utils.RegisterFunc(L, Utils.GETTER_IDX, "loginInfo", _g_get_loginInfo); Utils.RegisterFunc(L, Utils.GETTER_IDX, "fairyData", _g_get_fairyData); Utils.RegisterFunc(L, Utils.GETTER_IDX, "realm", _g_get_realm); Utils.RegisterFunc(L, Utils.GETTER_IDX, "maliciousAtkPlayer", _g_get_maliciousAtkPlayer); Utils.RegisterFunc(L, Utils.GETTER_IDX, "crossServerTick", _g_get_crossServerTick); @@ -64,7 +63,6 @@ Utils.RegisterFunc(L, Utils.SETTER_IDX, "hero", _s_set_hero); Utils.RegisterFunc(L, Utils.SETTER_IDX, "loginInfo", _s_set_loginInfo); Utils.RegisterFunc(L, Utils.SETTER_IDX, "fairyData", _s_set_fairyData); Utils.RegisterFunc(L, Utils.SETTER_IDX, "realm", _s_set_realm); Utils.RegisterFunc(L, Utils.SETTER_IDX, "maliciousAtkPlayer", _s_set_maliciousAtkPlayer); Utils.RegisterFunc(L, Utils.SETTER_IDX, "crossServerTick", _s_set_crossServerTick); @@ -692,20 +690,6 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_realm(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PlayerDatas gen_to_be_invoked = (PlayerDatas)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.realm); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_maliciousAtkPlayer(RealStatePtr L) { try { @@ -788,21 +772,6 @@ PlayerDatas gen_to_be_invoked = (PlayerDatas)translator.FastGetCSObj(L, 1); gen_to_be_invoked.fairyData = (PlayerFairyData)translator.GetObject(L, 2, typeof(PlayerFairyData)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_realm(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PlayerDatas gen_to_be_invoked = (PlayerDatas)translator.FastGetCSObj(L, 1); gen_to_be_invoked.realm = (PlayerRealmData)translator.GetObject(L, 2, typeof(PlayerRealmData)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); Lua/Gen/RealmConfigWrap.cs
@@ -27,16 +27,12 @@ Utils.RegisterFunc(L, Utils.GETTER_IDX, "Lv", _g_get_Lv); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Name", _g_get_Name); Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsBigRealm", _g_get_IsBigRealm); Utils.RegisterFunc(L, Utils.GETTER_IDX, "NeedPoint", _g_get_NeedPoint); Utils.RegisterFunc(L, Utils.GETTER_IDX, "NeedGood", _g_get_NeedGood); Utils.RegisterFunc(L, Utils.GETTER_IDX, "NeedNum", _g_get_NeedNum); Utils.RegisterFunc(L, Utils.GETTER_IDX, "NeedActiveTreasure", _g_get_NeedActiveTreasure); Utils.RegisterFunc(L, Utils.GETTER_IDX, "AddAttrType", _g_get_AddAttrType); Utils.RegisterFunc(L, Utils.GETTER_IDX, "AddAttrNum", _g_get_AddAttrNum); Utils.RegisterFunc(L, Utils.GETTER_IDX, "BossID", _g_get_BossID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Img", _g_get_Img); Utils.RegisterFunc(L, Utils.GETTER_IDX, "SitTime", _g_get_SitTime); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Quality", _g_get_Quality); Utils.RegisterFunc(L, Utils.GETTER_IDX, "FightPower", _g_get_FightPower); Utils.RegisterFunc(L, Utils.GETTER_IDX, "specialProperty", _g_get_specialProperty); @@ -318,34 +314,6 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_IsBigRealm(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.IsBigRealm); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_NeedPoint(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.NeedPoint); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_NeedGood(RealStatePtr L) { try { @@ -367,20 +335,6 @@ RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.NeedNum); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_NeedActiveTreasure(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.NeedActiveTreasure); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } @@ -437,20 +391,6 @@ RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.Img); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_SitTime(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); RealmConfig gen_to_be_invoked = (RealmConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.SitTime); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } Lua/Gen/RealmPracticeModelWrap.cs
File was deleted Lua/Gen/RealmPracticeModelWrap.cs.meta
File was deleted Lua/Gen/SnxxzUIChatCenterWrap.cs
@@ -38,7 +38,6 @@ Utils.RegisterFunc(L, Utils.METHOD_IDX, "PlaySpeech", _m_PlaySpeech); Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckAutoPlayVoice", _m_CheckAutoPlayVoice); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPlayerLoginOk", _m_OnPlayerLoginOk); Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckSendRealmThanks", _m_CheckSendRealmThanks); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetChatExtra", _m_SetChatExtra); Utils.RegisterFunc(L, Utils.METHOD_IDX, "HandleChatBanned", _m_HandleChatBanned); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ServerForbidenChat", _m_ServerForbidenChat); @@ -607,32 +606,6 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_CheckSendRealmThanks(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.ChatCenter gen_to_be_invoked = (Snxxz.UI.ChatCenter)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.CheckSendRealmThanks( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetChatExtra(RealStatePtr L) Lua/Gen/SnxxzUIRealmModelWrap.cs
File was deleted Lua/Gen/SnxxzUIRealmModelWrap.cs.meta
File was deleted Lua/Gen/XLuaGenAutoRegister.cs
@@ -698,9 +698,6 @@ translator.DelayWrapLoader(typeof(PlayerDatas), PlayerDatasWrap.__Register); translator.DelayWrapLoader(typeof(Snxxz.UI.RealmModel), SnxxzUIRealmModelWrap.__Register); translator.DelayWrapLoader(typeof(SnxxzGame), SnxxzGameWrap.__Register); @@ -1285,9 +1282,6 @@ translator.DelayWrapLoader(typeof(Snxxz.UI.RankModel), SnxxzUIRankModelWrap.__Register); translator.DelayWrapLoader(typeof(RealmPracticeModel), RealmPracticeModelWrap.__Register); translator.DelayWrapLoader(typeof(Snxxz.UI.Redpoint), SnxxzUIRedpointWrap.__Register); System/Chat/ChatCenter.cs
@@ -825,58 +825,6 @@ } #endregion #region 境界渡劫私聊感谢 const string RealmThank = "ThankMessage"; const int RealmThankCount = 11; public void CheckSendRealmThanks() { try { var model = ModelCenter.Instance.GetModel<DungeonModel>(); var realmConfig = RealmConfig.Get(realmModel.cacheRealmLv); if (model.dungeonResult.leaderID == PlayerDatas.Instance.baseData.PlayerID && realmConfig != null && realmConfig.IsBigRealm == 1) { var count = 0; var configs = RealmConfig.GetValues(); for (int i = 0; i < configs.Count; i++) { if (configs[i].Lv < realmModel.cacheRealmLv && configs[i].IsBigRealm == 1) { count++; } else if (configs[i].Lv >= realmModel.cacheRealmLv) { break; } } if (count >= 3) { return; } var teamModel = ModelCenter.Instance.GetModel<TeamModel>(); for (int i = 0; i < teamModel.myTeam.memberCount; i++) { Teammate teammate; if (teamModel.myTeam.TryGetMember(i, out teammate) && teammate.id != PlayerDatas.Instance.baseData.PlayerID && teammate.online) { ChatCtrl.Inst.PteChatID = (int)teammate.id; ChatCtrl.Inst.PteChatName = teammate.mateName; LanguageVerify.toPlayerLevel = teammate.level; var content = StringUtility.Contact(RealmThank, UnityEngine.Random.Range(1, RealmThankCount + 1)); ChatCtrl.Inst.SendChatInfo(ChatInfoType.Friend, Language.Get(content)); } } } } catch (Exception e) { DebugEx.Log(e.Message); } } #endregion #region 聊天黑名单 public string SetChatExtra() System/DailyQuest/DailyQuestRealmPracticeBehaviour.cs
@@ -91,7 +91,7 @@ { var isMaxRealm = realmModel.realmMaxLevel == PlayerDatas.Instance.baseData.realmLevel; var realmConfig = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); var pointNeed = realmConfig.NeedPoint; var pointNeed = 0; var pointOwn = PlayerDatas.Instance.extersion.realmPoint; if (isMaxRealm) @@ -174,7 +174,7 @@ var duration = 2f; var realmConfig = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); var pointNeed = realmConfig.NeedPoint; var pointNeed = 0; while (timer < duration) { System/Dungeon/DungeonFightWin.cs
@@ -431,14 +431,6 @@ } break; case RealmModel.REALM_DUNGEON_ID: var realmLv = ModelCenter.Instance.GetModel<RealmModel>().cacheRealmLv; var realmConfig = RealmConfig.Get(realmLv); if (model.dungeonResult.leaderID != PlayerDatas.Instance.baseData.PlayerID || realmConfig == null || realmConfig.IsBigRealm != 1 || model.dungeonResult.isPass != 1) { model.ExitCurrentDungeon(); } break; case JadeDynastyTowerModel.DATA_MAPID: var jadeDynastyTowerModel = ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); System/Dungeon/DungeonModel.cs
@@ -1019,17 +1019,8 @@ WindowCenter.Instance.Open<DungeonSlayerVictoryWin>(); break; case RealmModel.REALM_DUNGEON_ID: var realmConfig = RealmConfig.Get(realmModel.cacheRealmLv); if (realmConfig != null && realmConfig.IsBigRealm == 1 && dungeonResult.leaderID == PlayerDatas.Instance.baseData.PlayerID) { RealmBossShow.Instance.Open(realmModel.cacheRealmLv); //ModelCenter.Instance.GetModel<ChatCenter>().CheckSendRealmThanks(); } else { WindowCenter.Instance.Open<DungeonRealmVictoryWin>(); } var realmLevel = PlayerDatas.Instance.baseData.realmLevel + 1; RealmBossShow.Instance.Open(realmLevel); break; case RuneTowerModel.RUNETOWER_MAPID: WindowCenter.Instance.Open<DungeonRuneTowerVictoryWin>(); System/Dungeon/DungeonRealmVictoryWin.cs
@@ -50,7 +50,7 @@ void DisplayProperty() { var _realmLv = realmModel.cacheRealmLv; var _realmLv = PlayerDatas.Instance.baseData.realmLevel; RealmConfig presentcfg = RealmConfig.Get(_realmLv); if (presentcfg != null) { System/MainInterfacePanel/ChatFrame.cs
@@ -193,7 +193,7 @@ public void CheckRealmSfx() { var _model = ModelCenter.Instance.GetModel<RealmModel>(); if (_model.IsDungeonState && realmModel.realmRedpoint.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.realmRedpoint.id) if (_id == realmModel.levelUpRedpoint.id) { CheckRealmSfx(); } System/Realm/PracticeTypeCell.cs
File was deleted System/Realm/PracticeTypeCell.cs.meta
File was deleted System/Realm/RealmAnimationBehaviour.cs
New file @@ -0,0 +1,90 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Snxxz.UI { public class RealmAnimationBehaviour : MonoBehaviour { [SerializeField] float m_Radius = 100f; [SerializeField] RealmStageBehaviour[] m_RealmStages; Coroutine m_RotateCoroutine = null; float m_DeltaAngle { get { return 360f / 8; } } public void SetDefault() { for (int i = 0; i < m_RealmStages.Length; i++) { m_RealmStages[i].transform.localPosition = GetPointPosition(i); m_RealmStages[i].animIndex = i; } } Vector3 GetPointPosition(int _index) { return GetPointPosition(GetPointAngle(_index)); } float GetPointAngle(int _index) { return _index * m_DeltaAngle - 90; } Vector3 GetPointPosition(float angle) { var _x = transform.position.x + m_Radius * Mathf.Sin(Mathf.Deg2Rad * angle); var _y = transform.position.y + m_Radius * Mathf.Cos(Mathf.Deg2Rad * angle); var _z = transform.position.z; return new Vector3(_x, _y, _z); } public void DisplayLevelUp(int level) { } void StartRotate() { if (m_RotateCoroutine != null) { StopCoroutine(m_RotateCoroutine); } m_RotateCoroutine = StartCoroutine(Co_Rotate()); } IEnumerator Co_Rotate() { var angle = 0f; while (angle < 180f) { yield return null; angle += 1f; angle = Mathf.Min(180, angle); for (int i = 0; i < m_RealmStages.Length; i++) { var cacheAngle = GetPointAngle(i); var position = GetPointPosition(cacheAngle - angle); m_RealmStages[i].transform.localPosition = position; } } foreach (var realmStage in m_RealmStages) { realmStage.animIndex = (realmStage.animIndex + 4) % 8; } } [ContextMenu("Reset")] void TestReset() { SetDefault(); } [ContextMenu("Rotate")] void TestRotate() { StartRotate(); } } } System/Realm/RealmAnimationBehaviour.cs.metacopy from System/Realm/SecondPraTypeCell.cs.meta copy to System/Realm/RealmAnimationBehaviour.cs.meta
File was copied from System/Realm/SecondPraTypeCell.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: ac27f012a5377e740809237c25859fd4 timeCreated: 1524465087 guid: 61373bae0e710a94189beb54b777a035 timeCreated: 1552443812 licenseType: Pro MonoImporter: serializedVersion: 2 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(OnEquipPreview); } 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 OnEquipPreview() { } } } System/Realm/RealmBriefBehaviour.cs.meta
File was renamed from System/Realm/SecondPraTypeCell.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: ac27f012a5377e740809237c25859fd4 timeCreated: 1524465087 guid: f06b05882f781f94c92d48a2906a3236 timeCreated: 1552297489 licenseType: Pro MonoImporter: serializedVersion: 2 System/Realm/RealmDungeonWin.cs
File was deleted System/Realm/RealmDungeonWin.cs.meta
File was deleted System/Realm/RealmHeartMagicBehaviour.cs
New file @@ -0,0 +1,87 @@ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { public class RealmHeartMagicBehaviour : MonoBehaviour { [SerializeField] Image m_BossName; [SerializeField] Text m_FightPower; [SerializeField] RawImage m_RawBoss; [SerializeField] Button m_Goto; const string State_EnterHash = "Show"; const string State_IdleHash = "Idle"; int realmLevel = 0; DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } private void Awake() { m_Goto.AddListener(GotoBoss); } public void Display(int realmLevel) { this.realmLevel = realmLevel; DisplayBase(); DisplayBoss(); } void DisplayBase() { var config = RealmConfig.Get(realmLevel); var fightPower = PlayerDatas.Instance.baseData.FightPoint; var satisfy = fightPower >= config.FightPower; var label = UIHelper.AppendStringColor(satisfy ? TextColType.Green : TextColType.Red, fightPower.ToString()); m_FightPower.text = StringUtility.Contact(label, "/", config.FightPower); } void DisplayBoss() { var config = RealmConfig.Get(realmLevel); m_RawBoss.gameObject.SetActive(true); UI3DModelExhibition.Instance.ShowNPC(m_RawBoss, new UI3DNPCExhibitionData() { gray = false, isDialogue = false, npcId = config.BossID, }); var npcConfig = NPCConfig.Get(config.BossID); var npcModel = UI3DModelExhibition.Instance.NpcModelPet; if (npcModel != null) { var animator = npcModel.GetComponentInChildren<Animator>(); if (animator != null) { var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerRealmSuffix, npcConfig.MODE); animator.runtimeAnimatorController = runtimeController; animator.Play(State_EnterHash, 0); } } } public void Dispose() { UI3DModelExhibition.Instance.StopShow(); } private void GotoBoss() { if (CrossServerUtility.IsCrossServer()) { SysNotifyMgr.Instance.ShowTip("CrossMap10"); return; } dungeonModel.SingleChallenge(RealmModel.REALM_DUNGEON_ID, 0); } } } System/Realm/RealmHeartMagicBehaviour.cs.metacopy from System/Realm/SecondPraTypeCell.cs.meta copy to System/Realm/RealmHeartMagicBehaviour.cs.meta
File was copied from System/Realm/SecondPraTypeCell.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: ac27f012a5377e740809237c25859fd4 timeCreated: 1524465087 guid: 601311942a76af14bbf33e6347d041e8 timeCreated: 1552455695 licenseType: Pro MonoImporter: serializedVersion: 2 System/Realm/RealmLevelUpBehaviour.cs
New file @@ -0,0 +1,150 @@ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { public class RealmLevelUpBehaviour : MonoBehaviour { [SerializeField] Transform m_ContainerCondition; [SerializeField] RealmUpCondition m_LevelCondition; [SerializeField] RealmUpCondition m_BossCondition; [SerializeField] Transform m_ContainerCost; [SerializeField] ItemBehaviour m_Item; [SerializeField] Button m_LevelUp; int realmLevel = 0; RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } } PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } private void Awake() { m_LevelUp.AddListener(OnLevelUp); } public void Display(int realmLevel) { this.realmLevel = realmLevel; var currentRealmLevel = PlayerDatas.Instance.baseData.realmLevel; var isNext = realmLevel == currentRealmLevel + 1; m_ContainerCondition.gameObject.SetActive(isNext); m_ContainerCost.gameObject.SetActive(isNext); m_LevelUp.gameObject.SetActive(isNext); if (isNext) { DisplayCondition(); DisplayCost(); } } public void DisplayCondition() { var config = RealmConfig.Get(realmLevel - 1); m_LevelCondition.DisplayLevel(realmLevel - 1); m_BossCondition.SetActive(config.BossID != 0); if (config.BossID != 0) { m_BossCondition.DisplayBoss(realmLevel - 1); } } public void DisplayCost() { var config = RealmConfig.Get(realmLevel - 1); m_ContainerCost.gameObject.SetActive(config.NeedGood != 0); m_Item.SetItem(config.NeedGood, config.NeedNum); } private void OnLevelUp() { var error = 0; if (TryLevelUp(out error)) { CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp(); GameNetSystem.Instance.SendInfo(pak); } else { DisplayErrorTip(error); } } bool TryLevelUp(out int error) { error = 0; var config = RealmConfig.Get(realmLevel - 1); if (PlayerDatas.Instance.baseData.LV < config.NeedLV) { error = 1; return false; } if (config.BossID != 0 && !model.isBossPass) { error = 2; return false; } if (config.NeedGood != 0) { var count = packModel.GetItemCountByID(PackType.Item, config.NeedGood); if (count < config.NeedNum) { error = 3; return false; } } return true; } void DisplayErrorTip(int error) { switch (error) { case 1: break; case 2: break; case 3: break; } } } [Serializable] public class RealmUpCondition { [SerializeField] Transform m_Container; [SerializeField] Text m_Condition; [SerializeField] Text m_Progress; RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } } public void DisplayLevel(int realmLevel) { var config = RealmConfig.Get(realmLevel); m_Condition.text = Language.Get("RealmConditionLevel", config.NeedLV); var level = PlayerDatas.Instance.baseData.LV; var satisfy = level >= config.NeedLV; var levelLabel = UIHelper.AppendStringColor(satisfy ? TextColType.Green : TextColType.Red, level.ToString()); m_Progress.text = StringUtility.Contact(levelLabel, "/", config.NeedLV); } public void DisplayBoss(int realmLevel) { var config = RealmConfig.Get(realmLevel); m_Condition.text = Language.Get("RealmConditionBoss", config.Name); var progress = model.isBossPass ? 1 : 0; var label = UIHelper.AppendStringColor(model.isBossPass ? TextColType.Green : TextColType.Red, progress.ToString()); m_Progress.text = StringUtility.Contact(label, "/", 1); } public void SetActive(bool active) { m_Container.gameObject.SetActive(active); } } } System/Realm/RealmLevelUpBehaviour.cs.metacopy from System/Realm/SecondPraTypeCell.cs.meta copy to System/Realm/RealmLevelUpBehaviour.cs.meta
File was copied from System/Realm/SecondPraTypeCell.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: ac27f012a5377e740809237c25859fd4 timeCreated: 1524465087 guid: 53b362c7475d93e40bb79502f81e03d3 timeCreated: 1552381921 licenseType: Pro MonoImporter: serializedVersion: 2 System/Realm/RealmModel.cs
New file @@ -0,0 +1,156 @@ using LitJson; using Snxxz.UI; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; namespace Snxxz.UI { public class RealmModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize { Dictionary<int, Dictionary<int, int>> m_RealmProperties = new Dictionary<int, Dictionary<int, int>>(); List<List<int>> m_RealmStages = new List<List<int>>(); public int realmMaxLevel { get; private set; } public bool isBossPass { get; private set; } public const int REALM_DUNGEON_ID = 31110; public readonly Redpoint levelUpRedpoint = new Redpoint(114, 11401); public readonly Redpoint challengeRedpoint = new Redpoint(114, 11402); int m_SelectRealm = 0; public int selectRealm { get { return m_SelectRealm; } set { if (m_SelectRealm != value) { m_SelectRealm = value; if (selectRealmRefresh != null) { selectRealmRefresh(); } } } } public event Action selectRealmRefresh; EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } public override void Init() { ParseConfig(); } public void OnBeforePlayerDataInitialize() { isBossPass = false; } public void OnPlayerLoginOk() { } public override void UnInit() { } void ParseConfig() { realmMaxLevel = 0; List<int> stages = new List<int>(); m_RealmStages.Add(stages); var configs = RealmConfig.GetValues(); foreach (var config in configs) { if (config.Lv > realmMaxLevel) { 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); } stages.Add(config.Lv); if (config.BossID != 0) { stages = new List<int>(); m_RealmStages.Add(stages); } } } public bool TryGetRealmProperty(int level, out Dictionary<int, int> propertyDict) { return m_RealmProperties.TryGetValue(level, out propertyDict); } public bool TryGetRealmStages(int index, out List<int> stages) { stages = null; if (index < m_RealmStages.Count) { stages = m_RealmStages[index]; return true; } return false; } 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 int GetRealmStage(int realmLevel) { for (int i = 0; i < m_RealmStages.Count; i++) { var stages = m_RealmStages[i]; if (stages.Contains(realmLevel)) { return i; } } return m_RealmStages.Count - 1; } public void SendLevelUpRealm() { CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp(); GameNetSystem.Instance.SendInfo(pak); } public void ReceivePackage(HA311_tagMCSyncRealmInfo package) { isBossPass = package.IsPass == 1; } } } System/Realm/RealmModel.cs.meta
File was renamed from Core/GameEngine/Model/Player/Realm/RealmModel.cs.meta @@ -1,12 +1,12 @@ fileFormatVersion: 2 guid: 4839d4a757dc0ae4b9330fff398a4846 timeCreated: 1507905919 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: fileFormatVersion: 2 guid: 4839d4a757dc0ae4b9330fff398a4846 timeCreated: 1507905919 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Realm/RealmPracticeModel.cs
File was deleted System/Realm/RealmPracticeModel.cs.meta
File was deleted System/Realm/RealmPracticeWin.cs
File was deleted System/Realm/RealmPracticeWin.cs.meta
File was deleted System/Realm/RealmProgressBehaviour.cs
File was deleted System/Realm/RealmProgressBehaviour.cs.meta
File was deleted System/Realm/RealmSitWin.cs
File was deleted System/Realm/RealmSitWin.cs.meta
File was deleted System/Realm/RealmStageBehaviour.cs
@@ -1,4 +1,5 @@ using System.Collections; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -8,37 +9,53 @@ { public class RealmStageBehaviour : MonoBehaviour { [SerializeField] RealmIcon m_RealmIcon; [SerializeField] Image m_RealmCompleted; [SerializeField] Image m_Arrow; [SerializeField] Image m_Last; [SerializeField] VerticalLayoutGroup m_Layout; [SerializeField] Image m_RealmIcon; [SerializeField] Transform m_ContainerSelect; [SerializeField] Image m_SelectIcon; [SerializeField] UIEffect m_Effect; [SerializeField] Button m_Select; public void Display(int _realmLv, bool last) int realmLevel = 0; public int animIndex { get; set; } RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } } public void Display(int _realmLv) { var config = RealmConfig.Get(_realmLv); var realmLevel = PlayerDatas.Instance.baseData.realmLevel; if (config != null) this.realmLevel = _realmLv; model.selectRealmRefresh -= SelectRealmRefresh; model.selectRealmRefresh += SelectRealmRefresh; DisplayBase(); DisplaySelect(); } void DisplayBase() { var config = RealmConfig.Get(realmLevel); m_RealmIcon.SetSprite(config.Img); } void DisplaySelect() { m_ContainerSelect.gameObject.SetActive(model.selectRealm == realmLevel); if (model.selectRealm == realmLevel) { m_RealmIcon.Display(_realmLv); m_RealmCompleted.gameObject.SetActive(realmLevel >= _realmLv); m_Arrow.gameObject.SetActive(realmLevel == _realmLv); m_Last.gameObject.SetActive(last); var config = RealmConfig.Get(realmLevel); m_SelectIcon.SetSprite(StringUtility.Contact("RealmSelectBottom_", config.Quality)); } } public float GetWidth(int realmLevel) public void Dispose() { var config = RealmConfig.Get(realmLevel); if (config != null) { var sprite = UILoader.LoadSprite(config.Img); if (sprite) { return sprite.rect.width + m_Layout.padding.left + m_Layout.padding.right; } } return 86 + m_Layout.padding.left + m_Layout.padding.right; model.selectRealmRefresh -= SelectRealmRefresh; } private void SelectRealmRefresh() { DisplaySelect(); } } } System/Realm/RealmUpHoldWin.cs
File was deleted System/Realm/RealmUpHoldWin.cs.meta
File was deleted System/Realm/RealmUpWin.cs
@@ -17,422 +17,34 @@ [XLua.Hotfix] public class RealmUpWin : Window { #region built-in [SerializeField] RectTransform m_ContainerNow; [SerializeField] RectTransform m_ContainerNowHasRealm; [SerializeField] RectTransform m_ContainerNext; [SerializeField] RectTransform m_ContainerProgress; [SerializeField] RectTransform m_ContainerModel; [SerializeField] RectTransform m_ContainerNoHighestBottom; [SerializeField] RectTransform m_ContainerHighestBottom; [SerializeField] Image m_RealmTitleNext; [SerializeField] RealmIcon m_RealmIconNow; [SerializeField] RealmIcon m_RealmIconNowHighest; [SerializeField] RealmIcon m_RealmIconNext; [SerializeField] RealmPropertyCell m_RealmPropertyNow; [SerializeField] RealmPropertyCell m_RealmPropertyNext; [SerializeField] RawImage m_RawBoss; [SerializeField] RawImage m_RawPlayer; [SerializeField] RealmProgressBehaviour m_RealmProgress; [SerializeField] UIEffect m_RealmDungeonSfx; [SerializeField] Button m_SingleDungeon; [SerializeField] Button m_FuncButton; [SerializeField] Text m_RealmStageTip; [SerializeField] RectTransform m_ContainerFightPower; [SerializeField] Text m_FightPower; [SerializeField] Button m_RealmPreview; [SerializeField, Header("Boss初始朝向")] Vector3 direction = Vector3.zero; [SerializeField, Header("模型位置")] Vector3[] m_ModelPositions; [SerializeField, Header("当前境界位置")] Vector3[] m_RealmNowPositions; [SerializeField, Header("下一境界位置")] Vector3[] m_RealmNextwPositions; [SerializeField, Header("Boss位置")] Vector3[] m_BossPositions; [SerializeField, Header("Boss出现延长")] float m_DelayEnterTime = 1f; [SerializeField, Header("出场总时长")] float m_BossEnterDuration = 3f; int cacheRealmPoint = 0; Coroutine cacheCoroutine = null; const string State_EnterHash = "Show"; const string State_IdleHash = "Idle"; DateTime overdueTime = DateTime.Now; RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } } protected override void AddListeners() { throw new NotImplementedException(); } protected override void BindController() { } protected override void AddListeners() { m_SingleDungeon.onClick.AddListener(SingleDungeon); m_FuncButton.onClick.AddListener(OnFunctionClick); m_RealmPreview.onClick.AddListener(OnRealmPreview); } protected override void OnPreOpen() { PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshInfoEvent; WindowCenter.Instance.windowAfterCloseEvent += WindowAfterCloseEvent; cacheRealmPoint = PlayerDatas.Instance.extersion.realmPoint; m_RawBoss.gameObject.SetActive(false); m_RawPlayer.gameObject.SetActive(false); overdueTime = DateTime.Now; Display(); } protected override void OnActived() { base.OnActived(); if (realmModel.realmDungeonState) { StopBoss(); m_RawBoss.gameObject.SetActive(false); m_RawPlayer.gameObject.SetActive(true); UI3DModelExhibition.Instance.ShowSitDownPlayer(m_RawPlayer, PlayerDatas.Instance.baseData.Job); } var _realmPoint = PlayerDatas.Instance.extersion.realmPoint; var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); bool satisfyChallenge = false; if (config != null) { satisfyChallenge = _realmPoint >= config.NeedPoint; } if (satisfyChallenge && !NewBieCenter.Instance.inGuiding && !NewBieCenter.Instance.IsGuideCompleted(35) && realmModel.excuteRealmOpenGuide) { NewBieCenter.Instance.StartNewBieGuide(35); } } protected override void OnAfterOpen() { HandleAchievement(); if (realmModel.openByDungeonStep && !realmModel.realmDungeonState) { m_RawBoss.gameObject.SetActive(false); m_RawPlayer.gameObject.SetActive(false); ActivateShow.RealmActivate(PlayerDatas.Instance.baseData.realmLevel); } realmModel.openByDungeonStep = false; if (realmModel.realmDungeonState) { m_RealmDungeonSfx.Play(); overdueTime = DateTime.Now.AddSeconds(m_BossEnterDuration); StartCoroutine(Co_DisplayBossShow()); } realmModel.realmDungeonState = false; } protected override void OnPreClose() { PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshInfoEvent; WindowCenter.Instance.windowAfterCloseEvent -= WindowAfterCloseEvent; StopBoss(); UI3DModelExhibition.Instance.StopShow(); realmModel.realmDungeonState = false; if (cacheCoroutine != null) { StopCoroutine(cacheCoroutine); cacheCoroutine = null; } throw new NotImplementedException(); } protected override void OnAfterClose() { var _realmPoint = PlayerDatas.Instance.extersion.realmPoint; var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); if (!realmModel.IsRealmHighest && _realmPoint >= config.NeedPoint && realmModel.realmRedpoint.state == RedPointState.Simple) { realmModel.openedRealmUpWin = true; realmModel.UpdateRedpoint(); } } #endregion IEnumerator Co_DisplayBossShow() { yield return WaitingForSecondConst.WaitMS800; var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); m_RawPlayer.gameObject.SetActive(false); UI3DModelExhibition.Instance.StopShow(); yield return WaitingForSecondConst.GetWaitForSeconds(m_DelayEnterTime > 0 ? m_DelayEnterTime : 1f); StartBoss(config, true); throw new NotImplementedException(); } private void PlayerDataRefreshInfoEvent(PlayerDataType refreshType) protected override void OnAfterOpen() { if (refreshType == PlayerDataType.RealmLevel) { DisplayRealmNow(); DisplayRealmNext(); DisplayModel(); DisplayButton(); DisplayProgress(); DisplayContainer(); } else if (refreshType == PlayerDataType.RealmPoint) { m_RealmProgress.DisplayProgress(true); DisplayRemind(); DisplayModel(); DisplayButton(); cacheRealmPoint = PlayerDatas.Instance.extersion.realmPoint; } throw new NotImplementedException(); } private void Display() protected override void OnPreClose() { DisplayRealmNow(); DisplayRealmNext(); DisplayModel(); DisplayProgress(); DisplayButton(); DisplayContainer(); throw new NotImplementedException(); } private void DisplayRealmNow() protected override void OnPreOpen() { var _realmLv = PlayerDatas.Instance.baseData.realmLevel; var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); m_ContainerNow.gameObject.SetActive(_realmLv > 0); m_ContainerNoHighestBottom.gameObject.SetActive(!realmModel.IsRealmHighest); m_ContainerHighestBottom.gameObject.SetActive(realmModel.IsRealmHighest); if (_realmLv > 0) { m_RealmPropertyNow.Display(_realmLv, false); m_RealmIconNow.Display(_realmLv); m_RealmIconNowHighest.Display(_realmLv); } } private void DisplayRealmNext() { var _realmLv = PlayerDatas.Instance.baseData.realmLevel + 1; var config = RealmConfig.Get(_realmLv); m_ContainerNext.gameObject.SetActive(config != null); if (config != null) { m_RealmPropertyNext.Display(_realmLv, false); m_RealmIconNext.Display(_realmLv); var fightPower = PlayerDatas.Instance.baseData.FightPoint; m_FightPower.text = StringUtility.Contact(UIHelper.AppendStringColor(TextColType.Green, Language.Get("RolePromoteBetterFight")), UIHelper.AppendStringColor(fightPower >= config.FightPower ? TextColType.Green : TextColType.Red, fightPower.ToString()) , "/", config.FightPower); } } private void DisplayProgress() { if (!realmModel.IsRealmHighest) { m_RealmProgress.Display(); } DisplayRemind(); } private void DisplayRemind() { var _realmPoint = PlayerDatas.Instance.extersion.realmPoint; var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); m_ContainerFightPower.gameObject.SetActive(!realmModel.IsRealmHighest && _realmPoint >= config.NeedPoint); if (_realmPoint < config.NeedPoint) { m_RealmStageTip.text = Language.Get("RealmWin_Bewrite_39"); } else { if (config.IsBigRealm == 1) { m_RealmStageTip.text = Language.Get("RealmWin_Bewrite_2"); } else { m_RealmStageTip.text = Language.Get("RealmWin_Bewrite_11"); } } if (realmModel.IsRealmHighest) { m_RealmStageTip.text = string.Empty; } } private void DisplayModel() { var _realmPoint = PlayerDatas.Instance.extersion.realmPoint; var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); if (realmModel.IsRealmHighest || _realmPoint < config.NeedPoint) { m_RawPlayer.gameObject.SetActive(true); StopBoss(); m_RawBoss.gameObject.SetActive(false); UI3DModelExhibition.Instance.ShowSitDownPlayer(m_RawPlayer, PlayerDatas.Instance.baseData.Job); } else if (_realmPoint >= config.NeedGood) { m_RawBoss.gameObject.SetActive(true); m_RawPlayer.gameObject.SetActive(false); UI3DModelExhibition.Instance.StopShow(); StartBoss(config); } } private void StopBoss() { UI3DModelExhibition.Instance.StopShow(); } private void StartBoss(RealmConfig config, bool act = false) { StopBoss(); m_RawBoss.gameObject.SetActive(true); UI3DModelExhibition.Instance.StopShow(); UI3DModelExhibition.Instance.ShowNPC(config.BossID, config.IsBigRealm == 1 ? Vector3.zero : direction, m_RawBoss, false); var npcConfig = NPCConfig.Get(config.BossID); var npcModel = UI3DModelExhibition.Instance.NpcModelPet; m_RawBoss.transform.localPosition = config.IsBigRealm == 1 ? m_BossPositions[1] : m_BossPositions[0]; if (npcModel != null) { var animator = npcModel.GetComponentInChildren<Animator>(); if (animator != null) { var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerRealmSuffix, npcConfig.MODE); animator.runtimeAnimatorController = runtimeController; animator.Play(act ? State_EnterHash : State_IdleHash, 0); } } } private void DisplayContainer() { int _state = PlayerDatas.Instance.baseData.realmLevel == 0 ? 0 : realmModel.IsRealmHighest ? 2 : 1; m_ContainerProgress.gameObject.SetActive(_state != 2); m_ContainerNow.transform.localPosition = _state == 2 ? m_RealmNowPositions[1] : m_RealmNowPositions[0]; m_ContainerNext.transform.localPosition = _state == 0 ? m_RealmNextwPositions[1] : m_RealmNextwPositions[0]; m_ContainerModel.transform.localPosition = m_ModelPositions[_state]; m_RealmTitleNext.SetSprite(_state == 0 ? "TB_JJ_10" : "TB_JJ_7"); } private void DisplayButton() { var _realmPoint = PlayerDatas.Instance.extersion.realmPoint; var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); bool satisfyChallenge = _realmPoint >= config.NeedPoint; m_SingleDungeon.gameObject.SetActive(!realmModel.IsRealmHighest && satisfyChallenge); m_FuncButton.gameObject.SetActive(!realmModel.IsRealmHighest && !satisfyChallenge); } private void OnFunctionClick() { WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DailyQuestFunc1); } //private void GroupDungeon() //{ // if (DateTime.Now < overdueTime) // { // return; // } // if (PlayerDatas.Instance.baseData.MapID == RealmModel.REALM_DUNGEON_ID) // { // return; // } // var teamModel = ModelCenter.Instance.GetModel<TeamModel>(); // if (teamModel.myTeam.inTeam && teamModel.myTeam.iamCaptainer) // { // ModelCenter.Instance.GetModel<DungeonModel>().GroupChallenge(RealmModel.REALM_DUNGEON_ID, 1); // } // else // { // teamModel.missionBuf = teamModel.currentMission = new TeamMission(31110, 1); // WindowCenter.Instance.Open<TeamFrameWin>(false, teamModel.myTeam.inTeam ? 1 : 0); // } //} //private void AutoGroup() //{ // if (DateTime.Now < overdueTime) // { // return; // } // var teamModel = ModelCenter.Instance.GetModel<TeamModel>(); // teamModel.RequestAutoMatchTeam(new TeamMission(RealmModel.REALM_DUNGEON_ID, 1)); // WindowCenter.Instance.Open<TeamFrameWin>(false, 1); //} private void SingleDungeon() { if (DateTime.Now < overdueTime) { return; } if (PlayerDatas.Instance.baseData.MapID == RealmModel.REALM_DUNGEON_ID) { return; } PlayerDatas.Instance.realm.realmHelpList.Clear(); var _realmPoint = PlayerDatas.Instance.extersion.realmPoint; var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); if (_realmPoint >= config.NeedPoint) { ModelCenter.Instance.GetModel<DungeonModel>().SingleChallenge(RealmModel.REALM_DUNGEON_ID, config.IsBigRealm == 1 ? 1 : 0); } } private void OnRealmPreview() { WindowCenter.Instance.Open<RealmPreviewWin>(); } void HandleAchievement() { if (AchievementGoto.achievementType == AchievementGoto.RealmDungeon) { if (!realmModel.IsRealmHighest) { var _effect = AchievementGuideEffectPool.Require(1); _effect.transform.SetParentEx(m_FuncButton.transform, Vector3.zero, Vector3.zero, Vector3.one); AchievementGoto.achievementType = 0; } } else if (AchievementGoto.achievementType == AchievementGoto.RealmDungeonHelp) { var _level = PlayerDatas.Instance.baseData.realmLevel; var _realmCfg = RealmConfig.Get(_level); if (_realmCfg != null && _realmCfg.IsBigRealm == 1 && realmModel.IsDungeonState) { var _effect = AchievementGuideEffectPool.Require(1); _effect.transform.SetParentEx(m_FuncButton.transform, Vector3.zero, Vector3.zero, Vector3.one); } else { SysNotifyMgr.Instance.ShowTip("Achievement_79"); } AchievementGoto.achievementType = 0; } AchievementGoto.achievementType = 0; } private void WindowAfterCloseEvent(Window _win) { if (_win is RealmPropertyUpWin) { DisplayModel(); } throw new NotImplementedException(); } } } System/Realm/RealmWin.cs
@@ -14,17 +14,24 @@ public class RealmWin : Window { [SerializeField] FunctionButton realmUpTitleBtn; [SerializeField] Button closeBtn; [SerializeField] RealmBriefBehaviour m_RealmBrief; [SerializeField] RealmLevelUpBehaviour m_RealmLevelUp; [SerializeField] RealmAnimationBehaviour m_RealmAnimation; [SerializeField] RealmStageBehaviour[] m_RealmStages; [SerializeField] RealmHeartMagicBehaviour m_RealmHeartMagic; [SerializeField] Button m_RealmRestraint; [SerializeField] Button m_GotoBoss; [SerializeField] Button m_Close; RealmModel m_Model; RealmModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<RealmModel>()); return ModelCenter.Instance.GetModel<RealmModel>(); } } DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } #region Built-in protected override void BindController() @@ -33,26 +40,15 @@ 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); m_GotoBoss.AddListener(GotoBoss); } protected override void OnPreOpen() { realmUpTitleBtn.state = TitleBtnState.Click; } PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent; protected override void OnActived() { base.OnActived(); OnRealmUp(); Display(); } protected override void OnAfterOpen() @@ -61,7 +57,7 @@ protected override void OnPreClose() { CloseChildWin(); PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent; } protected override void OnAfterClose() @@ -73,14 +69,64 @@ } #endregion private void CloseChildWin() void Display() { var children = WindowConfig.Get().FindChildWindows("RealmWin"); foreach (var window in children) DisplayRealmLevelUp(); } void DisplayRealmStages() { var realmLevel = PlayerDatas.Instance.baseData.realmLevel; var stage = model.GetRealmStage(realmLevel < model.realmMaxLevel ? (realmLevel + 1) : realmLevel); m_RealmAnimation.SetDefault(); List<int> realms = null; if (model.TryGetRealmStages(stage, out realms)) { WindowCenter.Instance.Close(window); for (int i = 0; i < m_RealmStages.Length; i++) { if (i < realms.Count) { m_RealmStages[i].gameObject.SetActive(true); m_RealmStages[i].Display(realms[i]); } else { m_RealmStages[i].gameObject.SetActive(false); if (realms[realms.Count - 1] < model.realmMaxLevel) { m_RealmStages[i].Display(realms[0] + i); } } } } } void DisplayRealmLevelUp() { var realmLevel = PlayerDatas.Instance.baseData.realmLevel; var isMax = realmLevel >= model.realmMaxLevel; m_RealmLevelUp.gameObject.SetActive(!isMax); if (!isMax) { m_RealmLevelUp.Display(realmLevel + 1); } var config = RealmConfig.Get(realmLevel); m_GotoBoss.gameObject.SetActive(config.BossID != 0); } private void PlayerDataRefreshEvent(PlayerDataType dataType) { if (dataType == PlayerDataType.RealmLevel) { DisplayRealmLevelUp(); } } private void GotoBoss() { dungeonModel.SingleChallenge(RealmModel.REALM_DUNGEON_ID, 0); } } } System/Realm/SecondPraTypeCell.cs
File was deleted System/Realm/TaskTypeCell.cs
File was deleted System/Realm/TaskTypeCell.cs.meta
File was deleted System/RolePromote/RolePromoteModel.cs
@@ -445,7 +445,7 @@ _id == runeModel.runeMosaicRedpoint.id || _id == magicianModel.magicianRedpoint.id || _id == methodData.fairyHeartRedpoint.id || _id == realmModel.realmRedpoint.id || _id == realmModel.levelUpRedpoint.id || _id == equipGemModel.redpoint.id || _id == rolePointModel.redpoint.id) { System/Team/GroupDungeonChallengeProcessor.cs
@@ -37,8 +37,6 @@ switch (_mapId) { case RealmModel.REALM_DUNGEON_ID: var realmModel = ModelCenter.Instance.GetModel<RealmModel>(); realmModel.GotoDungeon(); break; case 31080: { System/Team/TeamModel.cs
@@ -248,16 +248,6 @@ public void RequestCreateTeam(int _mapId, int _lineId, int _levelMin = 1, int _levelMax = 1) { if (_mapId == 31110) { var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); if (config.IsBigRealm != 1 || !ModelCenter.Instance.GetModel<RealmModel>().IsDungeonState) { SysNotifyMgr.Instance.ShowTip("NOGreatBourn"); return; } } var mapId = _mapId == NONE_MISSION ? 0 : _mapId == CURRENTMAP_MISSION ? PlayerDatas.Instance.baseData.MapID : _mapId; var mapEx = _lineId <= 0 ? 0 : _lineId; var dungeonId = dungeonModel.GetDungeonId(mapId, mapEx); @@ -393,17 +383,6 @@ switch (dungeonId) { case 311101: if (RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel).IsBigRealm == 1) { var index = GetBigRealmIndex(); if (index == 1 || index == 2) { invite = true; int.TryParse(json["311101"][index - 1].ToString(), out level); } } break; default: invite = true; int.TryParse(json[dungeonId.ToString()][0].ToString(), out level); @@ -1210,22 +1189,6 @@ private int GetBigRealmIndex() { var index = 0; if (RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel).IsBigRealm == 1) { foreach (var item in RealmConfig.GetValues()) { if (item.IsBigRealm == 1) { index++; } if (item.Lv == PlayerDatas.Instance.baseData.realmLevel) { break; } } } return index; } System/Team/TeamTargetJoinLimitWin.cs
@@ -189,16 +189,6 @@ missionBuf.mapId == TeamModel.CURRENTMAP_MISSION ? PlayerDatas.Instance.baseData.MapID : missionBuf.mapId; var mapEx = missionBuf.mapEx <= 0 ? 0 : missionBuf.mapEx; if (mapId == 31110) { var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); if (config.IsBigRealm != 1 || !ModelCenter.Instance.GetModel<RealmModel>().IsDungeonState) { SysNotifyMgr.Instance.ShowTip("NOGreatBourn"); return; } } var key = dungeonModel.GetDungeonId(mapId, mapEx); if (key == 0)