Merge branch 'master' into ItemReconstruction
# Conflicts:
# Core/NetworkPackage/DTCFile/ServerPack/H03_MainCharacter/DTC0310_tagRoleSkillChange.cs
# System/Treasure/TreasureLevelUpWin.cs
# System/Treasure/TreasureModel.cs
# System/Treasure/TreasurePotentialPanel.cs
# System/WindowBase/ModelCenter.cs
4 文件已复制
13个文件已删除
3 文件已重命名
7个文件已添加
48个文件已修改
| | |
| | | //--------------------------------------------------------
|
| | | // [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 TreasureConfig
|
| | | {
|
| | |
|
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Wednesday, February 20, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class TreasureConfig |
| | | { |
| | | |
| | | public readonly int ID;
|
| | | public readonly int Category;
|
| | | public readonly int PreTreasure;
|
| | |
| | | public readonly int MapId;
|
| | | public readonly int LineId;
|
| | | public readonly int ChallengeLevel;
|
| | | public readonly int[] Potentials;
|
| | | public readonly int[] SkillPower;
|
| | | public readonly string NeedItem;
|
| | | public readonly int EffectID;
|
| | | public readonly string[] Verse;
|
| | | public readonly int ShowNetGotEffect;
|
| | | public readonly int PreferredStage;
|
| | | public readonly int UIScale;
|
| | |
|
| | | public TreasureConfig()
|
| | | {
|
| | | }
|
| | |
|
| | | public TreasureConfig(string input)
|
| | | {
|
| | | try
|
| | | {
|
| | | var tables = input.Split('\t');
|
| | |
|
| | | public readonly int UIScale; |
| | | |
| | | public TreasureConfig() |
| | | { |
| | | } |
| | | |
| | | public TreasureConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out ID);
|
| | |
|
| | | int.TryParse(tables[1],out Category);
|
| | |
| | |
|
| | | int.TryParse(tables[16],out ChallengeLevel);
|
| | |
|
| | | string[] PotentialsStringArray = tables[17].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Potentials = new int[PotentialsStringArray.Length]; |
| | | for (int i=0;i<PotentialsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(PotentialsStringArray[i],out Potentials[i]); |
| | | }
|
| | | int.TryParse(tables[17],out EffectID); |
| | |
|
| | | string[] SkillPowerStringArray = tables[18].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | SkillPower = new int[SkillPowerStringArray.Length]; |
| | | for (int i=0;i<SkillPowerStringArray.Length;i++) |
| | | { |
| | | int.TryParse(SkillPowerStringArray[i],out SkillPower[i]); |
| | | }
|
| | | Verse = tables[18].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
| | |
|
| | | NeedItem = tables[19];
|
| | | int.TryParse(tables[19],out ShowNetGotEffect); |
| | |
|
| | | int.TryParse(tables[20],out EffectID); |
| | | int.TryParse(tables[20],out PreferredStage); |
| | |
|
| | | Verse = tables[21].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
| | |
|
| | | int.TryParse(tables[22],out ShowNetGotEffect); |
| | |
|
| | | int.TryParse(tables[23],out PreferredStage); |
| | |
|
| | | int.TryParse(tables[24],out UIScale); |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | | }
|
| | |
|
| | | static Dictionary<string, TreasureConfig> configs = new Dictionary<string, TreasureConfig>();
|
| | | public static TreasureConfig Get(string id)
|
| | | { |
| | | if (!inited)
|
| | | {
|
| | | Debug.Log("TreasureConfig 还未完成初始化。");
|
| | | return null;
|
| | | }
|
| | | |
| | | if (configs.ContainsKey(id))
|
| | | {
|
| | | return configs[id];
|
| | | }
|
| | |
|
| | | TreasureConfig config = null;
|
| | | if (rawDatas.ContainsKey(id))
|
| | | {
|
| | | config = configs[id] = new TreasureConfig(rawDatas[id]);
|
| | | rawDatas.Remove(id);
|
| | | }
|
| | |
|
| | | return config;
|
| | | }
|
| | |
|
| | | public static TreasureConfig 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<TreasureConfig> GetValues()
|
| | | {
|
| | | var values = new List<TreasureConfig>();
|
| | | 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 +"/Treasure.txt";
|
| | | }
|
| | | else
|
| | | {
|
| | | path = AssetVersionUtility.GetAssetFilePath("config/Treasure.txt");
|
| | | }
|
| | |
|
| | | var tempConfig = new TreasureConfig();
|
| | | 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 TreasureConfig(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 TreasureConfig(line);
|
| | | configs[id] = config;
|
| | | (config as IConfigPostProcess).OnConfigParseCompleted();
|
| | | }
|
| | | else
|
| | | {
|
| | | rawDatas[id] = line;
|
| | | }
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | | Debug.LogError(ex);
|
| | | }
|
| | | }
|
| | |
|
| | | inited = true;
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | int.TryParse(tables[21],out UIScale); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, TreasureConfig> configs = new Dictionary<string, TreasureConfig>(); |
| | | public static TreasureConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("TreasureConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | TreasureConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new TreasureConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static TreasureConfig 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<TreasureConfig> GetValues() |
| | | { |
| | | var values = new List<TreasureConfig>(); |
| | | 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 +"/Treasure.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/Treasure.txt"); |
| | | } |
| | | |
| | | var tempConfig = new TreasureConfig(); |
| | | 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 TreasureConfig(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 TreasureConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Thursday, February 14, 2019 |
| | | // [ Date ]: Wednesday, February 20, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | public partial class TreasureSkillConfig |
| | | { |
| | | |
| | | public readonly int ID; |
| | | public readonly int SkillType; |
| | | public readonly int SkillLv; |
| | | public readonly int MeterialNum1; |
| | | public readonly int InitialRate; |
| | | public readonly int[] Meterial2ID; |
| | | public readonly int[] MeterialNum2; |
| | | public readonly int[] Rate; |
| | | public readonly int id;
|
| | | public readonly int limitSkillId;
|
| | | public readonly int limitLevel; |
| | | |
| | | public TreasureSkillConfig() |
| | | { |
| | |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | | int.TryParse(tables[1],out SkillType); |
| | | |
| | | int.TryParse(tables[2],out SkillLv); |
| | | |
| | | int.TryParse(tables[3],out MeterialNum1); |
| | | |
| | | int.TryParse(tables[4],out InitialRate); |
| | | |
| | | string[] Meterial2IDStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Meterial2ID = new int[Meterial2IDStringArray.Length]; |
| | | for (int i=0;i<Meterial2IDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(Meterial2IDStringArray[i],out Meterial2ID[i]); |
| | | } |
| | | |
| | | string[] MeterialNum2StringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | MeterialNum2 = new int[MeterialNum2StringArray.Length]; |
| | | for (int i=0;i<MeterialNum2StringArray.Length;i++) |
| | | { |
| | | int.TryParse(MeterialNum2StringArray[i],out MeterialNum2[i]); |
| | | } |
| | | |
| | | string[] RateStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Rate = new int[RateStringArray.Length]; |
| | | for (int i=0;i<RateStringArray.Length;i++) |
| | | { |
| | | int.TryParse(RateStringArray[i],out Rate[i]); |
| | | } |
| | | int.TryParse(tables[0],out id); |
| | |
|
| | | int.TryParse(tables[1],out limitSkillId); |
| | |
|
| | | int.TryParse(tables[2],out limitLevel); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | public delegate void SkillChangeHandler(int OldSkillId, int NewSkillId);
|
| | | public static event SkillChangeHandler SkillChangeEvent;
|
| | |
|
| | | TreasureModel m_Model;
|
| | | TreasureModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<TreasureModel>()); } }
|
| | | MountModel m_HorseModel;
|
| | | MountModel horsemodel
|
| | | {
|
| | |
| | | onMainModel.XpSkill(vNetData.NewSkillID, vNetData.RemainTime);
|
| | |
|
| | |
|
| | | model.UpdateTreasurePotentialInfo(vNetData.OldSkillID, vNetData.NewSkillID);
|
| | | ModelCenter.Instance.GetModel<TreasureSkillModel>().OnReceivePackage(vNetData.OldSkillID, vNetData.NewSkillID);
|
| | | ModelCenter.Instance.GetModel<TalentModel>().UpdateTalentSkill(vNetData.OldSkillID, vNetData.NewSkillID);
|
| | | ModelCenter.Instance.GetModel<JadeDynastySkillModel>().OnReceivePackage(vNetData);
|
| | | if (vNetData != null)
|
| | |
| | | m_SkillToSpSkill = new Dictionary<int, List<SkillInfo>>();
|
| | | }
|
| | |
|
| | | Snxxz.UI.TreasureModel _model = Snxxz.UI.ModelCenter.Instance.GetModel<Snxxz.UI.TreasureModel>();
|
| | | _model.potentialLevelUpdate += OnSpSkillChange;
|
| | | Snxxz.UI.TreasureSkillModel _model = Snxxz.UI.ModelCenter.Instance.GetModel<Snxxz.UI.TreasureSkillModel>();
|
| | | _model.potentialLevelRefresh += OnSpSkillChange;
|
| | | }
|
| | |
|
| | | public void OnSpSkillChange(int skillTypeID, int level)
|
| | |
| | | ActorInfo.Hp = m_H0434.HP;
|
| | | ActorInfo.MaxHp = m_H0434.MaxHP;
|
| | |
|
| | | if (s_OnRefreshLife != null)
|
| | | if ((package != null && package.socketType == ServerType.CrossSever && CrossServerUtility.IsCrossServerOneVsOne())
|
| | | || this is GA_PVPClientPlayer)
|
| | | {
|
| | | s_OnRefreshLife(ServerInstID, ActorInfo.RealHp, ActorInfo.RealMaxHp);
|
| | | if (s_OnRefreshLife != null)
|
| | | {
|
| | | s_OnRefreshLife(ServerInstID, ActorInfo.RealHp, ActorInfo.RealMaxHp);
|
| | | }
|
| | | }
|
| | |
|
| | | RequestName();
|
| | |
| | |
|
| | | protected sealed override void OnPutonSecondary(uint secondaryItemID, GameObject secondary)
|
| | | {
|
| | | if(!secondary)
|
| | | if (!secondary)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(BlastFurnaceModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 48, 26, 12); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 48, 25, 12); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshSelectRecycleAct", _e_RefreshSelectRecycleAct); |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "sTreasureModel", _g_get_sTreasureModel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "extraMats", _g_get_extraMats); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "MaxStoveLv", _g_get_MaxStoveLv); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "alchemyModellist", _g_get_alchemyModellist); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "jumpToPrescripe", _g_get_jumpToPrescripe); |
| | |
| | | |
| | | BlastFurnaceModel gen_to_be_invoked = (BlastFurnaceModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.sTreasureModel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_extraMats(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | BlastFurnaceModel gen_to_be_invoked = (BlastFurnaceModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.extraMats); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | #endif |
| | | } |
| | | |
| | | public UnityEngine.Vector3 __Gen_Delegate_Imp290(object p0, int p1) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | | { |
| | | #endif |
| | | RealStatePtr L = luaEnv.rawL; |
| | | int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); |
| | | ObjectTranslator translator = luaEnv.translator; |
| | | translator.PushAny(L, p0); |
| | | LuaAPI.xlua_pushinteger(L, p1); |
| | | |
| | | PCall(L, 2, 1, errFunc); |
| | | |
| | | |
| | | UnityEngine.Vector3 __gen_ret;translator.Get(L, errFunc + 1, out __gen_ret); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public UnityEngine.Vector3 __Gen_Delegate_Imp291(object p0, UnityEngine.Vector3 p1) |
| | | public UnityEngine.Vector3 __Gen_Delegate_Imp290(object p0, UnityEngine.Vector3 p1) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public void __Gen_Delegate_Imp292(object p0, bool p1, bool p2) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | | { |
| | | #endif |
| | | RealStatePtr L = luaEnv.rawL; |
| | | int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); |
| | | ObjectTranslator translator = luaEnv.translator; |
| | | translator.PushAny(L, p0); |
| | | LuaAPI.lua_pushboolean(L, p1); |
| | | LuaAPI.lua_pushboolean(L, p2); |
| | | |
| | | PCall(L, 3, 0, errFunc); |
| | | |
| | | |
| | | |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public void __Gen_Delegate_Imp293(object p0, Snxxz.UI.TreasureAnimation.TreasureShowStep p1) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | | { |
| | | #endif |
| | | RealStatePtr L = luaEnv.rawL; |
| | | int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); |
| | | ObjectTranslator translator = luaEnv.translator; |
| | | translator.PushAny(L, p0); |
| | | translator.Push(L, p1); |
| | | |
| | | PCall(L, 2, 0, errFunc); |
| | | |
| | | |
| | | |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public void __Gen_Delegate_Imp294(object p0, bool p1, int p2) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | | { |
| | | #endif |
| | | RealStatePtr L = luaEnv.rawL; |
| | | int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); |
| | | ObjectTranslator translator = luaEnv.translator; |
| | | translator.PushAny(L, p0); |
| | | LuaAPI.lua_pushboolean(L, p1); |
| | | LuaAPI.xlua_pushinteger(L, p2); |
| | | |
| | | PCall(L, 3, 0, errFunc); |
| | | |
| | | |
| | | |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public UnityEngine.Vector3 __Gen_Delegate_Imp295(object p0) |
| | | public UnityEngine.Vector3 __Gen_Delegate_Imp291(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public Treasure3DConfig.TreasureParam __Gen_Delegate_Imp296(object p0) |
| | | public Treasure3DConfig.TreasureParam __Gen_Delegate_Imp292(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public Snxxz.UI.UI3DTreasureSelectStage __Gen_Delegate_Imp297() |
| | | public Snxxz.UI.UI3DTreasureSelectStage __Gen_Delegate_Imp293() |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public TreasureCategory __Gen_Delegate_Imp298(object p0) |
| | | public TreasureCategory __Gen_Delegate_Imp294(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public void __Gen_Delegate_Imp299(object p0, bool p1, TreasureCategory p2) |
| | | public void __Gen_Delegate_Imp295(object p0, bool p1, TreasureCategory p2) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public System.Collections.IEnumerator __Gen_Delegate_Imp300(object p0, TreasureCategory p1, object p2) |
| | | public System.Collections.IEnumerator __Gen_Delegate_Imp296(object p0, TreasureCategory p1, object p2) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public void __Gen_Delegate_Imp301(object p0, TreasureCategory p1, bool p2) |
| | | public void __Gen_Delegate_Imp297(object p0, TreasureCategory p1, bool p2) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public System.Collections.IEnumerator __Gen_Delegate_Imp302(object p0, object p1, float p2) |
| | | public UnityEngine.Vector3 __Gen_Delegate_Imp298(object p0, int p1) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | | { |
| | | #endif |
| | | RealStatePtr L = luaEnv.rawL; |
| | | int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); |
| | | ObjectTranslator translator = luaEnv.translator; |
| | | translator.PushAny(L, p0); |
| | | LuaAPI.xlua_pushinteger(L, p1); |
| | | |
| | | PCall(L, 2, 1, errFunc); |
| | | |
| | | |
| | | UnityEngine.Vector3 __gen_ret;translator.Get(L, errFunc + 1, out __gen_ret); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public System.Collections.IEnumerator __Gen_Delegate_Imp299(object p0, object p1, float p2) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public Snxxz.UI.SignInModel __Gen_Delegate_Imp303(object p0) |
| | | public Snxxz.UI.SignInModel __Gen_Delegate_Imp300(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c58500c7d37be664d8432324eea49a6f |
| | | timeCreated: 1550565918 |
| | | guid: e7bad9fbfb1757543aa1413d6c4814f5 |
| | | timeCreated: 1550718687 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(SnxxzGame); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 11, 0, 0); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 12, 0, 0); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddUpdateAction", _m_AddUpdateAction); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveUpdateAction", _m_RemoveUpdateAction); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "StartTimePause", _m_StartTimePause); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "MovingCamera", _m_MovingCamera); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ResetCamera", _m_ResetCamera); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "StopAllCameraCo", _m_StopAllCameraCo); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_StopAllCameraCo(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | SnxxzGame gen_to_be_invoked = (SnxxzGame)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.StopAllCameraCo( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.TreasureModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 63, 31, 20); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 37, 20, 12); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPlayerLoginOk", _m_OnPlayerLoginOk); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckReguluPop", _m_CheckReguluPop); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureUnlockShow", _m_GetTreasureUnlockShow); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPotentialUnlockShow", _m_GetPotentialUnlockShow); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetPotentialUnlockShow", _m_SetPotentialUnlockShow); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSpAnim", _m_GetSpAnim); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetSpAnim", _m_SetSpAnim); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureFinishAnim", _m_GetTreasureFinishAnim); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTreasureFinishAnim", _m_SetTreasureFinishAnim); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetUnlockShowTreasure", _m_TryGetUnlockShowTreasure); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTreasureUnlockShow", _m_SetTreasureUnlockShow); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTreasureStageShow", _m_SetTreasureStageShow); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureStageShow", _m_GetTreasureStageShow); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetTreasure", _m_TryGetTreasure); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetTreasureDungeon", _m_TryGetTreasureDungeon); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetTreasureUnlockAchievement", _m_TryGetTreasureUnlockAchievement); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureCategory", _m_GetTreasureCategory); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetActiveTreasureCategory", _m_GetActiveTreasureCategory); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureIdByMapIdAndLineId", _m_GetTreasureIdByMapIdAndLineId); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillLevelUpType", _m_GetSkillLevelUpType); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestPotentialUpgrade", _m_RequestPotentialUpgrade); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateTreasureCollectState", _m_UpdateTreasureCollectState); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateTreasurePotentialInfo", _m_UpdateTreasurePotentialInfo); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillLevelUpRedpointTreasure", _m_GetSkillLevelUpRedpointTreasure); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TreasureStageUpLimit", _m_TreasureStageUpLimit); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckOpenTreasureNewGot", _m_CheckOpenTreasureNewGot); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SatisfyLevelUpUnlock", _m_SatisfyLevelUpUnlock); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SatisyPotentialLevelUp", _m_SatisyPotentialLevelUp); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateTreasureLevelInfo", _m_UpdateTreasureLevelInfo); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "HumanTreasureStateChange", _m_HumanTreasureStateChange); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetFurnacesAchievements", _m_GetFurnacesAchievements); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsVersionUnOpenTreasure", _m_IsVersionUnOpenTreasure); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMapIdByTreasure", _m_GetMapIdByTreasure); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureFightPower", _m_GetTreasureFightPower); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetExtensionPower", _m_GetExtensionPower); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetPotentialGetSkill", _m_TryGetPotentialGetSkill); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsPotentialUnlock", _m_IsPotentialUnlock); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPotentialInitialPower", _m_GetPotentialInitialPower); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SatisfyEntranceOpen", _m_SatisfyEntranceOpen); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisplayEntranceLimitHint", _m_DisplayEntranceLimitHint); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPotentialNextTargetLevel", _m_GetPotentialNextTargetLevel); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "DemonDungeonChallengeNext", _m_DemonDungeonChallengeNext); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTreasureBySkillId", _m_GetTreasureBySkillId); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "treasureCollectProgressUpdateEvent", _e_treasureCollectProgressUpdateEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "treasureSelectedEvent", _e_treasureSelectedEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "potentialBookSelectEvent", _e_potentialBookSelectEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "collectingTreasureChangeEvent", _e_collectingTreasureChangeEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "treasureStateChangeEvent", _e_treasureStateChangeEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "onPotentialLevelUpResultEvent", _e_onPotentialLevelUpResultEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "potentialLevelChangeEvent", _e_potentialLevelChangeEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "potentialLevelUpdate", _e_potentialLevelUpdate); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "vipKillNPCTreasureEvent", _e_vipKillNPCTreasureEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "treasureLevelProgressUpdateEvent", _e_treasureLevelProgressUpdateEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "treasureStageUpEvent", _e_treasureStageUpEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "humanTreasureStateChangeEvent", _e_humanTreasureStateChangeEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "demonTreasureDungeonUpdate", _e_demonTreasureDungeonUpdate); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "skillLevelUpRedpointUpdate", _e_skillLevelUpRedpointUpdate); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "demonDungeonChallengeNext", _e_demonDungeonChallengeNext); |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "stoveRedpoint", _g_get_stoveRedpoint); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedTreasure", _g_get_selectedTreasure); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedPotential", _g_get_selectedPotential); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureStepUpShow", _g_get_treasureStepUpShow); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureStageUpShow", _g_get_treasureStageUpShow); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "currentCategory", _g_get_currentCategory); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "collectingHuman", _g_get_collectingHuman); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "collectingDemon", _g_get_collectingDemon); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedPotentialBook", _g_get_selectedPotentialBook); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "fairyTreasureGetDict", _g_get_fairyTreasureGetDict); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "serverInited", _g_get_serverInited); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "newGotTreasureId", _g_get_newGotTreasureId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "newGotShowing", _g_get_newGotShowing); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureEntranceShowId", _g_get_treasureEntranceShowId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureCollectingShowId", _g_get_treasureCollectingShowId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureGotoId", _g_get_treasureGotoId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "openFromTreasureSoul", _g_get_openFromTreasureSoul); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "openFromTreasureUnlockShow", _g_get_openFromTreasureUnlockShow); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "openFromTreasureCollect", _g_get_openFromTreasureCollect); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "openFromTreasureList", _g_get_openFromTreasureList); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "openFromTaskId", _g_get_openFromTaskId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "inPotentialModifyPower", _g_get_inPotentialModifyPower); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "castSoulGuideTaskIds", _g_get_castSoulGuideTaskIds); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "guideTreasures", _g_get_guideTreasures); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureBackLvLimit", _g_get_treasureBackLvLimit); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureBackPercent", _g_get_treasureBackPercent); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "treasureExitLvLimit", _g_get_treasureExitLvLimit); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "exitRecord", _g_get_exitRecord); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "entranceOpenCondition", _g_get_entranceOpenCondition); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "cacheGotAchievements", _g_get_cacheGotAchievements); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "vipKillNPCTreasure", _g_get_vipKillNPCTreasure); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectedTreasure", _s_set_selectedTreasure); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectedPotential", _s_set_selectedPotential); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "treasureStepUpShow", _s_set_treasureStepUpShow); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "treasureStageUpShow", _s_set_treasureStageUpShow); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "currentCategory", _s_set_currentCategory); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "collectingHuman", _s_set_collectingHuman); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "collectingDemon", _s_set_collectingDemon); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectedPotentialBook", _s_set_selectedPotentialBook); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "newGotTreasureId", _s_set_newGotTreasureId); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "treasureEntranceShowId", _s_set_treasureEntranceShowId); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "treasureCollectingShowId", _s_set_treasureCollectingShowId); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "treasureGotoId", _s_set_treasureGotoId); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "openFromTreasureSoul", _s_set_openFromTreasureSoul); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "openFromTreasureUnlockShow", _s_set_openFromTreasureUnlockShow); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "openFromTreasureCollect", _s_set_openFromTreasureCollect); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "openFromTreasureList", _s_set_openFromTreasureList); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "openFromTaskId", _s_set_openFromTaskId); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "inPotentialModifyPower", _s_set_inPotentialModifyPower); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "exitRecord", _s_set_exitRecord); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "vipKillNPCTreasure", _s_set_vipKillNPCTreasure); |
| | | |
| | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 6, 1, 1); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSkillLevelUpId", _m_GetSkillLevelUpId_xlua_st_); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 5, 1, 1); |
| | | |
| | | |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "TREASURE_DATAMAPID", Snxxz.UI.TreasureModel.TREASURE_DATAMAPID); |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "TREASURE_MAPID", Snxxz.UI.TreasureModel.TREASURE_MAPID); |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetPotentialUnlockShow(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.GetPotentialUnlockShow( __treasureId ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SetPotentialUnlockShow(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | bool __value = LuaAPI.lua_toboolean(L, 3); |
| | | |
| | | gen_to_be_invoked.SetPotentialUnlockShow( __treasureId, __value ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.SetPotentialUnlockShow( __treasureId ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.SetPotentialUnlockShow!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetSpAnim(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.GetSpAnim( __treasureId ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SetSpAnim(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | bool _anim = LuaAPI.lua_toboolean(L, 3); |
| | | |
| | | gen_to_be_invoked.SetSpAnim( __treasureId, _anim ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.SetSpAnim( __treasureId ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.SetSpAnim!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetTreasureFinishAnim(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.GetTreasureFinishAnim( __treasureId ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SetTreasureFinishAnim(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | bool _anim = LuaAPI.lua_toboolean(L, 3); |
| | | |
| | | gen_to_be_invoked.SetTreasureFinishAnim( __treasureId, _anim ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.SetTreasureFinishAnim( __treasureId ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.SetTreasureFinishAnim!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_TryGetUnlockShowTreasure(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SetTreasureStageShow(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __id = LuaAPI.xlua_tointeger(L, 2); |
| | | int __stage = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.SetTreasureStageShow( __id, __stage ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetTreasureStageShow(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __id = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetTreasureStageShow( __id ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetSkillLevelUpType(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __skillId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetSkillLevelUpType( __skillId ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_RequestPotentialUpgrade(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | int __potentialId = LuaAPI.xlua_tointeger(L, 3); |
| | | int __costIndex = LuaAPI.xlua_tointeger(L, 4); |
| | | |
| | | gen_to_be_invoked.RequestPotentialUpgrade( __treasureId, __potentialId, __costIndex ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UpdateTreasureCollectState(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | |
| | | |
| | | { |
| | | uint[] __gotTreasures = (uint[])translator.GetObject(L, 2, typeof(uint[])); |
| | | uint[] _collecteds = (uint[])translator.GetObject(L, 2, typeof(uint[])); |
| | | |
| | | gen_to_be_invoked.UpdateTreasureCollectState( __gotTreasures ); |
| | | gen_to_be_invoked.UpdateTreasureCollectState( _collecteds ); |
| | | |
| | | |
| | | |
| | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UpdateTreasurePotentialInfo(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __oldSkillId = LuaAPI.xlua_tointeger(L, 2); |
| | | int __newSkillId = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.UpdateTreasurePotentialInfo( __oldSkillId, __newSkillId ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetSkillLevelUpRedpointTreasure(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetSkillLevelUpRedpointTreasure( ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_TreasureStageUpLimit(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | bool __tip = LuaAPI.lua_toboolean(L, 3); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.TreasureStageUpLimit( __treasureId, __tip ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | int __treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.TreasureStageUpLimit( __treasureId ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.TreasureStageUpLimit!"); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SatisfyLevelUpUnlock(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | int _index = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.SatisfyLevelUpUnlock( _treasureId, _index ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SatisyPotentialLevelUp(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | int _potentialId = LuaAPI.xlua_tointeger(L, 3); |
| | | Snxxz.UI.Item _item; |
| | | |
| | | bool gen_ret = gen_to_be_invoked.SatisyPotentialLevelUp( _treasureId, _potentialId, out _item ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | translator.Push(L, _item); |
| | | |
| | | |
| | | |
| | | |
| | | return 2; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UpdateTreasureLevelInfo(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | HA352_tagMCMagicWeaponLVInfo _package = (HA352_tagMCMagicWeaponLVInfo)translator.GetObject(L, 2, typeof(HA352_tagMCMagicWeaponLVInfo)); |
| | | |
| | | gen_to_be_invoked.UpdateTreasureLevelInfo( _package ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_HumanTreasureStateChange(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __id = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.HumanTreasureStateChange( __id ); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsVersionUnOpenTreasure( __id ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetSkillLevelUpId_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | int __type = LuaAPI.xlua_tointeger(L, 1); |
| | | int __level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = Snxxz.UI.TreasureModel.GetSkillLevelUpId( __type, __level ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_TryGetPotentialGetSkill(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __skillTypeId = LuaAPI.xlua_tointeger(L, 2); |
| | | int[] __array; |
| | | |
| | | bool gen_ret = gen_to_be_invoked.TryGetPotentialGetSkill( __skillTypeId, out __array ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | translator.Push(L, __array); |
| | | |
| | | |
| | | |
| | | |
| | | return 2; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_IsPotentialUnlock(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | int _potentialId = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsPotentialUnlock( _treasureId, _potentialId ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetPotentialInitialPower(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _treasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | int _index = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetPotentialInitialPower( _treasureId, _index ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SatisfyEntranceOpen(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetPotentialNextTargetLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetPotentialNextTargetLevel( _level ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_selectedPotential(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.selectedPotential); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_treasureStepUpShow(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_selectedPotentialBook(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.selectedPotentialBook); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_fairyTreasureGetDict(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_treasureEntranceShowId(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.treasureEntranceShowId); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_treasureCollectingShowId(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_openFromTreasureSoul(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.openFromTreasureSoul); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_openFromTreasureUnlockShow(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.openFromTreasureUnlockShow); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_openFromTreasureCollect(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.openFromTreasureCollect); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_openFromTreasureList(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.openFromTreasureList); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_openFromTaskId(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.openFromTaskId); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_inPotentialModifyPower(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.inPotentialModifyPower); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_castSoulGuideTaskIds(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.castSoulGuideTaskIds); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.treasureBackLvLimit); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_treasureBackPercent(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked.treasureBackPercent); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_treasureExitLvLimit(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.treasureExitLvLimit); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_selectedPotential(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.selectedPotential = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_treasureStepUpShow(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_selectedPotentialBook(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.selectedPotentialBook = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_newGotTreasureId(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.newGotTreasureId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_treasureEntranceShowId(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.treasureEntranceShowId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_openFromTreasureSoul(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.openFromTreasureSoul = LuaAPI.lua_toboolean(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_openFromTreasureUnlockShow(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.openFromTreasureUnlockShow = LuaAPI.lua_toboolean(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_openFromTreasureCollect(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.openFromTreasureCollect = LuaAPI.lua_toboolean(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_openFromTreasureList(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.openFromTreasureList = LuaAPI.lua_toboolean(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_openFromTaskId(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.openFromTaskId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_inPotentialModifyPower(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.inPotentialModifyPower = LuaAPI.lua_toboolean(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_potentialBookSelectEvent(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | System.Action<int> gen_delegate = translator.GetDelegate<System.Action<int>>(L, 3); |
| | | if (gen_delegate == null) { |
| | | return LuaAPI.luaL_error(L, "#3 need System.Action<int>!"); |
| | | } |
| | | |
| | | if (gen_param_count == 3) |
| | | { |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { |
| | | gen_to_be_invoked.potentialBookSelectEvent += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.potentialBookSelectEvent -= gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.potentialBookSelectEvent!"); |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_collectingTreasureChangeEvent(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.treasureStateChangeEvent!"); |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_onPotentialLevelUpResultEvent(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | System.Action<int, int, bool> gen_delegate = translator.GetDelegate<System.Action<int, int, bool>>(L, 3); |
| | | if (gen_delegate == null) { |
| | | return LuaAPI.luaL_error(L, "#3 need System.Action<int, int, bool>!"); |
| | | } |
| | | |
| | | if (gen_param_count == 3) |
| | | { |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { |
| | | gen_to_be_invoked.onPotentialLevelUpResultEvent += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.onPotentialLevelUpResultEvent -= gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.onPotentialLevelUpResultEvent!"); |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_potentialLevelChangeEvent(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | System.Action<int, int> gen_delegate = translator.GetDelegate<System.Action<int, int>>(L, 3); |
| | | if (gen_delegate == null) { |
| | | return LuaAPI.luaL_error(L, "#3 need System.Action<int, int>!"); |
| | | } |
| | | |
| | | if (gen_param_count == 3) |
| | | { |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { |
| | | gen_to_be_invoked.potentialLevelChangeEvent += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.potentialLevelChangeEvent -= gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.potentialLevelChangeEvent!"); |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_potentialLevelUpdate(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | System.Action<int, int> gen_delegate = translator.GetDelegate<System.Action<int, int>>(L, 3); |
| | | if (gen_delegate == null) { |
| | | return LuaAPI.luaL_error(L, "#3 need System.Action<int, int>!"); |
| | | } |
| | | |
| | | if (gen_param_count == 3) |
| | | { |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { |
| | | gen_to_be_invoked.potentialLevelUpdate += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.potentialLevelUpdate -= gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.potentialLevelUpdate!"); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_humanTreasureStateChangeEvent(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | System.Action<int> gen_delegate = translator.GetDelegate<System.Action<int>>(L, 3); |
| | | if (gen_delegate == null) { |
| | | return LuaAPI.luaL_error(L, "#3 need System.Action<int>!"); |
| | | } |
| | | |
| | | if (gen_param_count == 3) |
| | | { |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { |
| | | gen_to_be_invoked.humanTreasureStateChangeEvent += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.humanTreasureStateChangeEvent -= gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.humanTreasureStateChangeEvent!"); |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_demonTreasureDungeonUpdate(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.demonTreasureDungeonUpdate!"); |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_skillLevelUpRedpointUpdate(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | Snxxz.UI.TreasureModel gen_to_be_invoked = (Snxxz.UI.TreasureModel)translator.FastGetCSObj(L, 1); |
| | | System.Action gen_delegate = translator.GetDelegate<System.Action>(L, 3); |
| | | if (gen_delegate == null) { |
| | | return LuaAPI.luaL_error(L, "#3 need System.Action!"); |
| | | } |
| | | |
| | | if (gen_param_count == 3) |
| | | { |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { |
| | | gen_to_be_invoked.skillLevelUpRedpointUpdate += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.skillLevelUpRedpointUpdate -= gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.TreasureModel.skillLevelUpRedpointUpdate!"); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(TreasureConfig); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 25, 0); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 22, 0); |
| | | |
| | | |
| | | |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "MapId", _g_get_MapId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "LineId", _g_get_LineId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "ChallengeLevel", _g_get_ChallengeLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "Potentials", _g_get_Potentials); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "SkillPower", _g_get_SkillPower); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "NeedItem", _g_get_NeedItem); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "EffectID", _g_get_EffectID); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "Verse", _g_get_Verse); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "ShowNetGotEffect", _g_get_ShowNetGotEffect); |
| | |
| | | |
| | | TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ChallengeLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_Potentials(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.Potentials); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_SkillPower(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.SkillPower); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_NeedItem(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | TreasureConfig gen_to_be_invoked = (TreasureConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushstring(L, gen_to_be_invoked.NeedItem); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(TreasureSkillConfig); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 8, 0); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 3, 0); |
| | | |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "ID", _g_get_ID); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "SkillType", _g_get_SkillType); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "SkillLv", _g_get_SkillLv); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "MeterialNum1", _g_get_MeterialNum1); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "InitialRate", _g_get_InitialRate); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "Meterial2ID", _g_get_Meterial2ID); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "MeterialNum2", _g_get_MeterialNum2); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "Rate", _g_get_Rate); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "id", _g_get_id); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "limitSkillId", _g_get_limitSkillId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "limitLevel", _g_get_limitLevel); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_ID(RealStatePtr L) |
| | | static int _g_get_id(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | TreasureSkillConfig gen_to_be_invoked = (TreasureSkillConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ID); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.id); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_SkillType(RealStatePtr L) |
| | | static int _g_get_limitSkillId(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | TreasureSkillConfig gen_to_be_invoked = (TreasureSkillConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.SkillType); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.limitSkillId); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_SkillLv(RealStatePtr L) |
| | | static int _g_get_limitLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | TreasureSkillConfig gen_to_be_invoked = (TreasureSkillConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.SkillLv); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_MeterialNum1(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | TreasureSkillConfig gen_to_be_invoked = (TreasureSkillConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.MeterialNum1); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_InitialRate(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | TreasureSkillConfig gen_to_be_invoked = (TreasureSkillConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.InitialRate); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_Meterial2ID(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | TreasureSkillConfig gen_to_be_invoked = (TreasureSkillConfig)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.Meterial2ID); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_MeterialNum2(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | TreasureSkillConfig gen_to_be_invoked = (TreasureSkillConfig)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.MeterialNum2); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_Rate(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | TreasureSkillConfig gen_to_be_invoked = (TreasureSkillConfig)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.Rate); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.limitLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(WeekPartyPointConfig); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 4, 0); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 5, 0); |
| | | |
| | | |
| | | |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "ImageType1", _g_get_ImageType1); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "ImageType2", _g_get_ImageType2); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "name", _g_get_name); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "Zoom", _g_get_Zoom); |
| | | |
| | | |
| | | |
| | |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_Zoom(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | WeekPartyPointConfig gen_to_be_invoked = (WeekPartyPointConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Zoom); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | |
|
| | | public static void GotoSpSkillLevelUp(int _achievementId)
|
| | | {
|
| | | var config = SuccessConfig.Get(_achievementId);
|
| | | var index = PlayerDatas.Instance.baseData.Job - 1;
|
| | | var skillId = index < config.Condition.Length ? config.Condition[index] : config.Condition[0];
|
| | |
|
| | | var treasureId = 0;
|
| | | var humanTreasures = treasureModel.GetTreasureCategory(TreasureCategory.Human);
|
| | |
|
| | | foreach (var id in humanTreasures)
|
| | | {
|
| | | Treasure treasure;
|
| | | treasureModel.TryGetTreasure(id, out treasure);
|
| | | if (treasure.GetPotential(skillId) != null)
|
| | | {
|
| | | treasureId = treasure.id;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | var skillConfig = SkillConfig.Get(skillId);
|
| | | var treasureConfig = TreasureConfig.Get(treasureId);
|
| | |
|
| | | if (treasureId != 0)
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen(82))
|
| | | {
|
| | | FuncOpen.Instance.ProcessorFuncErrorTip(82);
|
| | | return;
|
| | | }
|
| | |
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(treasureId, out treasure))
|
| | | {
|
| | | if (!treasure.IsHighestStage)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("TreasureSkillUnGet", skillConfig.SkillName, treasureConfig.Name);
|
| | | return;
|
| | | }
|
| | | guideAchievementId = _achievementId;
|
| | | }
|
| | | }
|
| | | //var config = SuccessConfig.Get(_achievementId);
|
| | | //var index = PlayerDatas.Instance.baseData.Job - 1;
|
| | | //var skillId = index < config.Condition.Length ? config.Condition[index] : config.Condition[0];
|
| | | //
|
| | | //var treasureId = 0;
|
| | | //var humanTreasures = treasureModel.GetTreasureCategory(TreasureCategory.Human);
|
| | | //
|
| | | //foreach (var id in humanTreasures)
|
| | | //{
|
| | | // Treasure treasure;
|
| | | // treasureModel.TryGetTreasure(id, out treasure);
|
| | | // if (treasure.GetPotential(skillId) != null)
|
| | | // {
|
| | | // treasureId = treasure.id;
|
| | | // break;
|
| | | // }
|
| | | //}
|
| | | //
|
| | | //var skillConfig = SkillConfig.Get(skillId);
|
| | | //var treasureConfig = TreasureConfig.Get(treasureId);
|
| | | //
|
| | | //if (treasureId != 0)
|
| | | //{
|
| | | // if (!FuncOpen.Instance.IsFuncOpen(82))
|
| | | // {
|
| | | // FuncOpen.Instance.ProcessorFuncErrorTip(82);
|
| | | // return;
|
| | | // }
|
| | | //
|
| | | // Treasure treasure;
|
| | | // if (treasureModel.TryGetTreasure(treasureId, out treasure))
|
| | | // {
|
| | | // if (!treasure.IsHighestStage)
|
| | | // {
|
| | | // SysNotifyMgr.Instance.ShowTip("TreasureSkillUnGet", skillConfig.SkillName, treasureConfig.Name);
|
| | | // return;
|
| | | // }
|
| | | // guideAchievementId = _achievementId;
|
| | | // }
|
| | | //}
|
| | |
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | if (PlayerDatas.Instance.skill.ContainsQuickSkill(skillId) == -1)
|
| | | {
|
| | | WindowCenter.Instance.Open<SkillPanel>();
|
| | | WindowCenter.Instance.Open<SkillWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | break;
|
| | | case 116:
|
| | | getItemPathModel.SetChinItemModel(config.Condition[0]);
|
| | | break;
|
| | | case 91:
|
| | | var index = PlayerDatas.Instance.baseData.Job - 1;
|
| | | var potentialId = index < config.Condition.Length ? config.Condition[index] : config.Condition[0];
|
| | |
|
| | | var treasureModel = ModelCenter.Instance.GetModel<TreasureModel>();
|
| | | var treasureId = 0;
|
| | | var treasures = treasureModel.GetTreasureCategory(TreasureCategory.Human);
|
| | |
|
| | | foreach (var id in treasures)
|
| | | {
|
| | | Treasure treasure;
|
| | | treasureModel.TryGetTreasure(id, out treasure);
|
| | | if (treasure.GetPotential(potentialId) != null)
|
| | | {
|
| | | treasureId = treasure.id;
|
| | | break;
|
| | | }
|
| | | }
|
| | | var skillConfig = SkillConfig.Get(potentialId);
|
| | | var treasureConfig = TreasureConfig.Get(treasureId);
|
| | | if (treasureId != 0)
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen(82))
|
| | | {
|
| | | return;
|
| | | }
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(treasureId, out treasure))
|
| | | {
|
| | | if (!treasure.IsHighestStage)
|
| | | {
|
| | | return;
|
| | | }
|
| | | treasureModel.currentCategory = TreasureCategory.Human;
|
| | | treasureModel.selectedTreasure = treasureId;
|
| | | if (!WindowCenter.Instance.IsOpen<TreasureBaseWin>())
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.TreasureCollectSoul);
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | default:
|
| | | WindowCenter.Instance.Close<TreasureBaseWin>();
|
| | |
| | | private FuncConfigConfig _blastFurnaceExpModel;
|
| | | private ItemConfig chinItemModel;
|
| | | private Dictionary<int, int> _blastFurnaceExpDict;
|
| | | public int[] extraMats { get; private set; }
|
| | |
|
| | | public int MaxStoveLv { get; private set; }
|
| | | public List<AlchemyConfig> alchemyModellist { get; private set; }
|
| | |
| | | ParseAlchemyConfig();
|
| | | ParseAlchemySpecConfig();
|
| | | _blastFurnaceExpDict = new Dictionary<int, int>();
|
| | | extraMats = null;
|
| | | _upTreasureRateModel = FuncConfigConfig.Get("TreasureUpRateItem");
|
| | | if (_upTreasureRateModel != null)
|
| | | {
|
| | | extraMats = ConfigParse.GetMultipleStr<int>(_upTreasureRateModel.Numerical2);
|
| | | }
|
| | | List<RefineStoveConfig> stovelist = RefineStoveConfig.GetValues();
|
| | | MaxStoveLv = 0;
|
| | | if (stovelist != null)
|
| | |
| | |
|
| | | if (gotoTreasureId == 0)
|
| | | {
|
| | | var result = treasures.FindLast((x) =>
|
| | | {
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(x, out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | var config = TreasureConfig.Get(humanTreasure.id);
|
| | | return humanTreasure != null && (humanTreasure.humanState == HumanTreasureState.CastSoul);
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | );
|
| | |
|
| | | if (result != 0)
|
| | | {
|
| | | gotoTreasureId = result;
|
| | | }
|
| | | }
|
| | |
|
| | | if (gotoTreasureId == 0)
|
| | | {
|
| | | for (int i = 0; i < treasures.Count; i++)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(treasures[i], out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (humanTreasure != null
|
| | | && (humanTreasure.humanState == HumanTreasureState.Locked || humanTreasure.humanState == HumanTreasureState.Challenge))
|
| | | if (treasure != null
|
| | | && (treasure.state == TreasureState.Locked || treasure.state == TreasureState.Collecting))
|
| | | {
|
| | | gotoTreasureId = humanTreasure.id;
|
| | | gotoTreasureId = treasure.id;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private bool IsTreasureCollectSoul(int _treasureId)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(_treasureId, out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (humanTreasure.humanState == HumanTreasureState.CastSoul)
|
| | | {
|
| | | foreach (var achievementGroup in treasure.achievementGroups.Values)
|
| | | {
|
| | | if (achievementGroup.IsAwardable())
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return false;
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | private bool IsDungeon()//是否在副本中
|
| | |
| | |
|
| | | public static int greatMasterStartLV { get; private set; }
|
| | | public static int playerMaxLevel { get; private set; }
|
| | | public static float potentialUpSuccessRecommend { get; private set; }
|
| | | public static int[] kylinHomeCollectItems;
|
| | | public static List<int> dailyQuestOpenTime;
|
| | | public static int flyBootItemId { get; private set; }
|
| | |
| | | CompareEquipPlaces = GetIntArray("EquipUpType");
|
| | | greatMasterStartLV = GetInt("GreatMasterStartLV");
|
| | | playerMaxLevel = GetInt("PlayerMaxLV");
|
| | | potentialUpSuccessRecommend = GetFloat("SPSkillType", 2) * 0.0001f;
|
| | | kylinHomeCollectItems = GetIntArray("KirinNpc", 2);
|
| | | dailyQuestOpenTime = GetTimeArray("ActionTime", 1);
|
| | | flyBootItemId = GetInt("TransportPay");
|
| | |
| | | else
|
| | | {
|
| | | treasureModel.selectedTreasure = _treasureId;
|
| | | treasureModel.openFromTaskId = Task_ID;
|
| | | WindowCenter.Instance.Open<TreasureBaseWin>();
|
| | | }
|
| | | return;
|
| | |
| | | else
|
| | | {
|
| | | treasureModel.selectedTreasure = _treasureId;
|
| | | treasureModel.openFromTaskId = Task_ID;
|
| | | WindowCenter.Instance.Open<TreasureBaseWin>();
|
| | | }
|
| | | }
|
| | |
| | | void SkillButton()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<SkillPanel>();
|
| | | WindowCenter.Instance.Open<SkillWin>();
|
| | |
|
| | |
|
| | | //DesignDebug.Log("技能按钮");
|
| | |
| | |
|
| | | public void PowerAdd(int power)
|
| | | {
|
| | | if (ModelCenter.Instance.GetModel<TreasureModel>().inPotentialModifyPower)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (prowBool)
|
| | | {
|
| | | prowNum = power;
|
| | |
| | | Treasure treasure; |
| | | if (treasureModel.TryGetTreasure(treasures[i], out treasure)) |
| | | { |
| | | _SkillAndPreTreasure[treasure.unlockSkill] = treasures[i]; |
| | | _SkillAndPreTreasure[treasure.skillId] = treasures[i]; |
| | | } |
| | | } |
| | | } |
| | |
| | | if (Gold >= NeedMoney)
|
| | | {
|
| | | taskmodel.CompletionOfTask(TaskID);
|
| | | if (WindowCenter.Instance.IsOpen<SkillPanel>())
|
| | | if (WindowCenter.Instance.IsOpen<SkillWin>())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | case GuideTriggerType.TreasureCollectSoul:
|
| | | return IsTreasureCollectSoul(config.Condition);
|
| | | case GuideTriggerType.TreasureAwaken:
|
| | | Treasure treasureAwaken;
|
| | | if (treasureModel.TryGetTreasure(config.Condition, out treasureAwaken))
|
| | | {
|
| | | var humanTreasure = treasureAwaken as HumanTreasure;
|
| | | return humanTreasure != null && humanTreasure.castSoulRedpoint != null && humanTreasure.castSoulRedpoint.state == RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | return false;
|
| | | case GuideTriggerType.Map:
|
| | | return PlayerDatas.Instance.baseData.MapID == config.Condition;
|
| | | case GuideTriggerType.BranchQuestCando:
|
| | |
| | |
|
| | | private bool IsTreasureCollectSoul(int _treasureId)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(_treasureId, out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (humanTreasure != null && humanTreasure.humanState == HumanTreasureState.CastSoul)
|
| | | {
|
| | | foreach (var achievementGroup in treasure.achievementGroups.Values)
|
| | | {
|
| | | if (achievementGroup.IsAwardable())
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return false;
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | case GuideTriggerType.TreasureCollectSoul:
|
| | | return IsTreasureCollectSoul(config.Condition);
|
| | | case GuideTriggerType.TreasureAwaken:
|
| | | Treasure treasureAwaken;
|
| | | if (treasureModel.TryGetTreasure(config.Condition, out treasureAwaken))
|
| | | {
|
| | | var humanTreasure = treasureAwaken as HumanTreasure;
|
| | | return humanTreasure != null && humanTreasure.castSoulRedpoint != null && humanTreasure.castSoulRedpoint.state == RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | return false;
|
| | | case GuideTriggerType.QuestCanAccept:
|
| | | return taskmodel.currentMission == config.Condition && taskmodel.currentMissionState == 0;
|
| | | case GuideTriggerType.QuestCanDo:
|
| | |
| | |
|
| | | private bool IsTreasureCollectSoul(int _treasureId)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(_treasureId, out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (humanTreasure != null && humanTreasure.humanState == HumanTreasureState.CastSoul)
|
| | | {
|
| | | foreach (var achievementGroup in treasure.achievementGroups.Values)
|
| | | {
|
| | | if (achievementGroup.IsAwardable())
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return false;
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | private bool IsComposeEnough(int _secondType)
|
| | |
| | | _id == methodData.fairyHeartRedpoint.id ||
|
| | | _id == realmModel.realmRedpoint.id ||
|
| | | _id == gemModel.gemTagRedPoint.id ||
|
| | | _id == rolePointModel.redpoint.id ||
|
| | | IsTreasureRedpoint(_id))
|
| | | _id == rolePointModel.redpoint.id)
|
| | | {
|
| | | CheckPromoteDetailEffect();
|
| | | }
|
| | | }
|
| | |
|
| | | private bool IsTreasureRedpoint(int _id)
|
| | | {
|
| | | for (int k = 1; k < (int)TreasureCategory.Zerg; k++)
|
| | | {
|
| | | var list = treasureModel.GetTreasureCategory((TreasureCategory)k);
|
| | | if (list == null)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | for (int j = 0; j < list.Count; j++)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(list[j], out treasure)
|
| | | && treasure.skillLevelUpRedpoint != null && treasure.skillLevelUpRedpoint.id == _id)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool GetPromoteDetailShow(PromoteDetailType _type)
|
| | |
| | | case PromoteDetailType.GodWeapon:
|
| | | return magicianModel.magicianRedpoint.state == RedPointState.Simple;
|
| | | case PromoteDetailType.TreasurePotential:
|
| | | var list = treasureModel.GetTreasureCategory(TreasureCategory.Human);
|
| | | for (int j = 0; j < list.Count; j++)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(list[j], out treasure) && treasure.state == TreasureState.Collected
|
| | | && treasure.skillLevelUpRedpoint != null && treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | break;
|
| | | return false;
|
| | | case PromoteDetailType.Gem:
|
| | | return gemModel.gemTagRedPoint.state == RedPointState.Simple;
|
| | | case PromoteDetailType.Wash:
|
| | |
| | | [SerializeField] Text m_TreasureNameTxt;
|
| | | [SerializeField] Text m_SkillNameTxt;
|
| | | [SerializeField] Text m_SkillCoolDownTxt;
|
| | | [SerializeField] Text m_SkillLevel;
|
| | | [SerializeField] Text m_SkillDescTxt;
|
| | | [SerializeField] Button m_LeftBtn;
|
| | | [SerializeField] Button m_RightBtn;
|
| | |
| | | {
|
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<SkillModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | TreasureSkillModel treasureSkillModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<TreasureSkillModel>(); }
|
| | | }
|
| | |
|
| | | #region Built-in
|
| | |
| | | m_TreasureNameTxt.text = cfg.Skillsource;
|
| | | m_SkillDescTxt.text = UIHelper.ReplaceNewLine(cfg.Description);
|
| | | m_SkillCoolDownTxt.text = cfg.CoolDownTime == 0 ? string.Empty : Language.Get("L1065", cfg.CoolDownTime / 1000);
|
| | |
|
| | | TreasureSkill treasureSkill;
|
| | | var level = 0;
|
| | | if (treasureSkillModel.TryGetSkill(cfg.SkillTypeID, out treasureSkill))
|
| | | {
|
| | | level = treasureSkill.level;
|
| | | }
|
| | | if (level > 0)
|
| | | {
|
| | | m_SkillLevel.text = Language.Get("SkillActLevel", level);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_SkillLevel.text = Language.Get("SkillActLevel", Language.Get("TreasureSkilllock"));
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public int PassOpenHoleCount()
|
| | | {
|
| | | var count = 0;
|
| | | for (int i = 0; i < 6; i++)
|
| | | for (int i = 0; i < passEquipCnt; i++)
|
| | | {
|
| | | if (IsPassSkillHoleOpen(i))
|
| | | {
|
| | |
| | | if (model.UnlockPassHole != 0)
|
| | | {
|
| | | var index = 0;
|
| | | for (int i = 0; i < equipPassSkills.Count; i++)
|
| | | for (int i = 0; i < model.passEquipCnt; i++)
|
| | | {
|
| | | PassSkillLimit limit;
|
| | | if (model.TryGetPassSkillLimit(i, out limit))
|
| | |
| | | {
|
| | | for (int i = 0; i < equipPassSkills.Count; i++)
|
| | | {
|
| | | PassSkillLimit limit;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleUnLimitColor;
|
| | | if (model.TryGetPassSkillLimit(i, out limit))
|
| | | equipPassSkills[i].gameObject.SetActive(i < model.passEquipCnt);
|
| | | if (i < model.passEquipCnt)
|
| | | {
|
| | | if (limit.level > 0)
|
| | | PassSkillLimit limit;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleUnLimitColor;
|
| | | if (model.TryGetPassSkillLimit(i, out limit))
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV < limit.level)
|
| | | if (limit.level > 0)
|
| | | {
|
| | | SetEquipSkillDeActive(i);
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleLimitColor;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text = Language.Get("PassSkillHoleLimitLv", limit.level);
|
| | | continue;
|
| | | }
|
| | | }
|
| | | else if (limit.vipLv > 0)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv < limit.vipLv)
|
| | | {
|
| | | SetEquipSkillDeActive(i);
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleLimitColor;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text = Language.Get("PassSkillHoleLimitVip", limit.vipLv);
|
| | | continue;
|
| | | }
|
| | | }
|
| | | else if (limit.MountLv > 0)
|
| | | {
|
| | | if (promoteModel.GetMountTotallv() < limit.MountLv)
|
| | | {
|
| | | SetEquipSkillDeActive(i);
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleLimitColor;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text = Language.Get("PassSkillHoleLimitMount", limit.MountLv);
|
| | | continue;
|
| | | }
|
| | | }
|
| | | else if (limit.OpenSkillSlots > 0)
|
| | | {
|
| | | if (!model.IsTaskHoleUnlock(limit.OpenSkillSlots) || model.UnlockPassHole == limit.OpenSkillSlots)
|
| | | {
|
| | | SetEquipSkillDeActive(i);
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleLimitColor;
|
| | |
|
| | | if (model.taskHoleDict.ContainsKey(limit.OpenSkillSlots))
|
| | | if (PlayerDatas.Instance.baseData.LV < limit.level)
|
| | | {
|
| | | var taskId = model.taskHoleDict[limit.OpenSkillSlots];
|
| | | var config = PyTaskConfig.Get(taskId);
|
| | | if (PlayerDatas.Instance.baseData.LV < config.lv)
|
| | | SetEquipSkillDeActive(i);
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleLimitColor;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text = Language.Get("PassSkillHoleLimitLv", limit.level);
|
| | | continue;
|
| | | }
|
| | | }
|
| | | else if (limit.vipLv > 0)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv < limit.vipLv)
|
| | | {
|
| | | SetEquipSkillDeActive(i);
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleLimitColor;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text = Language.Get("PassSkillHoleLimitVip", limit.vipLv);
|
| | | continue;
|
| | | }
|
| | | }
|
| | | else if (limit.MountLv > 0)
|
| | | {
|
| | | if (promoteModel.GetMountTotallv() < limit.MountLv)
|
| | | {
|
| | | SetEquipSkillDeActive(i);
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleLimitColor;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text = Language.Get("PassSkillHoleLimitMount", limit.MountLv);
|
| | | continue;
|
| | | }
|
| | | }
|
| | | else if (limit.OpenSkillSlots > 0)
|
| | | {
|
| | | if (!model.IsTaskHoleUnlock(limit.OpenSkillSlots) || model.UnlockPassHole == limit.OpenSkillSlots)
|
| | | {
|
| | | SetEquipSkillDeActive(i);
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleLimitColor;
|
| | |
|
| | | if (model.taskHoleDict.ContainsKey(limit.OpenSkillSlots))
|
| | | {
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text =
|
| | | UIHelper.ReplaceNewLine(Language.Get("PassSkillHoleLimitTask_6", config.lv));
|
| | | continue;
|
| | | var taskId = model.taskHoleDict[limit.OpenSkillSlots];
|
| | | var config = PyTaskConfig.Get(taskId);
|
| | | if (PlayerDatas.Instance.baseData.LV < config.lv)
|
| | | {
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text =
|
| | | UIHelper.ReplaceNewLine(Language.Get("PassSkillHoleLimitTask_6", config.lv));
|
| | | continue;
|
| | | }
|
| | | }
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text =
|
| | | UIHelper.ReplaceNewLine(Language.Get(StringUtility.Contact("PassSkillHoleLimitTask_", limit.OpenSkillSlots)));
|
| | | continue;
|
| | | }
|
| | | else if (model.IsImmediatelyUnlock(i)
|
| | | && model.IsTaskHoleUnlock(limit.OpenSkillSlots))
|
| | | {
|
| | | if (m_ImmediatelyUnlock.gameObject.activeSelf)
|
| | | {
|
| | | m_ImmediatelyUnlock.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text =
|
| | | UIHelper.ReplaceNewLine(Language.Get(StringUtility.Contact("PassSkillHoleLimitTask_", limit.OpenSkillSlots)));
|
| | | continue;
|
| | | }
|
| | | else if (model.IsImmediatelyUnlock(i)
|
| | | && model.IsTaskHoleUnlock(limit.OpenSkillSlots))
|
| | | {
|
| | | if (m_ImmediatelyUnlock.gameObject.activeSelf)
|
| | | {
|
| | | m_ImmediatelyUnlock.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | int _skillId = 0;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text = string.Empty;
|
| | | equipPassSkills[i].skillData.m_LockImg.gameObject.SetActive(false);
|
| | | model.TryGetEquipPassSkills(model.presentSltPage, i, out _skillId);
|
| | | equipPassSkills[i].skillData.SetSkillData(_skillId);
|
| | | }
|
| | | int _skillId = 0;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text = string.Empty;
|
| | | equipPassSkills[i].skillData.m_LockImg.gameObject.SetActive(false);
|
| | | model.TryGetEquipPassSkills(model.presentSltPage, i, out _skillId);
|
| | | equipPassSkills[i].skillData.SetSkillData(_skillId);
|
| | | }
|
| | | }
|
| | |
|
| | | private void CheckReplaceEquipSkill()
|
| | | {
|
| | | for (int i = 0; i < equipPassSkills.Count; i++)
|
| | | for (int i = 0; i < model.passEquipCnt; i++)
|
| | | {
|
| | | var rect = equipPassSkills[i].transform as RectTransform;
|
| | | var des = RectTransformUtility.CalculateRelativeRectTransformBounds(this.transform, rect);
|
| | | var src = RectTransformUtility.CalculateRelativeRectTransformBounds(this.transform, m_DragImg.rectTransform);
|
| | | var dis = Vector3.Distance(des.center, src.center);
|
| | | if (dis < rect.rect.width / 2)
|
| | | if (i < equipPassSkills.Count)
|
| | | {
|
| | | if (CheckOpenGetWays(i) != 0)
|
| | | var rect = equipPassSkills[i].transform as RectTransform;
|
| | | var des = RectTransformUtility.CalculateRelativeRectTransformBounds(this.transform, rect);
|
| | | var src = RectTransformUtility.CalculateRelativeRectTransformBounds(this.transform, m_DragImg.rectTransform);
|
| | | var dis = Vector3.Distance(des.center, src.center);
|
| | | if (dis < rect.rect.width / 2)
|
| | | {
|
| | | //SoundPlayer.Instance.PlayUIAudio(2);
|
| | | return;
|
| | | if (CheckOpenGetWays(i) != 0)
|
| | | {
|
| | | //SoundPlayer.Instance.PlayUIAudio(2);
|
| | | return;
|
| | | }
|
| | | model.SendEquipPassSkills(model.skillDragId, i);
|
| | | if (model.passSkillHoleRedpoints[i].state == RedPointState.Simple)
|
| | | {
|
| | | model.SetDayRemind();
|
| | | }
|
| | | break;
|
| | | }
|
| | | model.SendEquipPassSkills(model.skillDragId, i);
|
| | | if (model.passSkillHoleRedpoints[i].state == RedPointState.Simple)
|
| | | {
|
| | | model.SetDayRemind();
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | using System;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class SkillWin : Window
|
| | | {
|
| | | [SerializeField] Button m_Close;
|
| | | [SerializeField] Button m_Left;
|
| | | [SerializeField] Button m_Right;
|
| | | [SerializeField] FunctionButton m_ActSkill;
|
| | | [SerializeField] FunctionButton m_PassSkill;
|
| | | [SerializeField] FunctionButton m_Talent;
|
| | | [SerializeField] FunctionButton m_TreasureSkill;
|
| | | [SerializeField] FunctionButtonGroup m_FuncGroup;
|
| | | [Header("拖动延迟")]
|
| | | [SerializeField] float m_OnDragDelay = 0.1f;
|
| | |
|
| | | SkillModel m_Model;
|
| | | SkillModel model {
|
| | | get {
|
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<SkillModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | | model.onDragDelay = m_OnDragDelay;
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Close.onClick.AddListener(OnClose);
|
| | | m_ActSkill.onClick.AddListener(OnAccordFunc);
|
| | | m_PassSkill.onClick.AddListener(OnPassFunc);
|
| | | m_Talent.onClick.AddListener(OnTalentFunc);
|
| | | m_TreasureSkill.onClick.AddListener(OnTreasureSkillFunc);
|
| | | m_Left.onClick.AddListener(() => {
|
| | | m_FuncGroup.TriggerLast();
|
| | | });
|
| | | m_Right.onClick.AddListener(() => {
|
| | | m_FuncGroup.TriggerNext();
|
| | | });
|
| | | }
|
| | |
|
| | | private void OnPassFunc()
|
| | | {
|
| | | CloseChild();
|
| | | functionOrder = m_PassSkill.order;
|
| | | WindowCenter.Instance.Open<SkillPassWin>();
|
| | | }
|
| | |
|
| | | private void OnTalentFunc()
|
| | | {
|
| | | CloseChild();
|
| | | functionOrder = m_Talent.order;
|
| | | WindowCenter.Instance.Open<TalentWin>();
|
| | | }
|
| | |
|
| | | private void OnAccordFunc()
|
| | | {
|
| | | CloseChild();
|
| | | functionOrder = m_ActSkill.order;
|
| | | WindowCenter.Instance.Open<SkillAccordWin>();
|
| | | }
|
| | |
|
| | | private void OnTreasureSkillFunc()
|
| | | {
|
| | | CloseChild();
|
| | | functionOrder = m_TreasureSkill.order;
|
| | | WindowCenter.Instance.Open<TreasureSkillWin>();
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | |
|
| | | if (functionOrder == 0 && model.jumpToPass)
|
| | | {
|
| | | functionOrder = m_PassSkill.order;
|
| | | model.jumpToPass = false;
|
| | | }
|
| | |
|
| | | m_FuncGroup.TriggerByOrder(functionOrder);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | model.jumpToPass = false;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | void OnClose()
|
| | | {
|
| | | CloseChild();
|
| | | CloseImmediately();
|
| | | }
|
| | |
|
| | | void CloseChild()
|
| | | {
|
| | | var children = WindowConfig.Get().FindChildWindows("SkillWin");
|
| | | foreach (var window in children)
|
| | | {
|
| | | WindowCenter.Instance.Close(window);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| File was renamed from System/Skill/SkillPanel.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c683bffb2de22ee4cbda7aaaa1243e1d |
| | | timeCreated: 1498562046 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | | fileFormatVersion: 2
|
| | | guid: c683bffb2de22ee4cbda7aaaa1243e1d
|
| | | timeCreated: 1498562046
|
| | | licenseType: Free
|
| | | MonoImporter:
|
| | | serializedVersion: 2
|
| | | defaultReferences: []
|
| | | executionOrder: 0
|
| | | icon: {instanceID: 0}
|
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class TreasurePotentialBehaviour : MonoBehaviour
|
| | | {
|
| | | [SerializeField] Transform m_ContainerLock;
|
| | | [SerializeField] Transform m_ContainerUnlock;
|
| | | [SerializeField] Text m_PotentialName;
|
| | | [SerializeField] Text m_PotentialLevel;
|
| | | [SerializeField] Text m_PotentialLimit;
|
| | | [SerializeField] Text m_PotentialCondition;
|
| | | [SerializeField] Image m_PotentialIcon;
|
| | | [SerializeField] Button m_Func;
|
| | | [SerializeField] RedpointBehaviour m_Redpoint;
|
| | |
|
| | | int skillId = 0;
|
| | |
|
| | | TreasureSkillModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<TreasureSkillModel>(); }
|
| | | }
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | m_Func.AddListener(OnFunc);
|
| | | }
|
| | |
|
| | | public void Display(int skillId)
|
| | | {
|
| | | this.skillId = skillId;
|
| | |
|
| | | bool isOpen = model.IsPotentialUnlock(skillId);
|
| | | m_ContainerLock.gameObject.SetActive(!isOpen);
|
| | | m_ContainerUnlock.gameObject.SetActive(isOpen);
|
| | |
|
| | | TreasurePotential potential;
|
| | | if (model.TryGetPotential(skillId, out potential))
|
| | | {
|
| | | {
|
| | | var skillConfig = potential.GetSkillConfig(potential.level);
|
| | | m_PotentialName.text = skillConfig.SkillName;
|
| | | m_PotentialIcon.SetSprite(skillConfig.IconName);
|
| | | m_PotentialLimit.gameObject.SetActive(potential.level == 0);
|
| | | m_PotentialLevel.gameObject.SetActive(potential.level > 0);
|
| | | m_PotentialLevel.text = StringUtility.Contact("LV", potential.level);
|
| | | m_PotentialIcon.material = potential.level > 0 ? MaterialUtility.GetUIDefaultGraphicMaterial()
|
| | | : MaterialUtility.GetInstantiatedSpriteGrayMaterial();
|
| | | }
|
| | |
|
| | |
|
| | | if (!isOpen)
|
| | | {
|
| | | var treasureSkillId = 0;
|
| | | if (model.ContainsSkill(skillId, out treasureSkillId))
|
| | | {
|
| | | var skillConfig = SkillConfig.Get(treasureSkillId);
|
| | | m_PotentialCondition.text = Language.Get("TreasurePotentialUnlock", skillConfig.SkillName, potential.openLevel);
|
| | | }
|
| | | }
|
| | |
|
| | | m_Redpoint.redpointId = potential.levelUpRedpoint.id;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnFunc()
|
| | | {
|
| | | bool isOpen = model.IsPotentialUnlock(skillId);
|
| | | if (isOpen)
|
| | | {
|
| | | TreasurePotentialLevelUpWin.selectPotentialId = skillId;
|
| | | WindowCenter.Instance.Open<TreasurePotentialLevelUpWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
copy from System/Treasure/TreasurePotentialLines.cs.meta
copy to System/Skill/TreasurePotentialBehaviour.cs.meta
| File was copied from System/Treasure/TreasurePotentialLines.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a79244bb3007bb74bbce789238b8cb13 |
| | | timeCreated: 1530153964 |
| | | guid: c5024aa76e8f6f647aa17c0e4406cbff |
| | | timeCreated: 1550647552 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, February 20, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class TreasurePotentialLevelUpWin : Window
|
| | | {
|
| | | [SerializeField] Image m_SkillIcon;
|
| | | [SerializeField] Text m_SkillName;
|
| | | [SerializeField] Text m_SkillLevel;
|
| | | [SerializeField] Text m_FightPower;
|
| | | [SerializeField] Transform m_ContainerNow;
|
| | | [SerializeField] Text m_SkillDescNow;
|
| | | [SerializeField] Transform m_ContainerNext;
|
| | | [SerializeField] Text m_SkillDescNext;
|
| | | [SerializeField] Transform m_ContainerLevelUp;
|
| | | [SerializeField] Text m_PreSkillCondition;
|
| | | [SerializeField] ItemBehaviour m_Item;
|
| | | [SerializeField] Transform m_ContainerMax;
|
| | | [SerializeField] Button m_LevelUp;
|
| | | [SerializeField] Button m_GetWay;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | public static int selectPotentialId = 0;
|
| | |
|
| | | TreasureSkillModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<TreasureSkillModel>(); }
|
| | | }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_LevelUp.AddListener(LevelUp);
|
| | | m_Close.AddListener(CloseClick);
|
| | | m_GetWay.AddListener(GetWay);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | Display();
|
| | | model.skillLevelUpRefresh += SkillLevelUpRefresh;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | model.skillLevelUpRefresh -= SkillLevelUpRefresh;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void SkillLevelUpRefresh(int id)
|
| | | {
|
| | | if (selectPotentialId == id)
|
| | | {
|
| | | Display();
|
| | | }
|
| | | }
|
| | |
|
| | | public void Display()
|
| | | {
|
| | | TreasurePotential potential;
|
| | | if (model.TryGetPotential(selectPotentialId, out potential))
|
| | | {
|
| | | var config = potential.GetSkillConfig(potential.level);
|
| | | m_SkillIcon.SetSprite(config.IconName);
|
| | | m_SkillName.text = config.SkillName;
|
| | | m_SkillLevel.text = StringUtility.Contact("LV", potential.level);
|
| | | m_FightPower.text = StringUtility.Contact("+", config.FightPower);
|
| | |
|
| | | var isMax = potential.level >= potential.maxLevel;
|
| | | m_ContainerNext.gameObject.SetActive(!isMax);
|
| | |
|
| | | if (potential.level == 0)
|
| | | {
|
| | | m_SkillDescNow.text = Language.Get("TreasurePotentialNowEffect", Language.Get("TreasurePotentialUnLearn"));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_SkillDescNow.text = Language.Get("TreasurePotentialNowEffect", config.Description);
|
| | | }
|
| | |
|
| | | if (!isMax)
|
| | | {
|
| | | var nextConfig = potential.GetSkillConfig(potential.level + 1);
|
| | | m_SkillDescNext.text = Language.Get("TreasurePotentialNextEffect", nextConfig.Description);
|
| | |
|
| | | var preSkill = config.LearnSkillReq;
|
| | |
|
| | | m_PreSkillCondition.gameObject.SetActive(preSkill != 0 && config.LearnSkillLV > 0);
|
| | | if (preSkill != 0 && config.LearnSkillLV > 0)
|
| | | {
|
| | | TreasurePotential prePotential;
|
| | | var satisfyLevel = false;
|
| | | var preSkillLevel = 0;
|
| | | if (model.TryGetPotential(preSkill, out prePotential))
|
| | | {
|
| | | preSkillLevel = prePotential.level;
|
| | | satisfyLevel = preSkillLevel >= config.LearnSkillLV;
|
| | | }
|
| | | var preSkillConfig = SkillConfig.Get(preSkill);
|
| | | var displayLevel = StringUtility.Contact(
|
| | | UIHelper.AppendStringColor(satisfyLevel ? TextColType.Green : TextColType.Red, preSkillLevel.ToString())
|
| | | , "/", config.LearnSkillLV);
|
| | | m_PreSkillCondition.text = Language.Get("PotentialPreSkillCondition",
|
| | | preSkillConfig.SkillName, displayLevel);
|
| | | }
|
| | | }
|
| | |
|
| | | m_ContainerLevelUp.gameObject.SetActive(!isMax);
|
| | | m_ContainerMax.gameObject.SetActive(isMax);
|
| | | m_GetWay.gameObject.SetActive(!isMax);
|
| | |
|
| | | if (!isMax)
|
| | | {
|
| | | var requireSkillConfig = SkillConfig.Get(config.LearnSkillReq);
|
| | | TreasurePotential requirePotential;
|
| | | if (model.TryGetPotential(config.LearnSkillReq, out requirePotential))
|
| | | {
|
| | | m_Item.SetItem(config.ExAttr4, config.ExAttr5);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | var error = 0;
|
| | | bool satisfyLevelUp = model.TryLevelUpPotential(selectPotentialId, out error);
|
| | | m_LevelUp.gameObject.SetActive(satisfyLevelUp);
|
| | | }
|
| | |
|
| | | private void GetWay()
|
| | | {
|
| | | TreasurePotential potential;
|
| | | if (model.TryGetPotential(selectPotentialId, out potential))
|
| | | {
|
| | | var config = potential.GetSkillConfig(potential.level);
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(config.ExAttr4);
|
| | | }
|
| | | }
|
| | |
|
| | | private void LevelUp()
|
| | | {
|
| | | var error = 0;
|
| | | if (model.TryLevelUpPotential(selectPotentialId, out error))
|
| | | {
|
| | | var pak = new C0304_tagCAddSkillPoint();
|
| | | pak.SkillID = (ushort)selectPotentialId;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | | else
|
| | | {
|
| | | model.DisplayLevelUpError(error);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
copy from System/Treasure/TreasurePotentialLines.cs.meta
copy to System/Skill/TreasurePotentialLevelUpWin.cs.meta
| File was copied from System/Treasure/TreasurePotentialLines.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a79244bb3007bb74bbce789238b8cb13 |
| | | timeCreated: 1530153964 |
| | | guid: e0638481d824bb1458261240ff26eba0 |
| | | timeCreated: 1550653809 |
| | | 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 TreasureSkillCell : CellView
|
| | | {
|
| | | [SerializeField] Image m_SkillIcon;
|
| | | [SerializeField] Text m_SkillName;
|
| | | [SerializeField] Text m_SkillLevel;
|
| | | [SerializeField] Transform m_ContainerLock;
|
| | | [SerializeField] Text m_SkillCondition;
|
| | | [SerializeField] Transform m_ContainerSelect;
|
| | | [SerializeField] Button m_Func;
|
| | | [SerializeField] RedpointBehaviour m_Redpoint;
|
| | |
|
| | | int skillId;
|
| | |
|
| | | TreasureSkillModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<TreasureSkillModel>(); }
|
| | | }
|
| | |
|
| | | TreasureModel treasureModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<TreasureModel>(); }
|
| | | }
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | m_Func.onClick.AddListener(OnFunc);
|
| | | }
|
| | |
|
| | | public void Display(int skillId)
|
| | | {
|
| | | this.skillId = skillId;
|
| | |
|
| | | DisplayBase();
|
| | |
|
| | | var treasureId = treasureModel.GetTreasureBySkillId(skillId);
|
| | |
|
| | | var isSkillUnlock = false;
|
| | |
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(treasureId, out treasure))
|
| | | {
|
| | | isSkillUnlock = treasure.state == TreasureState.Collected;
|
| | | }
|
| | |
|
| | | m_ContainerLock.gameObject.SetActive(!isSkillUnlock);
|
| | | m_SkillIcon.material = isSkillUnlock ? MaterialUtility.GetUIDefaultGraphicMaterial() :
|
| | | MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | m_ContainerSelect.gameObject.SetActive(skillId == model.selectSkill);
|
| | | m_SkillLevel.gameObject.SetActive(isSkillUnlock);
|
| | |
|
| | | TreasureSkill treasureSkill;
|
| | | if (model.TryGetSkill(skillId, out treasureSkill))
|
| | | {
|
| | | m_SkillLevel.text = StringUtility.Contact("LV.", treasureSkill.level);
|
| | | m_Redpoint.redpointId = treasureSkill.redpoint.id;
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayBase()
|
| | | {
|
| | | var config = SkillConfig.Get(skillId);
|
| | | m_SkillIcon.SetSprite(config.IconName);
|
| | | m_SkillName.text = config.SkillName;
|
| | |
|
| | | var treasureId = treasureModel.GetTreasureBySkillId(skillId);
|
| | | var treasureConfig = TreasureConfig.Get(treasureId);
|
| | | if (treasureConfig != null)
|
| | | {
|
| | | m_SkillCondition.text = Language.Get("TreasureSkillUnlock", treasureConfig.Name);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnFunc()
|
| | | {
|
| | | TreasureSkill skill;
|
| | | if (model.TryGetSkill(skillId, out skill))
|
| | | {
|
| | | if (skill.level > 0)
|
| | | {
|
| | | model.selectSkill = skillId;
|
| | | }
|
| | | else
|
| | | {
|
| | | var treasureId = treasureModel.GetTreasureBySkillId(skillId);
|
| | | var treasureConfig = TreasureConfig.Get(treasureId);
|
| | | if (treasureConfig != null)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("TreasureSkillUnlock", treasureConfig.Name);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
| File was renamed from System/Treasure/TreasurePotentialLines.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a79244bb3007bb74bbce789238b8cb13 |
| | | timeCreated: 1530153964 |
| | | guid: fe04066f80cc08c4690c7333bff82cf1 |
| | | timeCreated: 1550643246 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class TreasureSkillModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | Dictionary<int, TreasureSkill> treasureSkills = new Dictionary<int, TreasureSkill>();
|
| | | Dictionary<int, List<int>> jobTreasureSkills = new Dictionary<int, List<int>>();
|
| | | List<int> skillLevelUpItems = new List<int>();
|
| | |
|
| | | int m_SelectSkill;
|
| | | public int selectSkill
|
| | | {
|
| | | get { return m_SelectSkill; }
|
| | | set
|
| | | {
|
| | | if (m_SelectSkill != value)
|
| | | {
|
| | | m_SelectSkill = value;
|
| | | if (selectRefresh != null)
|
| | | {
|
| | | selectRefresh();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | bool serverInited = false;
|
| | |
|
| | | public bool requireRemind { get; private set; }
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(103, 10304);
|
| | | public const int REDPOINTID_BASE = 10304000;
|
| | | public static int redpointIndex = 100;
|
| | |
|
| | | PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
|
| | | public event Action selectRefresh;
|
| | | public event Action<int> treasureSkillRefresh;
|
| | | public event Action<int> skillLevelUpRefresh;
|
| | | public event Action<int, int> potentialLevelRefresh;
|
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | |
|
| | | packModel.RefreshItemCountAct += RefreshItemCountAct;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | foreach (var skill in treasureSkills.Values)
|
| | | {
|
| | | skill.Reset();
|
| | | }
|
| | | serverInited = false;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | serverInited = true;
|
| | | requireRemind = true;
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | packModel.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | }
|
| | |
|
| | | private void OnFuncStateChangeEvent(int id)
|
| | | {
|
| | | if (id == 82)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshItemCountAct(PackType packType, int arg2, int itemId)
|
| | | {
|
| | | if (packType == PackType.rptItem && skillLevelUpItems.Contains(itemId))
|
| | | {
|
| | | if (serverInited)
|
| | | {
|
| | | requireRemind = true;
|
| | | }
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | void ParseConfig()
|
| | | {
|
| | | var configs = TreasureSkillConfig.GetValues();
|
| | | var index = 0;
|
| | | foreach (var config in configs)
|
| | | {
|
| | | TreasureSkill treasureSkill;
|
| | | if (!treasureSkills.TryGetValue(config.limitSkillId, out treasureSkill))
|
| | | {
|
| | | treasureSkill = new TreasureSkill(config.limitSkillId, index);
|
| | | treasureSkills.Add(config.limitSkillId, treasureSkill);
|
| | | index++;
|
| | | }
|
| | | treasureSkill.potentials.Add(new TreasurePotential(config.id, 0,
|
| | | config.limitLevel, treasureSkill.redpoint.id));
|
| | | var skillConfig = SkillConfig.Get(config.limitSkillId);
|
| | |
|
| | | List<int> skills;
|
| | | if (!jobTreasureSkills.TryGetValue(skillConfig.UseType, out skills))
|
| | | {
|
| | | skills = new List<int>();
|
| | | jobTreasureSkills.Add(skillConfig.UseType, skills);
|
| | | }
|
| | | if (!skills.Contains(config.limitSkillId))
|
| | | {
|
| | | skills.Add(config.limitSkillId);
|
| | | }
|
| | | }
|
| | |
|
| | | foreach (var skill in treasureSkills.Values)
|
| | | {
|
| | | for (int i = 1; i <= skill.maxLevel; i++)
|
| | | {
|
| | | var config = skill.GetSkillConfig(i);
|
| | | if (!skillLevelUpItems.Contains(config.ExAttr4))
|
| | | {
|
| | | skillLevelUpItems.Add(config.ExAttr4);
|
| | | }
|
| | | }
|
| | |
|
| | | foreach (var potential in skill.potentials)
|
| | | {
|
| | | for (int i = 1; i <= potential.maxLevel; i++)
|
| | | {
|
| | | var config = potential.GetSkillConfig(i);
|
| | | if (!skillLevelUpItems.Contains(config.ExAttr4))
|
| | | {
|
| | | skillLevelUpItems.Add(config.ExAttr4);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TryGetSkills(out List<int> skills)
|
| | | {
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | var useType = (int)Mathf.Pow(2, job);
|
| | | return jobTreasureSkills.TryGetValue(useType, out skills);
|
| | | }
|
| | |
|
| | | public bool TryGetSkill(int skillId, out TreasureSkill treasureSkill)
|
| | | {
|
| | | return treasureSkills.TryGetValue(skillId, out treasureSkill);
|
| | | }
|
| | |
|
| | | public bool TryGetPotential(int skillId, out TreasurePotential potential)
|
| | | {
|
| | | var treasureSkillId = 0;
|
| | | potential = null;
|
| | | if (ContainsSkill(skillId, out treasureSkillId))
|
| | | {
|
| | | var treasureSkill = treasureSkills[treasureSkillId];
|
| | | potential = treasureSkill.potentials.Find((x) =>
|
| | | {
|
| | | return x.id == skillId;
|
| | | });
|
| | | return potential != null;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsPotentialUnlock(int skillId)
|
| | | {
|
| | | var treasureSkillId = 0;
|
| | | if (ContainsSkill(skillId, out treasureSkillId))
|
| | | {
|
| | | var treasureSkill = treasureSkills[treasureSkillId];
|
| | | TreasurePotential potential;
|
| | | if (TryGetPotential(skillId, out potential))
|
| | | {
|
| | | return treasureSkill.level >= potential.openLevel;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public void OnReceivePackage(int oldSkillID, int newSkillID)
|
| | | {
|
| | | var config = SkillConfig.Get(newSkillID);
|
| | | var skillTypeId = config.SkillTypeID;
|
| | | var treasureSkillId = 0;
|
| | | if (ContainsSkill(skillTypeId, out treasureSkillId))
|
| | | {
|
| | | var treasureSkill = treasureSkills[treasureSkillId];
|
| | |
|
| | | var level = 0;
|
| | | if (skillTypeId == treasureSkillId)
|
| | | {
|
| | | level = treasureSkill.level;
|
| | | }
|
| | | else
|
| | | {
|
| | | TreasurePotential potential;
|
| | | if (TryGetPotential(skillTypeId, out potential))
|
| | | {
|
| | | level = potential.level;
|
| | | }
|
| | | }
|
| | |
|
| | | treasureSkill.Refresh(newSkillID);
|
| | |
|
| | | bool levelUp = false;
|
| | | if (skillTypeId == treasureSkillId)
|
| | | {
|
| | | levelUp = treasureSkill.level > level;
|
| | | }
|
| | | else
|
| | | {
|
| | | TreasurePotential potential;
|
| | | if (TryGetPotential(skillTypeId, out potential))
|
| | | {
|
| | | levelUp = potential.level > level;
|
| | | }
|
| | |
|
| | | if (potential != null && potentialLevelRefresh != null)
|
| | | {
|
| | | potentialLevelRefresh(skillTypeId, potential.level);
|
| | | }
|
| | | }
|
| | |
|
| | | if (levelUp && serverInited)
|
| | | {
|
| | | if (skillLevelUpRefresh != null)
|
| | | {
|
| | | skillLevelUpRefresh(skillTypeId);
|
| | | }
|
| | | }
|
| | |
|
| | | if (treasureSkillRefresh != null)
|
| | | {
|
| | | treasureSkillRefresh(skillTypeId);
|
| | | }
|
| | |
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TryLevelUpTreasureSkill(int skillId, out int error)
|
| | | {
|
| | | error = 0;
|
| | | TreasureSkill skill;
|
| | | if (TryGetSkill(skillId, out skill))
|
| | | {
|
| | | if (skill.level >= skill.maxLevel)
|
| | | {
|
| | | error = 1;
|
| | | return false;
|
| | | }
|
| | | var config = skill.GetSkillConfig(skill.level);
|
| | | var count = packModel.GetItemCountByID(PackType.rptItem, config.ExAttr4);
|
| | | if (count < config.ExAttr5)
|
| | | {
|
| | | error = 2;
|
| | | return false;
|
| | | }
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | public bool TryLevelUpPotential(int skillId, out int error)
|
| | | {
|
| | | error = 0;
|
| | | TreasurePotential potential;
|
| | | if (TryGetPotential(skillId, out potential))
|
| | | {
|
| | | if (potential.level >= potential.maxLevel)
|
| | | {
|
| | | error = 11;
|
| | | return false;
|
| | | }
|
| | | var config = potential.GetSkillConfig(potential.level);
|
| | | if (config.LearnSkillReq != 0 && config.LearnSkillLV > 0)
|
| | | {
|
| | | TreasurePotential requirePotential;
|
| | | if (!TryGetPotential(config.LearnSkillReq, out requirePotential)
|
| | | || requirePotential.level < config.LearnSkillLV)
|
| | | {
|
| | | error = 12;
|
| | | return false;
|
| | | }
|
| | | }
|
| | | var count = packModel.GetItemCountByID(PackType.rptItem, config.ExAttr4);
|
| | | if (count < config.ExAttr5)
|
| | | {
|
| | | error = 13;
|
| | | return false;
|
| | | }
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | public void DisplayLevelUpError(int error)
|
| | | {
|
| | | switch (error)
|
| | | {
|
| | | case 1:
|
| | | break;
|
| | | case 2:
|
| | | SysNotifyMgr.Instance.ShowTip("TreasureSkillLevelUpError2");
|
| | | break;
|
| | | case 11:
|
| | | break;
|
| | | case 12:
|
| | | break;
|
| | | case 13:
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | public bool ContainsSkill(int skillId, out int treasureSkillId)
|
| | | {
|
| | | treasureSkillId = 0;
|
| | | foreach (var skill in treasureSkills.Values)
|
| | | {
|
| | | if (skill.skillId == skillId)
|
| | | {
|
| | | treasureSkillId = skill.skillId;
|
| | | return true;
|
| | | }
|
| | | if (skill.potentials.FindIndex((x) =>
|
| | | {
|
| | | return x.id == skillId;
|
| | | }) != -1)
|
| | | {
|
| | | treasureSkillId = skill.skillId;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public void SetAlreadyRemind()
|
| | | {
|
| | | requireRemind = false;
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | void UpdateRedpoint()
|
| | | {
|
| | | var funcOpen = FuncOpen.Instance.IsFuncOpen(82);
|
| | | foreach (var skill in treasureSkills.Values)
|
| | | {
|
| | | var error = 0;
|
| | | if (requireRemind && funcOpen &&
|
| | | TryLevelUpTreasureSkill(skill.skillId, out error)
|
| | | && skill.level > 0)
|
| | | {
|
| | | skill.levelUpRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | skill.levelUpRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | foreach (var potential in skill.potentials)
|
| | | {
|
| | | if (requireRemind && funcOpen &&
|
| | | TryLevelUpPotential(potential.id, out error)
|
| | | && skill.level > 0)
|
| | | {
|
| | | potential.levelUpRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | potential.levelUpRedpoint.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public class TreasureSkill
|
| | | {
|
| | | public readonly int skillId;
|
| | | public readonly int maxLevel;
|
| | |
|
| | | public int level { get; private set; }
|
| | | public Redpoint redpoint { get; private set; }
|
| | | public Redpoint levelUpRedpoint { get; private set; }
|
| | | public List<TreasurePotential> potentials { get; private set; }
|
| | |
|
| | | public TreasureSkill(int skillId, int redpointIndex)
|
| | | {
|
| | | this.skillId = skillId;
|
| | | potentials = new List<TreasurePotential>();
|
| | |
|
| | | var config = SkillConfig.Get(skillId);
|
| | | maxLevel = config.SkillMaxLV;
|
| | |
|
| | | redpoint = new Redpoint(10304,
|
| | | TreasureSkillModel.REDPOINTID_BASE + redpointIndex);
|
| | | levelUpRedpoint = new Redpoint(redpoint.id,
|
| | | TreasureSkillModel.REDPOINTID_BASE + TreasureSkillModel.redpointIndex++);
|
| | | }
|
| | |
|
| | | public SkillConfig GetSkillConfig(int level)
|
| | | {
|
| | | if (level > 0)
|
| | | {
|
| | | return SkillConfig.Get(skillId + level - 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | return SkillConfig.Get(skillId + level);
|
| | | }
|
| | | }
|
| | |
|
| | | public void Refresh(int newSkillId)
|
| | | {
|
| | | var config = SkillConfig.Get(newSkillId);
|
| | | if (config.SkillTypeID == skillId)
|
| | | {
|
| | | level = config.SkillLV;
|
| | | }
|
| | | else
|
| | | {
|
| | | var index = potentials.FindIndex((x) =>
|
| | | {
|
| | | return x.id == config.SkillTypeID;
|
| | | });
|
| | | if (index != -1)
|
| | | {
|
| | | potentials[index].Refresh(newSkillId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void Reset()
|
| | | {
|
| | | level = 0;
|
| | | foreach (var potential in potentials)
|
| | | {
|
| | | potential.Reset();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public class TreasurePotential
|
| | | {
|
| | | public readonly int id;
|
| | | public readonly int openLevel;
|
| | | public readonly int maxLevel;
|
| | | public int level { get; private set; }
|
| | |
|
| | | public Redpoint levelUpRedpoint { get; private set; }
|
| | |
|
| | | public TreasurePotential(int id, int level, int openLevel, int redpointBase)
|
| | | {
|
| | | this.id = id;
|
| | | this.level = level;
|
| | | this.openLevel = openLevel;
|
| | |
|
| | | var config = SkillConfig.Get(id);
|
| | | maxLevel = config.SkillMaxLV;
|
| | |
|
| | | levelUpRedpoint = new Redpoint(redpointBase,
|
| | | TreasureSkillModel.REDPOINTID_BASE + TreasureSkillModel.redpointIndex++);
|
| | | }
|
| | |
|
| | | public SkillConfig GetSkillConfig(int level)
|
| | | {
|
| | | if (level > 0)
|
| | | {
|
| | | return SkillConfig.Get(id + level - 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | return SkillConfig.Get(id + level);
|
| | | }
|
| | | }
|
| | |
|
| | | public void Refresh(int newSkillId)
|
| | | {
|
| | | var config = SkillConfig.Get(newSkillId);
|
| | | if (config.SkillTypeID == id)
|
| | | {
|
| | | level = config.SkillLV;
|
| | | }
|
| | | }
|
| | |
|
| | | public void Reset()
|
| | | {
|
| | | level = 0;
|
| | | }
|
| | | }
|
| | | } |
| | | |
copy from System/Treasure/TreasurePotentialLines.cs.meta
copy to System/Skill/TreasureSkillModel.cs.meta
| File was copied from System/Treasure/TreasurePotentialLines.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a79244bb3007bb74bbce789238b8cb13 |
| | | timeCreated: 1530153964 |
| | | guid: 2bed671cea174f043ac4b86026dfd447 |
| | | timeCreated: 1550631448 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, February 20, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class TreasureSkillWin : Window
|
| | | {
|
| | | [SerializeField] ScrollerController m_Controller;
|
| | |
|
| | | [SerializeField] Text m_SkillName;
|
| | | [SerializeField] Text m_SkillLevel;
|
| | | [SerializeField] Text m_SkillCoolDown;
|
| | | [SerializeField] Transform m_ContainerNow;
|
| | | [SerializeField] Text m_SkillDescNow;
|
| | | [SerializeField] Transform m_ContainerNext;
|
| | | [SerializeField] Text m_SkillDescNext;
|
| | | [SerializeField] Transform m_ContainerLevelUp;
|
| | | [SerializeField] ItemBehaviour m_Item;
|
| | | [SerializeField] Button m_GetWay;
|
| | | [SerializeField] Button m_LevelUp;
|
| | | [SerializeField] RedpointBehaviour m_LevelRedpoint;
|
| | | [SerializeField] Transform m_ContainerMax;
|
| | | [SerializeField] TreasurePotentialBehaviour[] m_TreasurePotentials;
|
| | |
|
| | | TreasureSkillModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<TreasureSkillModel>(); }
|
| | | }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Controller.OnRefreshCell += OnRefreshCell;
|
| | | m_LevelUp.AddListener(LevelUp);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | SetDefaultSelect();
|
| | |
|
| | | Display();
|
| | |
|
| | | model.treasureSkillRefresh += TreasureSkillRefresh;
|
| | | model.selectRefresh += SelectRefresh;
|
| | | model.skillLevelUpRefresh += SkillLevelUpRefresh;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | model.treasureSkillRefresh -= TreasureSkillRefresh;
|
| | | model.selectRefresh -= SelectRefresh;
|
| | | model.skillLevelUpRefresh -= SkillLevelUpRefresh;
|
| | | model.SetAlreadyRemind();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | void SetDefaultSelect()
|
| | | {
|
| | | var selectSkill = 0;
|
| | | List<int> list;
|
| | | if (model.TryGetSkills(out list))
|
| | | {
|
| | | foreach (var skillId in list)
|
| | | {
|
| | | TreasureSkill skill;
|
| | | if (model.TryGetSkill(skillId, out skill))
|
| | | {
|
| | | if (selectSkill == 0 && skill.level > 0)
|
| | | {
|
| | | selectSkill = skillId;
|
| | | }
|
| | | if (skill.redpoint.state == RedPointState.Simple)
|
| | | {
|
| | | selectSkill = skillId;
|
| | | }
|
| | | }
|
| | | }
|
| | | if (selectSkill == 0)
|
| | | {
|
| | | selectSkill = list[0];
|
| | | }
|
| | | }
|
| | | model.selectSkill = selectSkill;
|
| | | }
|
| | |
|
| | | private void Display()
|
| | | {
|
| | | DisplaySkills();
|
| | | DisplaySkillDetial();
|
| | | }
|
| | |
|
| | | private void DisplaySkills()
|
| | | {
|
| | | List<int> list;
|
| | | m_Controller.Refresh();
|
| | | if (model.TryGetSkills(out list))
|
| | | {
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | m_Controller.AddCell(ScrollerDataType.Header, list[i]);
|
| | | }
|
| | | }
|
| | | m_Controller.Restart();
|
| | | }
|
| | |
|
| | | void DisplaySkillDetial()
|
| | | {
|
| | | TreasureSkill skill;
|
| | | m_GetWay.RemoveAllListeners();
|
| | | if (model.TryGetSkill(model.selectSkill, out skill))
|
| | | {
|
| | | var config = skill.GetSkillConfig(skill.level);
|
| | | if (config == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | m_SkillName.text = config.SkillName;
|
| | | m_SkillLevel.text = Language.Get("SkillActLevel", skill.level);
|
| | | m_SkillCoolDown.text = Language.Get("L1065", config.CoolDownTime / 1000);
|
| | | m_SkillDescNow.text = config.Description;
|
| | | m_LevelRedpoint.redpointId = skill.levelUpRedpoint.id;
|
| | |
|
| | | bool isMax = skill.level >= skill.maxLevel;
|
| | | m_ContainerNext.gameObject.SetActive(!isMax);
|
| | | m_ContainerLevelUp.gameObject.SetActive(!isMax);
|
| | | m_ContainerMax.gameObject.SetActive(isMax);
|
| | |
|
| | | if (!isMax)
|
| | | {
|
| | | var nextSkillConfig = SkillConfig.Get(skill.skillId + skill.level);
|
| | | m_SkillDescNext.text = nextSkillConfig.Description;
|
| | | m_Item.SetItem(config.ExAttr4, config.ExAttr5);
|
| | | m_GetWay.AddListener(() =>
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.Daily_EmperorRelic);
|
| | | });
|
| | | }
|
| | |
|
| | | for (int i = 0; i < m_TreasurePotentials.Length; i++)
|
| | | {
|
| | | if (i < skill.potentials.Count)
|
| | | {
|
| | | m_TreasurePotentials[i].gameObject.SetActive(true);
|
| | | m_TreasurePotentials[i].Display(skill.potentials[i].id);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TreasurePotentials[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void LevelUp()
|
| | | {
|
| | | var error = 0;
|
| | | if (model.TryLevelUpTreasureSkill(model.selectSkill, out error))
|
| | | {
|
| | | var pak = new C0304_tagCAddSkillPoint();
|
| | | pak.SkillID = (ushort)model.selectSkill;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | | else
|
| | | {
|
| | | model.DisplayLevelUpError(error);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnRefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | var skillCell = cell as TreasureSkillCell;
|
| | | skillCell.Display(cell.index);
|
| | | }
|
| | |
|
| | | private void TreasureSkillRefresh(int skillId)
|
| | | {
|
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | if (skillId == model.selectSkill)
|
| | | {
|
| | | DisplaySkillDetial();
|
| | | }
|
| | | }
|
| | |
|
| | | private void SelectRefresh()
|
| | | {
|
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | DisplaySkillDetial();
|
| | | }
|
| | |
|
| | | private void SkillLevelUpRefresh(int id)
|
| | | {
|
| | | if (model.selectSkill == id)
|
| | | {
|
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | DisplaySkillDetial();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
copy from System/Treasure/TreasurePotentialLines.cs.meta
copy to System/Skill/TreasureSkillWin.cs.meta
| File was copied from System/Treasure/TreasurePotentialLines.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a79244bb3007bb74bbce789238b8cb13 |
| | | timeCreated: 1530153964 |
| | | guid: 8023a2df1da730a48842b762feded6bc |
| | | timeCreated: 1550642738 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | WindowCenter.Instance.Open<RolePanel>(false, 3);
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.TreasurePotential:
|
| | | treasureModel.currentCategory = TreasureCategory.Human;
|
| | | var list = treasureModel.GetTreasureCategory(TreasureCategory.Human);
|
| | | var gotoId = list[0];
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(list[i], out treasure))
|
| | | {
|
| | | if (treasure.state == TreasureState.Collected && treasure.skillLevelUpRedpoint != null &&
|
| | | treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | gotoId = list[i];
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | treasureModel.selectedTreasure = gotoId;
|
| | | WindowCenter.Instance.Open<TreasureBaseWin>();
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.RolePromote:
|
| | | WindowCenter.Instance.Open<RolePromoteWin>();
|
| | |
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(model.selectedTreasure, out treasure))
|
| | | {
|
| | | var skillConfig = SkillConfig.Get(treasure.unlockSkill);
|
| | | var skillConfig = SkillConfig.Get(treasure.skillId);
|
| | | if (skillConfig != null)
|
| | | {
|
| | | m_SkillIcon.SetSprite(skillConfig.IconName);
|
| | |
| | | if (treasure.treasureStages.Count > 0 &&
|
| | | treasure.treasureStages[0].unlockType == TreasureStageUnlock.Skill)
|
| | | {
|
| | | var _skillId = treasure.unlockSkill;
|
| | | var _skillId = treasure.skillId;
|
| | | var skillConfig = SkillConfig.Get(_skillId);
|
| | | m_AddedEffect.text = skillConfig.Description;
|
| | | }
|
| | |
| | | case FunctionUnlockType.TreasureSkill:
|
| | | Treasure _treaure;
|
| | | ModelCenter.Instance.GetModel<TreasureModel>().TryGetTreasure(m_Id, out _treaure);
|
| | | var _skillCfg = SkillConfig.Get(_treaure.unlockSkill);
|
| | | var _skillCfg = SkillConfig.Get(_treaure.skillId);
|
| | | m_FunctionIcon.SetSprite(_skillCfg.IconName);
|
| | | m_FunctionIcon.SetNativeSize();
|
| | | originalScale = 1f;
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Thursday, May 03, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using System.Linq;
|
| | |
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class HumanTreasureWin : Window
|
| | | {
|
| | | [SerializeField] PositionTween m_PositionTween;
|
| | | [SerializeField] Image m_TreasureName;
|
| | | [SerializeField] Text m_TreasureStory;
|
| | | [SerializeField] Image m_SkillIcon;
|
| | | [SerializeField] Text m_SkillName;
|
| | | [SerializeField] Text m_SkillType;
|
| | | [SerializeField] Text m_SkillDescription;
|
| | | [SerializeField] Transform m_ContainerUnlock;
|
| | | [SerializeField] Button m_Challenge;
|
| | | [SerializeField] Transform m_ContainerCondition;
|
| | | [SerializeField] Text m_Condition;
|
| | |
|
| | | bool animationStep = false;
|
| | |
|
| | | TreasureModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<TreasureModel>(); }
|
| | | }
|
| | |
|
| | | AchievementModel achievementModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<AchievementModel>(); }
|
| | | }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Challenge.AddListener(Challenge);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | Display();
|
| | | TreasureBaseWin.allowSelectTreasure += AllowSelectTreasure;
|
| | | model.treasureSelectedEvent += TreasureSelectedEvent;
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | DisplayAnimation();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | TreasureBaseWin.allowSelectTreasure -= AllowSelectTreasure;
|
| | | model.treasureSelectedEvent -= TreasureSelectedEvent;
|
| | | animationStep = false;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | |
|
| | | void Display()
|
| | | {
|
| | | DisplayBase();
|
| | | DisplayCondition();
|
| | | }
|
| | |
|
| | | void DisplayBase()
|
| | | {
|
| | | var config = TreasureConfig.Get(model.selectedTreasure);
|
| | | m_TreasureName.SetSprite(config.TreasureNameIcon);
|
| | | m_TreasureStory.text = config.Story;
|
| | |
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(model.selectedTreasure, out treasure))
|
| | | {
|
| | | var skillId = treasure.skillId;
|
| | | var skillConfig = SkillConfig.Get(skillId);
|
| | | m_SkillIcon.SetSprite(skillConfig.IconName);
|
| | | m_SkillName.text = skillConfig.SkillName;
|
| | | m_SkillDescription.text = skillConfig.Description;
|
| | | m_SkillType.text = skillConfig.HurtType == 1 ? "PVP" : "PVE";// skillConfig.HurtType == 2 ? "PVE" : string.Empty;
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayCondition()
|
| | | {
|
| | | Treasure treasure;
|
| | | if (!model.TryGetTreasure(model.selectedTreasure, out treasure))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var state = treasure.state;
|
| | |
|
| | | Achievement achievement = null;
|
| | | int achievementId = 0;
|
| | | bool unlockAchievement = false;
|
| | | if (model.TryGetTreasureUnlockAchievement(treasure.id, out achievementId))
|
| | | {
|
| | | if (achievementModel.TryGetAchievement(achievementId, out achievement))
|
| | | {
|
| | | unlockAchievement = true;
|
| | | }
|
| | | }
|
| | | m_Challenge.gameObject.SetActive(!unlockAchievement || achievement.completed);
|
| | | m_ContainerCondition.gameObject.SetActive(unlockAchievement && !achievement.completed);
|
| | |
|
| | | if (state == TreasureState.Collected)
|
| | | {
|
| | | m_Challenge.gameObject.SetActive(false);
|
| | | m_ContainerCondition.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | if (model.IsVersionUnOpenTreasure(treasure.id))
|
| | | {
|
| | | m_Condition.text = Language.Get("TreasureNoOpen");
|
| | | return;
|
| | | }
|
| | |
|
| | | if (unlockAchievement && !achievement.completed)
|
| | | {
|
| | | var config = SuccessConfig.Get(achievementId);
|
| | | var _missionId = config.Condition[0];
|
| | | var _taskConfig = PyTaskConfig.Get(_missionId);
|
| | | if (_taskConfig == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | switch (config.Type)
|
| | | {
|
| | | case 1:
|
| | | m_Condition.text = Language.Get("TreasureChallengeLv", config.Condition[0]);
|
| | | break;
|
| | | case 3:
|
| | | m_Condition.text = Language.Get("TreasureGetRequire", _taskConfig.lv);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayAnimation()
|
| | | {
|
| | | animationStep = true;
|
| | | m_ContainerUnlock.gameObject.SetActive(false);
|
| | | m_PositionTween.Play();
|
| | | UI3DTreasureSelectStage.Instance.Tween(OnTreasureTweenComplete);
|
| | | }
|
| | |
|
| | | private void OnTreasureTweenComplete()
|
| | | {
|
| | | animationStep = false;
|
| | | m_ContainerUnlock.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | | private void TreasureSelectedEvent(int obj)
|
| | | {
|
| | | Display();
|
| | | UI3DTreasureSelectStage.Instance.SetEndState();
|
| | | }
|
| | |
|
| | | private void Challenge()
|
| | | {
|
| | | var config = TreasureConfig.Get(model.selectedTreasure);
|
| | | if (config != null)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= config.ChallengeLevel)
|
| | | {
|
| | | model.collectingHuman = model.selectedTreasure;
|
| | | ModelCenter.Instance.GetModel<DungeonModel>().SingleChallenge(TreasureModel.TREASURE_DATAMAPID, config.LineId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private bool AllowSelectTreasure(int treasureId)
|
| | | {
|
| | | if (NewBieCenter.Instance.inGuiding || animationStep)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | | //m_Click.interactable = own >= need;
|
| | | m_AddBtnText.color = own >= need ? UIHelper.GetUIColor(TextColType.NavyBrown) : UIHelper.GetUIColor(TextColType.White);
|
| | | //m_Click.image.material = own >= need ? m_SmoothMask.imageMaterials[0] : m_SmoothMask.imageMaterials[1];
|
| | | var config = TreasureSkillConfig.Get(potentialBook.levelUpId);
|
| | | var upRate = potentialBook.successRate - config.InitialRate;
|
| | | m_SuccessRatio.text = Language.Get("HallowsWin_UpSuccess", StringUtility.Contact((upRate * 0.01f).ToString("f0"), "%"));
|
| | | //var config = TreasureSkillConfig.Get(potentialBook.levelUpId);
|
| | | //var upRate = potentialBook.successRate - config.InitialRate;
|
| | | //m_SuccessRatio.text = Language.Get("HallowsWin_UpSuccess", StringUtility.Contact((upRate * 0.01f).ToString("f0"), "%"));
|
| | | }
|
| | |
|
| | | private void SelectPotentialBook()
|
| | | {
|
| | | //if (own >= need)
|
| | | //{
|
| | | model.selectedPotentialBook = potentialBook.itemId;
|
| | | //model.selectedPotentialBook = potentialBook.itemId;
|
| | | WindowCenter.Instance.Close<PotentialItemUseWin>();
|
| | | //}
|
| | | //else
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | var potential = treasure.GetPotential(model.selectedPotential);
|
| | | var levelUpType = model.GetSkillLevelUpType(potential.id);
|
| | | var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
|
| | | var config = TreasureSkillConfig.Get(levelupId);
|
| | |
|
| | | var books = new List<PotentialBook>();
|
| | | for (int i = 0; i < config.Meterial2ID.Length; i++)
|
| | | {
|
| | | var itemId = config.Meterial2ID[i];
|
| | | var needCount = config.MeterialNum2[i];
|
| | | var rate = config.Rate[i];
|
| | | books.Add(new PotentialBook(itemId, needCount, rate, levelupId));
|
| | | }
|
| | | m_PotentialScroll.Init(books);
|
| | | //var potential = treasure.GetPotential(model.selectedPotential);
|
| | | //var levelUpType = model.GetSkillLevelUpType(potential.id);
|
| | | //var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
|
| | | //var config = TreasureSkillConfig.Get(levelupId);
|
| | | //
|
| | | //var books = new List<PotentialBook>();
|
| | | //for (int i = 0; i < config.Meterial2ID.Length; i++)
|
| | | //{
|
| | | // var itemId = config.Meterial2ID[i];
|
| | | // var needCount = config.MeterialNum2[i];
|
| | | // var rate = config.Rate[i];
|
| | | // books.Add(new PotentialBook(itemId, needCount, rate, levelupId));
|
| | | //}
|
| | | //m_PotentialScroll.Init(books);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | private void GotoComplete()
|
| | | {
|
| | | if (m_TreasureCyclicScroll.showing || treasureModel.treasureStepUpShow
|
| | | || treasureModel.TreasureStageUpLimit(treasureModel.selectedTreasure))
|
| | | if (m_TreasureCyclicScroll.showing || treasureModel.treasureStepUpShow)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | m_TreasureTitle.SetSprite("XT_FB_45");
|
| | | m_Left.image.SetSprite("XT_FB_33");
|
| | | m_Right.image.SetSprite("XT_FB_34");
|
| | | WindowCenter.Instance.Open<TreasureLevelUpWin>();
|
| | | WindowCenter.Instance.Open<HumanTreasureWin>();
|
| | | break;
|
| | | case TreasureCategory.Demon:
|
| | | m_TreasureTitle.SetSprite("XT_FB_46");
|
| | |
| | | achievementModel.achievementAwardableEvent -= OnAchievementAwardable;
|
| | | achievementModel.achievementCompletedEvent -= OnAchievementCompleted;
|
| | | model.treasureStageUpEvent -= OnCastSoul;
|
| | | model.humanTreasureStateChangeEvent -= OnHumanTreasureStateChange;
|
| | | model.potentialLevelChangeEvent -= OnPotentialLevelChange;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent -= OnRedpointUpdate;
|
| | |
|
| | | achievementModel.achievementAwardableEvent += OnAchievementAwardable;
|
| | | achievementModel.achievementCompletedEvent += OnAchievementCompleted;
|
| | | model.treasureStageUpEvent += OnCastSoul;
|
| | | model.humanTreasureStateChangeEvent += OnHumanTreasureStateChange;
|
| | | model.potentialLevelChangeEvent += OnPotentialLevelChange;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent += OnRedpointUpdate;
|
| | | }
|
| | |
|
| | |
| | | achievementModel.achievementAwardableEvent -= OnAchievementAwardable;
|
| | | achievementModel.achievementCompletedEvent -= OnAchievementCompleted;
|
| | | model.treasureStageUpEvent -= OnCastSoul;
|
| | | model.humanTreasureStateChangeEvent -= OnHumanTreasureStateChange;
|
| | | model.potentialLevelChangeEvent -= OnPotentialLevelChange;
|
| | |
|
| | | RedpointCenter.Instance.redpointValueChangeEvent -= OnRedpointUpdate;
|
| | | }
|
| | |
| | | var progress = 0f;
|
| | | try
|
| | | {
|
| | | progress = treasure.progress / (float)treasure.achievements.Count;
|
| | | progress = treasure.progress / (float)config.RequirementTotal;
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | |
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(displayTreasureId, out treasure))
|
| | | {
|
| | | if (!treasure.hasClickChallenge)
|
| | | if (!treasure.alreadyClickChallenge)
|
| | | {
|
| | | var sendInfo = new CA516_tagCMMagicWeaponState();
|
| | | sendInfo.MWID = (uint)displayTreasureId;
|
| | | GameNetSystem.Instance.SendInfo(sendInfo);
|
| | | }
|
| | |
|
| | | treasure.hasClickChallenge = true;
|
| | | treasure.alreadyClickChallenge = true;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | var config = TreasureConfig.Get(displayTreasureId);
|
| | | model.selectedTreasure = displayTreasureId;
|
| | | model.currentCategory = (TreasureCategory)config.Category;
|
| | | model.openFromTreasureCollect = true;
|
| | | WindowCenter.Instance.Open<TreasureBaseWin>();
|
| | | }
|
| | | }
|
| | |
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(humanTreasures[i], out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (humanTreasure != null && humanTreasure.humanState == HumanTreasureState.Challenge)
|
| | | if (treasure != null && treasure.state == TreasureState.Collecting)
|
| | | {
|
| | | return humanTreasures[i];
|
| | | }
|
| | |
| | |
|
| | | private int GetAwakenAbleTreasure()
|
| | | {
|
| | | for (int i = 0; i < humanTreasures.Count; i++)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(humanTreasures[i], out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (humanTreasure != null && humanTreasure.castSoulRedpoint != null && humanTreasure.castSoulRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | return humanTreasures[i];
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private int GetCanCollectSoulTreasure()
|
| | | {
|
| | | for (int i = 0; i < humanTreasures.Count; i++)
|
| | | {
|
| | | if (IsTreasureCollectSoul(humanTreasures[i]))
|
| | | {
|
| | | return humanTreasures[i];
|
| | | }
|
| | | }
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private int GetAwakenUnderwayTreasure1()
|
| | | {
|
| | | return humanTreasures.Find((x) =>
|
| | | {
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(x, out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | var config = TreasureConfig.Get(humanTreasure.id);
|
| | | return humanTreasure != null && humanTreasure.humanState == HumanTreasureState.CastSoul && humanTreasure.stage < config.PreferredStage;
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | );
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private int GetNextChallengeTreasure()
|
| | |
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(humanTreasures[i], out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (humanTreasure != null && humanTreasure.humanState == HumanTreasureState.Locked)
|
| | | if (treasure != null && treasure.state == TreasureState.Locked)
|
| | | {
|
| | | return humanTreasures[i];
|
| | | }
|
| | |
| | |
|
| | | private int GetPotentialUpAbleTreasure()
|
| | | {
|
| | | for (int i = 0; i < humanTreasures.Count; i++)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(humanTreasures[i], out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (humanTreasure != null && humanTreasure.skillLevelUpRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | return humanTreasures[i];
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private int GetPotentialUpTreasure(int _lastPotentialLevel)
|
| | | {
|
| | | for (int i = 0; i < humanTreasures.Count; i++)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(humanTreasures[i], out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (humanTreasure != null && humanTreasure.humanState == HumanTreasureState.Potential)
|
| | | {
|
| | | var lastPotential = humanTreasure.potentials[humanTreasure.potentials.Count - 1];
|
| | | if (lastPotential.level < _lastPotentialLevel)
|
| | | {
|
| | | return humanTreasures[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0; i < humanTreasures.Count; i++)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(humanTreasures[i], out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (humanTreasure != null && humanTreasure.humanState == HumanTreasureState.Potential)
|
| | | {
|
| | | return humanTreasures[i];
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private bool IsTreasureCollectSoul(int _treasureId)
|
| | | {
|
| | | Treasure treasure;
|
| | |
|
| | | if (model.TryGetTreasure(_treasureId, out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (humanTreasure.humanState == HumanTreasureState.CastSoul)
|
| | | {
|
| | | foreach (var achievementGroup in treasure.achievementGroups.Values)
|
| | | {
|
| | | if (achievementGroup.IsAwardable())
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return false;
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
| | | DemonDungeonLabel treasureLabel;
|
| | | TreasureThreeDimensionsBehaviour m_ThreeDimensionsBehaviour;
|
| | |
|
| | | #region 红点
|
| | | private Transform potentialRed;
|
| | | private Transform achievementRed;
|
| | | private Transform stageUpRed;
|
| | |
|
| | | static GameObjectPoolManager.GameObjectPool m_PotentialRedpool;
|
| | | static GameObjectPoolManager.GameObjectPool m_AchievementRedpool;
|
| | | static GameObjectPoolManager.GameObjectPool m_StageUpRedpool;
|
| | | #endregion
|
| | |
|
| | | SFXController treasureEffect;
|
| | | SFXController backLightEffect;
|
| | | SFXController lockEffect;
|
| | | SFXController challengeSfx;
|
| | | SFXController specialSfx;
|
| | | SFXController highestSfx;
|
| | |
|
| | | public Treasure3DConfig paramConfig { get; set; }
|
| | |
|
| | |
| | | static Vector3 m_CacheBottomScale = Vector3.zero;
|
| | |
|
| | | TreasureModel m_Model;
|
| | | TreasureModel model {
|
| | | get {
|
| | | TreasureModel model
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<TreasureModel>());
|
| | | }
|
| | | }
|
| | |
| | | RequestTreasure();
|
| | | RequestBottom();
|
| | | RequestBackLight();
|
| | | RequestRedpoint();
|
| | | RequestHighestEffect();
|
| | | RequestTreasureCanva();
|
| | | UpdateTreasureState();
|
| | | UpdateParam();
|
| | | RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
|
| | | model.demonTreasureDungeonUpdate -= DemonTreasureDungeonUpdate;
|
| | | model.demonTreasureDungeonUpdate += DemonTreasureDungeonUpdate;
|
| | | }
|
| | |
| | | RecycleBackLight();
|
| | | RecycleLockEffect();
|
| | | RecycleCollectingSfx();
|
| | | RecycleRedpoint();
|
| | | RecycleCondition();
|
| | | RecycleTreasureLabel();
|
| | | RecycleHighestEffect();
|
| | | RecycleTreasureCanva();
|
| | | RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
|
| | | model.demonTreasureDungeonUpdate -= DemonTreasureDungeonUpdate;
|
| | | }
|
| | | interactProcessor.SetActive(_active);
|
| | |
| | | {
|
| | | lockEffect.transform.localPosition = paramConfig.lockSfxParam.position;
|
| | | }
|
| | | var count = 0;
|
| | | if (stageUpRed != null)
|
| | | {
|
| | | var _param = UI3DTreasureSelectStage.Instance.stageUpParam;
|
| | | count++;
|
| | | stageUpRed.transform.localPosition = GetRedpointPosition(count);
|
| | | stageUpRed.transform.localScale = _param.scale;
|
| | | }
|
| | | if (achievementRed != null)
|
| | | {
|
| | | var _param = UI3DTreasureSelectStage.Instance.achievementParam;
|
| | | count++;
|
| | | achievementRed.transform.localPosition = GetRedpointPosition(count);
|
| | | achievementRed.transform.localScale = _param.scale;
|
| | | }
|
| | | if (potentialRed != null)
|
| | | {
|
| | | var _param = UI3DTreasureSelectStage.Instance.potentialParam;
|
| | | count++;
|
| | | potentialRed.transform.localPosition = GetRedpointPosition(count);
|
| | | potentialRed.transform.localScale = _param.scale;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | UpdateParam();
|
| | | }
|
| | |
|
| | | public void UpdateTreasureStage()
|
| | | {
|
| | | RequestHighestEffect();
|
| | | }
|
| | |
|
| | | private void RequestBackLight()
|
| | | {
|
| | | RecycleBackLight();
|
| | |
| | | {
|
| | | SFXPlayUtility.Instance.Release(lockEffect);
|
| | | lockEffect = null;
|
| | | }
|
| | | }
|
| | |
|
| | | public void RequestRedpoint()
|
| | | {
|
| | | RecycleRedpoint();
|
| | | Treasure _treasure;
|
| | | model.TryGetTreasure(treasureId, out _treasure);
|
| | | if (_treasure == null || category != TreasureCategory.Human)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var _human = _treasure as HumanTreasure;
|
| | | var count = 0;
|
| | | if (_human.castSoulRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | if (m_StageUpRedpool == null)
|
| | | {
|
| | | var _prefab = UILoader.LoadPrefab("Dian_JueXing");
|
| | | m_StageUpRedpool = GameObjectPoolManager.Instance.RequestPool(_prefab);
|
| | | }
|
| | | stageUpRed = m_StageUpRedpool.Request().transform;
|
| | | stageUpRed.gameObject.SetActive(true);
|
| | | stageUpRed.SetParent(root);
|
| | | stageUpRed.transform.localPosition = Vector3.zero;
|
| | | stageUpRed.LookAt(UI3DTreasureSelectStage.Instance.center);
|
| | | if (stageUpRed != null)
|
| | | {
|
| | | var _param = UI3DTreasureSelectStage.Instance.stageUpParam;
|
| | | count++;
|
| | | stageUpRed.transform.localPosition = GetRedpointPosition(count);
|
| | | stageUpRed.transform.localScale = _param.scale;
|
| | | }
|
| | | LayerUtility.SetLayer(stageUpRed.gameObject, LayerUtility.UILayer, true);
|
| | | }
|
| | | if (_human.achievementRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | if (m_AchievementRedpool == null)
|
| | | {
|
| | | var _prefab = UILoader.LoadPrefab("Dian_JiHun");
|
| | | m_AchievementRedpool = GameObjectPoolManager.Instance.RequestPool(_prefab);
|
| | | }
|
| | | achievementRed = m_AchievementRedpool.Request().transform;
|
| | | achievementRed.gameObject.SetActive(true);
|
| | | achievementRed.SetParent(root);
|
| | | achievementRed.transform.localPosition = Vector3.zero;
|
| | | achievementRed.LookAt(UI3DTreasureSelectStage.Instance.center);
|
| | | if (achievementRed != null)
|
| | | {
|
| | | var _param = UI3DTreasureSelectStage.Instance.achievementParam;
|
| | | count++;
|
| | | achievementRed.transform.localPosition = GetRedpointPosition(count);
|
| | | achievementRed.transform.localScale = _param.scale;
|
| | | }
|
| | | LayerUtility.SetLayer(achievementRed.gameObject, LayerUtility.UILayer, true);
|
| | | }
|
| | | if (_human.skillLevelUpRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | if (m_PotentialRedpool == null)
|
| | | {
|
| | | var _prefab = UILoader.LoadPrefab("Dian_Gong");
|
| | | m_PotentialRedpool = GameObjectPoolManager.Instance.RequestPool(_prefab);
|
| | | }
|
| | | potentialRed = m_PotentialRedpool.Request().transform;
|
| | | potentialRed.gameObject.SetActive(true);
|
| | | potentialRed.SetParent(root);
|
| | | potentialRed.transform.localPosition = Vector3.zero;
|
| | | potentialRed.LookAt(UI3DTreasureSelectStage.Instance.center);
|
| | | if (potentialRed != null)
|
| | | {
|
| | | var _param = UI3DTreasureSelectStage.Instance.potentialParam;
|
| | | count++;
|
| | | potentialRed.transform.localPosition = GetRedpointPosition(count);
|
| | | potentialRed.transform.localScale = _param.scale;
|
| | | }
|
| | | LayerUtility.SetLayer(potentialRed.gameObject, LayerUtility.UILayer, true);
|
| | | }
|
| | | }
|
| | |
|
| | | public Vector3 GetRedpointPosition(int _count)
|
| | | {
|
| | | if (_count == 1)
|
| | | {
|
| | | return UI3DTreasureSelectStage.Instance.achievementParam.position;
|
| | | }
|
| | | else if (_count == 2)
|
| | | {
|
| | | return UI3DTreasureSelectStage.Instance.potentialParam.position;
|
| | | }
|
| | | else
|
| | | {
|
| | | return UI3DTreasureSelectStage.Instance.stageUpParam.position;
|
| | | }
|
| | | }
|
| | |
|
| | | private void RedpointValueChangeEvent(int _id)
|
| | | {
|
| | | if (UI3DTreasureSelectStage.Instance.IsCloser)
|
| | | {
|
| | | return;
|
| | | }
|
| | | Treasure _treasure;
|
| | | model.TryGetTreasure(treasureId, out _treasure);
|
| | | if (_treasure == null || category != TreasureCategory.Human)
|
| | | {
|
| | | return;
|
| | | }
|
| | | bool _update = false;
|
| | | if (_treasure.skillLevelUpRedpoint.id == _id
|
| | | || _treasure.achievementRedpoint.id == _id)
|
| | | {
|
| | | _update = true;
|
| | | }
|
| | | if (_treasure is HumanTreasure)
|
| | | {
|
| | | var _human = _treasure as HumanTreasure;
|
| | | if (_human.castSoulRedpoint.id == _id)
|
| | | {
|
| | | _update = true;
|
| | | }
|
| | | }
|
| | | if (_update)
|
| | | {
|
| | | RequestRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | public void RecycleRedpoint()
|
| | | {
|
| | | if (m_PotentialRedpool != null && potentialRed != null)
|
| | | {
|
| | | m_PotentialRedpool.Release(potentialRed.gameObject);
|
| | | potentialRed = null;
|
| | | }
|
| | | if (m_AchievementRedpool != null && achievementRed != null)
|
| | | {
|
| | | m_AchievementRedpool.Release(achievementRed.gameObject);
|
| | | achievementRed = null;
|
| | | }
|
| | | if (m_StageUpRedpool != null && stageUpRed != null)
|
| | | {
|
| | | m_StageUpRedpool.Release(stageUpRed.gameObject);
|
| | | stageUpRed = null;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void RequestHighestEffect()
|
| | | {
|
| | | RecycleHighestEffect();
|
| | | Treasure _treasure;
|
| | | if (category == TreasureCategory.Human &&
|
| | | model.TryGetTreasure(treasureId, out _treasure) && _treasure.IsHighestStage && _treasure.state == TreasureState.Collected
|
| | | && !model.GetTreasureFinishAnim(treasureId) && model.GetTreasureUnlockShow(TreasureCategory.Human) != treasureId)
|
| | | {
|
| | | highestSfx = SFXPlayUtility.Instance.Play(5197, root);
|
| | | if (highestSfx != null)
|
| | | {
|
| | | var animator = highestSfx.GetComponentInChildren<Animator>(true);
|
| | | if (animator != null)
|
| | | {
|
| | | animator.Play(HUMAN_HIGHEST_STAGE_1, 0, UI3DTreasureSelectStage.sync_normalizedTime);
|
| | | }
|
| | | highestSfx.duration = 0;
|
| | | LayerUtility.SetLayer(highestSfx.gameObject, LayerUtility.UILayer, true);
|
| | | highestSfx.transform.localPosition = Vector3.zero;
|
| | | highestSfx.transform.LookAt(UI3DTreasureSelectStage.Instance.center);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void RecycleHighestEffect()
|
| | | {
|
| | | if (highestSfx != null)
|
| | | {
|
| | | highestSfx.gameObject.SetActive(false);
|
| | | SFXPlayUtility.Instance.Release(highestSfx);
|
| | | highestSfx = null;
|
| | | }
|
| | | }
|
| | |
|
| | | public void RequestTreasureCanva()
|
| | | {
|
| | | RecycleTreasureCanva();
|
| | |
| | | RecycleName();
|
| | | RecycleBackLight();
|
| | | RecycleLockEffect();
|
| | | RecycleRedpoint();
|
| | | RecycleCondition();
|
| | | RecycleTreasureLabel();
|
| | | RecycleHighestEffect();
|
| | | RecycleTreasureCanva();
|
| | | RequestSpecialEffect();
|
| | |
|
| | |
| | | {
|
| | | RequestBottom();
|
| | | RequestName();
|
| | | RequestRedpoint();
|
| | | RequestHighestEffect();
|
| | | RequestTreasureCanva();
|
| | | UpdateTreasureState();
|
| | | RecycleSpecialEffect();
|
| | |
| | | }
|
| | | if (model.treasureGotoId != 0 && model.treasureGotoId != 101)
|
| | | {
|
| | | model.openFromTreasureUnlockShow = true;
|
| | | UI3DTreasureSelectStage.Instance.OnPointDownTreasure(model.treasureGotoId);
|
| | | model.treasureGotoId = 0;
|
| | | }
|
| | | UI3DTreasureSelectStage.Instance.CompleteUnlock();
|
| | | model.treasureGotoId = 0;
|
| | | }
|
| | |
|
| | | public void PlayHighestShow()
|
| | | {
|
| | | RecycleHighestEffect();
|
| | | var _effect = SFXPlayUtility.Instance.Play(5197, root);
|
| | | if (_effect != null)
|
| | | {
|
| | | var animator = _effect.GetComponentInChildren<Animator>(true);
|
| | | if (animator != null)
|
| | | {
|
| | | animator.Play(HUMAN_HIGHEST_STAGE_2, 0, 0);
|
| | | }
|
| | | LayerUtility.SetLayer(_effect.gameObject, LayerUtility.UILayer, true);
|
| | | _effect.transform.LookAt(UI3DTreasureSelectStage.Instance.center);
|
| | | _effect.transform.localPosition = Vector3.zero;
|
| | | _effect.duration = 3.0f;
|
| | | }
|
| | | SnxxzGame.Instance.StartCoroutine(Co_HighestShow());
|
| | | }
|
| | |
|
| | | IEnumerator Co_HighestShow()
|
| | | {
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(2.2f);
|
| | | model.SetTreasureFinishAnim(treasureId, false);
|
| | | if (display)
|
| | | {
|
| | | UpdateTreasureStage();
|
| | | }
|
| | | UI3DTreasureSelectStage.Instance.ReCheckTreasureHighest();
|
| | | }
|
| | |
|
| | | bool RequireGrayTreasureSkin()
|
| | |
| | | {
|
| | | public int id { get; private set; }
|
| | |
|
| | | int m_Stage;
|
| | | public int stage
|
| | | {
|
| | | get { return m_Stage; }
|
| | | private set { m_Stage = value; }
|
| | | }
|
| | | public int stage { get; private set; }
|
| | |
|
| | | public int exp { get; private set; }
|
| | |
|
| | | bool m_HasClickChallenge = false;
|
| | | public bool hasClickChallenge
|
| | | {
|
| | | get { return m_HasClickChallenge; }
|
| | | set { m_HasClickChallenge = value; }
|
| | | }
|
| | | public bool alreadyClickChallenge { get; set; }
|
| | |
|
| | | TreasureState m_State = TreasureState.Locked;
|
| | | public TreasureState state
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public int unlockSkill
|
| | | public int skillId
|
| | | {
|
| | | get
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public int autoSelectPotential { get; set; }
|
| | |
|
| | | Dictionary<int, List<TreasurePotential>> jobToPotentials = new Dictionary<int, List<TreasurePotential>>();
|
| | | public List<TreasureStage> treasureStages = new List<TreasureStage>();
|
| | |
|
| | | public List<TreasurePotential> potentials
|
| | | {
|
| | | get
|
| | | {
|
| | | if (jobToPotentials.ContainsKey(PlayerDatas.Instance.baseData.Job))
|
| | | {
|
| | | return jobToPotentials[PlayerDatas.Instance.baseData.Job];
|
| | | }
|
| | | else
|
| | | {
|
| | | return null;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public List<int> achievements = new List<int>();
|
| | | public Dictionary<int, AchievementGroup> achievementGroups = new Dictionary<int, AchievementGroup>();
|
| | |
|
| | | public Redpoint skillLevelUpRedpoint { get; private set; }
|
| | | public Redpoint achievementRedpoint { get; private set; }
|
| | |
|
| | | public Treasure(int _id, int[] _potentialIds, Redpoint _skillLevelUpRedpoint, Redpoint _achievementPoint)
|
| | | public Treasure(int _id)
|
| | | {
|
| | | this.id = _id;
|
| | | this.skillLevelUpRedpoint = _skillLevelUpRedpoint;
|
| | | this.achievementRedpoint = _achievementPoint;
|
| | |
|
| | | var config = TreasureConfig.Get(this.id);
|
| | | List<int> _expAchievements;
|
| | | if (SuccessConfig.TryGetTreasureExpAchievements(_id, out _expAchievements))
|
| | | {
|
| | | achievements.AddRange(_expAchievements);
|
| | | }
|
| | |
|
| | | foreach (var achievement in achievements)
|
| | | {
|
| | | var achievementConfig = SuccessConfig.Get(achievement);
|
| | |
|
| | | AchievementGroup group;
|
| | | if (achievementGroups.ContainsKey(achievementConfig.Group))
|
| | | {
|
| | | group = achievementGroups[achievementConfig.Group];
|
| | | }
|
| | | else
|
| | | {
|
| | | achievementGroups[achievementConfig.Group] = group = new AchievementGroup(achievementConfig.Group);
|
| | | }
|
| | |
|
| | | group.AddAchievement(achievement);
|
| | | }
|
| | |
|
| | | foreach (var group in achievementGroups.Values)
|
| | | {
|
| | | group.Sort();
|
| | | }
|
| | |
|
| | | for (int i = 0; i < _potentialIds.Length; i++)
|
| | | {
|
| | | var skillId = _potentialIds[i];
|
| | | var skillConfig = SkillConfig.Get(skillId);
|
| | | if (skillConfig == null)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | for (int j = 0; j < GeneralDefine.openJobs.Length; j++)
|
| | | {
|
| | | var job = GeneralDefine.openJobs[j];
|
| | | List<TreasurePotential> tempPotentials;
|
| | | if (jobToPotentials.ContainsKey(job))
|
| | | {
|
| | | tempPotentials = jobToPotentials[job];
|
| | | }
|
| | | else
|
| | | {
|
| | | jobToPotentials[job] = tempPotentials = new List<TreasurePotential>();
|
| | | }
|
| | |
|
| | | if (skillConfig.UseType == 0 || skillConfig.UseType == 1 << job)
|
| | | {
|
| | | tempPotentials.Add(new TreasurePotential(skillId, 0));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public TreasurePotential GetPotential(int _potentialId)
|
| | | public void RefreshLevel(int stage, int exp, bool alreadyClickChallenge)
|
| | | {
|
| | | if (potentials == null)
|
| | | {
|
| | | return null;
|
| | | }
|
| | | else
|
| | | {
|
| | | for (int i = 0; i < potentials.Count; i++)
|
| | | {
|
| | | var potential = potentials[i];
|
| | | if (potential.id == _potentialId)
|
| | | {
|
| | | return potential;
|
| | | }
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | | }
|
| | |
|
| | | public TreasurePotential GetPotentialByIndex(int index)
|
| | | {
|
| | | if (potentials == null)
|
| | | {
|
| | | return null;
|
| | | }
|
| | | else
|
| | | {
|
| | | if (index >= 0 && index < potentials.Count)
|
| | | {
|
| | | return potentials[index];
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | | }
|
| | |
|
| | | public void ResetPotentialLevel()
|
| | | {
|
| | | var list = potentials;
|
| | | if (list != null)
|
| | | {
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | list[i].level = 0;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdatePotentialLevel(int _potentialId, int _level)
|
| | | {
|
| | | for (int i = 0; i < potentials.Count; i++)
|
| | | {
|
| | | var potential = potentials[i];
|
| | | if (potential.id == _potentialId)
|
| | | {
|
| | | potential.level = _level;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public AchievementGroup FindAchievementGroup(int _achievementId)
|
| | | {
|
| | | foreach (var key in achievementGroups.Keys)
|
| | | {
|
| | | var achievementGroup = achievementGroups[key];
|
| | | if (achievementGroup.Contain(_achievementId))
|
| | | {
|
| | | return achievementGroup;
|
| | | }
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | private int AchievementCompare(int _lhs, int _rhs)
|
| | | {
|
| | | var configA = SuccessConfig.Get(_lhs);
|
| | | var configB = SuccessConfig.Get(_rhs);
|
| | |
|
| | | return configA.ReOrder < configB.ReOrder ? -1 : 1;
|
| | | }
|
| | |
|
| | | public void ParseTreasureStage(TreasureUpConfig config)
|
| | | {
|
| | | TreasureStage _stage = new TreasureStage(config);
|
| | | treasureStages.Add(_stage);
|
| | | }
|
| | |
|
| | | public void UpdateTreasureLevelExp(int level, int exp, bool _hasClickChallenge)
|
| | | {
|
| | | stage = level;
|
| | | this.stage = stage;
|
| | | this.exp = exp;
|
| | | hasClickChallenge = _hasClickChallenge;
|
| | | if ((this is HumanTreasure))
|
| | | {
|
| | | (this as HumanTreasure).UpdateTreasureState();
|
| | | }
|
| | | this.alreadyClickChallenge = alreadyClickChallenge;
|
| | | }
|
| | |
|
| | | public bool IsHighestStage
|
| | | public void AddTreasureStage(TreasureUpConfig config)
|
| | | {
|
| | | get
|
| | | {
|
| | | return treasureStages.FindIndex((x) =>
|
| | | {
|
| | | return x.stage >= stage + 1;
|
| | | }) == -1;
|
| | | }
|
| | | var _stage = new TreasureStage(config);
|
| | | treasureStages.Add(_stage);
|
| | | }
|
| | |
|
| | | public int GetStageId(int _stageIndex)
|
| | |
| | | }
|
| | | return _stage;
|
| | | }
|
| | | }
|
| | |
|
| | | public class HumanTreasure : Treasure
|
| | | {
|
| | | TreasureModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<TreasureModel>(); }
|
| | | }
|
| | |
|
| | | HumanTreasureState m_State = HumanTreasureState.Locked;
|
| | | public HumanTreasureState humanState
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_State;
|
| | | }
|
| | | private set
|
| | | {
|
| | | m_State = value;
|
| | | model.HumanTreasureStateChange(base.id);
|
| | | }
|
| | | }
|
| | |
|
| | | public HumanTreasure(int _id, int[] _potentialIds, Redpoint _skillLevelUpRedpoint, Redpoint _achievementPoint
|
| | | , Redpoint _castSoulPoint)
|
| | | : base(_id, _potentialIds, _skillLevelUpRedpoint, _achievementPoint)
|
| | | {
|
| | | castSoulRedpoint = _castSoulPoint;
|
| | | }
|
| | |
|
| | | public void UpdateTreasureState()
|
| | | {
|
| | | if (state == TreasureState.Locked)
|
| | | {
|
| | | humanState = HumanTreasureState.Locked;
|
| | | return;
|
| | | }
|
| | | if (state == TreasureState.Collecting)
|
| | | {
|
| | | humanState = HumanTreasureState.Challenge;
|
| | | return;
|
| | | }
|
| | | if (IsHighestStage && FuncOpen.Instance.IsFuncOpen(82))
|
| | | {
|
| | | foreach (var potential in potentials)
|
| | | {
|
| | | var config = SkillConfig.Get(potential.id);
|
| | | var level = potential.level;
|
| | | var isMax = level >= config.SkillMaxLV;
|
| | | if (!isMax)
|
| | | {
|
| | | humanState = HumanTreasureState.Potential;
|
| | | return;
|
| | | }
|
| | | }
|
| | | humanState = HumanTreasureState.Complete;
|
| | | }
|
| | | else
|
| | | {
|
| | | humanState = HumanTreasureState.CastSoul;
|
| | | }
|
| | | }
|
| | |
|
| | | public Redpoint castSoulRedpoint { get; private set; }
|
| | | }
|
| | |
|
| | | public class AchievementGroup
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public class TreasurePotential
|
| | | {
|
| | | public int id { get; private set; }
|
| | | public int level { get; set; }
|
| | |
|
| | | public TreasurePotential(int _id, int _level)
|
| | | {
|
| | | this.id = _id;
|
| | | this.level = _level;
|
| | | }
|
| | | }
|
| | |
|
| | | public struct PotentialBook
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | var skillConfig = SkillConfig.Get(m_Treasure.unlockSkill);
|
| | | var skillConfig = SkillConfig.Get(m_Treasure.skillId);
|
| | | m_ContainerSkill.gameObject.SetActive(skillConfig != null);
|
| | | if (skillConfig != null)
|
| | | {
|
| | |
| | | { |
| | | var config = TreasureConfig.Get(m_Treasure.id); |
| | | m_FunctionTitle.text = Language.Get("Hallows_UnLockSkill"); |
| | | var skillConfig = SkillConfig.Get(m_Treasure.unlockSkill); |
| | | var skillConfig = SkillConfig.Get(m_Treasure.skillId); |
| | | m_FunctionName.text = skillConfig.SkillName; |
| | | m_Icon.SetSprite(skillConfig.IconName); |
| | | |
| | |
| | |
|
| | | public event Action<int> treasureCollectProgressUpdateEvent;
|
| | | public event Action<int> treasureSelectedEvent;
|
| | | public event Action<int> potentialBookSelectEvent;
|
| | | public event Action<TreasureCategory> collectingTreasureChangeEvent;
|
| | | public event Action<int> treasureStateChangeEvent;
|
| | | public event Action<int, int, bool> onPotentialLevelUpResultEvent;
|
| | | public event Action<int, int> potentialLevelChangeEvent;
|
| | | public event Action<int, int> potentialLevelUpdate;
|
| | | public event Action vipKillNPCTreasureEvent;
|
| | | public event Action<int> treasureLevelProgressUpdateEvent;
|
| | | public event Action<int> treasureStageUpEvent;
|
| | | public event Action<int> humanTreasureStateChangeEvent;
|
| | | public event Action<int> demonTreasureDungeonUpdate;
|
| | | public event Action skillLevelUpRedpointUpdate;
|
| | | public event Action demonDungeonChallengeNext;
|
| | |
|
| | | int m_SelectedTreasure = 0;
|
| | |
| | | {
|
| | | treasureSelectedEvent(m_SelectedTreasure);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | int m_SelectedPotential = 0;
|
| | | public int selectedPotential {
|
| | | get { return m_SelectedPotential; }
|
| | | set {
|
| | | if (m_SelectedPotential != value)
|
| | | {
|
| | | m_SelectedPotential = value;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | int m_SelectedPotentialBook = 0;
|
| | | public int selectedPotentialBook {
|
| | | get { return m_SelectedPotentialBook; }
|
| | | set {
|
| | | if (m_SelectedPotentialBook != value)
|
| | | {
|
| | | m_SelectedPotentialBook = value;
|
| | | if (potentialBookSelectEvent != null)
|
| | | {
|
| | | potentialBookSelectEvent(m_SelectedPotentialBook);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | int levelUpTreasureIdBuf = 0;
|
| | | int levelUpPotentialBuf = 0;
|
| | |
|
| | | Dictionary<int, List<int>> skillLevelUpTypes = new Dictionary<int, List<int>>();
|
| | | Dictionary<int, Treasure> treasures = new Dictionary<int, Treasure>();
|
| | | Dictionary<TreasureCategory, List<int>> treasureCategory = new Dictionary<TreasureCategory, List<int>>();
|
| | | Dictionary<int, int> treasureMapDict = new Dictionary<int, int>();
|
| | |
| | | List<int> m_CacheGotAchievements = new List<int>();
|
| | | Dictionary<int, int> treasureStageShowDict = new Dictionary<int, int>();
|
| | | List<int> treasureUnOpens = new List<int>();//版本未开放法宝
|
| | | Dictionary<int, int[]> potentialInitialPowers = new Dictionary<int, int[]>();
|
| | | Dictionary<int, TreasureDungeon> treasureDungeons = new Dictionary<int, TreasureDungeon>();
|
| | | List<int> potentialNextTargetLevels = new List<int>();
|
| | |
|
| | | public Dictionary<int, int> fairyTreasureGetDict { get; private set; }
|
| | |
|
| | |
| | | get { return newGotTreasureId > 0; }
|
| | | }
|
| | |
|
| | | public int treasureEntranceShowId {
|
| | | get { return LocalSave.GetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "_TreasureEntranceShowId")); }
|
| | | set { LocalSave.SetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "_TreasureEntranceShowId"), value); }
|
| | | }
|
| | |
|
| | | public int treasureCollectingShowId {
|
| | | get { return LocalSave.GetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "_TreasureCollectingShowId")); }
|
| | | set { LocalSave.SetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "_TreasureCollectingShowId"), value); }
|
| | | }
|
| | |
|
| | | bool potentialFuncOpen { get; set; }
|
| | |
|
| | | public int treasureGotoId { get; set; }
|
| | |
|
| | | public bool openFromTreasureSoul { get; set; }
|
| | | public bool openFromTreasureUnlockShow { get; set; }
|
| | | public bool openFromTreasureCollect { get; set; }
|
| | | public bool openFromTreasureList { get; set; }
|
| | | public int openFromTaskId { get; set; }
|
| | | public bool inPotentialModifyPower { get; set; }
|
| | |
|
| | | public List<int> castSoulGuideTaskIds { get; private set; }
|
| | | public List<int> guideTreasures { get; private set; }
|
| | |
|
| | | public int treasureBackLvLimit { get; private set; }
|
| | | public float treasureBackPercent { get; private set; }
|
| | | public int treasureExitLvLimit { get; private set; }
|
| | | public int exitRecord { get; set; }
|
| | | public int entranceOpenCondition { get; private set; }
|
| | |
|
| | | public List<int> cacheGotAchievements { get { return m_CacheGotAchievements; } }
|
| | |
|
| | | AchievementModel achievementModel { get { return ModelCenter.Instance.GetModel<AchievementModel>(); } }
|
| | | PackModel packageModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
|
| | | VIPKillNPCTreasure m_VIPKillNPCTreasure;
|
| | | public VIPKillNPCTreasure vipKillNPCTreasure {
|
| | |
| | | public override void Init()
|
| | | {
|
| | | ParseConfigs();
|
| | | ParseSkillLevelUpConfig();
|
| | | ParsePotentialSkillConfig();
|
| | |
|
| | | achievementModel.achievementProgressUpdateEvent += OnAchievementProgressUpdate;
|
| | | achievementModel.achievementAwardableEvent += OnAchievementAwardable;
|
| | | achievementModel.achievementCompletedEvent += OnAchievementCompleted;
|
| | |
|
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += OnGetSkillLevelUpResult;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnTreasurePotentialSPChange;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFunctionStateChange;
|
| | | packageModel.refreshItemCountEvent += OnPackageItemChange;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
|
| | | WindowCenter.Instance.windowAfterOpenEvent += OnWindowOpen;
|
| | | WindowCenter.Instance.windowAfterCloseEvent += OnWindowClose;
|
| | | NewBieCenter.Instance.guideCompletedEvent += GuideComplete;
|
| | |
| | | public override void UnInit()
|
| | | {
|
| | | achievementModel.achievementProgressUpdateEvent -= OnAchievementProgressUpdate;
|
| | | achievementModel.achievementAwardableEvent -= OnAchievementAwardable;
|
| | | achievementModel.achievementCompletedEvent -= OnAchievementCompleted;
|
| | | NewBieCenter.Instance.guideCompletedEvent -= GuideComplete;
|
| | |
|
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= OnGetSkillLevelUpResult;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnTreasurePotentialSPChange;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFunctionStateChange;
|
| | | packageModel.refreshItemCountEvent -= OnPackageItemChange;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
|
| | | WindowCenter.Instance.windowAfterOpenEvent -= OnWindowOpen;
|
| | | WindowCenter.Instance.windowAfterCloseEvent -= OnWindowClose;
|
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | |
| | | {
|
| | | if (playerLevelRefresh)
|
| | | {
|
| | | UpdateAchievementRedpoints();
|
| | | playerLevelRefresh = false;
|
| | | }
|
| | | }
|
| | |
| | | serverInited = false;
|
| | | playerLevelRefresh = false;
|
| | | needDisplayReguluLevelUp = false;
|
| | | potentialFuncOpen = false;
|
| | | treasureUnlockShowDict.Clear();
|
| | | cacheGotAchievements.Clear();
|
| | | foreach (var treasure in treasures.Values)
|
| | | {
|
| | | treasure.state = TreasureState.Locked;
|
| | | treasure.UpdateTreasureLevelExp(0, 0, false);
|
| | | treasure.ResetPotentialLevel();
|
| | | if ((treasure is HumanTreasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | humanTreasure.UpdateTreasureState();
|
| | | }
|
| | | treasure.RefreshLevel(0, 0, false);
|
| | | }
|
| | | foreach (var treasureDungeon in treasureDungeons.Values)
|
| | | {
|
| | |
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | serverInited = true;
|
| | | UpdateAchievementRedpoints();
|
| | | UpdateCastSoulRedpoints();
|
| | | UpdateSkillLevelUpRedpoints();
|
| | | UpdateDemonDungeonRedpoints();
|
| | | }
|
| | |
|
| | |
| | | return treasureUnlockShowDict[_type];
|
| | | }
|
| | |
|
| | | public bool GetPotentialUnlockShow(int _treasureId)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (TryGetTreasure(_treasureId, out treasure))
|
| | | {
|
| | | var potential = treasure.GetPotentialByIndex(1);
|
| | | if (potential != null && IsPotentialUnlock(_treasureId, potential.id))
|
| | | {
|
| | | SetPotentialUnlockShow(_treasureId);
|
| | | return false;
|
| | | }
|
| | | }
|
| | | var _playerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | return LocalSave.GetBool(StringUtility.Contact(_playerId, "_PotentialUnlockShow_", _treasureId));
|
| | | }
|
| | |
|
| | | public void SetPotentialUnlockShow(int _treasureId, bool _value = false)
|
| | | {
|
| | | var _playerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | LocalSave.SetBool(StringUtility.Contact(_playerId, "_PotentialUnlockShow_", _treasureId), _value);
|
| | | }
|
| | |
|
| | | public bool GetSpAnim(int _treasureId)
|
| | | {
|
| | | var list = GetTreasureCategory(TreasureCategory.Human);
|
| | | var index = list.IndexOf(_treasureId);
|
| | | if (index == -1)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | Treasure treasure;
|
| | | if (TryGetTreasure(_treasureId, out treasure))
|
| | | {
|
| | | var potential = treasure.GetPotentialByIndex(1);
|
| | | if (potential != null && IsPotentialUnlock(_treasureId, potential.id))
|
| | | {
|
| | | SetSpAnim(_treasureId);
|
| | | return true;
|
| | | }
|
| | | }
|
| | | uint value = 0;
|
| | | uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.SpAnim, 0), out value);
|
| | | return MathUtility.GetBitValue(value, (ushort)index);
|
| | | }
|
| | |
|
| | | public void SetSpAnim(int _treasureId, bool anim = true)
|
| | | {
|
| | | var list = GetTreasureCategory(TreasureCategory.Human);
|
| | | var index = list.IndexOf(_treasureId);
|
| | | if (index == -1)
|
| | | {
|
| | | return;
|
| | | }
|
| | | uint value = 0;
|
| | | uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.SpAnim, 0), out value);
|
| | | int bitValue = MathUtility.SetBitValue((int)value, (ushort)index, anim);
|
| | | QuickSetting.Instance.SetQuickSetting(QuickSetting.QuickSettingType.SpAnim, bitValue);
|
| | | QuickSetting.Instance.SendPackage();
|
| | | }
|
| | |
|
| | | public bool GetTreasureFinishAnim(int _treasureId)
|
| | | {
|
| | | if (_treasureId == 101)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | var list = GetTreasureCategory(TreasureCategory.Human);
|
| | | var index = list.IndexOf(_treasureId);
|
| | | if (index == -1)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | uint value = 0;
|
| | | uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, 0), out value);
|
| | | return MathUtility.GetBitValue(value, (ushort)index);
|
| | | }
|
| | |
|
| | | public void SetTreasureFinishAnim(int _treasureId, bool anim = true)
|
| | | {
|
| | | var list = GetTreasureCategory(TreasureCategory.Human);
|
| | | var index = list.IndexOf(_treasureId);
|
| | | if (index == -1)
|
| | | {
|
| | | return;
|
| | | }
|
| | | uint value = 0;
|
| | | uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, 0), out value);
|
| | | int bitValue = MathUtility.SetBitValue((int)value, (ushort)index, anim);
|
| | | QuickSetting.Instance.SetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, bitValue);
|
| | | QuickSetting.Instance.SendPackage();
|
| | | }
|
| | |
|
| | | public bool TryGetUnlockShowTreasure(out int _id)
|
| | | {
|
| | | _id = 0;
|
| | |
| | | }
|
| | | var _playerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | LocalSave.SetInt(StringUtility.Contact(_playerId, _type, "_TreasureUnlockShow"), _id);
|
| | | }
|
| | |
|
| | | public void SetTreasureStageShow(int _id, int _stage)
|
| | | {
|
| | | LocalSave.SetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID,
|
| | | "_TreasureStageShow_", _id), _stage);
|
| | | }
|
| | |
|
| | | public int GetTreasureStageShow(int _id)
|
| | | {
|
| | | var _stage = LocalSave.GetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID,
|
| | | "_TreasureStageShow_", _id), -1);
|
| | | return _stage;
|
| | | }
|
| | |
|
| | | public bool TryGetTreasure(int _id, out Treasure _treasure)
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 获得技能的升级类型
|
| | | /// </summary>
|
| | | /// <param name="_skillId"></param>
|
| | | /// <returns></returns>
|
| | | public int GetSkillLevelUpType(int _skillId)
|
| | | public void UpdateTreasureCollectState(uint[] collecteds)
|
| | | {
|
| | | foreach (var key in skillLevelUpTypes.Keys)
|
| | | for (int i = 0; i < collecteds.Length; i++)
|
| | | {
|
| | | if (skillLevelUpTypes[key].Contains(_skillId))
|
| | | {
|
| | | return key;
|
| | | }
|
| | | }
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public void RequestPotentialUpgrade(int _treasureId, int _potentialId, int _costIndex)
|
| | | {
|
| | | levelUpTreasureIdBuf = _treasureId;
|
| | | levelUpPotentialBuf = _potentialId;
|
| | |
|
| | | var info = new CA50D_tagCMMagicWeaponSkillUp();
|
| | | info.SkillTypeID = (ushort)_potentialId;
|
| | | info.CostIndex = (byte)_costIndex;
|
| | |
|
| | | GameNetSystem.Instance.SendInfo(info);
|
| | | }
|
| | |
|
| | | public void UpdateTreasureCollectState(uint[] _gotTreasures)
|
| | | {
|
| | | for (int i = 0; i < _gotTreasures.Length; i++)
|
| | | {
|
| | | var id = (int)_gotTreasures[i];
|
| | | var id = (int)collecteds[i];
|
| | | Treasure treasure;
|
| | | if (TryGetTreasure(id, out treasure))
|
| | | {
|
| | | var config = TreasureConfig.Get(id);
|
| | | if (treasure.state != TreasureState.Collected)
|
| | | {
|
| | | treasure.state = TreasureState.Collected;
|
| | | if (treasure is HumanTreasure)
|
| | | if (config.Category == (int)TreasureCategory.Human)
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | humanTreasure.UpdateTreasureState();
|
| | | UpdateCastSoulRedpoint(treasure.id);
|
| | | if (GetTreasureUnlockShow(TreasureCategory.Human) == treasure.id)
|
| | | {
|
| | | SetTreasureUnlockShow(TreasureCategory.Human, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | if (serverInited)
|
| | | {
|
| | | newGotTreasureId = id;
|
| | | treasureEntranceShowId = id;
|
| | |
|
| | | OpenTreasureNewGot();
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | treasure.state = TreasureState.Collecting;
|
| | | UpdateDemonDungeonRedpoint(treasure.id);
|
| | | if ((TreasureCategory)config.Category == TreasureCategory.Human)
|
| | | {
|
| | | (treasure as HumanTreasure).UpdateTreasureState();
|
| | | }
|
| | | if ((TreasureCategory)config.Category == TreasureCategory.Demon)
|
| | | {
|
| | | collectingDemon = key;
|
| | |
| | | }
|
| | |
|
| | | UpdateStoveRedpoint();
|
| | | UpdateSkillLevelUpRedpoints();
|
| | | }
|
| | |
|
| | | public void UpdateTreasurePotentialInfo(int _oldSkillId, int _newSkillId)
|
| | | {
|
| | | var config = SkillConfig.Get(_newSkillId);
|
| | | foreach (var key in treasures.Keys)
|
| | | {
|
| | | var treasure = treasures[key];
|
| | | if (treasure.GetPotential(config.SkillTypeID) != null)
|
| | | {
|
| | | treasure.UpdatePotentialLevel(config.SkillTypeID, config.SkillLV);
|
| | | if (treasure is HumanTreasure)
|
| | | {
|
| | | (treasure as HumanTreasure).UpdateTreasureState();
|
| | | }
|
| | | if (potentialLevelUpdate != null)
|
| | | {
|
| | | potentialLevelUpdate(config.SkillTypeID, config.SkillLV);
|
| | | }
|
| | | if (potentialLevelChangeEvent != null)
|
| | | {
|
| | | potentialLevelChangeEvent(key, config.SkillTypeID);
|
| | | }
|
| | | UpdateSkillLevelUpRedpoints();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void OnAchievementProgressUpdate(int _achievement)
|
| | |
| | | {
|
| | | int[] achievements = null;
|
| | | var config = TreasureConfig.Get(treasure.id);
|
| | | if ((TreasureCategory)config.Category == TreasureCategory.Human)
|
| | | {
|
| | | achievements = treasure.achievements.ToArray();
|
| | | }
|
| | | else
|
| | | {
|
| | | achievements = config.Achievements;
|
| | | }
|
| | | achievements = config.Achievements;
|
| | | if (achievements == null)
|
| | | {
|
| | | return;
|
| | | continue;
|
| | | }
|
| | | if (Array.IndexOf(achievements, _achievement) != -1)
|
| | | {
|
| | |
| | | var oldProgress = _treasure.progress;
|
| | | var tempProgress = 0;
|
| | | Achievement achievement;
|
| | | //if (achievementModel.TryGetAchievement(config.MainID, out achievement))
|
| | | //{
|
| | | // if (achievement.completed)
|
| | | // {
|
| | | // tempProgress++;
|
| | | // }
|
| | | //}
|
| | |
|
| | | int[] achievements = config.Achievements;
|
| | | if ((TreasureCategory)config.Category == TreasureCategory.Human)
|
| | | {
|
| | | achievements = _treasure.achievements.ToArray();
|
| | | }
|
| | | else
|
| | | {
|
| | | achievements = config.Achievements;
|
| | | }
|
| | |
|
| | | for (int i = 0; i < achievements.Length; i++)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnGetSkillLevelUpResult(H0721_tagMakeItemAnswer _result)
|
| | | {
|
| | | switch ((MakeType)_result.MakeType)
|
| | | {
|
| | | case MakeType.Def_treasureSkillEquip:
|
| | | if (onPotentialLevelUpResultEvent != null)
|
| | | {
|
| | | onPotentialLevelUpResultEvent(levelUpTreasureIdBuf, levelUpPotentialBuf, _result.Result == 1);
|
| | | }
|
| | |
|
| | | levelUpTreasureIdBuf = 0;
|
| | | levelUpPotentialBuf = 0;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnTreasurePotentialSPChange(PlayerDataRefresh refreshType)
|
| | | private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType)
|
| | | {
|
| | | switch (refreshType)
|
| | | {
|
| | | case PlayerDataRefresh.ExAttr7:
|
| | | case PlayerDataRefresh.ExAttr8:
|
| | | UpdateSkillLevelUpRedpoints();
|
| | | break;
|
| | | case PlayerDataRefresh.LV:
|
| | | playerLevelRefresh = true;
|
| | | break;
|
| | |
| | | case PlayerDataRefresh.FightPower:
|
| | | UpdateDemonDungeonRedpoints();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnPackageItemChange(PackType _type, int _index, int _itemId)
|
| | | {
|
| | | if (_type == PackType.Item)
|
| | | {
|
| | | var config = ItemConfig.Get(_itemId);
|
| | | if (config.Type == 6)
|
| | | {
|
| | | UpdateSkillLevelUpRedpoints();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnFunctionStateChange(int _functionId)
|
| | | {
|
| | | if (_functionId == 82)
|
| | | {
|
| | | UpdateSkillLevelUpRedpoints();
|
| | | bool requireCheckUnlockShow = false;
|
| | | if (!potentialFuncOpen && FuncOpen.Instance.IsFuncOpen(82))
|
| | | {
|
| | | requireCheckUnlockShow = true;
|
| | | }
|
| | | potentialFuncOpen = FuncOpen.Instance.IsFuncOpen(82);
|
| | | var list = treasureCategory[TreasureCategory.Human];
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | Treasure treasure;
|
| | | TryGetTreasure(list[i], out treasure);
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | humanTreasure.UpdateTreasureState();
|
| | | if (!serverInited || !treasure.IsHighestStage || !requireCheckUnlockShow)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | if (IsPotentialUnlock(list[i], treasure.potentials[0].id))
|
| | | {
|
| | | SetPotentialUnlockShow(list[i], true);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void UpdateSkillLevelUpRedpoints()
|
| | | {
|
| | | var list = GetTreasureCategory(TreasureCategory.Human);
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | var id = list[i];
|
| | | if (treasures[id].skillLevelUpRedpoint != null)
|
| | | {
|
| | | treasures[id].skillLevelUpRedpoint.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | | var functionOpen = FuncOpen.Instance.IsFuncOpen(82);
|
| | | if (functionOpen)
|
| | | {
|
| | | for (int k = 0; k < 3; k++)
|
| | | {
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | var treasure = treasures[list[i]];
|
| | | if (k < treasure.potentials.Count)
|
| | | {
|
| | | var potential = treasure.potentials[k];
|
| | | Item item;
|
| | | if (SatisfyLevelUpUnlock(list[i], k)
|
| | | && SatisyPotentialLevelUp(list[i], potential.id, out item))
|
| | | {
|
| | | treasure.skillLevelUpRedpoint.state = RedPointState.Simple;
|
| | | treasure.autoSelectPotential = k;
|
| | | if (skillLevelUpRedpointUpdate != null)
|
| | | {
|
| | | skillLevelUpRedpointUpdate();
|
| | | }
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | int minCostTreasure = 0;
|
| | | int minCostPotentialIndex = 0;
|
| | | int minCostItemColor = 0;
|
| | | int minCostItemCount = 0;
|
| | | bool step = false;
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | var treasure = treasures[list[i]];
|
| | | if (treasure.state != TreasureState.Collected || !treasure.IsHighestStage)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | for (int k = 0; k < treasure.potentials.Count; k++)
|
| | | {
|
| | | Item item;
|
| | | if (SatisyPotentialLevelUp(treasure.id, treasure.potentials[k].id, out item))
|
| | | {
|
| | | if (item.id != 0)
|
| | | {
|
| | | var itemConfig = ItemConfig.Get(item.id);
|
| | | var itemColor = itemConfig.ItemColor;
|
| | | if (minCostItemColor == 0 || itemColor < minCostItemColor ||
|
| | | (itemColor == minCostItemColor && item.count < minCostItemCount))
|
| | | {
|
| | | minCostItemColor = itemColor;
|
| | | minCostItemCount = item.count;
|
| | | minCostTreasure = treasure.id;
|
| | | minCostPotentialIndex = k;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | minCostTreasure = treasure.id;
|
| | | minCostPotentialIndex = k;
|
| | | step = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | if (step)
|
| | | {
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (minCostTreasure != 0)
|
| | | {
|
| | | treasures[minCostTreasure].skillLevelUpRedpoint.state = RedPointState.Simple;
|
| | | treasures[minCostTreasure].autoSelectPotential = minCostPotentialIndex;
|
| | | }
|
| | | }
|
| | | if (skillLevelUpRedpointUpdate != null)
|
| | | {
|
| | | skillLevelUpRedpointUpdate();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public int GetSkillLevelUpRedpointTreasure()
|
| | | {
|
| | | var list = GetTreasureCategory(TreasureCategory.Human);
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | var treasure = treasures[list[i]];
|
| | | if (treasure.skillLevelUpRedpoint != null &&
|
| | | treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private void UpdateAchievementRedpoints()
|
| | | {
|
| | | foreach (var id in treasures.Keys)
|
| | | {
|
| | | UpdateAchievementRedpoint(id);
|
| | | }
|
| | | }
|
| | |
|
| | | private void UpdateCastSoulRedpoints()
|
| | | {
|
| | | foreach (var id in treasures.Keys)
|
| | | {
|
| | | UpdateCastSoulRedpoint(id);
|
| | | }
|
| | | }
|
| | |
|
| | | private void UpdateStoveRedpoint()
|
| | | {
|
| | | Treasure treasure;
|
| | |
| | | stoveRedpoint.state = RedPointState.None;
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TreasureStageUpLimit(int _treasureId, bool _tip = true)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= treasureExitLvLimit)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | Treasure _treasure;
|
| | | if (TryGetTreasure(_treasureId, out _treasure))
|
| | | {
|
| | | var human = _treasure as HumanTreasure;
|
| | | if (human != null && human.castSoulRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | if (_tip)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("FabaoAwaken");
|
| | | }
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | private void OnWindowOpen(Window _window)
|
| | |
| | | WindowCenter.Instance.Open<TreasureNewGotWin>();
|
| | | }
|
| | |
|
| | | public bool SatisfyLevelUpUnlock(int treasureId, int index)
|
| | | {
|
| | | if (treasures.ContainsKey(treasureId))
|
| | | {
|
| | | var treasure = treasures[treasureId];
|
| | | if (treasure.state == TreasureState.Collected && treasure.IsHighestStage)
|
| | | {
|
| | | if (index >= 0 && index < treasure.potentials.Count - 1)
|
| | | {
|
| | | var potential = treasure.potentials[index];
|
| | | var nextPotential = treasure.potentials[index + 1];
|
| | | var skillConfig = SkillConfig.Get(nextPotential.id);
|
| | | if (skillConfig.LearnSkillReq > 0)
|
| | | {
|
| | | if (potential.level < skillConfig.LearnSkillLV)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | else if (index == treasure.potentials.Count - 1)
|
| | | {
|
| | | var potential = treasure.GetPotentialByIndex(index);
|
| | | var config = SkillConfig.Get(potential.id);
|
| | | int[] _getSkillArray;
|
| | | if (TryGetPotentialGetSkill(config.SkillTypeID, out _getSkillArray))
|
| | | {
|
| | | if (potential.level < _getSkillArray[0])
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool SatisyPotentialLevelUp(int treasureId, int potentialId, out Item item)
|
| | | {
|
| | | item = default(Item);
|
| | | var treasure = treasures[treasureId];
|
| | | var potential = treasure.GetPotential(potentialId);
|
| | | if (potential == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | var config = SkillConfig.Get(potential.id);
|
| | | if (potential.level >= config.SkillMaxLV)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | if (config.LearnSkillReq > 0)
|
| | | {
|
| | | var preSkillLevelRequirement = config.LearnSkillLV;
|
| | | var preSkill = PlayerDatas.Instance.skill.GetSkillBySkillTypeID(config.LearnSkillReq);
|
| | | var preSkillLevel = preSkill == null ? 0 : preSkill.level;
|
| | |
|
| | | if (preSkillLevel < preSkillLevelRequirement)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | | if (PlayerDatas.Instance.baseData.LV < config.LearnLVReq)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | var levelUpType = GetSkillLevelUpType(potential.id);
|
| | | var levelupId = GetSkillLevelUpId(levelUpType, potential.level + 1);
|
| | | var treasureSkillConfig = TreasureSkillConfig.Get(levelupId);
|
| | | var spOwn = PlayerDatas.Instance.baseData.treasurePotentialSp;
|
| | | var spNeed = treasureSkillConfig.MeterialNum1;
|
| | |
|
| | | if (spOwn < spNeed)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | if (treasureSkillConfig.InitialRate >= 8000)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | else
|
| | | {
|
| | | for (int j = 0; j < treasureSkillConfig.MeterialNum2.Length; j++)
|
| | | {
|
| | | var rate = treasureSkillConfig.Rate[j];
|
| | | if (rate >= 6000)
|
| | | {
|
| | | var itemId = treasureSkillConfig.Meterial2ID[j];
|
| | | var own = packageModel.GetItemCountByID(PackType.Item, itemId);
|
| | | if (own >= treasureSkillConfig.MeterialNum2[j])
|
| | | {
|
| | | item = new Item()
|
| | | {
|
| | | id = itemId,
|
| | | count = treasureSkillConfig.MeterialNum2[j],
|
| | | };
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | private void OnAchievementAwardable(int _achievementId)
|
| | | {
|
| | | foreach (var treasure in treasures.Values)
|
| | | {
|
| | | if (treasure.achievements.Contains(_achievementId))
|
| | | {
|
| | | UpdateAchievementRedpoint(treasure.id);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnAchievementCompleted(int _achievementId)
|
| | | {
|
| | | foreach (var treasure in treasures.Values)
|
| | | {
|
| | | if (treasure.achievements.Contains(_achievementId))
|
| | | {
|
| | | UpdateAchievementRedpoint(treasure.id);
|
| | | }
|
| | |
|
| | | var config = TreasureConfig.Get(treasure.id);
|
| | | if (treasure.achievements.Contains(_achievementId))
|
| | | var achievements = config.Achievements;
|
| | | if (achievements != null)
|
| | | {
|
| | | UpdateTreasureCollectProgress(treasure);
|
| | | if (Array.IndexOf(achievements, _achievementId) != -1)
|
| | | {
|
| | | UpdateTreasureCollectProgress(treasure);
|
| | | }
|
| | | }
|
| | |
|
| | | if (treasure.state == TreasureState.Locked)
|
| | |
| | | if (_pretreasure == null || _pretreasure.state == TreasureState.Collected)
|
| | | {
|
| | | treasure.state = TreasureState.Collecting;
|
| | | (treasure as HumanTreasure).UpdateTreasureState();
|
| | | collectingHuman = treasure.id;
|
| | | if (serverInited)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void UpdateAchievementRedpoint(int _treasureId)
|
| | | {
|
| | | if (!treasures.ContainsKey(_treasureId))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var treasure = treasures[_treasureId];
|
| | | var config = TreasureConfig.Get(_treasureId);
|
| | | treasure.achievementRedpoint.state = RedPointState.None;
|
| | | if ((TreasureCategory)config.Category == TreasureCategory.Human && treasure.state != TreasureState.Collected)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if ((TreasureCategory)config.Category == TreasureCategory.Demon && !FuncOpen.Instance.IsFuncOpen(107))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if((TreasureCategory)config.Category == TreasureCategory.Human && treasure.IsHighestStage)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | foreach (var achievementGroup in treasure.achievementGroups.Values)
|
| | | {
|
| | | if (achievementGroup.IsAwardable())
|
| | | {
|
| | | treasure.achievementRedpoint.state = RedPointState.Simple;
|
| | | break;
|
| | | }
|
| | |
|
| | | treasure.achievementRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void UpdateCastSoulRedpoint(int _treasureId)
|
| | | {
|
| | | if (!treasures.ContainsKey(_treasureId))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var treasure = treasures[_treasureId] as HumanTreasure;
|
| | | if (treasure == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | treasure.castSoulRedpoint.state = RedPointState.None;
|
| | | if (treasure.state != TreasureState.Collected ||
|
| | | treasure.humanState != HumanTreasureState.CastSoul)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var _nextStage = treasure.treasureStages.Find((x) =>
|
| | | {
|
| | | return x.stage == treasure.stage + 1;
|
| | | });
|
| | | if (_nextStage != null)
|
| | | {
|
| | | if (treasure.exp >= _nextStage.exp)
|
| | | {
|
| | | treasure.castSoulRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateTreasureLevelInfo(HA352_tagMCMagicWeaponLVInfo package)
|
| | | {
|
| | | for (int i = 0; i < package.Count; i++)
|
| | |
| | | {
|
| | | _up = true;
|
| | | }
|
| | | treasure.UpdateTreasureLevelExp(package.InfoList[i].LV, (int)package.InfoList[i].Exp, package.InfoList[i].State == 1);
|
| | | if (serverInited && treasure.IsHighestStage)
|
| | | {
|
| | | SetTreasureFinishAnim(treasure.id);
|
| | | }
|
| | | treasure.RefreshLevel(package.InfoList[i].LV, (int)package.InfoList[i].Exp, package.InfoList[i].State == 1);
|
| | | if (treasureLevelProgressUpdateEvent != null)
|
| | | {
|
| | | treasureLevelProgressUpdateEvent(treasure.id);
|
| | | }
|
| | | UpdateCastSoulRedpoint(treasure.id);
|
| | | UpdateAchievementRedpoint(treasure.id);
|
| | | if (serverInited && _up && treasureStageUpEvent != null)
|
| | | {
|
| | | treasureStageUpEvent(treasure.id);
|
| | |
| | | demonTreasureDungeonUpdate(treasureDungeon.treasureId);
|
| | | }
|
| | | }
|
| | | }
|
| | | UpdateSkillLevelUpRedpoints();
|
| | | }
|
| | |
|
| | | public void HumanTreasureStateChange(int _id)
|
| | | {
|
| | | if (humanTreasureStateChangeEvent != null)
|
| | | {
|
| | | humanTreasureStateChangeEvent(_id);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | categoryTreasures.Add(config.ID);
|
| | | var skillLevelUpRedpoint = config.Potentials.Length > 0 ? new Redpoint(CATEGORY_REDPOINTIDS[config.Category - 1], TREASURE_REDPOINTBASE + redpointIndex++) : null;
|
| | | var achievementRedpoint = new Redpoint(CATEGORY_REDPOINTIDS[config.Category - 1], TREASURE_REDPOINTBASE + redpointIndex++);
|
| | | Treasure treasure;
|
| | | if (category == TreasureCategory.Human)
|
| | | {
|
| | | var caseSoulRedpoint = new Redpoint(CATEGORY_REDPOINTIDS[config.Category - 1], TREASURE_REDPOINTBASE + redpointIndex++);
|
| | | treasure = new HumanTreasure(config.ID, config.Potentials, skillLevelUpRedpoint, achievementRedpoint, caseSoulRedpoint);
|
| | | potentialInitialPowers.Add(config.ID, config.SkillPower);
|
| | | }
|
| | | else
|
| | | {
|
| | | treasure = new Treasure(config.ID, config.Potentials, skillLevelUpRedpoint, achievementRedpoint);
|
| | | }
|
| | | Treasure treasure = new Treasure(config.ID);
|
| | |
|
| | | treasures[config.ID] = treasure;
|
| | |
|
| | |
| | | treasureAchievementDict.Add(config.ID, config.Achievements[i]);
|
| | | break;
|
| | | }
|
| | | //else if (config.Category == (int)TreasureCategory.Fairy && config.ID == 301)
|
| | | //{
|
| | | // eightFurnacesAchievements.Add(config.Achievements[i]);
|
| | | //}
|
| | | }
|
| | |
|
| | | if (treasure.state == TreasureState.Locked && config.PreTreasure == 0)
|
| | |
| | | Treasure treasure;
|
| | | if (TryGetTreasure(config.MWID, out treasure))
|
| | | {
|
| | | treasure.ParseTreasureStage(config);
|
| | | treasure.AddTreasureStage(config);
|
| | | }
|
| | | }
|
| | |
|
| | | var funcConfig = FuncConfigConfig.Get("GuideMission");
|
| | | castSoulGuideTaskIds = new List<int>();
|
| | | castSoulGuideTaskIds.AddRange(ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1));
|
| | | guideTreasures = new List<int>();
|
| | | guideTreasures.AddRange(ConfigParse.GetMultipleStr<int>(funcConfig.Numerical2));
|
| | |
|
| | |
| | |
|
| | | funcConfig = FuncConfigConfig.Get("TreasureSkip");
|
| | | treasureBackLvLimit = int.Parse(funcConfig.Numerical1);
|
| | | treasureBackPercent = float.Parse(funcConfig.Numerical2);
|
| | | funcConfig = FuncConfigConfig.Get("TreasureExitLimit");
|
| | | treasureExitLvLimit = int.Parse(funcConfig.Numerical1);
|
| | |
|
| | | funcConfig = FuncConfigConfig.Get("TreasureNoOpen");
|
| | | treasureUnOpens.AddRange(ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1));
|
| | |
| | | }
|
| | | treasureDungeon.ParseDungeonInfo(config);
|
| | | }
|
| | |
|
| | | funcConfig = FuncConfigConfig.Get("TreasureSpTarget");
|
| | | potentialNextTargetLevels.AddRange(ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1));
|
| | | }
|
| | |
|
| | | const string pattern = "\\\"[0-9]+\\\":\\[[0-9|,]*\\]";
|
| | | private void ParseSkillLevelUpConfig()
|
| | | {
|
| | | try
|
| | | {
|
| | | var config = FuncConfigConfig.Get("SPSkillType");
|
| | | var matches = Regex.Matches(config.Numerical1, pattern);
|
| | |
|
| | | for (int i = 0; i < matches.Count; i++)
|
| | | {
|
| | | var match = matches[i].Value;
|
| | | var stringArray = match.Split(':');
|
| | |
|
| | | var key = 0;
|
| | | int.TryParse(Regex.Match(stringArray[0], "[0-9]+").Value, out key);
|
| | | var skillList = skillLevelUpTypes[key] = new List<int>();
|
| | | var skillMatches = Regex.Matches(stringArray[1], "[0-9]{2,}");
|
| | | for (int j = 0; j < skillMatches.Count; j++)
|
| | | {
|
| | | skillList.Add(int.Parse(skillMatches[j].Value));
|
| | | }
|
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public static int GetSkillLevelUpId(int _type, int _level)
|
| | | {
|
| | | return _type * 100 + _level;
|
| | | }
|
| | |
|
| | | public int GetMapIdByTreasure(int _treasureId)
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | Dictionary<int, int[]> m_TreasurePotentialGetSkills = new Dictionary<int, int[]>();
|
| | | private void ParsePotentialSkillConfig()
|
| | | {
|
| | | var _cfg = FuncConfigConfig.Get("PotentialSkillLearn");
|
| | | var _jsonData = LitJson.JsonMapper.ToObject(_cfg.Numerical1);
|
| | | foreach (var _key in _jsonData.Keys)
|
| | | {
|
| | | var _typeId = int.Parse(_key);
|
| | | m_TreasurePotentialGetSkills.Add(_typeId, LitJson.JsonMapper.ToObject<int[]>(_jsonData[_key].ToJson()));
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TryGetPotentialGetSkill(int _skillTypeId, out int[] _array)
|
| | | {
|
| | | return m_TreasurePotentialGetSkills.TryGetValue(_skillTypeId, out _array);
|
| | | }
|
| | |
|
| | | public bool IsPotentialUnlock(int treasureId, int potentialId)
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen(82))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | Treasure treasure;
|
| | | if (TryGetTreasure(treasureId, out treasure))
|
| | | {
|
| | | var potential = treasure.GetPotential(potentialId);
|
| | | if (potential != null)
|
| | | {
|
| | | var skillConfig = SkillConfig.Get(potential.id);
|
| | | if (skillConfig.LearnSkillReq > 0)
|
| | | {
|
| | | var prepotential = treasure.GetPotential(skillConfig.LearnSkillReq);
|
| | | if (prepotential != null && prepotential.level < skillConfig.LearnSkillLV)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | public int GetPotentialInitialPower(int treasureId, int index)
|
| | | {
|
| | | if (potentialInitialPowers.ContainsKey(treasureId))
|
| | | {
|
| | | var powerArray = potentialInitialPowers[treasureId];
|
| | | if (powerArray != null && index < powerArray.Length && index >= 0)
|
| | | {
|
| | | return powerArray[index];
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public bool SatisfyEntranceOpen()
|
| | | {
|
| | | var list = GetTreasureCategory(TreasureCategory.Human);
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | var taskModel = ModelCenter.Instance.GetModel<TaskModel>();
|
| | | var taskModel = ModelCenter.Instance.GetModel<PlayerTaskDatas>();
|
| | | var missions = taskModel.MainTaskDic;
|
| | | if (missions != null)
|
| | | {
|
| | |
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("OpenFabaoHint", taskConfig.lv);
|
| | | }
|
| | | }
|
| | |
|
| | | public int GetPotentialNextTargetLevel(int level)
|
| | | {
|
| | | var list = potentialNextTargetLevels;
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | if (level < list[i])
|
| | | {
|
| | | if (level < list[i] - 1)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public void DemonDungeonChallengeNext(int lineId)
|
| | |
| | | {
|
| | | Treasure treasure;
|
| | | if (TryGetTreasure(list[i], out treasure)
|
| | | && treasure.unlockSkill == skillId)
|
| | | && treasure.skillId == skillId)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | |
| | | m_HumanBtn.onClick.AddListener(() =>
|
| | | {
|
| | | if (UI3DTreasureSelectStage.Instance.currentCategory == TreasureCategory.Human
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser
|
| | | || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | m_DemonBtn.onClick.AddListener(() =>
|
| | | {
|
| | | if (UI3DTreasureSelectStage.Instance.currentCategory == TreasureCategory.Demon
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser
|
| | | || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | m_FairyBtn.onClick.AddListener(() =>
|
| | | {
|
| | | if (UI3DTreasureSelectStage.Instance.currentCategory == TreasureCategory.Fairy
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser
|
| | | || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | m_KingBtn.onClick.AddListener(() =>
|
| | | {
|
| | | if (UI3DTreasureSelectStage.Instance.currentCategory == TreasureCategory.King
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser
|
| | | || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | });
|
| | | m_BackBtn.onClick.AddListener(() =>
|
| | | {
|
| | | if (UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
|
| | | if (UI3DTreasureSelectStage.Instance.UnlockShowing)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | protected override void OnPreOpen()
|
| | | {
|
| | | UI3DTreasureSelectStage.Instance.UnlockShowing = false;
|
| | | UI3DTreasureSelectStage.Instance.treasureFinishShowing = false;
|
| | | if (!UI3DTreasureSelectStage.Instance.IsOpen)
|
| | | {
|
| | | UI3DTreasureSelectStage.Instance.Open(false, model.currentCategory);
|
| | |
| | | UI3DTreasureSelectStage.Instance.OnCameraStartEvent += OnCameraStartEvent;
|
| | | UI3DTreasureSelectStage.Instance.OnCameraBackComplete += OnCameraBackComplete;
|
| | | UI3DTreasureSelectStage.Instance.OnUnlockComplete += OnUnlockComplete;
|
| | | UI3DTreasureSelectStage.Instance.OnHighestComplete += OnHighestComplete;
|
| | | UI3DTreasureSelectStage.Instance.startAnimation += StartAnimation;
|
| | | m_TreasureDrag.OnValueChange += OnValueChange;
|
| | | m_TreasureDrag.OnDragComplete += OnDragComplete;
|
| | |
| | | UI3DTreasureSelectStage.Instance.OnCameraStartEvent -= OnCameraStartEvent;
|
| | | UI3DTreasureSelectStage.Instance.OnCameraBackComplete -= OnCameraBackComplete;
|
| | | UI3DTreasureSelectStage.Instance.OnUnlockComplete -= OnUnlockComplete;
|
| | | UI3DTreasureSelectStage.Instance.OnHighestComplete -= OnHighestComplete;
|
| | | UI3DTreasureSelectStage.Instance.startAnimation -= StartAnimation;
|
| | | m_TreasureDrag.OnValueChange -= OnValueChange;
|
| | | m_TreasureDrag.OnDragComplete -= OnDragComplete;
|
| | |
| | | private void UpdateButtonState()
|
| | | {
|
| | | var _closer = UI3DTreasureSelectStage.Instance.IsCloser
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing|| UI3DTreasureSelectStage.Instance.treasureFinishShowing;
|
| | | if (UI3DTreasureSelectStage.Instance.UnlockShowing
|
| | | || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing;
|
| | | if (UI3DTreasureSelectStage.Instance.UnlockShowing)
|
| | | {
|
| | | m_BackBtn.gameObject.SetActive(false);
|
| | | }
|
| | |
| | | private void ReclickSelect(TreasureCategory category)
|
| | | {
|
| | | if (UI3DTreasureSelectStage.Instance.jumping
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser
|
| | | || UI3DTreasureSelectStage.Instance.treasureFinishShowing)
|
| | | || UI3DTreasureSelectStage.Instance.UnlockShowing || UI3DTreasureSelectStage.Instance.IsCloser)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | var gotoId = 0;
|
| | | switch (category)
|
| | | {
|
| | | case TreasureCategory.Human:
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(list[i], out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | if (treasure.achievementRedpoint.state == RedPointState.Simple
|
| | | || treasure.skillLevelUpRedpoint.state == RedPointState.Simple
|
| | | || humanTreasure.castSoulRedpoint.state == RedPointState.Simple
|
| | | || humanTreasure.humanState == HumanTreasureState.Challenge)
|
| | | {
|
| | | if (list[i] > UI3DTreasureSelectStage.Instance.selectTreasure)
|
| | | {
|
| | | if (rightSelect || gotoId == 0)
|
| | | {
|
| | | gotoId = list[i];
|
| | | break;
|
| | | }
|
| | | }
|
| | | else if (list[i] < UI3DTreasureSelectStage.Instance.selectTreasure)
|
| | | {
|
| | | gotoId = list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case TreasureCategory.Demon:
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | |
| | | public bool CloserComplete { get; private set; }
|
| | | public int jumpTreasure { get; private set; }
|
| | | public bool UnlockShowing { get; set; }
|
| | | public bool treasureFinishShowing { get; set; }
|
| | | public bool Preloading { get; private set; }
|
| | |
|
| | | public GameObject currentTreasureTitle
|
| | |
| | | public event Action OnCameraCloserComplete;
|
| | | public event Action OnCameraBackEvent;
|
| | | public event Action OnUnlockComplete;
|
| | | public event Action OnHighestComplete;
|
| | | public event Action startAnimation;
|
| | |
|
| | | Dictionary<TreasureCategory, List<TreasureComponent>> m_Treasures = new Dictionary<TreasureCategory, List<TreasureComponent>>();
|
| | |
| | | IsCloser = false;
|
| | | CloserComplete = false;
|
| | | UnlockShowing = false;
|
| | | treasureFinishShowing = false;
|
| | | IsOpen = false;
|
| | | jumping = false;
|
| | | Preloading = false;
|
| | |
| | | });
|
| | | if (_component != null && _component.display)
|
| | | {
|
| | | _component.UpdateTreasureStage();
|
| | | _component.SetLayer(CloserComplete ? LayerUtility.DefaultLayer : LayerUtility.UILayer);
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | presentSelectIndex = 0;
|
| | | UnlockShowing = false;
|
| | | treasureFinishShowing = false;
|
| | |
|
| | | currentCategory = _type;
|
| | | model.currentCategory = currentCategory;
|
| | |
| | | {
|
| | | var _treasure = 0;
|
| | | int _index = -1;
|
| | | if (CheckTreasureFinish(out _treasure))
|
| | | {
|
| | | treasureFinishShowing = true;
|
| | | }
|
| | | else if (model.GetTreasureUnlockShow(currentCategory) != 0)
|
| | | if (model.GetTreasureUnlockShow(currentCategory) != 0)
|
| | | {
|
| | | _treasure = model.GetTreasureUnlockShow(currentCategory);
|
| | | model.treasureGotoId = _treasure;
|
| | |
| | | return _index;
|
| | | }
|
| | |
|
| | | private bool CheckTreasureFinish(out int treasureId)
|
| | | {
|
| | | treasureId = 0;
|
| | | if (currentCategory != TreasureCategory.Human)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | var list = model.GetTreasureCategory(TreasureCategory.Human);
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | if (list[i] == 101)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(list[i], out treasure)
|
| | | && treasure.IsHighestStage && model.GetTreasureFinishAnim(list[i]))
|
| | | {
|
| | | treasureId = list[i];
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | int Compare(int x, int y)
|
| | | {
|
| | | Treasure treasure_x;
|
| | |
| | | if (collect_x != collect_y)
|
| | | {
|
| | | return -collect_x.CompareTo(collect_y);
|
| | | }
|
| | | if ((treasure_x is HumanTreasure) && (treasure_y is HumanTreasure))
|
| | | {
|
| | | var humanTreasure_x = treasure_x as HumanTreasure;
|
| | | var humanTreasure_y = treasure_y as HumanTreasure;
|
| | | bool castSoul_x = humanTreasure_x.castSoulRedpoint.state == RedPointState.Simple;
|
| | | bool castSoul_y = humanTreasure_y.castSoulRedpoint.state == RedPointState.Simple;
|
| | | if (castSoul_x != castSoul_y)
|
| | | {
|
| | | return -castSoul_x.CompareTo(castSoul_y);
|
| | | }
|
| | | bool achieve_x = humanTreasure_x.achievementRedpoint.state == RedPointState.Simple;
|
| | | bool achieve_y = humanTreasure_y.achievementRedpoint.state == RedPointState.Simple;
|
| | | if (achieve_x != achieve_y)
|
| | | {
|
| | | return -achieve_x.CompareTo(achieve_y);
|
| | | }
|
| | | bool skillUp_x = humanTreasure_x.skillLevelUpRedpoint.state == RedPointState.Simple;
|
| | | bool skillUp_y = humanTreasure_y.skillLevelUpRedpoint.state == RedPointState.Simple;
|
| | | if (skillUp_x != skillUp_y)
|
| | | {
|
| | | return -skillUp_x.CompareTo(skillUp_y);
|
| | | }
|
| | | }
|
| | |
|
| | | TreasureDungeon treasureDungeonx;
|
| | |
| | | public bool AllowPointClick()
|
| | | {
|
| | | if (IsCloser || UnlockShowing || jumping
|
| | | || draging || BossShowModel.Instance.BossShowing
|
| | | || treasureFinishShowing)
|
| | | || draging || BossShowModel.Instance.BossShowing)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | var _component = m_Treasures[currentCategory][presentSelectIndex];
|
| | | _component.PlayUnlockShow();
|
| | | }
|
| | | else if (treasureFinishShowing)
|
| | | {
|
| | | var _component = m_Treasures[currentCategory][presentSelectIndex];
|
| | | _component.PlayHighestShow();
|
| | | }
|
| | | else
|
| | | {
|
| | | TreasureDungeon treasureDungeon;
|
| | |
| | |
|
| | | public void BegineDrag()
|
| | | {
|
| | | if (IsCloser || UnlockShowing || treasureFinishShowing)
|
| | | if (IsCloser || UnlockShowing)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | private void CameraBackComplete()
|
| | | {
|
| | | IsCloser = false;
|
| | | if (OnCameraBackComplete != null)
|
| | | {
|
| | | OnCameraBackComplete();
|
| | | }
|
| | | IsCloser = false;
|
| | | if (!IsOpen)
|
| | | {
|
| | | return;
|
| | |
| | | var _timer = 0f;
|
| | | while (_timer < _duration && IsOpen && IsCloser)
|
| | | {
|
| | | var _target = 0.62f * _timer / _duration;
|
| | | renderCamera.rect = new Rect(-_target, 0, 1, 1);
|
| | | var offset = currentCategory == TreasureCategory.Human ? 0.3f : -0.62f;
|
| | | var _target = offset * _timer / _duration;
|
| | | renderCamera.rect = new Rect(_target, 0, 1, 1);
|
| | | yield return null;
|
| | | _timer += Time.deltaTime;
|
| | | }
|
| | |
| | |
|
| | | public void SetEndState()
|
| | | {
|
| | | renderCamera.rect = new Rect(-0.62f, 0, 1, 1);
|
| | | var offset = currentCategory == TreasureCategory.Human ? 0.3f : -0.62f;
|
| | | renderCamera.rect = new Rect(offset, 0, 1, 1);
|
| | | var config = ScriptableObjectLoader.LoadSoTreasure3DConfig(selectTreasure);
|
| | | renderCamera.transform.localPosition = config.renderCameraParam.position;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 解锁动画播放完成
|
| | | public void CompleteUnlock()
|
| | | {
|
| | | if (OnUnlockComplete != null)
|
| | |
| | | OnUnlockComplete();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | public void ReCheckTreasureHighest()
|
| | | {
|
| | | treasureFinishShowing = false;
|
| | | if (!IsOpen)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var treasureId = 0;
|
| | | if (CheckTreasureFinish(out treasureId))
|
| | | {
|
| | | treasureFinishShowing = true;
|
| | | }
|
| | | else if (model.GetTreasureUnlockShow(currentCategory) != 0)
|
| | | if (model.GetTreasureUnlockShow(currentCategory) != 0)
|
| | | {
|
| | | UnlockShowing = true;
|
| | | treasureId = model.GetTreasureUnlockShow(currentCategory);
|
| | |
| | | {
|
| | | _component.PlayUnlockShow();
|
| | | }
|
| | | else if (treasureFinishShowing)
|
| | | {
|
| | | _component.PlayHighestShow();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | if (startAnimation != null)
|
| | | {
|
| | | startAnimation();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (OnHighestComplete != null)
|
| | | {
|
| | | OnHighestComplete();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | RegisterModel<JadeDynastyGemModel>();
|
| | | RegisterModel<LuckyTreasureModel>();
|
| | | RegisterModel<EquipModel>();
|
| | | RegisterModel<TreasureSkillModel>();
|
| | | inited = true;
|
| | | }
|
| | |
|
| | |
| | | case JumpUIType.SkillFunc2:
|
| | | case JumpUIType.SkillFunc3:
|
| | | case JumpUIType.SkillFunc2Type2:
|
| | | SetJumpLogic<SkillPanel>(_tagWinSearchModel.TABID);
|
| | | SetJumpLogic<SkillWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.StrengthFunc1:
|
| | | case JumpUIType.StrengthFunc2:
|
| | |
| | | if (_treasure != null)
|
| | | {
|
| | | m_HeroSkillCompletet = callback;
|
| | | var _skillId = _treasure.unlockSkill;
|
| | | var _skillId = _treasure.skillId;
|
| | | var _index = m_TreasureSkills.FindIndex((x) =>
|
| | | {
|
| | | return x.treasureId == _treasureId;
|