| | |
| | | public readonly int Quality;
|
| | | public readonly int FightPower;
|
| | | public readonly string equipNameIcon;
|
| | | public readonly int[] equips;
|
| | | public readonly string equips;
|
| | | public readonly int effectId;
|
| | | public readonly int requireIconEffect; |
| | | |
| | |
| | |
|
| | | equipNameIcon = tables[11];
|
| | |
|
| | | string[] equipsStringArray = tables[12].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | equips = new int[equipsStringArray.Length]; |
| | | for (int i=0;i<equipsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(equipsStringArray[i],out equips[i]); |
| | | }
|
| | | equips = tables[12];
|
| | |
|
| | | int.TryParse(tables[13],out effectId);
|
| | |
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: d49ca04ff4a91bc4fb645c417f9ef0b3 |
| | | timeCreated: 1552547353 |
| | | timeCreated: 1552548022 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | public static int selectRealmLevel = 0;
|
| | |
|
| | | RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | var config = RealmConfig.Get(selectRealmLevel);
|
| | | m_EquipName.SetSprite(config.equipNameIcon);
|
| | |
|
| | |
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | int[] equips = null;
|
| | | model.TryGetRealmPreviewEquips(selectRealmLevel, job, out equips);
|
| | |
|
| | | UI3DModelExhibition.Instance.ShowPlayer(m_RawPlayer, new UI3DPlayerExhibitionData()
|
| | | {
|
| | | job = job,
|
| | | clothesId = config.equips != null && config.equips.Length > 0 ? config.equips[0] : 0,
|
| | | weaponId = config.equips != null && config.equips.Length > 1 ? config.equips[1] : 0,
|
| | | secondaryId = config.equips != null && config.equips.Length > 2 ? config.equips[2] : 0,
|
| | | clothesId = equips != null && equips.Length > 0 ? equips[0] : 0,
|
| | | weaponId = equips != null && equips.Length > 1 ? equips[1] : 0,
|
| | | secondaryId = equips != null && equips.Length > 2 ? equips[2] : 0,
|
| | | suitLevel = 1,
|
| | | });
|
| | | }
|
| | |
| | | public void DisplayBoss(int realmLevel)
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | m_Condition.text = Language.Get("RealmConditionBoss", config.Name);
|
| | | var label = UIHelper.GetRealmColorByLv(realmLevel, StringUtility.Contact("[", config.Name, "]"));
|
| | | m_Condition.text = Language.Get("RealmConditionBoss", label);
|
| | | var progress = model.isBossPass ? 1 : 0;
|
| | | m_Progress.text = StringUtility.Contact(progress, "/", 1);
|
| | | m_Progress.color = model.isBossPass ? UIHelper.s_LightGreen : UIHelper.s_DarkRedColor;
|
| | |
| | | public class RealmModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize
|
| | | {
|
| | | Dictionary<int, Dictionary<int, int>> m_RealmProperties = new Dictionary<int, Dictionary<int, int>>();
|
| | | Dictionary<int, Dictionary<int, int[]>> m_RealmPreviewEquips = 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; }
|
| | |
| | | stages.Add(config.Lv + 1);
|
| | | }
|
| | | }
|
| | |
|
| | | if (!string.IsNullOrEmpty(config.equips))
|
| | | {
|
| | | var json = LitJson.JsonMapper.ToObject(config.equips);
|
| | | Dictionary<int, int[]> dict = new Dictionary<int, int[]>();
|
| | | foreach (var jobKey in json.Keys)
|
| | | {
|
| | | var job = int.Parse(jobKey);
|
| | | var equipArray = LitJson.JsonMapper.ToObject<int[]>(json[jobKey].ToJson());
|
| | | dict.Add(job, equipArray);
|
| | | }
|
| | | m_RealmPreviewEquips.Add(config.Lv, dict);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetRealmPreviewEquips(int level, int job, out int[] equips)
|
| | | {
|
| | | equips = null;
|
| | | if (m_RealmPreviewEquips.ContainsKey(level))
|
| | | {
|
| | | return m_RealmPreviewEquips[level].TryGetValue(job, out equips);
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsUnlockEquipRealm(int realmLevel, out int level)
|
| | | {
|
| | | level = 0;
|