Merge branch 'master' into ItemTip
# Conflicts:
# Lua/Gen/AssetBundleUtilityWrap.cs
# System/EquipGem/EquipStrengthRein.cs
# System/ItemTip.meta
# System/Realm/RealmProgressBehaviour.cs
# System/Realm/RealmUpWin.cs
8 文件已复制
30个文件已删除
2 文件已重命名
10个文件已添加
33个文件已修改
| | |
| | | #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));
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Wednesday, March 13, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class EquipPlusEvolveConfig |
| | | { |
| | | |
| | | public readonly int ID;
|
| | | public readonly int EquipPlace;
|
| | | public readonly int EvolveLV;
|
| | | public readonly int NeedPlusLV;
|
| | | public readonly string CostItem;
|
| | | public readonly string Attr; |
| | | |
| | | public EquipPlusEvolveConfig() |
| | | { |
| | | } |
| | | |
| | | public EquipPlusEvolveConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out ID); |
| | |
|
| | | int.TryParse(tables[1],out EquipPlace); |
| | |
|
| | | int.TryParse(tables[2],out EvolveLV); |
| | |
|
| | | int.TryParse(tables[3],out NeedPlusLV); |
| | |
|
| | | CostItem = tables[4];
|
| | |
|
| | | Attr = tables[5]; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, EquipPlusEvolveConfig> configs = new Dictionary<string, EquipPlusEvolveConfig>(); |
| | | public static EquipPlusEvolveConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("EquipPlusEvolveConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | EquipPlusEvolveConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new EquipPlusEvolveConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static EquipPlusEvolveConfig 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<EquipPlusEvolveConfig> GetValues() |
| | | { |
| | | var values = new List<EquipPlusEvolveConfig>(); |
| | | 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 +"/EquipPlusEvolve.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/EquipPlusEvolve.txt"); |
| | | } |
| | | |
| | | var tempConfig = new EquipPlusEvolveConfig(); |
| | | 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 EquipPlusEvolveConfig(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 EquipPlusEvolveConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
copy from System/Realm/SecondPraTypeCell.cs.meta
copy to Core/GameEngine/Model/Config/EquipPlusEvolveConfig.cs.meta
| File was copied from System/Realm/SecondPraTypeCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ac27f012a5377e740809237c25859fd4 |
| | | timeCreated: 1524465087 |
| | | guid: 92e53a1a4e4766d4f95f949ace5c9d48 |
| | | timeCreated: 1552466135 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //--------------------------------------------------------
|
| | | // [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; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d49ca04ff4a91bc4fb645c417f9ef0b3 |
| | | timeCreated: 1550121380 |
| | | timeCreated: 1552295065 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | 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; } }
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, March 13, 2019 |
| | | //-------------------------------------------------------- |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine;
|
| | | using System.Text;
|
| | |
|
| | | public partial class EquipPlusEvolveConfig : IConfigPostProcess
|
| | | {
|
| | | static Dictionary<string, EquipPlusEvolveConfig> equipPlusEvolve = new Dictionary<string, EquipPlusEvolveConfig>();
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | | equipPlusEvolve.Add(StringUtility.Contact(EquipPlace, EvolveLV).ToString(), this);
|
| | | }
|
| | | public static EquipPlusEvolveConfig GetEquipPlaceAndEvolveLV(int equipPlace, int evolveLV)
|
| | | {
|
| | | EquipPlusEvolveConfig equipPlusEvolveConfig = null;
|
| | | equipPlusEvolve.TryGetValue(StringUtility.Contact(equipPlace, evolveLV).ToString(), out equipPlusEvolveConfig);
|
| | | return equipPlusEvolveConfig;
|
| | | }
|
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
copy from System/Realm/SecondPraTypeCell.cs.meta
copy to Core/GameEngine/Model/TelPartialConfig/EquipPlusEvolveConfig.cs.meta
| File was copied from System/Realm/SecondPraTypeCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ac27f012a5377e740809237c25859fd4 |
| | | timeCreated: 1524465087 |
| | | guid: 28fda1791f83c8c42a42d6dd2102fb53 |
| | | timeCreated: 1552466618 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | |
|
| | | switch (PlayerDatas.Instance.baseData.MapID)
|
| | | {
|
| | | case 31110:
|
| | | { //渡劫副本
|
| | | PlayerDatas.Instance.realm.OnRefreshData(vNetData);
|
| | | }
|
| | | break;
|
| | | case 31230:
|
| | |
|
| | | break;
|
| New file |
| | |
| | | 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);
|
| | | }
|
| | | }
|
copy 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 |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ac27f012a5377e740809237c25859fd4 |
| | | timeCreated: 1524465087 |
| | | guid: 49f4b5ca7f4a21b47ad40ecdf0363120 |
| | | timeCreated: 1552296188 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | base.Done(vNetPack); |
| | | |
| | | HA908_tagGCRealmFBHelpInfo vNetData = vNetPack as HA908_tagGCRealmFBHelpInfo; |
| | | if (vNetData != null) { |
| | | PlayerDatas.Instance.realm.OnRefreshData(vNetData); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | 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);
|
| | | }
|
| | |
|
| | | }
|
copy 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 |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ac27f012a5377e740809237c25859fd4 |
| | | timeCreated: 1524465087 |
| | | guid: 4904fcbdde518cd4c8dbc1a9f00a3300 |
| | | timeCreated: 1552296188 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | 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>())
|
| | |
| | | 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); |
| | | |
| | |
| | | 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); |
| | | |
| | |
| | | } |
| | | |
| | | [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 { |
| | |
| | | |
| | | 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); |
| | |
| | | |
| | | 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); |
| | |
| | | } |
| | | |
| | | [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 { |
| | |
| | | |
| | | 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); |
| | | } |
| | |
| | | |
| | | 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); |
| | | } |
| | |
| | | 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); |
| | |
| | | |
| | | } |
| | | |
| | | [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) |
| | |
| | | translator.DelayWrapLoader(typeof(PlayerDatas), PlayerDatasWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RealmModel), SnxxzUIRealmModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(SnxxzGame), SnxxzGameWrap.__Register); |
| | | |
| | | |
| | |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RankModel), SnxxzUIRankModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(RealmPracticeModel), RealmPracticeModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.Redpoint), SnxxzUIRedpointWrap.__Register); |
| | |
| | | private void OnClickUseBtn()
|
| | | {
|
| | | CloseImmediately();
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, auctionHelpModel.ItemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | ItemOperateUtility.Instance.GotoUseItem(auctionHelpModel.ItemModel.itemInfo.index);
|
| | | //itemTipsModel.SetItemTipsModel(PackType.Item, auctionHelpModel.ItemModel.guid, false, true);
|
| | | //itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | //itemTipsModel.ShowUICtrl();
|
| | | } |
| | | private void OnClickAuction()
|
| | | {
|
| | |
| | | }
|
| | | #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()
|
| | |
| | | {
|
| | | 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)
|
| | |
| | | var duration = 2f;
|
| | |
|
| | | var realmConfig = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | var pointNeed = realmConfig.NeedPoint;
|
| | | var pointNeed = 0;
|
| | |
|
| | | while (timer < duration)
|
| | | {
|
| | |
| | | }
|
| | | 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>();
|
| | |
| | | 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>();
|
| | |
| | |
|
| | | void DisplayProperty()
|
| | | {
|
| | | var _realmLv = realmModel.cacheRealmLv;
|
| | | var _realmLv = PlayerDatas.Instance.baseData.realmLevel;
|
| | | RealmConfig presentcfg = RealmConfig.Get(_realmLv);
|
| | | if (presentcfg != null)
|
| | | {
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, March 13, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class EquipEvolution:MonoBehaviour { |
| | | |
| | | [SerializeField] Button m_EvolutionBtn; |
| | | [SerializeField] RichText m_TexLv; |
| | | [SerializeField] RichText m_TextConent;
|
| | | private void Start()
|
| | | {
|
| | | m_EvolutionBtn.AddListener(OnClickEvolutionBtn);
|
| | | }
|
| | | public void SetEquipEvolution()
|
| | | {
|
| | |
|
| | | } |
| | | private void OnClickEvolutionBtn()
|
| | | {
|
| | |
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| File was renamed from System/Realm/SecondPraTypeCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ac27f012a5377e740809237c25859fd4 |
| | | timeCreated: 1524465087 |
| | | guid: 648b718a16cf31041af0af29d73f4485 |
| | | timeCreated: 1552470726 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class EquipStrengthFull:MonoBehaviour { |
| | | |
| | | |
| | | |
| | | public class EquipStrengthFull : MonoBehaviour
|
| | | {
|
| | | [SerializeField] ItemCell m_ItemEquip;
|
| | | [SerializeField] Text NeedMoney; |
| | | [SerializeField] Text m_AttributesText1;
|
| | | [SerializeField] Text m_AttributesText2;
|
| | | [SerializeField] Text m_AttributesText3;
|
| | | [SerializeField] Text m_TextNumber;
|
| | | [SerializeField] Text m_TextMaxLv;
|
| | |
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
|
| | | public void SetEquipStrengthFull(string equipGuid, int level, int equipPlace)
|
| | | {
|
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(level, equipPlace);
|
| | | int equipLv = 0;
|
| | | EquipStrengthClass equipStrength = new EquipStrengthClass();
|
| | | if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级
|
| | | {
|
| | | equipLv = strengthModel.EquipStrengthDic[equipIndex].EquipPartStarLV;
|
| | | equipStrength = strengthModel.EquipStrengthDic[equipIndex];
|
| | | }
|
| | | var itemPlus = strengthModel.GetEquipConfig(level, equipPlace);
|
| | | if (itemPlus == null)
|
| | | {
|
| | | DebugEx.LogError("没有索引到对应的强化表数据");
|
| | | return;
|
| | | }
|
| | | NeedMoney.text = SetMoneyText(itemPlus);
|
| | | m_TextNumber.text = "+" + equipLv;
|
| | | int equipType = strengthModel.GetEquipStrengthType(equipPlace);
|
| | | var equipMaxLv = strengthModel.EquipLevelMaxDic[equipType];
|
| | | if (equipMaxLv != null)
|
| | | {
|
| | | m_TextMaxLv.text = Language.Get("ZBQH_02", equipMaxLv.MaxStar, equipMaxLv.MaxLv);
|
| | | }
|
| | | var item = packModel.GetItemByGuid(equipGuid);
|
| | | if (item != null)
|
| | | {
|
| | | m_ItemEquip.Init(item);
|
| | | }
|
| | | var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace);
|
| | | m_AttributesText1.gameObject.SetActive(false);
|
| | | m_AttributesText2.gameObject.SetActive(false);
|
| | | m_AttributesText3.gameObject.SetActive(false);
|
| | | for (int i = 0; i < 3; i++)
|
| | | {
|
| | | if (i < equipLvNowList.Count)
|
| | | {
|
| | | int type = i;
|
| | | var _equipLv = equipLvNowList[type];
|
| | | switch (type)
|
| | | {
|
| | | case 0:
|
| | | m_AttributesText1.gameObject.SetActive(true);
|
| | | GameObject addText = m_AttributesText1.transform.Find("Number").gameObject;
|
| | | addText.SetActive(false);
|
| | | m_AttributesText1.text = _equipLv.StrName + ":" + _equipLv.AttValue;
|
| | | break;
|
| | | case 1:
|
| | | m_AttributesText2.gameObject.SetActive(true);
|
| | | GameObject addText1 = m_AttributesText2.transform.Find("Number").gameObject;
|
| | | addText1.SetActive(false);
|
| | | m_AttributesText2.text = _equipLv.StrName + ":" + _equipLv.AttValue;
|
| | | break;
|
| | | case 2:
|
| | | m_AttributesText3.gameObject.SetActive(true);
|
| | | GameObject addText2 = m_AttributesText3.transform.Find("Number").gameObject;
|
| | | addText2.SetActive(false);
|
| | | m_AttributesText3.text = _equipLv.StrName + ":" + _equipLv.AttValue;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | private string SetMoneyText(ItemPlusConfig itemPlusConfig)
|
| | | {
|
| | | string strMoneyText = string.Empty;
|
| | | ulong money = UIHelper.GetMoneyCnt(3);
|
| | | ulong needMoney = (ulong)itemPlusConfig.costCount;
|
| | | string MoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3));
|
| | | string NeedMoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(needMoney);
|
| | | if (money >= needMoney)
|
| | | {
|
| | | strMoneyText = "<color=#fffaf0>" + NeedMoneyStr + "/" + MoneyStr + "</color>";
|
| | | }
|
| | | else
|
| | | {
|
| | | strMoneyText = "<color=#ff0000>" + NeedMoneyStr + "/" + MoneyStr + "</color>";
|
| | | }
|
| | | return strMoneyText;
|
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | public int AttValue;
|
| | | public string StrName;
|
| | | }
|
| | | public class EquipMaxLvClass
|
| | | {
|
| | | public int MaxLv;
|
| | | public int MaxStar;
|
| | | }
|
| | |
|
| | | public class EquipPlusEvolveClass
|
| | | {
|
| | | public int EquipType;//装备类型
|
| | | public int EvolveLV;//进化等级
|
| | | public int NeedPlusLV;//需要强化等级
|
| | | public int CostItemID;//所需物品ID
|
| | | public int CostItemCount;//所需物品数量
|
| | | public ItemConfig Item;
|
| | | public int AttrType;
|
| | | public string AttrValue;
|
| | | public string AttrName;
|
| | | }
|
| | | public class EquipStrengthModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public Dictionary<int, EquipStrengthClass> EquipStrengthDic = new Dictionary<int, EquipStrengthClass>();//强化数据
|
| | | public Dictionary<int, int> EquipLevelMaxDic = new Dictionary<int, int>();//强化类型的最大等级上限
|
| | | public Dictionary<int, int> PartTypeDic = new Dictionary<int, int>();//强化的部位类型
|
| | | public Dictionary<int, EquipStrengthClass> EquipStrengthDic = new Dictionary<int, EquipStrengthClass>();//强化数据
|
| | | public Dictionary<int, EquipMaxLvClass> EquipLevelMaxDic = new Dictionary<int, EquipMaxLvClass>();//强化类型的最大等级上限
|
| | | public Dictionary<int, int> PartTypeDic = new Dictionary<int, int>();//强化的部位类型
|
| | | public event Action EquipStrengthUpdate;//强化数据刷新
|
| | | public event Action SelectEquipRefresh;//二级页签刷新
|
| | | public event Action SelectLevelRefresh;//一级页签刷新
|
| | |
| | | SelectLevelRefresh();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | private int selectEquipPlace = -1;//装备部位
|
| | |
| | | {
|
| | | if (EquipLevelMaxDic.ContainsKey(value.EquipType))
|
| | | {
|
| | | var lv = EquipLevelMaxDic[value.EquipType];
|
| | | var lv = EquipLevelMaxDic[value.EquipType].MaxLv;
|
| | | if (value.levelMax > lv)
|
| | | {
|
| | | EquipLevelMaxDic[value.EquipType] = value.levelMax;
|
| | | EquipLevelMaxDic[value.EquipType].MaxLv = value.levelMax;
|
| | | EquipLevelMaxDic[value.EquipType].MaxStar = value.equipStar;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | EquipLevelMaxDic.Add(value.EquipType, value.levelMax);
|
| | | EquipMaxLvClass equipMaxLvClass = new EquipMaxLvClass();
|
| | | equipMaxLvClass.MaxStar = value.equipStar;
|
| | | equipMaxLvClass.MaxLv = value.levelMax;
|
| | | EquipLevelMaxDic.Add(value.EquipType, equipMaxLvClass);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | int lv = 0;
|
| | | if (EquipLevelMaxDic.ContainsKey(type))
|
| | | {
|
| | | lv = EquipLevelMaxDic[type];
|
| | | lv = EquipLevelMaxDic[type].MaxLv;
|
| | | }
|
| | | return lv;
|
| | | }
|
| | |
|
| | | public List<EquipTypeClass> GetEquipValueList(int level, int equipPlace,int addlv=0)
|
| | | public List<EquipTypeClass> GetEquipValueList(int level, int equipPlace, int addlv = 0)
|
| | | {
|
| | | List<EquipTypeClass> EquipTypeList = new List<EquipTypeClass>();
|
| | | int type = GetEquipStrengthType(equipPlace);
|
| | | int equiplv = 0;
|
| | | int equipIndex = level * 10 + equipPlace;
|
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(level, equipPlace);
|
| | | if (EquipStrengthDic.ContainsKey(equipIndex))
|
| | | {
|
| | | equiplv = EquipStrengthDic[equipIndex].EquipPartStarLV;
|
| | |
| | | var itemPlus = ItemPlusConfig.GetTypeAndLevel(type, equiplv);
|
| | | if (itemPlus != null)
|
| | | {
|
| | | int [] attType = itemPlus.attType;
|
| | | int [] attValue = itemPlus.attValue;
|
| | | int[] attType = itemPlus.attType;
|
| | | int[] attValue = itemPlus.attValue;
|
| | | for (int i = 0; i < attType.Length; i++)
|
| | | {
|
| | | EquipTypeClass equipType = new EquipTypeClass();
|
| | |
| | | }
|
| | | EquipTypeList.Add(equipType);
|
| | | }
|
| | |
|
| | | }
|
| | | return EquipTypeList;
|
| | |
|
| | |
| | | ItemPlusConfig itemPlusConfig = new ItemPlusConfig();
|
| | | int type = GetEquipStrengthType(equipPlace);
|
| | | int equiplv = 0;
|
| | | int equipIndex = level * 10 + equipPlace;
|
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(level, equipPlace);
|
| | | if (EquipStrengthDic.ContainsKey(equipIndex))
|
| | | {
|
| | | equiplv = EquipStrengthDic[equipIndex].EquipPartStarLV;
|
| | |
| | | itemPlusConfig = ItemPlusConfig.GetTypeAndLevel(type, equiplv);
|
| | | return itemPlusConfig;
|
| | | }
|
| | |
|
| | | public EquipPlusEvolveClass GetEquipPlusEvolve(int equipType, int equipLv=0)//获取装备进化数据
|
| | | {
|
| | | EquipPlusEvolveClass equipPlusEvolve = new EquipPlusEvolveClass();
|
| | | var equipPlusEvolveConfig = EquipPlusEvolveConfig.GetEquipPlaceAndEvolveLV(equipType, equipLv);
|
| | | if (equipPlusEvolveConfig != null)
|
| | | {
|
| | | equipPlusEvolve.EquipType = equipPlusEvolveConfig.EquipPlace;
|
| | | equipPlusEvolve.EvolveLV = equipPlusEvolveConfig.EvolveLV;
|
| | | equipPlusEvolve.NeedPlusLV = equipPlusEvolveConfig.NeedPlusLV;
|
| | | var Dic1 = ConfigParse.GetDic<int, int>(equipPlusEvolveConfig.CostItem);
|
| | | foreach (var key in Dic1.Keys)
|
| | | {
|
| | | equipPlusEvolve.CostItemID = key;
|
| | | equipPlusEvolve.CostItemCount = Dic1[key];
|
| | | }
|
| | | var Dic2 = ConfigParse.GetDic<int, float>(equipPlusEvolveConfig.Attr);
|
| | | foreach (var key in Dic2.Keys)
|
| | | {
|
| | | equipPlusEvolve.AttrType = key;
|
| | | var config = PlayerPropertyConfig.Get(key);
|
| | | if (config != null)
|
| | | {
|
| | | equipPlusEvolve.AttrName = config.Name;
|
| | | float value= Dic2[key];
|
| | | switch (config.ISPercentage)
|
| | | {
|
| | | case 0:
|
| | | equipPlusEvolve.AttrValue = value.ToString();
|
| | | break;
|
| | | case 1:
|
| | | equipPlusEvolve.AttrValue = (value/100).ToString()+"%";
|
| | | break;
|
| | | case 2:
|
| | | equipPlusEvolve.AttrValue = value.ToString()+"%";
|
| | | break;
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return equipPlusEvolve;
|
| | | }
|
| | | } |
| | | |
| | | |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | using System; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class EquipStrengthRein : MonoBehaviour
|
| | | public class EquipStrengthRein : MonoBehaviour |
| | | { |
| | | [SerializeField] ItemCell m_ItemMoney;
|
| | | [SerializeField] ItemCell m_ItemMoney; |
| | | [SerializeField] ItemCell m_ItemEquip; |
| | | [SerializeField] IntensifySmoothSlider m_Slider; |
| | | [SerializeField] Text NeedMoney; |
| | | [SerializeField] Text m_AttributesText1;
|
| | | [SerializeField] Text m_AttributesText2;
|
| | | [SerializeField] Text m_AttributesText3;
|
| | | [SerializeField] Text m_SliderText;
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | [SerializeField] Text m_AttributesText1; |
| | | [SerializeField] Text m_AttributesText2; |
| | | [SerializeField] Text m_AttributesText3; |
| | | [SerializeField] Text m_SliderText; |
| | | [SerializeField] Text m_TextNumber; |
| | | [SerializeField] Text m_TextMaxLv; |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } } |
| | | public void SetEquipStrengthRein(string equipGuid,int level,int equipPlace)
|
| | | {
|
| | | //ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3));
|
| | | int equipIndex = level * 10 + equipPlace;
|
| | | int equipLv = 0;
|
| | | EquipStrengthClass equipStrength=new EquipStrengthClass();
|
| | | if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级
|
| | | {
|
| | | equipLv = strengthModel.EquipStrengthDic[equipIndex].EquipPartStarLV;
|
| | | equipStrength = strengthModel.EquipStrengthDic[equipIndex];
|
| | | }
|
| | | var itemPlus = strengthModel.GetEquipConfig(level, equipPlace);
|
| | | if (itemPlus == null)
|
| | | {
|
| | | DebugEx.LogError("没有索引到对应的强化表数据");
|
| | | return;
|
| | | }
|
| | | var item = packModel.GetItemByGuid(equipGuid);
|
| | | if (item != null)
|
| | | {
|
| | | m_ItemEquip.Init(item);
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(2100, true, (ulong)1);
|
| | | m_ItemMoney.Init(cellModel);
|
| | | var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace);
|
| | | var equipAddLvList = strengthModel.GetEquipValueList(level, equipPlace,1);
|
| | | m_AttributesText1.gameObject.SetActive(false);
|
| | | m_AttributesText2.gameObject.SetActive(false);
|
| | | m_AttributesText3.gameObject.SetActive(false);
|
| | | for (int i = 0; i < 3; i++)
|
| | | {
|
| | | if (i < equipLvNowList.Count)
|
| | | {
|
| | | int type = i;
|
| | | var _equipLv = equipLvNowList[type];
|
| | | var _equipAddLv = equipAddLvList[type];
|
| | | switch (type)
|
| | | {
|
| | | case 0:
|
| | | m_AttributesText1.gameObject.SetActive(true);
|
| | | Text addText = m_AttributesText1.transform.Find("Number").GetComponent<Text>();
|
| | |
|
| | | m_AttributesText1.text = _equipLv.StrName + ":" + _equipLv.AttValue;
|
| | | addText.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue);
|
| | | break;
|
| | | case 1:
|
| | | m_AttributesText2.gameObject.SetActive(true);
|
| | | Text addText1 = m_AttributesText2.transform.Find("Number").GetComponent<Text>();
|
| | | m_AttributesText2.text = _equipLv.StrName + ":" + _equipLv.AttValue;
|
| | | addText1.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue);
|
| | | break;
|
| | | case 2:
|
| | | m_AttributesText3.gameObject.SetActive(true);
|
| | | Text addText2 = m_AttributesText3.transform.Find("Number").GetComponent<Text>();
|
| | | m_AttributesText3.text = _equipLv.StrName + ":" + _equipLv.AttValue;
|
| | | addText2.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | m_SliderText.text = equipStrength.Proficiency + "/" + itemPlus.upExpNeed;
|
| | | if (strengthModel.IsChangeBool)
|
| | | {
|
| | | strengthModel.IsChangeBool = false;
|
| | | m_Slider.delay = 0f;
|
| | | m_Slider.stage = equipLv;
|
| | | m_Slider.ResetStage();
|
| | | m_Slider.value = (float)Math.Round((double)equipStrength.Proficiency/ itemPlus.upExpNeed, 2, MidpointRounding.AwayFromZero);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Slider.delay = 0.2f;
|
| | | m_Slider.stage = equipLv;
|
| | | m_Slider.value = (float)Math.Round((double)equipStrength.Proficiency / itemPlus.upExpNeed, 2, MidpointRounding.AwayFromZero);
|
| | | }
|
| | | public void SetEquipStrengthRein(string equipGuid,int level,int equipPlace) |
| | | { |
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(level, equipPlace); |
| | | int equipLv = 0; |
| | | EquipStrengthClass equipStrength=new EquipStrengthClass(); |
| | | if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级 |
| | | { |
| | | equipLv = strengthModel.EquipStrengthDic[equipIndex].EquipPartStarLV; |
| | | equipStrength = strengthModel.EquipStrengthDic[equipIndex]; |
| | | } |
| | | var itemPlus = strengthModel.GetEquipConfig(level, equipPlace); |
| | | if (itemPlus == null) |
| | | { |
| | | DebugEx.LogError("没有索引到对应的强化表数据"); |
| | | return; |
| | | } |
| | | var item = packModel.GetItemByGuid(equipGuid); |
| | | if (item != null) |
| | | { |
| | | m_ItemEquip.Init(item); |
| | | } |
| | | m_TextNumber.text = "+" + (equipLv + 1); |
| | | NeedMoney.text = SetMoneyText(itemPlus); |
| | | int equipType = strengthModel.GetEquipStrengthType(equipPlace); |
| | | var equipMaxLv = strengthModel.EquipLevelMaxDic[equipType]; |
| | | if (equipMaxLv != null) |
| | | { |
| | | m_TextMaxLv.text = Language.Get("ZBQH_02", equipMaxLv.MaxStar, equipMaxLv.MaxLv); |
| | | } |
| | | ItemCellModel cellModel = new ItemCellModel(2100, true, (ulong)1); |
| | | m_ItemMoney.Init(cellModel); |
| | | var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace); |
| | | var equipAddLvList = strengthModel.GetEquipValueList(level, equipPlace,1); |
| | | m_AttributesText1.gameObject.SetActive(false); |
| | | m_AttributesText2.gameObject.SetActive(false); |
| | | m_AttributesText3.gameObject.SetActive(false); |
| | | for (int i = 0; i < 3; i++) |
| | | { |
| | | if (i < equipLvNowList.Count) |
| | | { |
| | | int type = i; |
| | | var _equipLv = equipLvNowList[type]; |
| | | var _equipAddLv = equipAddLvList[type]; |
| | | switch (type) |
| | | { |
| | | case 0: |
| | | m_AttributesText1.gameObject.SetActive(true); |
| | | Text addText = m_AttributesText1.transform.Find("Number").GetComponent<Text>(); |
| | | |
| | | m_AttributesText1.text = _equipLv.StrName + ":" + _equipLv.AttValue; |
| | | addText.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue); |
| | | break; |
| | | case 1: |
| | | m_AttributesText2.gameObject.SetActive(true); |
| | | Text addText1 = m_AttributesText2.transform.Find("Number").GetComponent<Text>(); |
| | | m_AttributesText2.text = _equipLv.StrName + ":" + _equipLv.AttValue; |
| | | addText1.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue); |
| | | break; |
| | | case 2: |
| | | m_AttributesText3.gameObject.SetActive(true); |
| | | Text addText2 = m_AttributesText3.transform.Find("Number").GetComponent<Text>(); |
| | | m_AttributesText3.text = _equipLv.StrName + ":" + _equipLv.AttValue; |
| | | addText2.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | m_SliderText.text = equipStrength.Proficiency + "/" + itemPlus.upExpNeed; |
| | | if (strengthModel.IsChangeBool) |
| | | { |
| | | strengthModel.IsChangeBool = false; |
| | | m_Slider.delay = 0f; |
| | | m_Slider.stage = equipLv; |
| | | m_Slider.ResetStage(); |
| | | m_Slider.value = (float)Math.Round((double)equipStrength.Proficiency/ itemPlus.upExpNeed, 2, MidpointRounding.AwayFromZero); |
| | | } |
| | | else |
| | | { |
| | | m_Slider.delay = 0.2f; |
| | | m_Slider.stage = equipLv; |
| | | m_Slider.value = (float)Math.Round((double)equipStrength.Proficiency / itemPlus.upExpNeed, 2, MidpointRounding.AwayFromZero); |
| | | } |
| | | } |
| | | |
| | | private string SetMoneyText(ItemPlusConfig itemPlusConfig) |
| | | { |
| | | string strMoneyText = string.Empty; |
| | | ulong money = UIHelper.GetMoneyCnt(3); |
| | | ulong needMoney = (ulong)itemPlusConfig.costCount; |
| | | string MoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3)); |
| | | string NeedMoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(needMoney); |
| | | if (money >= needMoney) |
| | | { |
| | | strMoneyText = "<color=#fffaf0>" + NeedMoneyStr + "/"+ MoneyStr + "</color>"; |
| | | } |
| | | else |
| | | { |
| | | strMoneyText = "<color=#ff0000>" + NeedMoneyStr + "/" + MoneyStr + "</color>"; |
| | | } |
| | | return strMoneyText; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | |
|
| | | void DisplayBase()
|
| | | {
|
| | | int itemIndex = EquipPlaceMapConfig.GetServerPlace(equipLevel, equipPlace);
|
| | | var strengthLv = 0;
|
| | | if (strengthModel.EquipStrengthDic.ContainsKey(itemIndex))
|
| | | {
|
| | | strengthLv = strengthModel.EquipStrengthDic[itemIndex].EquipPartStarLV;
|
| | | }
|
| | | var item = packModel.GetItemByGuid(equipGuid);
|
| | | if (item != null)
|
| | | {
|
| | | m_Item.Init(item);
|
| | | m_ItemName.text = item.config.ItemName;
|
| | | m_Item.Init(item); |
| | | m_ItemName.text = Language.Get("ZBQH_01", item.config.ItemName, strengthLv);
|
| | | m_ItemName.color = UIHelper.GetUIColor(item.config.ItemColor, true);
|
| | | }
|
| | | }
|
| | |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class EquipStrengthUpper:MonoBehaviour { |
| | | |
| | | |
| | | |
| | | public class EquipStrengthUpper : MonoBehaviour
|
| | | {
|
| | | [SerializeField] ItemCell m_ItemEquip; |
| | | [SerializeField] Text NeedMoney; |
| | | [SerializeField] Text m_AttributesText1;
|
| | | [SerializeField] Text m_AttributesText2;
|
| | | [SerializeField] Text m_AttributesText3;
|
| | | [SerializeField] Text m_TextNumber;
|
| | | [SerializeField] Text m_TextMaxLv;
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } } |
| | | public void SetEquipStrengthUpper(string equipGuid, int level, int equipPlace)
|
| | | {
|
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(level, equipPlace);
|
| | | int equipLv = 0;
|
| | | EquipStrengthClass equipStrength = new EquipStrengthClass();
|
| | | if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级
|
| | | {
|
| | | equipLv = strengthModel.EquipStrengthDic[equipIndex].EquipPartStarLV;
|
| | | equipStrength = strengthModel.EquipStrengthDic[equipIndex];
|
| | | }
|
| | | var itemPlus = strengthModel.GetEquipConfig(level, equipPlace);
|
| | | if (itemPlus == null)
|
| | | {
|
| | | DebugEx.LogError("没有索引到对应的强化表数据");
|
| | | return;
|
| | | }
|
| | | NeedMoney.text = SetMoneyText(itemPlus);
|
| | | m_TextNumber.text = "+" + (equipLv + 1);
|
| | | int equipType = strengthModel.GetEquipStrengthType(equipPlace);
|
| | | var equipMaxLv = strengthModel.EquipLevelMaxDic[equipType];
|
| | | if (equipMaxLv != null)
|
| | | {
|
| | | m_TextMaxLv.text = Language.Get("ZBQH_02", equipMaxLv.MaxStar, equipMaxLv.MaxLv);
|
| | | }
|
| | | var item = packModel.GetItemByGuid(equipGuid);
|
| | | if (item != null)
|
| | | {
|
| | | m_ItemEquip.Init(item);
|
| | | }
|
| | | var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace);
|
| | | var equipAddLvList = strengthModel.GetEquipValueList(level, equipPlace, 1);
|
| | | m_AttributesText1.gameObject.SetActive(false);
|
| | | m_AttributesText2.gameObject.SetActive(false);
|
| | | m_AttributesText3.gameObject.SetActive(false);
|
| | | for (int i = 0; i < 3; i++)
|
| | | {
|
| | | if (i < equipLvNowList.Count)
|
| | | {
|
| | | int type = i;
|
| | | var _equipLv = equipLvNowList[type];
|
| | | var _equipAddLv = equipAddLvList[type];
|
| | | switch (type)
|
| | | {
|
| | | case 0:
|
| | | m_AttributesText1.gameObject.SetActive(true);
|
| | | Text addText = m_AttributesText1.transform.Find("Number").GetComponent<Text>();
|
| | |
|
| | | m_AttributesText1.text = _equipLv.StrName + ":" + _equipLv.AttValue;
|
| | | addText.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue);
|
| | | break;
|
| | | case 1:
|
| | | m_AttributesText2.gameObject.SetActive(true);
|
| | | Text addText1 = m_AttributesText2.transform.Find("Number").GetComponent<Text>();
|
| | | m_AttributesText2.text = _equipLv.StrName + ":" + _equipLv.AttValue;
|
| | | addText1.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue);
|
| | | break;
|
| | | case 2:
|
| | | m_AttributesText3.gameObject.SetActive(true);
|
| | | Text addText2 = m_AttributesText3.transform.Find("Number").GetComponent<Text>();
|
| | | m_AttributesText3.text = _equipLv.StrName + ":" + _equipLv.AttValue;
|
| | | addText2.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | private string SetMoneyText(ItemPlusConfig itemPlusConfig)
|
| | | {
|
| | | string strMoneyText = string.Empty;
|
| | | ulong money = UIHelper.GetMoneyCnt(3);
|
| | | ulong needMoney = (ulong)itemPlusConfig.costCount;
|
| | | string MoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3));
|
| | | string NeedMoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(needMoney);
|
| | | if (money >= needMoney)
|
| | | {
|
| | | strMoneyText = "<color=#fffaf0>" + NeedMoneyStr + "/" + MoneyStr + "</color>";
|
| | | }
|
| | | else
|
| | | {
|
| | | strMoneyText = "<color=#ff0000>" + NeedMoneyStr + "/" + MoneyStr + "</color>";
|
| | | }
|
| | | return strMoneyText;
|
| | | }
|
| | | } |
| | | |
| | | } |
| | |
| | | [SerializeField] EquipStrengthFull m_EquipStrengthFull;//满级
|
| | | [SerializeField] EquipStrengthUpper m_EquipStrengthUpper;//强化上限
|
| | | [SerializeField] EquipStrengthRein m_EquipStrengthRein;//可强化
|
| | | [SerializeField] EquipEvolution m_EquipEvolution;//进阶
|
| | | [SerializeField] GameObject m_BottomFrame;
|
| | | [SerializeField] Button m_StrengBtn;
|
| | | [SerializeField] Button m_AutomaticBtn;
|
| | |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | EquipStarModel equipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | | |
| | | private bool IsAutomaticBool = false; |
| | | private float WaitTime = 0.1f; |
| | | private float Times = 0f; |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | |
|
| | | strengthModel.IsChangeBool = true;
|
| | | IsAutomaticBool = false;
|
| | | Times = 0f;
|
| | | m_StopBtn.gameObject.SetActive(false);
|
| | | m_AutomaticBtn.gameObject.SetActive(true);
|
| | |
|
| | | OpenSelect();//默认选择 |
| | | DisplayEquips();
|
| | | SetStrengthenedState();
|
| | | strengthModel.SelectEquipRefresh += SelectEquipRefresh;
|
| | | strengthModel.SelectLevelRefresh += SelectLevelRefresh;
|
| | | strengthModel.EquipStrengthUpdate += EquipStrengthUpdate; |
| | |
| | | strengthModel.SelectEquipRefresh -= SelectEquipRefresh;
|
| | | strengthModel.SelectLevelRefresh -= SelectLevelRefresh;
|
| | | strengthModel.EquipStrengthUpdate -= EquipStrengthUpdate; |
| | | |
| | | }
|
| | |
|
| | |
|
| | |
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | if (IsAutomaticBool)
|
| | | {
|
| | | Times += Time.deltaTime;
|
| | | var isBool = StrengtheBool();
|
| | | var upperLimitBool = UpperLimitBool();
|
| | | if (Times >= WaitTime && isBool && upperLimitBool)
|
| | | {
|
| | | Times = 0;
|
| | | int itemIndex = EquipPlaceMapConfig.GetServerPlace(strengthModel.SelectLevel, strengthModel.SelectEquipPlace);
|
| | | strengthModel.SendEquip(itemIndex);
|
| | | }
|
| | | else if (!isBool || !upperLimitBool)
|
| | | {
|
| | | IsAutomaticBool = false;
|
| | | OnClickStopBtn();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | Times = 0f;
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void OnClickStrengBtn()
|
| | | {
|
| | | int itemIndex = strengthModel.SelectLevel * 10 + strengthModel.SelectEquipPlace;
|
| | | strengthModel.SendEquip(itemIndex);
|
| | | if (StrengtheBool())
|
| | | {
|
| | | int itemIndex = EquipPlaceMapConfig.GetServerPlace(strengthModel.SelectLevel, strengthModel.SelectEquipPlace);
|
| | | strengthModel.SendEquip(itemIndex);
|
| | | }
|
| | |
|
| | | }
|
| | | private void OnClickAutomaticBtn()
|
| | | {
|
| | | m_StopBtn.gameObject.SetActive(true);
|
| | | m_AutomaticBtn.gameObject.SetActive(false);
|
| | | if (StrengtheBool())
|
| | | {
|
| | | IsAutomaticBool = true;
|
| | | m_StopBtn.gameObject.SetActive(true);
|
| | | m_AutomaticBtn.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | }
|
| | | private void OnClickStopBtn()
|
| | | {
|
| | | IsAutomaticBool = false;
|
| | | m_StopBtn.gameObject.SetActive(false);
|
| | | m_AutomaticBtn.gameObject.SetActive(true);
|
| | |
|
| | | }
|
| | | private void EquipStrengthUpdate()
|
| | | {
|
| | | SetStrengthenedState();
|
| | | if (strengthModel.SelectLevel != -1)
|
| | | {
|
| | | SetStrengthenedState();
|
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | } |
| | | }
|
| | | void DisplayEquips()
|
| | | {
|
| | |
| | | private void SelectEquipRefresh()
|
| | | {
|
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | strengthModel.IsChangeBool = true;
|
| | | SetStrengthenedState();
|
| | | if (IsAutomaticBool)
|
| | | {
|
| | | Times = 0f;
|
| | | OnClickStopBtn();
|
| | | IsAutomaticBool = false;
|
| | | }
|
| | | }
|
| | |
|
| | | private void SelectLevelRefresh()
|
| | | {
|
| | | DisplayEquips();
|
| | | strengthModel.IsChangeBool = true;
|
| | | if (IsAutomaticBool)
|
| | | {
|
| | | Times = 0f;
|
| | | OnClickStopBtn();
|
| | | IsAutomaticBool = false;
|
| | | }
|
| | | DisplayEquips(); |
| | | if (strengthModel.SelectLevel != -1)
|
| | | {
|
| | | SetStrengthenedState();
|
| | | }
|
| | |
|
| | | } |
| | | private void OnRefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | |
| | | m_EquipStrengthFull.gameObject.SetActive(false);
|
| | | m_EquipStrengthUpper.gameObject.SetActive(false);
|
| | | m_EquipStrengthRein.gameObject.SetActive(false);
|
| | | m_EquipEvolution.gameObject.SetActive(false);
|
| | | int equipLevel = strengthModel.SelectLevel;
|
| | | int equipPlace = strengthModel.SelectEquipPlace;
|
| | | var equipSet = equipModel.GetEquipSet(equipLevel);
|
| | |
| | | var equiped = !string.IsNullOrEmpty(equipGuid);
|
| | | if (equiped)
|
| | | {
|
| | | int equipIndex = equipLevel * 10 + equipPlace;
|
| | | int star= equipStarModel.GetEquipStarLevel(equipLevel, equipPlace);
|
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(equipLevel, equipPlace);
|
| | | int star = equipStarModel.GetEquipStarLevel(equipLevel, equipPlace);
|
| | | int equipLv = 0;
|
| | | if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | int equipType = strengthModel.GetEquipStrengthType(equipPlace);
|
| | | var itemPlusMaxConfig = ItemPlusMaxConfig.GetEquipTypeAndEquipStar(equipType, equipPlace);//获取强化等级上限值
|
| | | var itemPlusMaxConfig = ItemPlusMaxConfig.GetEquipTypeAndEquipStar(equipType, star);//获取强化等级上限值
|
| | | if (itemPlusMaxConfig == null)
|
| | | {
|
| | | DebugEx.LogError("未查找到表数据");
|
| | |
| | | }
|
| | |
|
| | | int maxLv = strengthModel.GetEquipLevelMax(equipType);//获取最大强化等级
|
| | |
|
| | | m_EquipEvolution.gameObject.SetActive(true);
|
| | | if (equipLv >= maxLv)//满级
|
| | | {
|
| | | m_BottomFrame.SetActive(false);
|
| | | m_EquipStrengthFull.gameObject.SetActive(true);
|
| | | m_EquipStrengthFull.gameObject.SetActive(true); |
| | | m_EquipStrengthFull.SetEquipStrengthFull(equipGuid, equipLevel, equipPlace);
|
| | | }
|
| | | else if (maxLv > equipLv && equipLv >= itemPlusMaxConfig.levelMax)//强化上限
|
| | | {
|
| | | m_BottomFrame.SetActive(false);
|
| | | m_EquipStrengthUpper.gameObject.SetActive(true);
|
| | |
|
| | | m_EquipStrengthUpper.SetEquipStrengthUpper(equipGuid, equipLevel, equipPlace);
|
| | | }
|
| | | else if (itemPlusMaxConfig.levelMax > equipLv)//可强化过
|
| | | {
|
| | |
| | | m_NotEquipped.SetActive(true);
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | private void OpenSelect()
|
| | | {
|
| | | strengthModel.SelectLevel = -1;
|
| | | strengthModel.SelectEquipPlace = -1;
|
| | | var equipSets = equipModel.GetAllEquipSets();
|
| | | foreach (var level in equipSets)
|
| | | {
|
| | | var equipSet = equipModel.GetEquipSet(level);
|
| | | if (equipSet == null)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | if (equipSet.unLocked)
|
| | | {
|
| | | var slotCount = model.GetUnlockEquipSlotCount(level);
|
| | | if (slotCount > 0)
|
| | | {
|
| | | if (strengthModel.SelectLevel == -1)
|
| | | {
|
| | | strengthModel.SelectLevel = level;
|
| | | }
|
| | | if (strengthModel.SelectLevel == level)
|
| | | {
|
| | | var places = model.GetMosaicEquipPlaces();
|
| | | foreach (var place in places)
|
| | | {
|
| | | if (strengthModel.SelectEquipPlace == -1)
|
| | | {
|
| | | strengthModel.SelectEquipPlace = place;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private bool StrengtheBool()
|
| | | {
|
| | | bool isbool = false;
|
| | | var itemPlus = strengthModel.GetEquipConfig(strengthModel.SelectLevel, strengthModel.SelectEquipPlace);
|
| | | if (itemPlus == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | ulong money = UIHelper.GetMoneyCnt(3);
|
| | | ulong needMoney = (ulong)itemPlus.costCount;
|
| | | if (money >= needMoney)
|
| | | {
|
| | | isbool = true;
|
| | | }
|
| | | else
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("Z1011"));
|
| | | isbool = false;
|
| | | }
|
| | |
|
| | | return isbool;
|
| | | }
|
| | | private bool UpperLimitBool()
|
| | | {
|
| | | bool isBool = false;
|
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(strengthModel.SelectLevel, strengthModel.SelectEquipPlace);
|
| | | int star = equipStarModel.GetEquipStarLevel(strengthModel.SelectLevel, strengthModel.SelectEquipPlace);
|
| | | int equipLv = 0;
|
| | | if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级
|
| | | {
|
| | | equipLv = strengthModel.EquipStrengthDic[equipIndex].EquipPartStarLV;
|
| | | }
|
| | | int equipType = strengthModel.GetEquipStrengthType(strengthModel.SelectEquipPlace);
|
| | | var itemPlusMaxConfig = ItemPlusMaxConfig.GetEquipTypeAndEquipStar(equipType, star);//获取强化等级上限值
|
| | | if (itemPlusMaxConfig.levelMax > equipLv)
|
| | | {
|
| | | isBool = true;
|
| | | }
|
| | | else
|
| | | {
|
| | | isBool = false;
|
| | | }
|
| | |
|
| | | return isBool;
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | {
|
| | | gridCell.itemCellBtn.OnOneParaClick = (int info) =>
|
| | | {
|
| | | if (itemModel.itemInfo.isBind!= 1)
|
| | | if (itemModel.itemInfo.isBind== 1)
|
| | | {
|
| | | AuctionHelpModel auctionHelpModel = ModelCenter.Instance.GetModel<AuctionHelpModel>();
|
| | | auctionHelpModel.ItemModel = itemModel;
|
| | |
| | | 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)
|
| | |
| | |
|
| | | private void RedpointValueChangeEvent(int _id)
|
| | | {
|
| | | if (_id == realmModel.realmRedpoint.id)
|
| | | if (_id == realmModel.levelUpRedpoint.id)
|
| | | {
|
| | | CheckRealmSfx();
|
| | | }
|
| New file |
| | |
| | | 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();
|
| | | }
|
| | | }
|
| | | } |
| | | |
copy from System/Realm/SecondPraTypeCell.cs.meta
copy to System/Realm/RealmAnimationBehaviour.cs.meta
| File was copied from System/Realm/SecondPraTypeCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ac27f012a5377e740809237c25859fd4 |
| | | timeCreated: 1524465087 |
| | | guid: 61373bae0e710a94189beb54b777a035 |
| | | timeCreated: 1552443812 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | 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()
|
| | | {
|
| | |
|
| | | }
|
| | | }
|
| | | } |
| | | |
copy from System/Realm/SecondPraTypeCell.cs.meta
copy to System/Realm/RealmBriefBehaviour.cs.meta
| File was copied from System/Realm/SecondPraTypeCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ac27f012a5377e740809237c25859fd4 |
| | | timeCreated: 1524465087 |
| | | guid: f06b05882f781f94c92d48a2906a3236 |
| | | timeCreated: 1552297489 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | 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);
|
| | | }
|
| | | }
|
| | | } |
| | | |
copy from System/Realm/SecondPraTypeCell.cs.meta
copy to System/Realm/RealmHeartMagicBehaviour.cs.meta
| File was copied from System/Realm/SecondPraTypeCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ac27f012a5377e740809237c25859fd4 |
| | | timeCreated: 1524465087 |
| | | guid: 601311942a76af14bbf33e6347d041e8 |
| | | timeCreated: 1552455695 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | 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);
|
| | | }
|
| | | }
|
| | | } |
| | | |
copy from System/Realm/SecondPraTypeCell.cs.meta
copy to System/Realm/RealmLevelUpBehaviour.cs.meta
| File was copied from System/Realm/SecondPraTypeCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ac27f012a5377e740809237c25859fd4 |
| | | timeCreated: 1524465087 |
| | | guid: 53b362c7475d93e40bb79502f81e03d3 |
| | | timeCreated: 1552381921 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | 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;
|
| | | }
|
| | | }
|
| | | } |
| File was renamed from Core/GameEngine/Model/Player/Realm/RealmModel.cs.meta |
| | |
| | | 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: |
| | |
| | | using System.Collections; |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | |
|
| | | using UnityEngine; |
| | |
| | | {
|
| | | 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();
|
| | | }
|
| | | } |
| | | } |
| | |
| | | [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.AppendColor(TextColType.Green, Language.Get("RolePromoteBetterFight")),
|
| | | UIHelper.AppendColor(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();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | 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()
|
| | |
| | |
|
| | | 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()
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | CloseChildWin();
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | }
|
| | | #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);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | _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)
|
| | | {
|
| | |
| | | switch (_mapId)
|
| | | {
|
| | | case RealmModel.REALM_DUNGEON_ID:
|
| | | var realmModel = ModelCenter.Instance.GetModel<RealmModel>();
|
| | | realmModel.GotoDungeon();
|
| | | break;
|
| | | case 31080:
|
| | | {
|
| | |
| | |
|
| | | 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);
|
| | |
| | |
|
| | | 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);
|
| | |
| | | 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;
|
| | | }
|
| | |
|
| | |
| | | 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)
|
| | |
| | | normalTasks.Add(new ConfigInitTask("EquipSuitConfig", () => { EquipSuitConfig.Init(); }, () => { return EquipSuitConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipStarConfig", () => { EquipStarConfig.Init(); }, () => { return EquipStarConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("WashLevelMaxConfig", () => { WashLevelMaxConfig.Init(); }, () => { return WashLevelMaxConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipPlusEvolveConfig", () => { EquipPlusEvolveConfig.Init(); }, () => { return EquipPlusEvolveConfig.inited; })); |
| | | } |
| | | |
| | | static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>(); |