Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
Conflicts:
System/EquipGem/EquipStrengthSelectBehaviour.cs
1 文件已重命名
57个文件已修改
6 文件已复制
7个文件已添加
55个文件已删除
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Monday, March 11, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class WashLevelMaxConfig |
| | | { |
| | | |
| | | public readonly int id; |
| | | public readonly int equipType; |
| | | public readonly int equipStar; |
| | | public readonly int levelMax; |
| | | |
| | | public WashLevelMaxConfig() |
| | | { |
| | | } |
| | | |
| | | public WashLevelMaxConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out id); |
| | | |
| | | int.TryParse(tables[1],out equipType); |
| | | |
| | | int.TryParse(tables[2],out equipStar); |
| | | |
| | | int.TryParse(tables[3],out levelMax); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, WashLevelMaxConfig> configs = new Dictionary<string, WashLevelMaxConfig>(); |
| | | public static WashLevelMaxConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("WashLevelMaxConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | WashLevelMaxConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new WashLevelMaxConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static WashLevelMaxConfig 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<WashLevelMaxConfig> GetValues() |
| | | { |
| | | var values = new List<WashLevelMaxConfig>(); |
| | | 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 +"/WashLevelMax.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/WashLevelMax.txt"); |
| | | } |
| | | |
| | | var tempConfig = new WashLevelMaxConfig(); |
| | | 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 WashLevelMaxConfig(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 WashLevelMaxConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
copy from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta
copy to Core/GameEngine/Model/Config/WashLevelMaxConfig.cs.meta
| File was copied from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9132f6584cbf4624a98b972346cfb13f |
| | | timeCreated: 1548838906 |
| | | guid: 4f5f05a190827f847b600b3c9988650a |
| | | timeCreated: 1552298504 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | public partial class WashLevelMaxConfig : IConfigPostProcess |
| | | { |
| | | static Dictionary<int, WashLevelMaxConfig> washLevelMaxConfigs = new Dictionary<int, WashLevelMaxConfig>(); |
| | | |
| | | public void OnConfigParseCompleted() |
| | | { |
| | | var key = equipType * 100 + equipStar; |
| | | washLevelMaxConfigs[key] = this; |
| | | } |
| | | |
| | | public static WashLevelMaxConfig Get(int type, int star) |
| | | { |
| | | var key = type * 100 + star; |
| | | return washLevelMaxConfigs.ContainsKey(key) ? washLevelMaxConfigs[key] : null; |
| | | } |
| | | |
| | | public static int GetMaxLevel( int type) |
| | | { |
| | | var max = 0; |
| | | foreach ( var config in washLevelMaxConfigs.Values) |
| | | { |
| | | if ( config .equipType==type && config .levelMax >max) |
| | | { |
| | | max = config.levelMax; |
| | | } |
| | | } |
| | | |
| | | return max; |
| | | } |
| | | |
| | | } |
copy from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta
copy to Core/GameEngine/Model/TelPartialConfig/PartialWashLevelMaxConfig.cs.meta
| File was copied from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9132f6584cbf4624a98b972346cfb13f |
| | | timeCreated: 1548838906 |
| | | guid: 4d25380bc3cd23d479aa010336985565 |
| | | timeCreated: 1552298532 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | _go.transform.localScale = Vector3.one; |
| | | |
| | | var _monsterData = _go.AddComponent<Bhv_MonsterData>(); |
| | | _monsterData.resName = _resName; |
| | | monsterList.Add(_monsterData); |
| | | |
| | | _monsterData.Load(br); |
| | |
| | | { |
| | | EditorGUILayout.BeginHorizontal(GUILayout.Height(22)); |
| | | EditorGUILayout.LabelField("NPCID", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(50)); |
| | | EditorGUILayout.LabelField(monsterList[i].npcID.ToString(), guiSkin.textField, GUILayout.Height(20), GUILayout.Width(70)); |
| | | monsterList[i].npcID = (uint)EditorGUILayout.IntField((int)monsterList[i].npcID, guiSkin.textField, GUILayout.Height(20), GUILayout.Width(70)); |
| | | EditorGUILayout.LabelField("模型名", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(50)); |
| | | EditorGUILayout.LabelField(monsterList[i].resName, guiSkin.textField, GUILayout.Height(20), GUILayout.Width(70)); |
| | | monsterList[i].resName = EditorGUILayout.TextField(monsterList[i].resName, guiSkin.textField, GUILayout.Height(20), GUILayout.Width(70)); |
| | | if (GUILayout.Button("定高", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20))) |
| | | { |
| | | Vector3 _pos = monsterList[i].transform.position; |
| | |
| | | }
|
| | |
|
| | | public static event Action<H0429_tagObjResetPos> ResetPlayerPosEvent;
|
| | |
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | |
| | |
|
| | | if (vNetData.Reason == 0)
|
| | | {
|
| | | if (!PlayerSitHandler.Instance.playerSitDict.ContainsKey(vNetData.ObjID)
|
| | | || PlayerSitHandler.Instance.playerSitDict[vNetData.ObjID] == 1)
|
| | | if (PlayerSitHandler.Instance.playerSitDict != null)
|
| | | {
|
| | | _actor.IdleImmediate();
|
| | | _actor.StopPathFind();
|
| | | if (!PlayerSitHandler.Instance.playerSitDict.ContainsKey(vNetData.ObjID)
|
| | | || PlayerSitHandler.Instance.playerSitDict[vNetData.ObjID] == 1)
|
| | | {
|
| | | _actor.IdleImmediate();
|
| | | _actor.StopPathFind();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | |
| | | public class DTCA3BB_tagMCEquipPartXLAttrInfo : DtcBasic { |
| | | |
| | | EquipWashModel _washModel; |
| | | EquipWashModel washModel |
| | | { |
| | | get |
| | | { |
| | | return _washModel ?? (_washModel = ModelCenter.Instance.GetModel<EquipWashModel>()); |
| | | } |
| | | } |
| | | EquipTrainModel model { get { return ModelCenter.Instance.GetModel<EquipTrainModel>(); } } |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | |
| | | base.Done(vNetPack); |
| | | |
| | | HA3BB_tagMCEquipPartXLAttrInfo vNetData = vNetPack as HA3BB_tagMCEquipPartXLAttrInfo; |
| | | |
| | | washModel.ReFreshModel(vNetData); |
| | | var vNetData = vNetPack as HA3BB_tagMCEquipPartXLAttrInfo; |
| | | model.UpdateEquipTrainInfo(vNetData); |
| | | |
| | | } |
| | | |
| | |
| | | _npc.KillerServerInstID = PlayerDatas.Instance.PlayerId; |
| | | _npc.ActorInfo.serverDie = true; |
| | | GAMgr.Instance.ServerDie(_npc.ServerInstID); |
| | | GAMgr.Instance.DelayDie(_npc); |
| | | _npc.Die(PlayerDatas.Instance.PlayerId); |
| | | GAMgr.Instance.Release(_npc); |
| | | } |
| | | |
| | | m_EventHandlerDict.Remove(_eventID); |
| | |
| | | #endif |
| | | } |
| | | |
| | | public Snxxz.UI.JadeDynastyGemModel __Gen_Delegate_Imp193(object p0) |
| | | { |
| | | #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); |
| | | |
| | | PCall(L, 1, 1, errFunc); |
| | | |
| | | |
| | | Snxxz.UI.JadeDynastyGemModel __gen_ret = (Snxxz.UI.JadeDynastyGemModel)translator.GetObject(L, errFunc + 1, typeof(Snxxz.UI.JadeDynastyGemModel)); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<int, Snxxz.UI.JadeDynastyEquipModel.JadeDynastySuitAttrData>> __Gen_Delegate_Imp194(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | |
| | | #endif |
| | | } |
| | | |
| | | public Snxxz.UI.GemModel __Gen_Delegate_Imp206(object p0) |
| | | { |
| | | #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); |
| | | |
| | | PCall(L, 1, 1, errFunc); |
| | | |
| | | |
| | | Snxxz.UI.GemModel __gen_ret = (Snxxz.UI.GemModel)translator.GetObject(L, errFunc + 1, typeof(Snxxz.UI.GemModel)); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public int[] __Gen_Delegate_Imp207(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | |
| | | |
| | | PCall(L, 4, 1, errFunc); |
| | | |
| | | |
| | | bool __gen_ret = LuaAPI.lua_toboolean(L, errFunc + 1); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public bool __Gen_Delegate_Imp209(object p0, int p1, out Snxxz.UI.JadeDynastyGemModel.GemEquipData 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.xlua_pushinteger(L, p1); |
| | | |
| | | PCall(L, 2, 2, errFunc); |
| | | |
| | | translator.Get(L, errFunc + 2, out p2); |
| | | |
| | | bool __gen_ret = LuaAPI.lua_toboolean(L, errFunc + 1); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(PrepareHandler); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 2, 4, 3); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 2, 5, 4); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ServerPrepareStart", _m_ServerPrepareStart); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ServerPrepareEnd", _m_ServerPrepareEnd); |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "clientPrepareH0812", _g_get_clientPrepareH0812); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "isPreparing", _g_get_isPreparing); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "OnPrepareEndSuccess", _g_get_OnPrepareEndSuccess); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "OnPrepareEnd", _g_get_OnPrepareEnd); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "clientPrepareH0812", _s_set_clientPrepareH0812); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "isPreparing", _s_set_isPreparing); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "OnPrepareEndSuccess", _s_set_OnPrepareEndSuccess); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "OnPrepareEnd", _s_set_OnPrepareEnd); |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_OnPrepareEnd(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | PrepareHandler gen_to_be_invoked = (PrepareHandler)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.OnPrepareEnd); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_OnPrepareEnd(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | PrepareHandler gen_to_be_invoked = (PrepareHandler)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.OnPrepareEnd = translator.GetDelegate<UnityEngine.Events.UnityAction<int, int>>(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | #if USE_UNI_LUA |
| | | using LuaAPI = UniLua.Lua; |
| | | using RealStatePtr = UniLua.ILuaState; |
| | | using LuaCSFunction = UniLua.CSharpFunctionDelegate; |
| | | #else |
| | | using LuaAPI = XLua.LuaDLL.Lua; |
| | | using RealStatePtr = System.IntPtr; |
| | | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; |
| | | #endif |
| | | |
| | | using XLua; |
| | | using System.Collections.Generic; |
| | | |
| | | |
| | | namespace XLua.CSObjectWrap |
| | | { |
| | | using Utils = XLua.Utils; |
| | | public class SnxxzUIEquipModelWrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.EquipModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 21, 8, 2); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetLastestUnLockEquipSet", _m_GetLastestUnLockEquipSet); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SelectSet", _m_SelectSet); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ResetOperateParams", _m_ResetOperateParams); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SelectCandidateEquip", _m_SelectCandidateEquip); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAllEquipSets", _m_GetAllEquipSets); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetViewableEquipSets", _m_GetViewableEquipSets); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetUnLockedEquipSets", _m_GetUnLockedEquipSets); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetEquipSet", _m_GetEquipSet); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetEquip", _m_GetEquip); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsDressedInSuit", _m_IsDressedInSuit); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetAppearance", _m_SetAppearance); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAppearance", _m_GetAppearance); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSuitLevel", _m_GetSuitLevel); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetFightPoint", _m_GetFightPoint); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetGetWays", _m_GetGetWays); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "PutOn", _m_PutOn); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TakeOff", _m_TakeOff); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "CompareToCurrent", _m_CompareToCurrent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetEquipSuitEntry", _m_GetEquipSuitEntry); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "showedUnLockLevel", _g_get_showedUnLockLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "showedUnLockSlot", _g_get_showedUnLockSlot); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedLevel", _g_get_selectedLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedPlace", _g_get_selectedPlace); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedEquip", _g_get_selectedEquip); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedStarLevel", _g_get_selectedStarLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "appearance", _g_get_appearance); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "candidateEquips", _g_get_candidateEquips); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "showedUnLockLevel", _s_set_showedUnLockLevel); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "showedUnLockSlot", _s_set_showedUnLockSlot); |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 2, 0, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetItemServerEquipPlace", _m_GetItemServerEquipPlace_xlua_st_); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | Utils.EndClassRegister(type, L, translator); |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __CreateInstance(RealStatePtr L) |
| | | { |
| | | |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | if(LuaAPI.lua_gettop(L) == 1) |
| | | { |
| | | |
| | | Snxxz.UI.EquipModel gen_ret = new Snxxz.UI.EquipModel(); |
| | | translator.Push(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.EquipModel constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Init(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.Init( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UnInit(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.UnInit( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetLastestUnLockEquipSet(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetLastestUnLockEquipSet( ); |
| | | 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_SelectSet(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.SelectSet( _level, _place ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_ResetOperateParams(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.ResetOperateParams( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SelectCandidateEquip(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | string _equipGuid = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | gen_to_be_invoked.SelectCandidateEquip( _equipGuid ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetAllEquipSets(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | System.Collections.Generic.List<int> gen_ret = gen_to_be_invoked.GetAllEquipSets( ); |
| | | translator.Push(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_GetViewableEquipSets(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | System.Collections.Generic.List<int> gen_ret = gen_to_be_invoked.GetViewableEquipSets( ); |
| | | translator.Push(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_GetUnLockedEquipSets(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | System.Collections.Generic.List<int> gen_ret = gen_to_be_invoked.GetUnLockedEquipSets( ); |
| | | translator.Push(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_GetEquipSet(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | Snxxz.UI.EquipSet gen_ret = gen_to_be_invoked.GetEquipSet( _level ); |
| | | translator.Push(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_GetEquip(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | string gen_ret = gen_to_be_invoked.GetEquip( _level, _place ); |
| | | LuaAPI.lua_pushstring(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_IsDressedInSuit(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsDressedInSuit( _level, _place ); |
| | | 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_SetAppearance(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.SetAppearance( _level ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetAppearance(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 1) |
| | | { |
| | | |
| | | Snxxz.UI.EquipAppearance gen_ret = gen_to_be_invoked.GetAppearance( ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | Snxxz.UI.EquipAppearance gen_ret = gen_to_be_invoked.GetAppearance( _level ); |
| | | translator.Push(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.EquipModel.GetAppearance!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetSuitLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | Snxxz.UI.EquipSuitType _type;translator.Get(L, 3, out _type); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetSuitLevel( _level, _type ); |
| | | 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_GetFightPoint(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetFightPoint( _level ); |
| | | 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_GetGetWays(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | System.Collections.Generic.List<int> gen_ret = gen_to_be_invoked.GetGetWays( _level, _place ); |
| | | translator.Push(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_PutOn(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | string _equipGuid = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | gen_to_be_invoked.PutOn( _equipGuid ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_TakeOff(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.TakeOff( _level, _place ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_CompareToCurrent(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | string _equipGuid = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | int gen_ret = gen_to_be_invoked.CompareToCurrent( _equipGuid ); |
| | | 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_GetEquipSuitEntry(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _star = LuaAPI.xlua_tointeger(L, 3); |
| | | Snxxz.UI.EquipSuitType _type;translator.Get(L, 4, out _type); |
| | | |
| | | Snxxz.UI.EquipSuitPropertyEntry gen_ret = gen_to_be_invoked.GetEquipSuitEntry( _level, _star, _type ); |
| | | translator.Push(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_GetItemServerEquipPlace_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | int _itemId = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | int gen_ret = Snxxz.UI.EquipModel.GetItemServerEquipPlace( _itemId ); |
| | | 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 _g_get_showedUnLockLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.showedUnLockLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_showedUnLockSlot(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.showedUnLockSlot); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_selectedLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.selectedLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_selectedPlace(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.selectedPlace); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_selectedEquip(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.selectedEquip); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_selectedStarLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.selectedStarLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_appearance(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.appearance); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_candidateEquips(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.candidateEquips); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_showedUnLockLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.showedUnLockLevel = 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_showedUnLockSlot(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.showedUnLockSlot = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
copy from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta
copy to Lua/Gen/SnxxzUIEquipModelWrap.cs.meta
| File was copied from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9132f6584cbf4624a98b972346cfb13f |
| | | timeCreated: 1548838906 |
| | | guid: 3fdfeb134104ba3498aa547c61deff40 |
| | | timeCreated: 1552309981 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | #if USE_UNI_LUA |
| | | using LuaAPI = UniLua.Lua; |
| | | using RealStatePtr = UniLua.ILuaState; |
| | | using LuaCSFunction = UniLua.CSharpFunctionDelegate; |
| | | #else |
| | | using LuaAPI = XLua.LuaDLL.Lua; |
| | | using RealStatePtr = System.IntPtr; |
| | | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; |
| | | #endif |
| | | |
| | | using XLua; |
| | | using System.Collections.Generic; |
| | | |
| | | |
| | | namespace XLua.CSObjectWrap |
| | | { |
| | | using Utils = XLua.Utils; |
| | | public class SnxxzUIEquipStarModelWrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.EquipStarModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 20, 7, 0); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPlayerLoginOk", _m_OnPlayerLoginOk); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateStarLevels", _m_UpdateStarLevels); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "DoStarUpgrade", _m_DoStarUpgrade); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ResetOperateParams", _m_ResetOperateParams); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SelectLevel", _m_SelectLevel); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SelectPlace", _m_SelectPlace); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetCandidatePlaces", _m_GetCandidatePlaces); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetCandidatePlace", _m_GetCandidatePlace); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsEquipPlaceUpgradable", _m_IsEquipPlaceUpgradable); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTotalStarLevel", _m_GetTotalStarLevel); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetEquipStarLevel", _m_GetEquipStarLevel); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetEquipCountWhichStarLevelLq", _m_GetEquipCountWhichStarLevelLq); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMaterials", _m_GetMaterials); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddMaterial", _m_AddMaterial); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveMaterial", _m_RemoveMaterial); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMaterialSuccessRate", _m_GetMaterialSuccessRate); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMaterialLogicStringByIndex", _m_GetMaterialLogicStringByIndex); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedLevel", _g_get_selectedLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedPlace", _g_get_selectedPlace); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "equipStarLevel", _g_get_equipStarLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "equipMaxStarLevel", _g_get_equipMaxStarLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "operateMaterialIndex", _g_get_operateMaterialIndex); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "starUpgradeProbability", _g_get_starUpgradeProbability); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "materials", _g_get_materials); |
| | | |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 2, 0, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetMaxStarLevel", _m_GetMaxStarLevel_xlua_st_); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | Utils.EndClassRegister(type, L, translator); |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __CreateInstance(RealStatePtr L) |
| | | { |
| | | |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | if(LuaAPI.lua_gettop(L) == 1) |
| | | { |
| | | |
| | | Snxxz.UI.EquipStarModel gen_ret = new Snxxz.UI.EquipStarModel(); |
| | | translator.Push(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.EquipStarModel constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Init(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.Init( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UnInit(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.UnInit( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_OnBeforePlayerDataInitialize(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.OnBeforePlayerDataInitialize( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_OnPlayerLoginOk(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.OnPlayerLoginOk( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UpdateStarLevels(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | HA3B1_tagMCEquipPartStarInfo _info = (HA3B1_tagMCEquipPartStarInfo)translator.GetObject(L, 2, typeof(HA3B1_tagMCEquipPartStarInfo)); |
| | | |
| | | gen_to_be_invoked.UpdateStarLevels( _info ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_DoStarUpgrade(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | int _starLevel = LuaAPI.xlua_tointeger(L, 4); |
| | | |
| | | gen_to_be_invoked.DoStarUpgrade( _level, _place, _starLevel ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_ResetOperateParams(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.ResetOperateParams( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SelectLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.SelectLevel( _level ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SelectPlace(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.SelectPlace( _level, _place ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetCandidatePlaces(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | System.Collections.Generic.List<int> gen_ret = gen_to_be_invoked.GetCandidatePlaces( ); |
| | | translator.Push(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_GetCandidatePlace(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | Snxxz.UI.EquipStarUpgradeCandidate gen_ret = gen_to_be_invoked.GetCandidatePlace( _index ); |
| | | translator.Push(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_IsEquipPlaceUpgradable(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | string _equipGuid = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsEquipPlaceUpgradable( _equipGuid ); |
| | | 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_GetMaxStarLevel_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | int gen_ret = Snxxz.UI.EquipStarModel.GetMaxStarLevel( _level ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | int _quality = LuaAPI.xlua_tointeger(L, 1); |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = Snxxz.UI.EquipStarModel.GetMaxStarLevel( _quality, _level ); |
| | | LuaAPI.xlua_pushinteger(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.EquipStarModel.GetMaxStarLevel!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetTotalStarLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetTotalStarLevel( _level ); |
| | | 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_GetEquipStarLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetEquipStarLevel( _level, _place ); |
| | | 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_GetEquipCountWhichStarLevelLq(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _standard = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetEquipCountWhichStarLevelLq( _level, _standard ); |
| | | 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_GetMaterials(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | int _starLevel = LuaAPI.xlua_tointeger(L, 4); |
| | | |
| | | System.Collections.Generic.List<string> gen_ret = gen_to_be_invoked.GetMaterials( _level, _place, _starLevel ); |
| | | translator.Push(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_AddMaterial(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | string _itemGuid = LuaAPI.lua_tostring(L, 3); |
| | | |
| | | gen_to_be_invoked.AddMaterial( _index, _itemGuid ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_RemoveMaterial(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.RemoveMaterial( _index ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetMaterialSuccessRate(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | string _guid = LuaAPI.lua_tostring(L, 4); |
| | | |
| | | float gen_ret = gen_to_be_invoked.GetMaterialSuccessRate( _level, _place, _guid ); |
| | | LuaAPI.lua_pushnumber(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_GetMaterialLogicStringByIndex(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | LogicString gen_ret = gen_to_be_invoked.GetMaterialLogicStringByIndex( _index ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_selectedLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.selectedLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_selectedPlace(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.selectedPlace); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_equipStarLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.equipStarLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_equipMaxStarLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.equipMaxStarLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_operateMaterialIndex(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.operateMaterialIndex); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_starUpgradeProbability(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.starUpgradeProbability); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_materials(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipStarModel gen_to_be_invoked = (Snxxz.UI.EquipStarModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.materials); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
copy from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta
copy to Lua/Gen/SnxxzUIEquipStarModelWrap.cs.meta
| File was copied from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9132f6584cbf4624a98b972346cfb13f |
| | | timeCreated: 1548838906 |
| | | guid: 1a91f93cb17d61c40b11957c3b816b1f |
| | | timeCreated: 1552309981 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | #if USE_UNI_LUA |
| | | using LuaAPI = UniLua.Lua; |
| | | using RealStatePtr = UniLua.ILuaState; |
| | | using LuaCSFunction = UniLua.CSharpFunctionDelegate; |
| | | #else |
| | | using LuaAPI = XLua.LuaDLL.Lua; |
| | | using RealStatePtr = System.IntPtr; |
| | | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; |
| | | #endif |
| | | |
| | | using XLua; |
| | | using System.Collections.Generic; |
| | | |
| | | |
| | | namespace XLua.CSObjectWrap |
| | | { |
| | | using Utils = XLua.Utils; |
| | | public class SnxxzUIEquipTrainModelWrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.EquipTrainModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 18, 9, 0); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ResetOperateParams", _m_ResetOperateParams); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateEquipTrainInfo", _m_UpdateEquipTrainInfo); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Train", _m_Train); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Save", _m_Save); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GiveUp", _m_GiveUp); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SelectLevel", _m_SelectLevel); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SelectPlace", _m_SelectPlace); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetInevitable", _m_SetInevitable); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTrainLevel", _m_GetTrainLevel); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTotalLevel", _m_GetTotalLevel); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMaterialNeed", _m_GetMaterialNeed); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMaxTrainLevel", _m_GetMaxTrainLevel); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetCandidatePlaces", _m_GetCandidatePlaces); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsEquipPlaceTrainable", _m_IsEquipPlaceTrainable); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetUnSavedProperties", _m_GetUnSavedProperties); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTrainedProperties", _m_GetTrainedProperties); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedLevel", _g_get_selectedLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedPlace", _g_get_selectedPlace); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "equipTrainLevel", _g_get_equipTrainLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "equipTrainMaxLevel", _g_get_equipTrainMaxLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "material", _g_get_material); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "inevitableMaterialCount", _g_get_inevitableMaterialCount); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "operateType", _g_get_operateType); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "candidatePlaces", _g_get_candidatePlaces); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "propertyBars", _g_get_propertyBars); |
| | | |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 2, 0, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetTrainType", _m_GetTrainType_xlua_st_); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | Utils.EndClassRegister(type, L, translator); |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __CreateInstance(RealStatePtr L) |
| | | { |
| | | |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | if(LuaAPI.lua_gettop(L) == 1) |
| | | { |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_ret = new Snxxz.UI.EquipTrainModel(); |
| | | translator.Push(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.EquipTrainModel constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Init(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.Init( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UnInit(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.UnInit( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_ResetOperateParams(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.ResetOperateParams( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UpdateEquipTrainInfo(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | HA3BB_tagMCEquipPartXLAttrInfo _info = (HA3BB_tagMCEquipPartXLAttrInfo)translator.GetObject(L, 2, typeof(HA3BB_tagMCEquipPartXLAttrInfo)); |
| | | |
| | | gen_to_be_invoked.UpdateEquipTrainInfo( _info ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Train(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | bool[] _inevitables = (bool[])translator.GetObject(L, 4, typeof(bool[])); |
| | | |
| | | gen_to_be_invoked.Train( _level, _place, _inevitables ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Save(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.Save( _level, _place ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GiveUp(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.GiveUp( _level, _place ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SelectLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.SelectLevel( _level ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SelectPlace(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.SelectPlace( _level, _place ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SetInevitable(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | bool _invevitable = LuaAPI.lua_toboolean(L, 3); |
| | | |
| | | gen_to_be_invoked.SetInevitable( _index, _invevitable ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetTrainLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetTrainLevel( _level, _place ); |
| | | 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_GetTotalLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetTotalLevel( _level ); |
| | | 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_GetMaterialNeed(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetMaterialNeed( _level, _place ); |
| | | 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_GetMaxTrainLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | int _place = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetMaxTrainLevel( _place ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetMaxTrainLevel( _level, _place ); |
| | | LuaAPI.xlua_pushinteger(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.EquipTrainModel.GetMaxTrainLevel!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetCandidatePlaces(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | System.Collections.Generic.List<Snxxz.UI.EquipTrainCandidate> gen_ret = gen_to_be_invoked.GetCandidatePlaces( ); |
| | | translator.Push(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_IsEquipPlaceTrainable(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | string _equipGuid = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetUnSavedProperties(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | Int3 gen_ret = gen_to_be_invoked.GetUnSavedProperties( _level, _place ); |
| | | translator.Push(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_GetTrainedProperties(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | int _place = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | Int3 gen_ret = gen_to_be_invoked.GetTrainedProperties( _level, _place ); |
| | | translator.Push(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_GetTrainType_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | int _equipType = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | int gen_ret = Snxxz.UI.EquipTrainModel.GetTrainType( _equipType ); |
| | | 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 _g_get_selectedLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.selectedLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_selectedPlace(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.selectedPlace); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_equipTrainLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.equipTrainLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_equipTrainMaxLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.equipTrainMaxLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_material(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.material); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_inevitableMaterialCount(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.inevitableMaterialCount); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_operateType(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.operateType); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_candidatePlaces(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.candidatePlaces); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_propertyBars(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.EquipTrainModel gen_to_be_invoked = (Snxxz.UI.EquipTrainModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.propertyBars); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
copy from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta
copy to Lua/Gen/SnxxzUIEquipTrainModelWrap.cs.meta
| File was copied from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9132f6584cbf4624a98b972346cfb13f |
| | | timeCreated: 1548838906 |
| | | guid: 7b3a31634e12bd440a1034c3c94b90ae |
| | | timeCreated: 1552309981 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.RealmModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 10, 17, 8); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 9, 15, 6); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.RolePromoteModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 18, 4, 4); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 17, 4, 4); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMountCnt", _m_GetMountCnt); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMountTotallv", _m_GetMountTotallv); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPetCnt", _m_GetPetCnt); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetWashCnt", _m_GetWashCnt); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetBlastFurnaceDragUseCount", _m_GetBlastFurnaceDragUseCount); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckPromoteDetailEffect", _m_CheckPromoteDetailEffect); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPromoteDetailShow", _m_GetPromoteDetailShow); |
| | |
| | | int _lv = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetPetCnt( _lv ); |
| | | 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_GetWashCnt(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.RolePromoteModel gen_to_be_invoked = (Snxxz.UI.RolePromoteModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _lv = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetWashCnt( _lv ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 622ddb43baa2a8c41be78524753d9091 |
| | | timeCreated: 1550120579 |
| | | timeCreated: 1552309981 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | #if USE_UNI_LUA |
| | | using LuaAPI = UniLua.Lua; |
| | | using RealStatePtr = UniLua.ILuaState; |
| | | using LuaCSFunction = UniLua.CSharpFunctionDelegate; |
| | | #else |
| | | using LuaAPI = XLua.LuaDLL.Lua; |
| | | using RealStatePtr = System.IntPtr; |
| | | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; |
| | | #endif |
| | | |
| | | using XLua; |
| | | using System.Collections.Generic; |
| | | |
| | | |
| | | namespace XLua.CSObjectWrap |
| | | { |
| | | using Utils = XLua.Utils; |
| | | public class WashLevelMaxConfigWrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(WashLevelMaxConfig); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 1, 4, 0); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnConfigParseCompleted", _m_OnConfigParseCompleted); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "id", _g_get_id); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "equipType", _g_get_equipType); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "equipStar", _g_get_equipStar); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "levelMax", _g_get_levelMax); |
| | | |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 7, 1, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Get", _m_Get_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetKeys", _m_GetKeys_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetValues", _m_GetValues_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Has", _m_Has_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Init", _m_Init_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetMaxLevel", _m_GetMaxLevel_xlua_st_); |
| | | |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "inited", _g_get_inited); |
| | | |
| | | |
| | | |
| | | Utils.EndClassRegister(type, L, translator); |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __CreateInstance(RealStatePtr L) |
| | | { |
| | | |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | if(LuaAPI.lua_gettop(L) == 1) |
| | | { |
| | | |
| | | WashLevelMaxConfig gen_ret = new WashLevelMaxConfig(); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | return 1; |
| | | } |
| | | if(LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) |
| | | { |
| | | string _input = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | WashLevelMaxConfig gen_ret = new WashLevelMaxConfig(_input); |
| | | translator.Push(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 WashLevelMaxConfig constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Get_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) |
| | | { |
| | | int _id = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | WashLevelMaxConfig gen_ret = WashLevelMaxConfig.Get( _id ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | int _type = LuaAPI.xlua_tointeger(L, 1); |
| | | int _star = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | WashLevelMaxConfig gen_ret = WashLevelMaxConfig.Get( _type, _star ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)) |
| | | { |
| | | string _id = LuaAPI.lua_tostring(L, 1); |
| | | |
| | | WashLevelMaxConfig gen_ret = WashLevelMaxConfig.Get( _id ); |
| | | translator.Push(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 WashLevelMaxConfig.Get!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetKeys_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | System.Collections.Generic.List<string> gen_ret = WashLevelMaxConfig.GetKeys( ); |
| | | translator.Push(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_GetValues_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | System.Collections.Generic.List<WashLevelMaxConfig> gen_ret = WashLevelMaxConfig.GetValues( ); |
| | | translator.Push(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_Has_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) |
| | | { |
| | | int _id = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | bool gen_ret = WashLevelMaxConfig.Has( _id ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)) |
| | | { |
| | | string _id = LuaAPI.lua_tostring(L, 1); |
| | | |
| | | bool gen_ret = WashLevelMaxConfig.Has( _id ); |
| | | 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 WashLevelMaxConfig.Has!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Init_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 1&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1)) |
| | | { |
| | | bool _sync = LuaAPI.lua_toboolean(L, 1); |
| | | |
| | | WashLevelMaxConfig.Init( _sync ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 0) |
| | | { |
| | | |
| | | WashLevelMaxConfig.Init( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to WashLevelMaxConfig.Init!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_OnConfigParseCompleted(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | WashLevelMaxConfig gen_to_be_invoked = (WashLevelMaxConfig)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.OnConfigParseCompleted( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetMaxLevel_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | int _type = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | int gen_ret = WashLevelMaxConfig.GetMaxLevel( _type ); |
| | | 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 _g_get_inited(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | LuaAPI.lua_pushboolean(L, WashLevelMaxConfig.inited); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_id(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | WashLevelMaxConfig gen_to_be_invoked = (WashLevelMaxConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.id); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_equipType(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | WashLevelMaxConfig gen_to_be_invoked = (WashLevelMaxConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.equipType); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_equipStar(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | WashLevelMaxConfig gen_to_be_invoked = (WashLevelMaxConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.equipStar); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_levelMax(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | WashLevelMaxConfig gen_to_be_invoked = (WashLevelMaxConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.levelMax); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
copy from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta
copy to Lua/Gen/WashLevelMaxConfigWrap.cs.meta
| File was copied from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9132f6584cbf4624a98b972346cfb13f |
| | | timeCreated: 1548838906 |
| | | guid: 9384cb34198ae704ab4ae0d81b9d0f22 |
| | | timeCreated: 1552309981 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | static void wrapInit4(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(WashLevelMaxConfig), WashLevelMaxConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(WeatherConfig), WeatherConfigWrap.__Register); |
| | | |
| | | |
| | |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(maptransportConfig), maptransportConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(PlayerStoneData), PlayerStoneDataWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(PlayerDatas), PlayerDatasWrap.__Register); |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.Bounds), UnityEngineBoundsWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.Ray2D), UnityEngineRay2DWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit5(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.Ray2D), UnityEngineRay2DWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.Time), UnityEngineTimeWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.DailyQuestActionTimer), SnxxzUIDailyQuestActionTimerWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.DailyQuestModel), SnxxzUIDailyQuestModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit6(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.DailyQuestModel), SnxxzUIDailyQuestModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.ResourcesBackModel), SnxxzUIResourcesBackModelWrap.__Register); |
| | | |
| | |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.TrialDungeonModel), SnxxzUITrialDungeonModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.EquipModel), SnxxzUIEquipModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.EquipStarModel), SnxxzUIEquipStarModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.EquipTrainModel), SnxxzUIEquipTrainModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.FairyBossModel), SnxxzUIFairyBossModelWrap.__Register); |
| | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.JadeDynastyEquipModel), SnxxzUIJadeDynastyEquipModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.JadeDynastyGemModel), SnxxzUIJadeDynastyGemModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.JadeDynastySkillModel), SnxxzUIJadeDynastySkillModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.JadeDynastyTowerModel), SnxxzUIJadeDynastyTowerModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit7(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.FBHelpPointExchageModel), SnxxzUIFBHelpPointExchageModelWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.ItemLogicUtility), SnxxzUIItemLogicUtilityWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit7(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.ItemOperateUtility), SnxxzUIItemOperateUtilityWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.WishingPoolModel), SnxxzUIWishingPoolModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit8(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(PetBackpack), PetBackpackWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(PlayerDeadModel), PlayerDeadModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit8(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RankModel), SnxxzUIRankModelWrap.__Register); |
| | | |
| | |
| | | translator.DelayWrapLoader(typeof(EquipReinforceModel), EquipReinforceModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(EquipWashModel), EquipWashModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.GemModel), SnxxzUIGemModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(GodBeastModel), GodBeastModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(HowToPlayModel), HowToPlayModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(WashProModel), WashProModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.WingsRedDotModel), SnxxzUIWingsRedDotModelWrap.__Register); |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.VipInvestModel), SnxxzUIVipInvestModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit9(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.WheelOfFortuneModel), SnxxzUIWheelOfFortuneModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.VipModel), SnxxzUIVipModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit9(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(SpeechTranslate), SpeechTranslateWrap.__Register); |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ff2dde43802d1d14795873c131842a1e |
| | | timeCreated: 1552276115 |
| | | timeCreated: 1552309981 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | <type fullname="ViewRoleFuncConfig" preserve="all"/> |
| | | <type fullname="VipPrivilegeConfig" preserve="all"/> |
| | | <type fullname="WHYJRewardConfig" preserve="all"/> |
| | | <type fullname="WashLevelMaxConfig" preserve="all"/> |
| | | <type fullname="WeatherConfig" preserve="all"/> |
| | | <type fullname="WeekPartyConfig" preserve="all"/> |
| | | <type fullname="WeekPartyPointConfig" preserve="all"/> |
| | |
| | | <type fullname="Snxxz.UI.DungeonModel" preserve="all"/> |
| | | <type fullname="IceLodeStarAwardClass" preserve="all"/> |
| | | <type fullname="Snxxz.UI.TrialDungeonModel" preserve="all"/> |
| | | <type fullname="Snxxz.UI.EquipModel" preserve="all"/> |
| | | <type fullname="Snxxz.UI.EquipStarModel" preserve="all"/> |
| | | <type fullname="Snxxz.UI.EquipTrainModel" preserve="all"/> |
| | | <type fullname="Snxxz.UI.FairyBossModel" preserve="all"/> |
| | | <type fullname="Snxxz.UI.FairyFeastModel" preserve="all"/> |
| | | <type fullname="Snxxz.UI.FairyGrabBossModel" preserve="all"/> |
| | |
| | | <type fullname="Snxxz.UI.BuySuccessModel" preserve="all"/> |
| | | <type fullname="StoreModel" preserve="all"/> |
| | | <type fullname="EquipReinforceModel" preserve="all"/> |
| | | <type fullname="EquipWashModel" preserve="all"/> |
| | | <type fullname="Snxxz.UI.GemModel" preserve="all"/> |
| | | <type fullname="GodBeastModel" preserve="all"/> |
| | | <type fullname="HowToPlayModel" preserve="all"/> |
| | | <type fullname="WashProModel" preserve="all"/> |
| | | <type fullname="Snxxz.UI.WingsRedDotModel" preserve="all"/> |
| | | <type fullname="Snxxz.UI.ActivitiesPushModel" preserve="all"/> |
| | | <type fullname="ChatSetting" preserve="all"/> |
| | |
| | | if (cfg.ItemName == matchArray[i].Groups[1].Value)
|
| | | {
|
| | | bool equip = itemPlaceList[i].packType == PackType.Equip;
|
| | | List<EquipGem> equipGems = null;
|
| | | int[] equipGems = null;
|
| | | if (equip)
|
| | | {
|
| | | equipGemModel.TryGetEquipGems(itemPlaceList[i].itemPlace, out equipGems);
|
| | |
| | | public int itemId;
|
| | | public int isBind;
|
| | | public int count;
|
| | | public List<EquipGem> equipGems;
|
| | | public int[] equipGems;
|
| | | public string useData;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | break;
|
| | | case DailyQuestType.FairyGrabBoss:
|
| | | case DailyQuestType.AllianceBoss1:
|
| | | case DailyQuestType.AllianceBoss2:
|
| | | if (dailyQuestState == DailyQuestState.Normal)
|
| | | {
|
| | | dailyQuest.redpoint.state = completedTimes >= totalTimes ? RedPointState.None : RedPointState.Simple;
|
| | |
| | | {
|
| | | return DailyQuestState.Completed;
|
| | | }
|
| | | break;
|
| | | return DailyQuestState.Normal;
|
| | | }
|
| | |
|
| | | var completedTimes = GetDailyQuestCompletedTimes(_dailyQuestId);
|
| | |
| | | public int prepareTime; //跨服1Vs1 回合结束倒计时
|
| | | public int isStart; //跨服1Vs1回合开始
|
| | | public int PlayerEnterMap; //判断玩家ID不是自己则清除等待时间显示
|
| | | public int IsEncourage;//是否鼓舞
|
| | | public long totalExp
|
| | | {
|
| | | get
|
| | |
| | | SysNotifyMgr.Instance.ShowTip("Xjmj_InspireMaxLevel");
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<DungeonInspireWin>();
|
| | | var dataMapId = model.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | switch (dataMapId)
|
| | | {
|
| | | case AllianceBossModel.DATAMAPID:
|
| | | if (model.mission.IsEncourage == 1)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("Xjmj_InspireMaxLevel");
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<AllianceBossInspireWin>();
|
| | | break;
|
| | | default:
|
| | | WindowCenter.Instance.Open<DungeonInspireWin>();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | |
| | | private void OpenTrainWin() |
| | | { |
| | | CloseSubWindows(); |
| | | WindowCenter.Instance.Open<EquipTrainWin>(); |
| | | functionOrder = m_Train.order; |
| | | } |
| | | |
| | | private void CloseEquipFrameWin() |
| | |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.LuaCallCSharp] |
| | | public class EquipModel : Model |
| | | { |
| | | public int showedUnLockLevel { |
| | |
| | | { |
| | | foreach (var item in items) |
| | | { |
| | | candidateEquips.Add(new CandidateEquip(item.guid)); |
| | | if (item.isBind == 0) |
| | | { |
| | | candidateEquips.Add(new CandidateEquip(item.guid)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | [SerializeField] Image m_Bind;
|
| | |
|
| | | int itemId = 0;
|
| | | int bind = 0;
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | m_GemFlauntBtn.onClick.AddListener(GemFlaunt);
|
| | | }
|
| | |
|
| | | public void Display(EquipGem equipGem)
|
| | | public void Display(int equipGem)
|
| | | {
|
| | | itemId = equipGem.id;
|
| | | bind = equipGem.bind;
|
| | | itemId = equipGem;
|
| | | var config = ItemConfig.Get(itemId);
|
| | | m_Icon.SetSprite(config.IconKey);
|
| | | m_Bottom.SetItemBackGround(config.ItemColor);
|
| | | m_Bind.gameObject.SetActive(bind == 1);
|
| | | m_Bind.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | private void GemFlaunt()
|
| | |
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.World;
|
| | | ChatCtrl.Inst.openFromGem = true;
|
| | | ChatCtrl.Inst.flauntGemId = itemId;
|
| | | ChatCtrl.Inst.flauntGemBind = bind == 1;
|
| | | ChatCtrl.Inst.flauntGemBind = false;
|
| | | WindowCenter.Instance.Open<ChatWin>();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | |
| | | });
|
| | |
|
| | | bool inlay = false;
|
| | | List<EquipGem> equipGems = null;
|
| | | int[] equipGems = null;
|
| | | if (model.TryGetEquipGems(level, place, out equipGems))
|
| | | {
|
| | | inlay = hole < equipGems.Count && equipGems[hole].id != 0;
|
| | | inlay = hole < equipGems.Length && equipGems[hole] != 0;
|
| | | if (inlay)
|
| | | {
|
| | | DisplayGemBase(equipGems[hole]);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | void DisplayGemBase(EquipGem equipGem)
|
| | | void DisplayGemBase(int equipGem)
|
| | | {
|
| | | var config = ItemConfig.Get(equipGem.id);
|
| | | var config = ItemConfig.Get(equipGem);
|
| | | m_ItemBackground.SetItemBackGround(config.ItemColor);
|
| | | m_ItemIcon.SetSprite(config.IconKey);
|
| | | m_ItemName.text = config.ItemName;
|
| | | m_Bind.gameObject.SetActive(equipGem.bind == 1);
|
| | | m_Bind.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | void DisplayOpenCondition(int hole)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void DisplayGemProperty(EquipGem equipGem)
|
| | | public void DisplayGemProperty(int equipGem)
|
| | | {
|
| | | EquipGemWin.DisplayProperty(equipGem, m_Propertys);
|
| | | }
|
| | |
| | | m_ItemIcon.SetSprite(config.IconKey);
|
| | | m_Bind.gameObject.SetActive(item.isBind == 1);
|
| | | m_Count.text = item.count.ToString();
|
| | | EquipGemWin.DisplayProperty(new EquipGem()
|
| | | {
|
| | | id = item.itemId,
|
| | | bind = item.isBind,
|
| | | }, m_Propertys);
|
| | | EquipGemWin.DisplayProperty(item.itemId, m_Propertys);
|
| | | m_Redpoint.gameObject.SetActive(red);
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | EquipGemModel model { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } }
|
| | |
|
| | | public void Display(EquipGem equipGem)
|
| | | public void Display(int equipGem)
|
| | | {
|
| | | var itemConfig = ItemConfig.Get(equipGem.id);
|
| | | var upConfig = model.GetNextLevelConfig(equipGem.id);
|
| | | var itemConfig = ItemConfig.Get(equipGem);
|
| | | var upConfig = model.GetNextLevelConfig(equipGem);
|
| | | if (upConfig != null)
|
| | | {
|
| | | m_ItemBackground.SetItemBackGround(upConfig.ItemColor);
|
| | |
| | |
|
| | | m_ContainerLevelType.gameObject.SetActive(false);
|
| | |
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | model.TryGetEquipGem(equipLevel, equipPlace, equipHole, out equipGem);
|
| | | if (equipGem.id == 0)
|
| | | if (equipGem == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var config = ItemConfig.Get(equipGem.id);
|
| | | var config = ItemConfig.Get(equipGem);
|
| | | var type = config.EffectValueA1;
|
| | |
|
| | | GemType gemType;
|
| | |
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | return;
|
| | | }
|
| | | model.SendGemLevelUp(equipLevel, equipPlace, equipHole, levelUpType);
|
| | | }
|
| | | else
|
| | | {
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | model.TryGetEquipGem(equipLevel, equipPlace, equipHole, out equipGem);
|
| | |
|
| | | var config = ItemConfig.Get(equipGem.id);
|
| | | var config = ItemConfig.Get(equipGem);
|
| | |
|
| | | GemType gemType;
|
| | | model.TryGetGemType(config.EffectValueA1, out gemType);
|
| | |
|
| | | var count = model.GetGemCount(config.EffectValueA1, config.EffectValueB1, false);
|
| | | var count = model.GetGemCount(config.EffectValueA1, config.EffectValueB1);
|
| | |
|
| | | if (count < gemType.composeCount - 1)
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | var realCount = model.GetGemCount(config.EffectValueA1, config.EffectValueB1, true, equipGem.bind);
|
| | | if (realCount < gemType.composeCount - 1)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("GemComposeFail"), (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | model.SendGemLevelUp(equipLevel, equipPlace, equipHole, levelUpType);
|
| | | }
|
| | | });
|
| | | return;
|
| | | }
|
| | | model.SendGemLevelUp(equipLevel, equipPlace, equipHole, levelUpType);
|
| | | }
|
| | | model.SendGemLevelUp(equipLevel, equipPlace, equipHole, levelUpType);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | {
|
| | | if (equipLevel == level && equipPlace == place)
|
| | | {
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | model.TryGetEquipGem(level, place, equipHole, out equipGem);
|
| | | if (model.IsEquipGemMaxLevel(equipGem.id))
|
| | | if (model.IsEquipGemMaxLevel(equipGem))
|
| | | {
|
| | | CloseClick();
|
| | | }
|
| | |
| | |
|
| | | private void DisplayGemCount()
|
| | | {
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | model.TryGetEquipGem(equipLevel, equipPlace, equipHole, out equipGem);
|
| | |
|
| | | var config = ItemConfig.Get(equipGem.id);
|
| | | var config = ItemConfig.Get(equipGem);
|
| | | var type = config.EffectValueA1;
|
| | |
|
| | | GemType gemType;
|
| | | model.TryGetGemType(type, out gemType);
|
| | |
|
| | | var count = 0;
|
| | | count = model.GetGemCount(type, config.EffectValueB1, false);
|
| | | count = model.GetGemCount(type, config.EffectValueB1);
|
| | | var displayString = StringUtility.Contact(count < gemType.composeCount - 1 ? "<color=#ff0303>" : "<color=#109d06>",
|
| | | gemType.composeCount - 1, "</color>");
|
| | | m_CostGem.text = Language.Get("GemLevelUpCostGem", config.ItemName, displayString);
|
| | |
| | |
|
| | | void DisplayLevelUp()
|
| | | {
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | model.TryGetEquipGem(equipLevel, equipPlace, equipHole, out equipGem);
|
| | | EquipGemWin.DisplayProperty(equipGem, m_Propertys);
|
| | |
|
| | | var config = ItemConfig.Get(equipGem.id);
|
| | | m_Gem.SetItem(equipGem.id, 1, equipGem.bind == 1);
|
| | | var config = ItemConfig.Get(equipGem);
|
| | | m_Gem.SetItem(equipGem, 1);
|
| | |
|
| | | if (!model.IsEquipGemMaxLevel(equipGem.id))
|
| | | if (!model.IsEquipGemMaxLevel(equipGem))
|
| | | {
|
| | | m_ContainerNext.gameObject.SetActive(true);
|
| | | m_LevelUp.interactable = true;
|
| | | var upConfig = model.GetNextLevelConfig(equipGem.id);
|
| | | m_LevelUpGem.SetItem(upConfig.ID, 1, equipGem.bind == 1);
|
| | | EquipGemWin.DisplayProperty(new EquipGem(upConfig.ID, equipGem.bind), m_LevelUpPropertys);
|
| | | var upConfig = model.GetNextLevelConfig(equipGem);
|
| | | m_LevelUpGem.SetItem(upConfig.ID, 1);
|
| | | EquipGemWin.DisplayProperty(upConfig.ID, m_LevelUpPropertys);
|
| | |
|
| | | var index = 0;
|
| | | bool isNew = config.Effect2 == 0 && upConfig.Effect2 != 0;
|
| | |
| | | {
|
| | | public class EquipGemModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | Dictionary<int, List<EquipGem>> m_EquipGems = new Dictionary<int, List<EquipGem>>();
|
| | | Dictionary<int, int[]> m_EquipGems = new Dictionary<int, int[]>();
|
| | | Dictionary<int, List<int>> m_EquipGemTypes = new Dictionary<int, List<int>>();
|
| | | Dictionary<int, GemHoleCondition> m_GemHoleConditions = new Dictionary<int, GemHoleCondition>();
|
| | | Dictionary<int, GemType> m_GemTypes = new Dictionary<int, GemType>();
|
| | |
| | | List<int> m_EquipPlaces = new List<int>();
|
| | |
|
| | | readonly List<int> m_GemHoleItemIds = new List<int> { 0, 0, 0, 0 };
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(106, 10609);
|
| | |
|
| | | public const int EQUIPGEM_HOLE_COUNT = 4;
|
| | | public static int REDPOINTBASE = 106090000;
|
| | |
| | | return m_GemHoleConditions.TryGetValue(hole, out condition);
|
| | | }
|
| | |
|
| | | public bool TryGetEquipGems(int packIndex, out List<EquipGem> gems)
|
| | | public bool TryGetEquipGems(int packIndex, out int[] gems)
|
| | | {
|
| | | return m_EquipGems.TryGetValue(packIndex, out gems);
|
| | | }
|
| | |
|
| | | public bool TryGetEquipGems(int level, int place, out List<EquipGem> gems)
|
| | | public bool TryGetEquipGems(int level, int place, out int[] gems)
|
| | | {
|
| | | var packIndex = EquipPlaceMapConfig.GetServerPlace(level, place);
|
| | | return TryGetEquipGems(packIndex, out gems);
|
| | | }
|
| | |
|
| | | public bool TryGetEquipGem(int level, int place, int hole, out EquipGem equipGem)
|
| | | public bool TryGetEquipGem(int level, int place, int hole, out int equipGem)
|
| | | {
|
| | | equipGem = default(EquipGem);
|
| | | List<EquipGem> equipGems;
|
| | | equipGem = 0;
|
| | | int[] equipGems;
|
| | | if (TryGetEquipGems(level, place, out equipGems))
|
| | | {
|
| | | if (hole < equipGems.Count)
|
| | | if (hole < equipGems.Length)
|
| | | {
|
| | | equipGem = equipGems[hole];
|
| | | return equipGem.id != 0;
|
| | | return equipGem != 0;
|
| | | }
|
| | | }
|
| | | return false;
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | public bool IsEquipGemHoleOpen(int packIndex, int hole)
|
| | | {
|
| | | var config = EquipPlaceMapConfig.Get(packIndex);
|
| | | if (config != null)
|
| | | {
|
| | | return IsEquipGemHoleOpen(config.LV, config.EquipPlace, hole);
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsEquipGemMaxLevel(int id)
|
| | | {
|
| | | var itemConfig = ItemConfig.Get(id);
|
| | |
| | | return itemConfig.EffectValueB1 >= m_GemTypes[gemType].maxLevel;
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | public bool IsBetterGem(int itemId)
|
| | | {
|
| | | var config = ItemConfig.Get(itemId);
|
| | | if (config == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | foreach (var level in cacheEquipSets)
|
| | | {
|
| | | foreach (var place in m_EquipPlaces)
|
| | | {
|
| | | var gemTypes = m_EquipGemTypes[place];
|
| | | if (!gemTypes.Contains(config.EffectValueA1))
|
| | | {
|
| | | continue;
|
| | | }
|
| | | for (int i = 0; i < EQUIPGEM_HOLE_COUNT; i++)
|
| | | {
|
| | | if (!IsEquipGemHoleOpen(level, place, i))
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var equipGem = 0;
|
| | | if (TryGetEquipGem(level, place, i, out equipGem))
|
| | | {
|
| | | var compareConfig = ItemConfig.Get(equipGem);
|
| | | return config.EffectValueB1 > compareConfig.EffectValueB1;
|
| | | }
|
| | | else
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public ICollection<int> GetMosaicEquipPlaces()
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetGemCount(int type, int level, bool onlyBind, int bind = 0)
|
| | | public int GetGemCount(int type, int level)
|
| | | {
|
| | | GemType gemType;
|
| | | TryGetGemType(type, out gemType);
|
| | |
| | | var config = ItemConfig.Get(item.itemId);
|
| | | if (config.EffectValueA1 == type && config.EffectValueB1 == level)
|
| | | {
|
| | | if (onlyBind && item.isBind != bind)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | count += item.count;
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | continue;
|
| | | }
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | if (!TryGetEquipGem(level, place, i, out equipGem))
|
| | | {
|
| | | count++;
|
| | |
| | | var equipGems = m_EquipGems[key];
|
| | | foreach (var equipGem in equipGems)
|
| | | {
|
| | | var id = equipGem.id;
|
| | | if (id == 0)
|
| | | if (equipGem == 0)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var config = ItemConfig.Get(id);
|
| | | var config = ItemConfig.Get(equipGem);
|
| | | level += config != null ? config.EffectValueB1 : 0;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | for (int k = 0; k < m_GemHoleItemIds.Count; k++)
|
| | | {
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | TryGetEquipGem(config.LV, config.EquipPlace, k, out equipGem);
|
| | | m_GemHoleItemIds[k] = equipGem.id;
|
| | | m_GemHoleItemIds[k] = equipGem;
|
| | | }
|
| | |
|
| | | List<EquipGem> gems = null;
|
| | | int[] gems = null;
|
| | | if (!m_EquipGems.TryGetValue(data.EquipPlace, out gems))
|
| | | {
|
| | | gems = new List<EquipGem>();
|
| | | gems = new int[EQUIPGEM_HOLE_COUNT];
|
| | | m_EquipGems.Add(data.EquipPlace, gems);
|
| | | }
|
| | | gems.Clear();
|
| | | for (int k = 0; k < data.MaxStoneCount; k++)
|
| | | {
|
| | | gems.Add(new EquipGem((int)data.StoneInfo[k], data.StoneBind[k]));
|
| | | gems[k] = (int)data.StoneInfo[k];
|
| | | if (data.StoneInfo[k] > m_GemHoleItemIds[k])
|
| | | {
|
| | | if (serverInited && equipGemLevelUp != null)
|
| | |
| | | TryGetRedpoint(level, place, out equipGemRedpoint);
|
| | | for (int i = 0; i < EQUIPGEM_HOLE_COUNT; i++)
|
| | | {
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | if (!TryGetEquipGem(level, place, i, out equipGem))
|
| | | {
|
| | | if (SatisfyInlayBetterGem(level, place, i))
|
| | |
| | | TryGetRedpoint(level, place, out equipGemRedpoint);
|
| | | for (int i = 0; i < EQUIPGEM_HOLE_COUNT; i++)
|
| | | {
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | if (TryGetEquipGem(level, place, i, out equipGem))
|
| | | {
|
| | | if (SatisfyComposeGem(level, place, i))
|
| | | {
|
| | | var packIndex = EquipPlaceMapConfig.GetServerPlace(level, place);
|
| | | composeAbles[packIndex][i] = true;
|
| | | var config = ItemConfig.Get(equipGem.id);
|
| | | var config = ItemConfig.Get(equipGem);
|
| | | var type = config.EffectValueA1;
|
| | | cacheComposeGemTypes.Add(type);
|
| | | }
|
| | |
| | | {
|
| | | return false;
|
| | | }
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | TryGetEquipGem(level, place, hole, out equipGem);
|
| | | var equipGemLevel = 0;
|
| | | if (equipGem.id != 0)
|
| | | if (equipGem != 0)
|
| | | {
|
| | | var config = ItemConfig.Get(equipGem.id);
|
| | | var config = ItemConfig.Get(equipGem);
|
| | | equipGemLevel = config.EffectValueB1;
|
| | | }
|
| | | List<int> gemTypes = m_EquipGemTypes[place];
|
| | |
| | | {
|
| | | return false;
|
| | | }
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | TryGetEquipGem(level, place, hole, out equipGem);
|
| | | if (equipGem.id == 0)
|
| | | if (equipGem == 0)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | var config = ItemConfig.Get(equipGem.id);
|
| | | var config = ItemConfig.Get(equipGem);
|
| | | var type = config.EffectValueA1;
|
| | | if (cacheComposeGemTypes.Contains(type))
|
| | | {
|
| | |
| | | {
|
| | | RefreshRedpoint();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public struct EquipGem
|
| | | {
|
| | | public int id;
|
| | | public int bind;
|
| | |
|
| | | public EquipGem(int id, int bind)
|
| | | {
|
| | | this.id = id;
|
| | | this.bind = bind;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | void DisplayGems()
|
| | | {
|
| | | List<EquipGem> equipGems = null;
|
| | | int[] equipGems = null;
|
| | | model.TryGetEquipGems(equipLevel, equipPlace, out equipGems);
|
| | | for (int i = 0; i < m_TinyGems.Length; i++)
|
| | | {
|
| | |
| | | m_TinyGems[i].gameObject.SetActive(isOpen);
|
| | | if (isOpen)
|
| | | {
|
| | | var id = (equipGems != null && i < equipGems.Count) ? equipGems[i].id : 0;
|
| | | var id = (equipGems != null && i < equipGems.Length) ? equipGems[i] : 0;
|
| | | m_TinyGems[i].Set(id);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | m_SrollerControl.Refresh();
|
| | |
|
| | | EquipGem equipGem = default(EquipGem);
|
| | | List<EquipGem> equipGems = null;
|
| | | int equipGem = 0;
|
| | | int[] equipGems = null;
|
| | | if (model.TryGetEquipGems(equipLevel, equipPlace, out equipGems))
|
| | | {
|
| | | if (equipHole < equipGems.Count)
|
| | | if (equipHole < equipGems.Length)
|
| | | {
|
| | | equipGem = equipGems[equipHole];
|
| | | }
|
| | |
| | | inlayAble = inlayRedpoint.state == RedPointState.Simple;
|
| | | }
|
| | |
|
| | | m_Strike.gameObject.SetActive(equipGem.id != 0);
|
| | | m_Strike.gameObject.SetActive(equipGem != 0);
|
| | |
|
| | | var isMaxLevel = model.IsEquipGemMaxLevel(equipGem.id);
|
| | | var isMaxLevel = model.IsEquipGemMaxLevel(equipGem);
|
| | |
|
| | | if (equipGem.id != 0 && !isMaxLevel)
|
| | | if (equipGem != 0 && !isMaxLevel)
|
| | | {
|
| | | m_SrollerControl.AddCell(ScrollerDataType.Header, 0, HandleGem);
|
| | | }
|
| | |
|
| | | if (equipGem.id != 0 && isMaxLevel)
|
| | | if (equipGem != 0 && isMaxLevel)
|
| | | {
|
| | | m_SrollerControl.AddCell(ScrollerDataType.Extra2, 0, HandleGem);
|
| | | }
|
| | |
| | | GemType gemType;
|
| | | if (model.TryGetGemType(type, out gemType))
|
| | | {
|
| | | if (equipGem.id == 0 && gemType.shopId != 0)
|
| | | if (equipGem == 0 && gemType.shopId != 0)
|
| | | {
|
| | | m_SrollerControl.AddCell(ScrollerDataType.Tail, type, HandleGem);
|
| | | }
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | EquipGem equipGem;
|
| | | int equipGem;
|
| | | if (!model.TryGetEquipGem(equipLevel, equipPlace, equipHole, out equipGem))
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (model.IsEquipGemMaxLevel(equipGem.id))
|
| | | if (model.IsEquipGemMaxLevel(equipGem))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GemFullLevelError");
|
| | | return;
|
| | |
| | | case ScrollerDataType.Header:
|
| | | {
|
| | | var cell = _cell as EquipGemLevelUpCell;
|
| | | List<EquipGem> equipGems;
|
| | | int[] equipGems;
|
| | | if (model.TryGetEquipGems(equipLevel, equipPlace, out equipGems))
|
| | | {
|
| | | if (equipHole < equipGems.Count)
|
| | | if (equipHole < equipGems.Length)
|
| | | {
|
| | | cell.Display(equipGems[equipHole]);
|
| | | }
|
| | |
| | | case ScrollerDataType.Extra2:
|
| | | {
|
| | | var cell = _cell as EquipGemFlauntCell;
|
| | | List<EquipGem> equipGems;
|
| | | int[] equipGems;
|
| | | if (model.TryGetEquipGems(equipLevel, equipPlace, out equipGems))
|
| | | {
|
| | | if (equipHole < equipGems.Count)
|
| | | if (equipHole < equipGems.Length)
|
| | | {
|
| | | cell.Display(equipGems[equipHole]);
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public static void DisplayProperty(EquipGem equipGem, PropertyBehaviour[] properties)
|
| | | public static void DisplayProperty(int equipGem, PropertyBehaviour[] properties)
|
| | | {
|
| | | var config = ItemConfig.Get(equipGem.id);
|
| | | var config = ItemConfig.Get(equipGem);
|
| | | var index = 0;
|
| | |
|
| | | if (config.Effect2 != 0 && index < properties.Length)
|
| | |
| | | slotBehaviours.Add(behaviour); |
| | | } |
| | | |
| | | m_BackGround.SetSprite(""); |
| | | m_BackGround.SetSprite("RealmEquip_16"); |
| | | m_Arrow.transform.localEulerAngles = new Vector3(0, 0, 180); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | slotBehaviours.Clear(); |
| | | m_BackGround.SetSprite(""); |
| | | m_BackGround.SetSprite("RealmEquip_5"); |
| | | m_Arrow.transform.localEulerAngles = Vector3.zero; |
| | | } |
| | | |
| | |
| | | var item = packModel.GetItemByGuid(this.equip); |
| | | |
| | | m_ItemName.text = item.config.ItemName; |
| | | m_ItemName.color = UIHelper.GetUIColor(item.config.ItemColor, true); |
| | | var successRate = model.GetMaterialSuccessRate(model.selectedLevel.value, model.selectedPlace.value, this.equip); |
| | | m_Rate.text = string.Format("成功率 +{0}", Mathf.RoundToInt(successRate * 100)); |
| | | m_Item.SetItem(item.config.ID, 1); |
| | |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.LuaCallCSharp] |
| | | public class EquipStarModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize |
| | | { |
| | | public readonly LogicInt selectedLevel = new LogicInt(); |
| | |
| | | m_EmptyItem.gameObject.SetActive(true); |
| | | var place = this.candidate.place; |
| | | m_Description1.text = string.Format("部位:{0}", UIHelper.GetEquipPlaceName(place)); |
| | | m_Description1.color = UIHelper.GetUIColor(TextColType.Black, true); |
| | | m_Description2.text = "未穿戴装备"; |
| | | } |
| | | else |
| | |
| | | m_EmptyItem.gameObject.SetActive(false); |
| | | m_ItemCell.Init(item); |
| | | m_Description1.text = item.config.ItemName; |
| | | m_Description1.color = UIHelper.GetUIColor(item.config.ItemColor); |
| | | m_Description1.color = UIHelper.GetUIColor(item.config.ItemColor, true); |
| | | m_Description2.text = string.Empty; |
| | | } |
| | | } |
| | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | m_StarUpgrade.SetListener(StarUpgrade); |
| | | |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_StarUpgrade.SetListener(StarUpgrade); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | model.SelectLevel(equipModel.GetLastestUnLockEquipSet()); |
| | | |
| | | DisplayBaseInfo(); |
| | | DisplayDynamicInfo(true); |
| | | } |
| | |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class EquipTrainCandidateBehaviour : MonoBehaviour { |
| | | |
| | | public class EquipTrainCandidateBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] Image m_BackGround; |
| | | [SerializeField] Image m_EmptyItem; |
| | | [SerializeField] ItemCell m_ItemCell; |
| | |
| | | [SerializeField] Text m_Description2; |
| | | [SerializeField] Button m_Select; |
| | | |
| | | EquipStarModel model { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | | EquipTrainModel model { get { return ModelCenter.Instance.GetModel<EquipTrainModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | |
| | | int place; |
| | | EquipStarUpgradeCandidate candidate; |
| | | EquipTrainCandidate candidate; |
| | | |
| | | public void Display(int place) |
| | | public void Display(EquipTrainCandidate candidate) |
| | | { |
| | | this.place = place; |
| | | this.candidate = model.GetCandidatePlace(this.place); |
| | | this.candidate = candidate; |
| | | |
| | | DisplayBaseInfo(); |
| | | DisplayDynamicInfo(true); |
| | |
| | | m_EmptyItem.gameObject.SetActive(true); |
| | | var place = this.candidate.place; |
| | | m_Description1.text = string.Format("部位:{0}", UIHelper.GetEquipPlaceName(place)); |
| | | m_Description1.color = UIHelper.GetUIColor(TextColType.Black, true); |
| | | m_Description2.text = "未穿戴装备"; |
| | | m_Description2.color = UIHelper.GetUIColor(TextColType.Red, true); |
| | | } |
| | | else |
| | | { |
| | |
| | | m_EmptyItem.gameObject.SetActive(false); |
| | | m_ItemCell.Init(item); |
| | | m_Description1.text = item.config.ItemName; |
| | | m_Description1.color = UIHelper.GetUIColor(item.config.ItemColor); |
| | | m_Description2.text = string.Empty; |
| | | m_Description1.color = UIHelper.GetUIColor(item.config.ItemColor, true); |
| | | var trainLevel = model.GetTrainLevel(candidate.level, candidate.place); |
| | | m_Description2.text = string.Format("洗练等级:{0}级", trainLevel); |
| | | m_Description2.color = UIHelper.GetUIColor(TextColType.Black, true); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | public class EquipTrainCandidateBehaviourPool |
| | | { |
| | |
| | | |
| | | readonly List<EquipTrainCandidateBehaviour> slotBehaviours = new List<EquipTrainCandidateBehaviour>(); |
| | | |
| | | EquipStarModel model { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | | EquipTrainModel model { get { return ModelCenter.Instance.GetModel<EquipTrainModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | |
| | | public int level { get; private set; } |
| | |
| | | slotBehaviours.Add(behaviour); |
| | | } |
| | | |
| | | m_BackGround.SetSprite(""); |
| | | m_BackGround.SetSprite("RealmEquip_16"); |
| | | m_Arrow.transform.localEulerAngles = new Vector3(0, 0, 180); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | slotBehaviours.Clear(); |
| | | m_BackGround.SetSprite(""); |
| | | m_BackGround.SetSprite("RealmEquip_5"); |
| | | m_Arrow.transform.localEulerAngles = Vector3.zero; |
| | | } |
| | | |
| | |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.LuaCallCSharp] |
| | | public class EquipTrainModel : Model |
| | | { |
| | | |
| | | public readonly LogicInt selectedLevel = new LogicInt(); |
| | | public readonly LogicInt selectedPlace = new LogicInt(); |
| | | public readonly LogicInt equipTrainLevel = new LogicInt(); |
| | |
| | | public readonly LogicInt material = new LogicInt(); |
| | | public readonly LogicInt inevitableMaterialCount = new LogicInt(); |
| | | public readonly LogicEnum<TrainOperateType> operateType = new LogicEnum<TrainOperateType>(TrainOperateType.None); |
| | | public readonly List<EquipTrainCandidate> candidatePlaces = new List<EquipTrainCandidate>(); |
| | | public readonly List<EquipTrainPropertyBar> propertyBars = new List<EquipTrainPropertyBar>(); |
| | | |
| | | Dictionary<int, EquipTrainSet> equipTrains = new Dictionary<int, EquipTrainSet>(); |
| | | public readonly LogicList<EquipTrainCandidate> candidatePlaces = new LogicList<EquipTrainCandidate>(); |
| | | public readonly LogicList<EquipTrainPropertyBar> propertyBars = new LogicList<EquipTrainPropertyBar>(); |
| | | |
| | | static Dictionary<int, int> trainTypes = new Dictionary<int, int>(); |
| | | Dictionary<int, EquipTrainSet> equipTrains = new Dictionary<int, EquipTrainSet>(); |
| | | |
| | | EquipStarModel starModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (selectedLevel.value > 0) |
| | | { |
| | | var level = selectedLevel.value; |
| | | var place = selectedPlace.value; |
| | | var trainState = GetEquipPlaceTrainState(level, place); |
| | | equipTrainLevel.value = GetTrainLevel(level, place); |
| | | equipTrainMaxLevel.value = trainState == TrainState.Empty ? -1 : GetMaxTrainLevel(level, place); |
| | | material.value = GetTrainMaterial(level, place); |
| | | |
| | | operateType.value = CalculateTrainOperateType(level, place); |
| | | InitTrainableProperties(level, place, operateType.value); |
| | | } |
| | | |
| | | } |
| | | |
| | | public void Train(int level, int place, bool[] inevitables) |
| | |
| | | var code = 0; |
| | | for (int i = 0; i < inevitables.Length; i++) |
| | | { |
| | | code += inevitables[i] ? 0 : MathUtility.Power(2, i); |
| | | code += inevitables[i] ? MathUtility.Power(2, i) : 0; |
| | | } |
| | | |
| | | var equipWash = new CA325_tagCMEquipXLAttrChange(); |
| | |
| | | for (var i = 0; i < places.Count; i++) |
| | | { |
| | | var place = places[i]; |
| | | candidatePlaces[place] = new EquipTrainCandidate(level, place); |
| | | candidatePlaces.Add(new EquipTrainCandidate(level, place)); |
| | | if (i == 0) |
| | | { |
| | | SelectPlace(level, place); |
| | |
| | | { |
| | | selectedPlace.value = place; |
| | | selectedPlace.dirty = true; |
| | | foreach (var candidate in candidatePlaces) |
| | | for (int i = 0; i < candidatePlaces.Count; i++) |
| | | { |
| | | var candidate = candidatePlaces[i]; |
| | | candidate.selected.value = candidate.level == level && candidate.place == place; |
| | | } |
| | | |
| | | var trainState = GetEquipPlaceTrainState(level, place); |
| | | equipTrainLevel.value = GetTrainLevel(level, place); |
| | | equipTrainMaxLevel.value = GetMaxTrainLevel(level); |
| | | equipTrainMaxLevel.value = trainState == TrainState.Empty ? -1 : GetMaxTrainLevel(level, place); |
| | | material.value = GetTrainMaterial(level, place); |
| | | |
| | | InitTrainableProperties(level, place); |
| | | operateType.value = CalculateTrainOperateType(level, place); |
| | | InitTrainableProperties(level, place, operateType.value); |
| | | } |
| | | |
| | | public void SetInevitable(int index, bool invevitable) |
| | | { |
| | | var equipGuid = equipModel.GetEquip(selectedLevel.value, selectedPlace.value); |
| | | if (string.IsNullOrEmpty(equipGuid)) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("Wash_NoEquip1"); |
| | | return; |
| | | } |
| | | |
| | | if (propertyBars.Count > index) |
| | | { |
| | | propertyBars[index].inevitable.value = invevitable; |
| | |
| | | return equipTrains[level].GetTotalLevel(); |
| | | } |
| | | |
| | | public int GetMaxTrainLevel(int level) |
| | | public int GetMaterialNeed(int level, int place) |
| | | { |
| | | var star = starModel.GetEquipStarLevel(level, place); |
| | | var type = GetTrainType(place); |
| | | var data = EquipWashConfig.Get(type, star + 1); |
| | | |
| | | return 5; |
| | | return data.config.costCount; |
| | | } |
| | | |
| | | public int GetMaxTrainLevel(int place) |
| | | { |
| | | var type = GetTrainType(place); |
| | | return WashLevelMaxConfig.GetMaxLevel(type); |
| | | } |
| | | |
| | | public int GetMaxTrainLevel(int level, int place) |
| | | { |
| | | return 5; |
| | | var star = starModel.GetEquipStarLevel(level, place); |
| | | var type = GetTrainType(place); |
| | | var config = WashLevelMaxConfig.Get(type, star); |
| | | if (config == null) |
| | | { |
| | | return 0; |
| | | } |
| | | else |
| | | { |
| | | return config.levelMax; |
| | | } |
| | | } |
| | | |
| | | public bool IsEquipPlaceTrainable(string equipGuid) |
| | | public List<EquipTrainCandidate> GetCandidatePlaces() |
| | | { |
| | | return candidatePlaces.Fetch(); |
| | | } |
| | | |
| | | public TrainState GetEquipPlaceTrainState(int level, int place) |
| | | { |
| | | var equipGuid = equipModel.GetEquip(level, place); |
| | | if (string.IsNullOrEmpty(equipGuid)) |
| | | { |
| | | return false; |
| | | return TrainState.Empty; |
| | | } |
| | | |
| | | var equip = packModel.GetItemByGuid(equipGuid); |
| | | if (equip == null) |
| | | { |
| | | return false; |
| | | return TrainState.Empty; |
| | | } |
| | | |
| | | var maxStarLevel = GetMaxTrainLevel(equip.config.ItemColor, equip.config.LV); |
| | | var currentStarLevel = GetTrainLevel(equip.config.LV, equip.config.EquipPlace); |
| | | return currentStarLevel < maxStarLevel; |
| | | var absoluteMax = GetMaxTrainLevel(equip.config.EquipPlace); |
| | | if (currentStarLevel >= absoluteMax) |
| | | { |
| | | return TrainState.MaxLevel; |
| | | } |
| | | |
| | | var relativeMax = GetMaxTrainLevel(equip.config.LV, equip.config.EquipPlace); |
| | | if (currentStarLevel >= relativeMax) |
| | | { |
| | | return TrainState.StarLimit; |
| | | } |
| | | |
| | | return TrainState.Allowable; |
| | | } |
| | | |
| | | public Int3 GetUnSavedProperties(int level, int place) |
| | |
| | | return places; |
| | | } |
| | | |
| | | private void InitTrainableProperties(int level, int place) |
| | | private void InitTrainableProperties(int level, int place, TrainOperateType operateType) |
| | | { |
| | | var equipGuid = equipModel.GetEquip(level, place); |
| | | propertyBars.Clear(); |
| | | if (IsEquipPlaceTrainable(equipGuid)) |
| | | { |
| | | var unSavedProperties = GetUnSavedProperties(level, place); |
| | | var trainedProperties = GetTrainedProperties(level, place); |
| | | var trainLevel = GetTrainLevel(level, place); |
| | | var data = EquipWashConfig.Get(GetTrainType(place), trainLevel); |
| | | var trainState = GetEquipPlaceTrainState(level, place); |
| | | var absoluteMax = GetMaxTrainLevel(place); |
| | | |
| | | var propertyBar = new EquipTrainPropertyBar(data.config.attType1, data.config.attMax1); |
| | | var unSavedProperties = GetUnSavedProperties(level, place); |
| | | var trainedProperties = GetTrainedProperties(level, place); |
| | | var trainLevel = GetTrainLevel(level, place); |
| | | var data = EquipWashConfig.Get(GetTrainType(place), Mathf.Clamp(trainLevel + 1, 1, absoluteMax)); |
| | | |
| | | if (data != null) |
| | | { |
| | | var propertyBar = new EquipTrainPropertyBar(data.config.attType1, trainState == TrainState.Empty ? 0 : data.config.attMax1, trainState); |
| | | propertyBar.propertyValue.value = trainedProperties.x; |
| | | propertyBar.deltaValue.value = unSavedProperties.x; |
| | | propertyBar.operateType.value = operateType; |
| | | propertyBars.Add(propertyBar); |
| | | |
| | | propertyBar = new EquipTrainPropertyBar(data.config.attType2, data.config.attMax2); |
| | | propertyBar = new EquipTrainPropertyBar(data.config.attType2, trainState == TrainState.Empty ? 0 : data.config.attMax2, trainState); |
| | | propertyBar.propertyValue.value = trainedProperties.y; |
| | | propertyBar.deltaValue.value = unSavedProperties.y; |
| | | propertyBar.operateType.value = operateType; |
| | | propertyBars.Add(propertyBar); |
| | | |
| | | propertyBar = new EquipTrainPropertyBar(data.config.attType3, data.config.attMax3); |
| | | propertyBar = new EquipTrainPropertyBar(data.config.attType3, trainState == TrainState.Empty ? 0 : data.config.attMax3, trainState); |
| | | propertyBar.propertyValue.value = trainedProperties.z; |
| | | propertyBar.deltaValue.value = unSavedProperties.z; |
| | | propertyBar.operateType.value = operateType; |
| | | propertyBars.Add(propertyBar); |
| | | } |
| | | |
| | |
| | | |
| | | private int GetTrainMaterial(int level, int place) |
| | | { |
| | | var equipGuid = equipModel.GetEquip(level, place); |
| | | var equip = packModel.GetItemByGuid(equipGuid); |
| | | if (equip == null) |
| | | if (GetEquipPlaceTrainState(level, place) == TrainState.Allowable) |
| | | { |
| | | return 0; |
| | | var star = starModel.GetEquipStarLevel(level, place); |
| | | var type = GetTrainType(place); |
| | | var data = EquipWashConfig.Get(type, star + 1); |
| | | return data.config.costItem; |
| | | } |
| | | else |
| | | { |
| | | return 1; |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | private int CalculateInevitableMaterialCount() |
| | | { |
| | | var count = 0; |
| | | foreach (var bar in propertyBars) |
| | | for (int i = 0; i < propertyBars.Count; i++) |
| | | { |
| | | count += bar.inevitable.value ? 1 : 0; |
| | | count += propertyBars[i].inevitable.value ? 1 : 0; |
| | | } |
| | | |
| | | return count; |
| | |
| | | { |
| | | var currentLevel = GetTrainLevel(level, place); |
| | | var maxLevel = GetMaxTrainLevel(level, place); |
| | | if (currentLevel >= maxLevel) |
| | | if (maxLevel > 0 && currentLevel >= maxLevel) |
| | | { |
| | | return TrainOperateType.Max; |
| | | } |
| | |
| | | return TrainOperateType.Save; |
| | | } |
| | | |
| | | var equipGuid = equipModel.GetEquip(level, place); |
| | | var trainable = IsEquipPlaceTrainable(equipGuid); |
| | | var trainable = GetEquipPlaceTrainState(level, place) == TrainState.Allowable; |
| | | if (trainable) |
| | | { |
| | | return TrainOperateType.Train; |
| | |
| | | |
| | | private void ParseConfig() |
| | | { |
| | | var config = FuncConfigConfig.Get("EquipWashGroup1"); |
| | | var equipTypes = ConfigParse.GetMultipleStr<int>(config.Numerical1); |
| | | foreach (var equipType in equipTypes) |
| | | { |
| | | trainTypes[equipType] = 1; |
| | | } |
| | | |
| | | config = FuncConfigConfig.Get("EquipWashGroup2"); |
| | | equipTypes = ConfigParse.GetMultipleStr<int>(config.Numerical1); |
| | | foreach (var equipType in equipTypes) |
| | | { |
| | | trainTypes[equipType] = 2; |
| | | } |
| | | |
| | | config = FuncConfigConfig.Get("EquipWashGroup3"); |
| | | equipTypes = ConfigParse.GetMultipleStr<int>(config.Numerical1); |
| | | foreach (var equipType in equipTypes) |
| | | { |
| | | trainTypes[equipType] = 3; |
| | | } |
| | | var config = FuncConfigConfig.Get("EquipWashGroup"); |
| | | trainTypes = ConfigParse.GetDic<int, int>(config.Numerical1); |
| | | } |
| | | |
| | | public static int GetTrainType(int equipType) |
| | |
| | | Max = 4, |
| | | } |
| | | |
| | | public enum TrainState |
| | | { |
| | | Empty, |
| | | StarLimit, |
| | | MaxLevel, |
| | | Allowable, |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | public readonly int propertyId; |
| | | public readonly int upperLimit; |
| | | public readonly EquipTrainModel.TrainState trainState; |
| | | public readonly LogicInt propertyValue = new LogicInt(); |
| | | public readonly LogicInt deltaValue = new LogicInt(); |
| | | public readonly LogicBool inevitable = new LogicBool(); |
| | | public readonly LogicEnum<EquipTrainModel.TrainOperateType> operateType |
| | | = new LogicEnum<EquipTrainModel.TrainOperateType>(EquipTrainModel.TrainOperateType.None); |
| | | |
| | | public EquipTrainPropertyBar(int propertyId, int upperLimit) |
| | | public EquipTrainPropertyBar(int propertyId, int upperLimit, EquipTrainModel.TrainState trainState) |
| | | { |
| | | this.propertyId = propertyId; |
| | | this.upperLimit = upperLimit; |
| | | this.trainState = trainState; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | public class EquipTrainPropertyBarBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] int m_Index; |
| | | [SerializeField] Text m_PropertyName; |
| | | [SerializeField] Text m_Value; |
| | | [SerializeField] Slider m_Progress; |
| | | [SerializeField] Text m_DeltaValue; |
| | | [SerializeField] ToggleButton m_Inevitable; |
| | | |
| | | EquipTrainModel model { get { return ModelCenter.Instance.GetModel<EquipTrainModel>(); } } |
| | | |
| | | EquipTrainPropertyBar propertyBar; |
| | | |
| | | public void Display(EquipTrainPropertyBar propertyBar) |
| | | { |
| | | this.propertyBar = propertyBar; |
| | | |
| | | DisplayBaseInfo(); |
| | | DisplayDynamicInfo(true); |
| | | |
| | | m_Inevitable.SetListener(SwitchInevitable); |
| | | } |
| | | |
| | | private void LateUpdate() |
| | | { |
| | | DisplayDynamicInfo(false); |
| | | } |
| | | |
| | | private void DisplayBaseInfo() |
| | | { |
| | | var config = PlayerPropertyConfig.Get(propertyBar.propertyId); |
| | | m_PropertyName.text = config.Name; |
| | | |
| | | switch (propertyBar.trainState) |
| | | { |
| | | case EquipTrainModel.TrainState.Empty: |
| | | m_Progress.value = 0; |
| | | m_Value.text = "0"; |
| | | m_DeltaValue.gameObject.SetActive(false); |
| | | break; |
| | | case EquipTrainModel.TrainState.StarLimit: |
| | | m_Progress.value = 1; |
| | | m_Value.text = string.Format("{0}/{1}", propertyBar.propertyValue, propertyBar.upperLimit); |
| | | m_DeltaValue.gameObject.SetActive(false); |
| | | break; |
| | | case EquipTrainModel.TrainState.MaxLevel: |
| | | m_Progress.value = 1; |
| | | m_Value.text = string.Format("{0}/{1}", propertyBar.propertyValue, propertyBar.upperLimit); |
| | | m_DeltaValue.gameObject.SetActive(false); |
| | | break; |
| | | case EquipTrainModel.TrainState.Allowable: |
| | | m_Inevitable.gameObject.SetActive(true); |
| | | m_DeltaValue.gameObject.SetActive(true); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | |
| | | private void DisplayDynamicInfo(bool force) |
| | | { |
| | | if (force || propertyBar.inevitable.dirty) |
| | | { |
| | | m_Inevitable.isOn = propertyBar.inevitable.Fetch(); |
| | | } |
| | | |
| | | if (force || propertyBar.propertyValue.dirty) |
| | | { |
| | | var value = propertyBar.propertyValue.Fetch(); |
| | | var maxValue = propertyBar.upperLimit; |
| | | m_Value.text = string.Format("{0}/{1}", value, maxValue); |
| | | m_Progress.value = Mathf.Clamp01((float)value / maxValue); |
| | | } |
| | | |
| | | if (force || propertyBar.deltaValue.dirty || propertyBar.operateType.dirty || propertyBar.inevitable.dirty) |
| | | { |
| | | var deltaValue = propertyBar.deltaValue.Fetch(); |
| | | var operateType = propertyBar.operateType.Fetch(); |
| | | var inevitable = propertyBar.inevitable.Fetch(); |
| | | |
| | | m_Inevitable.isOn = inevitable; |
| | | if (operateType == EquipTrainModel.TrainOperateType.Train) |
| | | { |
| | | var isPerfect = propertyBar.upperLimit > 0 && propertyBar.propertyValue.value >= propertyBar.upperLimit; |
| | | if (isPerfect) |
| | | { |
| | | m_DeltaValue.text = "完美"; |
| | | m_DeltaValue.color = UIHelper.GetUIColor(TextColType.Green, true); |
| | | } |
| | | else |
| | | { |
| | | m_DeltaValue.text = inevitable ? "必增" : ""; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (deltaValue > 0) |
| | | { |
| | | m_DeltaValue.text = string.Format("+{0}", deltaValue); |
| | | m_DeltaValue.color = UIHelper.GetUIColor(TextColType.Green, true); |
| | | } |
| | | else if (deltaValue < 0) |
| | | { |
| | | m_DeltaValue.text = string.Format("-{0}", deltaValue); |
| | | m_DeltaValue.color = UIHelper.GetUIColor(TextColType.Red, true); |
| | | } |
| | | else |
| | | { |
| | | m_DeltaValue.text = ""; |
| | | m_DeltaValue.color = UIHelper.GetUIColor(TextColType.Green, true); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | private void SwitchInevitable() |
| | | { |
| | | switch (propertyBar.trainState) |
| | | { |
| | | case EquipTrainModel.TrainState.Empty: |
| | | SysNotifyMgr.Instance.ShowTip("Wash_NoEquip1"); |
| | | break; |
| | | case EquipTrainModel.TrainState.StarLimit: |
| | | break; |
| | | case EquipTrainModel.TrainState.Allowable: |
| | | model.SetInevitable(m_Index - 1, !propertyBar.inevitable.value); |
| | | break; |
| | | case EquipTrainModel.TrainState.MaxLevel: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class EquipTrainWin : Window |
| | | { |
| | | [SerializeField] RectTransform m_LevelContainer; |
| | | |
| | | [SerializeField] Text m_MaxTrainLevel; |
| | | [SerializeField] ItemCell m_TargetEquip; |
| | | [SerializeField] RectTransform m_EquipEmpty; |
| | | |
| | | [SerializeField] MaterialCell m_MaterialCell; |
| | | [SerializeField] InevitableMaterialCell m_InevitableMaterial; |
| | | |
| | | [SerializeField] RectTransform m_UnTrainableContainer; |
| | | [SerializeField] RectTransform m_TrainableContainer; |
| | | [SerializeField] Text m_TrainLevel; |
| | | [SerializeField] EquipTrainPropertyBarBehaviour[] m_PropertyBarBehaviours; |
| | | [SerializeField] RectTransform m_MaxLevelContainer; |
| | | |
| | | [SerializeField] Button m_Train; |
| | | [SerializeField] Button m_Save; |
| | | [SerializeField] Button m_GiveUp; |
| | | |
| | | List<EquipTrainLevelBehaviour> levelBehaviours = new List<EquipTrainLevelBehaviour>(); |
| | | |
| | | EquipTrainModel model { get { return ModelCenter.Instance.GetModel<EquipTrainModel>(); } } |
| | | EquipStarModel starModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Train.SetListener(Train); |
| | | m_Save.SetListener(Save); |
| | | m_GiveUp.SetListener(GiveUp); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | model.ResetOperateParams(); |
| | | } |
| | | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | model.SelectLevel(equipModel.GetLastestUnLockEquipSet()); |
| | | DisplayBaseInfo(); |
| | | DisplayDynamicInfo(true); |
| | | } |
| | | |
| | | protected override void LateUpdate() |
| | | { |
| | | base.LateUpdate(); |
| | | DisplayDynamicInfo(false); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | private void DisplayBaseInfo() |
| | | { |
| | | CreateLevelBehaviours(); |
| | | } |
| | | |
| | | private void DisplayDynamicInfo(bool force) |
| | | { |
| | | if (force || model.selectedLevel.dirty) |
| | | { |
| | | var level = model.selectedLevel.Fetch(); |
| | | for (var i = 0; i < levelBehaviours.Count; i++) |
| | | { |
| | | var behaviour = levelBehaviours[i]; |
| | | if (behaviour.level != level) |
| | | { |
| | | behaviour.Dispose(); |
| | | } |
| | | } |
| | | |
| | | for (var i = 0; i < levelBehaviours.Count; i++) |
| | | { |
| | | var behaviour = levelBehaviours[i]; |
| | | if (behaviour.level == level) |
| | | { |
| | | behaviour.Display(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (force || model.selectedPlace.dirty) |
| | | { |
| | | var level = model.selectedLevel.value; |
| | | var place = model.selectedPlace.Fetch(); |
| | | |
| | | var equipGuid = equipModel.GetEquip(level, place); |
| | | var equip = packModel.GetItemByGuid(equipGuid); |
| | | if (equip != null) |
| | | { |
| | | m_EquipEmpty.gameObject.SetActive(false); |
| | | m_TargetEquip.gameObject.SetActive(true); |
| | | m_TargetEquip.Init(equip); |
| | | } |
| | | else |
| | | { |
| | | m_EquipEmpty.gameObject.SetActive(true); |
| | | m_TargetEquip.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | if (force || model.equipTrainLevel.dirty) |
| | | { |
| | | var trainLevel = model.equipTrainLevel.Fetch(); |
| | | m_TrainLevel.text = string.Format("{0}级洗练", trainLevel); |
| | | m_MaxLevelContainer.gameObject.SetActive(trainLevel > 0 && trainLevel >= model.equipTrainMaxLevel.value); |
| | | } |
| | | |
| | | if (force || model.equipTrainMaxLevel.dirty) |
| | | { |
| | | var level = model.selectedLevel.value; |
| | | var place = model.selectedPlace.value; |
| | | var maxTrain = model.equipTrainMaxLevel.Fetch(); |
| | | |
| | | if (maxTrain < 0) |
| | | { |
| | | m_MaxTrainLevel.text = "穿戴装备可洗练"; |
| | | } |
| | | else if (maxTrain > 0) |
| | | { |
| | | var star = starModel.GetEquipStarLevel(level, place); |
| | | m_MaxTrainLevel.text = string.Format("{0}星装备最高可洗练至{1}级", star, maxTrain); |
| | | } |
| | | else |
| | | { |
| | | m_MaxTrainLevel.text = "提升装备星级可洗练"; |
| | | } |
| | | } |
| | | |
| | | if (force || model.material.dirty) |
| | | { |
| | | var level = model.selectedLevel.value; |
| | | var place = model.selectedPlace.value; |
| | | DisplayMaterial(level, place, model.material.Fetch()); |
| | | } |
| | | |
| | | if (force || model.inevitableMaterialCount.dirty) |
| | | { |
| | | var level = model.selectedLevel.value; |
| | | var place = model.selectedPlace.value; |
| | | DisplayInevitableMaterial(level, place, model.inevitableMaterialCount.Fetch()); |
| | | } |
| | | |
| | | if (force || model.operateType.dirty) |
| | | { |
| | | DisplayOperateButton(model.operateType.Fetch()); |
| | | } |
| | | |
| | | if (force || model.propertyBars.dirty) |
| | | { |
| | | DisplayProperty(model.propertyBars.Fetch()); |
| | | } |
| | | |
| | | } |
| | | |
| | | private void DisplayMaterial(int level, int place, int itemId) |
| | | { |
| | | var own = 0; |
| | | var need = 0; |
| | | if (itemId > 0) |
| | | { |
| | | need = model.GetMaterialNeed(level, place); |
| | | own = packModel.GetItemCountByID(PackType.Item, itemId); |
| | | } |
| | | |
| | | m_MaterialCell.Display(itemId, need, own); |
| | | } |
| | | |
| | | private void DisplayInevitableMaterial(int level, int place, int need) |
| | | { |
| | | var trainable = model.GetEquipPlaceTrainState(level, place) == EquipTrainModel.TrainState.Allowable; |
| | | if (trainable && need > 0) |
| | | { |
| | | var own = packModel.GetItemCountByID(PackType.Item, GeneralDefine.equipTrainMustItemId); |
| | | var type = EquipTrainModel.GetTrainType(place); |
| | | var trainLevel = model.GetTrainLevel(level, place); |
| | | var config = EquipWashConfig.Get(type, trainLevel + 1); |
| | | m_InevitableMaterial.Display(false, own, need, config.mustCosts[need - 1]); |
| | | } |
| | | else |
| | | { |
| | | m_InevitableMaterial.Display(true, 0, 0, 0); |
| | | } |
| | | } |
| | | |
| | | private void DisplayProperty(List<EquipTrainPropertyBar> propertyBars) |
| | | { |
| | | var isTrainable = !propertyBars.IsNullOrEmpty(); |
| | | if (isTrainable) |
| | | { |
| | | m_UnTrainableContainer.gameObject.SetActive(false); |
| | | m_TrainableContainer.gameObject.SetActive(true); |
| | | for (int i = 0; i < m_PropertyBarBehaviours.Length; i++) |
| | | { |
| | | var behaviour = m_PropertyBarBehaviours[i]; |
| | | if (i < propertyBars.Count) |
| | | { |
| | | behaviour.gameObject.SetActive(true); |
| | | behaviour.Display(propertyBars[i]); |
| | | } |
| | | else |
| | | { |
| | | behaviour.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | m_UnTrainableContainer.gameObject.SetActive(true); |
| | | m_TrainableContainer.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | private void DisplayOperateButton(EquipTrainModel.TrainOperateType opreateType) |
| | | { |
| | | switch (opreateType) |
| | | { |
| | | case EquipTrainModel.TrainOperateType.None: |
| | | m_Train.gameObject.SetActive(false); |
| | | m_Save.gameObject.SetActive(false); |
| | | m_GiveUp.gameObject.SetActive(false); |
| | | break; |
| | | case EquipTrainModel.TrainOperateType.Train: |
| | | m_Train.gameObject.SetActive(true); |
| | | m_Save.gameObject.SetActive(false); |
| | | m_GiveUp.gameObject.SetActive(false); |
| | | break; |
| | | case EquipTrainModel.TrainOperateType.Forbid: |
| | | break; |
| | | case EquipTrainModel.TrainOperateType.Save: |
| | | m_Save.gameObject.SetActive(true); |
| | | m_Train.gameObject.SetActive(false); |
| | | m_GiveUp.gameObject.SetActive(false); |
| | | break; |
| | | case EquipTrainModel.TrainOperateType.Max: |
| | | m_Train.gameObject.SetActive(false); |
| | | m_Save.gameObject.SetActive(false); |
| | | m_GiveUp.gameObject.SetActive(false); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | |
| | | private void Train() |
| | | { |
| | | var level = model.selectedLevel.value; |
| | | var place = model.selectedPlace.value; |
| | | var inevitables = new bool[3]; |
| | | for (int i = 0; i < 3; i++) |
| | | { |
| | | inevitables[i] = model.propertyBars[i].inevitable.value; |
| | | } |
| | | model.Train(level, place, inevitables); |
| | | } |
| | | |
| | | private void Save() |
| | | { |
| | | var level = model.selectedLevel.value; |
| | | var place = model.selectedPlace.value; |
| | | model.Save(level, place); |
| | | } |
| | | |
| | | private void GiveUp() |
| | | { |
| | | var level = model.selectedLevel.value; |
| | | var place = model.selectedPlace.value; |
| | | model.GiveUp(level, place); |
| | | } |
| | | |
| | | private void CreateLevelBehaviours() |
| | | { |
| | | var levels = equipModel.GetUnLockedEquipSets(); |
| | | var gap = levels.Count - levelBehaviours.Count; |
| | | for (var i = 0; i < gap; i++) |
| | | { |
| | | var instance = UIUtility.CreateWidget("EquipTrainLevelBehaviour", "EquipTrainLevelBehaviour"); |
| | | var behaviour = instance.GetComponent<EquipTrainLevelBehaviour>(); |
| | | behaviour.transform.SetParentEx(m_LevelContainer, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | levelBehaviours.Add(behaviour); |
| | | } |
| | | |
| | | for (var i = 0; i < levelBehaviours.Count; i++) |
| | | { |
| | | var behaviour = levelBehaviours[i]; |
| | | if (i < levels.Count) |
| | | { |
| | | behaviour.gameObject.SetActive(true); |
| | | behaviour.UnInit(); |
| | | behaviour.Init(levels[i]); |
| | | } |
| | | else |
| | | { |
| | | behaviour.UnInit(); |
| | | behaviour.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | [Serializable] |
| | | public class MaterialCell |
| | | { |
| | | public RectTransform m_LockContainer; |
| | | public ItemBehaviour m_Material; |
| | | public Text m_MaterialCount; |
| | | |
| | | public void Display(int itemId, int need, int own) |
| | | { |
| | | if (itemId > 0) |
| | | { |
| | | m_LockContainer.gameObject.SetActive(false); |
| | | m_Material.gameObject.SetActive(true); |
| | | m_MaterialCount.gameObject.SetActive(true); |
| | | m_Material.SetItem(itemId, 1); |
| | | var enough = own >= need; |
| | | m_MaterialCount.text = string.Format("{0}/{1}", UIHelper.AppendStringColor(enough ? TextColType.White : TextColType.Red, own.ToString(), true), need); |
| | | } |
| | | else |
| | | { |
| | | m_LockContainer.gameObject.SetActive(true); |
| | | m_Material.gameObject.SetActive(false); |
| | | m_MaterialCount.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | [Serializable] |
| | | public class InevitableMaterialCell |
| | | { |
| | | public RectTransform m_LockContainer; |
| | | public ItemBehaviour m_InevitableMaterial; |
| | | public Text m_InevitableMaterialCount; |
| | | public RectTransform m_DiamondContainer; |
| | | public Text m_DiamondCount; |
| | | |
| | | public void Display(bool locked, int need, int own, int diamond) |
| | | { |
| | | if (locked) |
| | | { |
| | | m_LockContainer.gameObject.SetActive(true); |
| | | m_InevitableMaterial.gameObject.SetActive(false); |
| | | m_InevitableMaterialCount.gameObject.SetActive(false); |
| | | m_DiamondContainer.gameObject.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | m_LockContainer.gameObject.SetActive(false); |
| | | m_InevitableMaterial.gameObject.SetActive(true); |
| | | m_InevitableMaterialCount.gameObject.SetActive(true); |
| | | |
| | | m_InevitableMaterial.SetItem(GeneralDefine.equipTrainMustItemId, 1); |
| | | var enough = own >= need; |
| | | |
| | | m_InevitableMaterialCount.text = string.Format("{0}/{1}", |
| | | UIHelper.AppendStringColor(enough ? TextColType.White : TextColType.Red, own.ToString(), true), need); |
| | | |
| | | if (diamond > 0) |
| | | { |
| | | m_DiamondContainer.gameObject.SetActive(true); |
| | | m_DiamondCount.text = diamond.ToString(); |
| | | } |
| | | else |
| | | { |
| | | m_DiamondContainer.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | }
|
| | | }
|
| | |
|
| | | var completedTimes = dailyQuestModel.GetDailyQuestCompletedTimes(dailyQuestId);
|
| | | var totalTimes = dailyQuestModel.GetDailyQuestTotalTimes(dailyQuestId);
|
| | | if (completedTimes >= totalTimes)
|
| | | {
|
| | | error = 2;
|
| | | return false;
|
| | | }
|
| | |
|
| | | if (CrossServerUtility.IsCrossServerBoss())
|
| | | {
|
| | | error = 3;
|
| | |
| | |
|
| | | private void UpdateMissionEvent()
|
| | | {
|
| | | Display();
|
| | | DisplayProgress();
|
| | | DisplayHurtRank();
|
| | | DisplayAlliance();
|
| | | }
|
| | |
|
| | | [Serializable]
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, March 12, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class AllianceBossInspireWin : Window
|
| | | {
|
| | | [SerializeField] Text m_Remind;
|
| | | [SerializeField] Text m_InspireHurt;
|
| | | [SerializeField] ItemBehaviour[] m_Items;
|
| | | [SerializeField] Text m_InspireLevel;
|
| | | [SerializeField] Button m_Inspire;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | DungeonInspireConfig inspireConfig = null;
|
| | |
|
| | | DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | AllianceBossModel allianceBossModel { get { return ModelCenter.Instance.GetModel<AllianceBossModel>(); } }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Inspire.AddListener(Inspire);
|
| | | m_Close.AddListener(CloseClick);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | model.dungeonInspireLvEvent += DungeonInspireLvEvent;
|
| | | model.updateMissionEvent += UpdateMissionEvent;
|
| | | var inspireConfigs = model.GetDungeonInspire(AllianceBossModel.DATAMAPID);
|
| | | inspireConfig = inspireConfigs[0];
|
| | |
|
| | | Display();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | model.dungeonInspireLvEvent -= DungeonInspireLvEvent;
|
| | | model.updateMissionEvent -= UpdateMissionEvent;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | |
|
| | | void Display()
|
| | | {
|
| | | DisplayRemind();
|
| | | DisplayInspireHurt();
|
| | | DisplayRewards();
|
| | | DisplayInspireLevel();
|
| | | }
|
| | |
|
| | | void DisplayRemind()
|
| | | {
|
| | | var singleHurt = model.GetDungeonInspireUpper(AllianceBossModel.DATAMAPID);
|
| | | var maxCount = model.GetInspireMaxCount(AllianceBossModel.DATAMAPID);
|
| | | m_Remind.text = Language.Get("AllianceBossInspireRemind", singleHurt, maxCount * singleHurt);
|
| | | }
|
| | |
|
| | | void DisplayInspireHurt()
|
| | | {
|
| | | var currentLevel = model.GetDungeonInspireLevel();
|
| | | var singleHurt = model.GetDungeonInspireUpper(AllianceBossModel.DATAMAPID);
|
| | | m_InspireHurt.text = Language.Get("AllianceBossInspireHurt", currentLevel * singleHurt);
|
| | | }
|
| | |
|
| | | void DisplayRewards()
|
| | | {
|
| | | for (int i = 0; i < m_Items.Length; i++)
|
| | | {
|
| | | if (i < allianceBossModel.inspireRewards.Count)
|
| | | {
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | m_Items[i].SetItem(allianceBossModel.inspireRewards[i]);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Items[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayInspireLevel()
|
| | | {
|
| | | m_InspireLevel.text = Language.Get("AllianceBossInspireLevel", model.mission.IsEncourage == 1 ? 1 : 0);
|
| | | }
|
| | |
|
| | | private void DungeonInspireLvEvent()
|
| | | {
|
| | | DisplayInspireHurt();
|
| | | }
|
| | |
|
| | | private void UpdateMissionEvent()
|
| | | {
|
| | | DisplayInspireLevel();
|
| | | }
|
| | |
|
| | | private void Inspire()
|
| | | {
|
| | | var cost = model.GetDungeonInspireCost(inspireConfig);
|
| | |
|
| | | if (model.mission.IsEncourage == 1)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("Xjmj_InspireMaxLevel");
|
| | | return;
|
| | | }
|
| | |
|
| | | var inspireLevel = model.GetDungeonInspireLevel();
|
| | | var maxLevel = model.GetInspireMaxCount(AllianceBossModel.DATAMAPID);
|
| | | if (inspireLevel >= maxLevel)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("Xjmj_InspireMaxLevel");
|
| | | return;
|
| | | }
|
| | |
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
|
| | | Language.Get("AllianceBossInspireConfirm", cost),
|
| | | (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | if (cost > PlayerDatas.Instance.baseData.diamond)
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | return;
|
| | | }
|
| | | CA508_tagCMDoFBAction pak = new CA508_tagCMDoFBAction();
|
| | | pak.ActionType = 0;
|
| | | pak.ActionInfo = (uint)inspireConfig.InspireType;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| File was renamed from System/JadeDynastyKnapSack/JadeDynastySelectGemWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9132f6584cbf4624a98b972346cfb13f |
| | | timeCreated: 1548838906 |
| | | guid: f2dae6865c031234fb3200b10f6b22de |
| | | timeCreated: 1552356351 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | public bool isActivityOver { get; private set; }
|
| | | public int participateLimit { get; private set; }
|
| | |
|
| | | public List<Item> inspireRewards { get; private set; }
|
| | |
|
| | | public event Action allianceBossStateRefresh;
|
| | |
|
| | | public override void Init()
|
| | |
| | | {
|
| | | var config = FuncConfigConfig.Get("LeagueBOSSNumber1");
|
| | | participateLimit = int.Parse(config.Numerical1);
|
| | |
|
| | | inspireRewards = new List<Item>();
|
| | | config = FuncConfigConfig.Get("LeagueBOSSReward1");
|
| | | var itemArray = LitJson.JsonMapper.ToObject<int[][]>(config.Numerical1);
|
| | | for (int i = 0; i < itemArray.Length; i++)
|
| | | {
|
| | | var item = itemArray[i];
|
| | | inspireRewards.Add(new Item()
|
| | | {
|
| | | id = item[0],
|
| | | count = item[1],
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HA40C_tagGCAllFamilyBossInfo package)
|
| | |
| | | {
|
| | | JadeDynastyTowerModel towerModel { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } }
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | JadeDynastyGemModel gemModel { get { return ModelCenter.Instance.GetModel<JadeDynastyGemModel>(); } }
|
| | | public string LocalSaveEquipUnlock { get; private set; }
|
| | | public string LocalSaveActiveSuit { get; private set; }
|
| | | public string LocalSaveActiveStoneSuit { get; private set; }
|
| | |
| | | var model = playerPack.GetItemByIndex(PackType.JadeDynastyEquip, key);
|
| | | if (model != null)
|
| | | {
|
| | | JadeDynastyGemModel.GemEquipData equipData;
|
| | | var existGem = gemModel.TryGetEquipGems(key, out equipData);
|
| | | uint[] stoneIds = existGem ? equipData.items : null;
|
| | | if (stoneIds != null)
|
| | | {
|
| | | foreach (var id in stoneIds)
|
| | | {
|
| | | if (id != 0)
|
| | | {
|
| | | var config = ItemConfig.Get((int)id);
|
| | | if (config.EffectValueB1 >= suitLv)
|
| | | {
|
| | | activeStoneNum += 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | //JadeDynastyGemModel.GemEquipData equipData;
|
| | | //var existGem = gemModel.TryGetEquipGems(key, out equipData);
|
| | | //uint[] stoneIds = existGem ? equipData.items : null;
|
| | | //if (stoneIds != null)
|
| | | //{
|
| | | // foreach (var id in stoneIds)
|
| | | // {
|
| | | // if (id != 0)
|
| | | // {
|
| | | // var config = ItemConfig.Get((int)id);
|
| | | // if (config.EffectValueB1 >= suitLv)
|
| | | // {
|
| | | // activeStoneNum += 1;
|
| | | // }
|
| | | // }
|
| | | // }
|
| | | //}
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var model = playerPack.GetItemByIndex(PackType.JadeDynastyEquip, key);
|
| | | if (model != null)
|
| | | {
|
| | | JadeDynastyGemModel.GemEquipData equipData;
|
| | | var existGem = gemModel.TryGetEquipGems(key, out equipData);
|
| | | uint[] stoneIds = existGem ? equipData.items : null;
|
| | | if (stoneIds != null)
|
| | | {
|
| | | foreach (var id in stoneIds)
|
| | | {
|
| | | if (id != 0)
|
| | | {
|
| | | var config = ItemConfig.Get((int)id);
|
| | | if (!stoneDict.ContainsKey(config.EffectValueB1))
|
| | | {
|
| | | stoneDict.Add(config.EffectValueB1, 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | stoneDict[config.EffectValueB1] += 1;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | //JadeDynastyGemModel.GemEquipData equipData;
|
| | | //var existGem = gemModel.TryGetEquipGems(key, out equipData);
|
| | | //uint[] stoneIds = existGem ? equipData.items : null;
|
| | | //if (stoneIds != null)
|
| | | //{
|
| | | // foreach (var id in stoneIds)
|
| | | // {
|
| | | // if (id != 0)
|
| | | // {
|
| | | // var config = ItemConfig.Get((int)id);
|
| | | // if (!stoneDict.ContainsKey(config.EffectValueB1))
|
| | | // {
|
| | | // stoneDict.Add(config.EffectValueB1, 1);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // stoneDict[config.EffectValueB1] += 1;
|
| | | // }
|
| | | // }
|
| | | //
|
| | | // }
|
| | | //}
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | private void OpenJadeDynastyGem()
|
| | | {
|
| | | CloseSubWindows();
|
| | | WindowCenter.Instance.Open<JadeDynastyGemWin>();
|
| | | functionOrder = m_JadeDynastyGem.order;
|
| | | }
|
| | |
|
| | |
| | | } |
| | | |
| | | |
| | | InlaidPanel.ShowGemInfo(gemAttrDes,stoneId, false); |
| | | //InlaidPanel.ShowGemInfo(gemAttrDes,stoneId, false); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | break; |
| | | case 25: |
| | | if (!ModelCenter.Instance.GetModel<GemModel>().SatisfyBetter(item.itemId)) |
| | | if (!ModelCenter.Instance.GetModel<EquipGemModel>().IsBetterGem(item.itemId)) |
| | | { |
| | | return false; |
| | | } |
| | |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } |
| | | StrengthenModel strengthModel { get { return ModelCenter.Instance.GetModel<StrengthenModel>(); } } |
| | | EquipWashModel equipWashModel { get { return ModelCenter.Instance.GetModel<EquipWashModel>(); } } |
| | | BuffModel Buffmodel { get { return ModelCenter.Instance.GetModel<BuffModel>(); } } |
| | | FairyModel fairyModel { get { return ModelCenter.Instance.GetModel<FairyModel>(); } } |
| | | BoxGetItemModel BoxModel { get { return ModelCenter.Instance.GetModel<BoxGetItemModel>(); } } |
| | | DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } } |
| | | EquipGemModel equipGemModel { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } } |
| | | |
| | | #region 装备 |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | var stones = PlayerStoneData.Instance.GetStoneInfo(equipPlace); |
| | | var gemOpenLvs = itemTipsModel.gemOpenLvs; |
| | | int[] stones = null; |
| | | equipGemModel.TryGetEquipGems(equipPlace, out stones); |
| | | if (stones != null) |
| | | { |
| | | int i = 0; |
| | | for (i = 0; i < stones.Length; i++) |
| | | { |
| | | if (stones[i] != 0 && item.config.LV >= gemOpenLvs[0]) |
| | | if (stones[i] != 0 && equipGemModel.IsEquipGemHoleOpen(equipPlace, 0)) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("SwitchEquip_Gem"); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | var washPro = equipWashModel.GetWashEquipInfo(equipPlace); |
| | | if (washPro != null) |
| | | { |
| | | int i = 0; |
| | | for (i = 0; i < washPro.XLAttrCnt; i++) |
| | | { |
| | | if (washPro.proValuelist[i].XLAttrValue > 0) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("SwitchEquip_Wash"); |
| | | break; |
| | | } |
| | | } |
| | |
| | | private Dictionary<int, int> GetStoneAttrDict()
|
| | | {
|
| | | Dictionary<int, int> attrDict = new Dictionary<int, int>();
|
| | | var stoneDict = PlayerStoneData.Instance.GetAllStone();
|
| | | foreach (var key in stoneDict.Keys)
|
| | | {
|
| | | var stoneIds = stoneDict[key];
|
| | | var itemModel = playerPack.GetItemByIndex(PackType.Equip, key);
|
| | | if (itemModel != null && stoneIds != null)
|
| | | {
|
| | | for (int i = 0; i < stoneIds.Length; i++)
|
| | | {
|
| | | int stoneId = (int)stoneIds[i];
|
| | | ItemConfig itemConfig = ItemConfig.Get(stoneId);
|
| | | if (itemConfig != null)
|
| | | {
|
| | | var itemEffectDict = SetItemEffectDict(itemConfig);
|
| | | foreach (var attrId in itemEffectDict.Keys)
|
| | | {
|
| | | var attrValue = itemEffectDict[attrId];
|
| | | if (!attrDict.ContainsKey(attrId))
|
| | | {
|
| | | attrDict.Add(attrId, attrValue);
|
| | | }
|
| | | else
|
| | | {
|
| | | attrDict[attrId] += attrValue;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | //var stoneDict = PlayerStoneData.Instance.GetAllStone();
|
| | | //foreach (var key in stoneDict.Keys)
|
| | | //{
|
| | | // var stoneIds = stoneDict[key];
|
| | | // var itemModel = playerPack.GetItemByIndex(PackType.Equip, key);
|
| | | // if (itemModel != null && stoneIds != null)
|
| | | // {
|
| | | // for (int i = 0; i < stoneIds.Length; i++)
|
| | | // {
|
| | | // int stoneId = (int)stoneIds[i];
|
| | | // ItemConfig itemConfig = ItemConfig.Get(stoneId);
|
| | | // if (itemConfig != null)
|
| | | // {
|
| | | // var itemEffectDict = SetItemEffectDict(itemConfig);
|
| | | // foreach (var attrId in itemEffectDict.Keys)
|
| | | // {
|
| | | // var attrValue = itemEffectDict[attrId];
|
| | | // if (!attrDict.ContainsKey(attrId))
|
| | | // {
|
| | | // attrDict.Add(attrId, attrValue);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // attrDict[attrId] += attrValue;
|
| | | // }
|
| | | // }
|
| | | // }
|
| | | // }
|
| | | // }
|
| | | //}
|
| | | return attrDict;
|
| | | }
|
| | |
|
| | |
| | | public ulong count { get; private set; }
|
| | | public int isBind { get; private set; }
|
| | | public int unionWarehouseScore { get; private set; }
|
| | | public uint[] stones { get; private set; } //可镶嵌宝石数组 长度为0 未镶嵌 数值为0 未镶嵌
|
| | | public int[] stones { get; private set; } //可镶嵌宝石数组 长度为0 未镶嵌 数值为0 未镶嵌
|
| | | public int score { get; private set; }
|
| | | public bool isCompare { get; private set; } //是否进行装备比较
|
| | | public bool isPreview { get; private set; }//是否预览
|
| | |
| | | public bool isHavePutLimit { get; private set; }
|
| | |
|
| | | StrengthenModel strengthengmodel { get { return ModelCenter.Instance.GetModel<StrengthenModel>(); } }
|
| | | EquipWashModel washModel { get { return ModelCenter.Instance.GetModel<EquipWashModel>(); } }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | RuneModel runeModel { get { return ModelCenter.Instance.GetModel<RuneModel>(); } }
|
| | | GodBeastModel beastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
|
| | |
| | | {
|
| | | SetStrengthData(strengthengmodel.StrengthenTheCeiling(index), strengthengmodel.GameDefineIndex(index));
|
| | | }
|
| | |
|
| | | WashProCount washPro = washModel.GetWashEquipInfo(index);
|
| | | if (washPro != null)
|
| | | {
|
| | | SetWashModel(washModel.OnGetWashType(index), washPro.XLAttrLV, washModel.WashProValues(index));
|
| | | }
|
| | | }
|
| | |
|
| | | switch (type)
|
| | | {
|
| | | case PackType.Equip:
|
| | | SetGemModel(PlayerStoneData.Instance.GetStoneInfo(index));
|
| | | int[] equipGems = null;
|
| | | var equipGemModel = ModelCenter.Instance.GetModel<EquipGemModel>();
|
| | | if (equipGemModel.TryGetEquipGems(index, out equipGems))
|
| | | {
|
| | | SetGemModel(equipGems);
|
| | | }
|
| | | break;
|
| | | case PackType.JadeDynastyEquip:
|
| | | JadeDynastyGemModel.GemEquipData equipData;
|
| | | var model = ModelCenter.Instance.GetModel<JadeDynastyGemModel>();
|
| | | var existGem = model.TryGetEquipGems(index + 121, out equipData);
|
| | | SetGemModel(existGem ? equipData.items : null);
|
| | | //JadeDynastyGemModel.GemEquipData equipData;
|
| | | //var model = ModelCenter.Instance.GetModel<JadeDynastyGemModel>();
|
| | | //var existGem = model.TryGetEquipGems(index + 121, out equipData);
|
| | | //SetGemModel(existGem ? equipData.items : null);
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | //设置弹框的宝石数据
|
| | | public void SetGemModel(params uint[] stones)
|
| | | public void SetGemModel(params int[] stones)
|
| | | {
|
| | | this.stones = stones;
|
| | | }
|
| | |
| | | void Strengthen1Button()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | var starModel = ModelCenter.Instance.GetModel<EquipStarModel>();
|
| | | var equipModel = ModelCenter.Instance.GetModel<EquipModel>();
|
| | | starModel.SelectLevel(equipModel.GetLastestUnLockEquipSet());
|
| | | WindowCenter.Instance.Open<EquipFrameWin>(false, 0);
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | EquipWashModel m_EquipWashModel;
|
| | | EquipWashModel equipWashModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_EquipWashModel ?? (m_EquipWashModel = ModelCenter.Instance.GetModel<EquipWashModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | public RichTableEvent()
|
| | | {
|
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.TABLE, this);
|
| | |
| | |
|
| | | private void OnSingleClickItemCell(int itemId, RichTextMgr.HrefInfo hrefInfo)
|
| | | {
|
| | | uint[] stone = null;
|
| | | int[] stone = null;
|
| | | if (hrefInfo.mSplits.ContainsKey("stone"))
|
| | | {
|
| | | try
|
| | | {
|
| | | stone = LitJson.JsonMapper.ToObject<uint[]>(hrefInfo.mSplits["stone"]);
|
| | | stone = LitJson.JsonMapper.ToObject<int[]>(hrefInfo.mSplits["stone"]);
|
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | |
| | | itemId = chatSendItem.itemId;
|
| | | itemCount = chatSendItem.count;
|
| | | isBind = chatSendItem.isBind;
|
| | | stone = chatSendItem.equipGems;
|
| | | if (!string.IsNullOrEmpty(chatSendItem.useData))
|
| | | {
|
| | | userdatadic = ConfigParse.Analysis(chatSendItem.useData);
|
| | |
| | | "", userdatadic);
|
| | | attrData.SetGemModel(stone);
|
| | | attrData.SetStrengthData(strengthenLv, GetStrengthenType(itemId));
|
| | | if (!_equipWash.Equals(default(RoleParticularModel.EquipWash)))
|
| | | {
|
| | | attrData.SetWashModel(equipWashModel.OnGetWashType(index), _equipWash.LV, _equipWash.Value);
|
| | | }
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | Dictionary<int, ulong> fightPowerDict = new Dictionary<int, ulong>();
|
| | | Dictionary<int, int> equipPartStarLvDict = new Dictionary<int, int>();
|
| | | Dictionary<int, uint[]> equipPartStoneDict = new Dictionary<int, uint[]>();
|
| | | Dictionary<int, int[]> equipPartStoneDict = new Dictionary<int, int[]>();
|
| | | Dictionary<int, EquipWash> equipWashDict = new Dictionary<int, EquipWash>();
|
| | | Dictionary<int, int> godWeaponDict = new Dictionary<int, int>();
|
| | | Dictionary<int, int> treasureDict = new Dictionary<int, int>();
|
| | |
| | | return allEquipStarLv;
|
| | | }
|
| | |
|
| | | public uint[] GetEquipStone(int index)
|
| | | public int[] GetEquipStone(int index)
|
| | | {
|
| | | if (equipPartStoneDict != null && equipPartStoneDict.ContainsKey(index))
|
| | | {
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | public Dictionary<int, uint[]> GetAllEquipStone()
|
| | | public Dictionary<int, int[]> GetAllEquipStone()
|
| | | {
|
| | | return equipPartStoneDict;
|
| | | }
|
| | |
| | | foreach (var key in jsonPlusData.Keys)
|
| | | {
|
| | | int index = int.Parse(key);
|
| | | equipPartStoneDict.Add(index, JsonMapper.ToObject<uint[]>(jsonPlusData[key].ToJson()));
|
| | | equipPartStoneDict.Add(index, JsonMapper.ToObject<int[]>(jsonPlusData[key].ToJson()));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | RoleParticularModel model { get { return ModelCenter.Instance.GetModel<RoleParticularModel>(); } }
|
| | | FriendsModel friendsModel { get { return ModelCenter.Instance.GetModel<FriendsModel>(); } }
|
| | | EquipWashModel equipWashModel { get { return ModelCenter.Instance.GetModel<EquipWashModel>(); } }
|
| | | StrengthenModel strengthengmodel { get { return ModelCenter.Instance.GetModel<StrengthenModel>(); } }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | |
|
| | |
| | | "", itemData.useDataDict);
|
| | | attrData.SetStrengthData(viewPlayerData.rolePlusData.GetEquipStarLv((int)type), strengthengmodel.GameDefineIndex((int)type));
|
| | | attrData.SetGemModel(viewPlayerData.rolePlusData.GetEquipStone((int)type));
|
| | | RoleParticularModel.EquipWash? equipWash = viewPlayerData.rolePlusData.GetEquipWash((int)type);
|
| | | if (equipWash.HasValue)
|
| | | {
|
| | | attrData.SetWashModel(equipWashModel.OnGetWashType((int)type), equipWash.Value.LV, equipWash.Value.Value);
|
| | | }
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | EquipWashModel m_EquipWashModel;
|
| | | EquipWashModel equipWashModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_EquipWashModel ?? (m_EquipWashModel = ModelCenter.Instance.GetModel<EquipWashModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | TreasureModel m_TreasureModel;
|
| | | TreasureModel treasureModel
|
| | | {
|
| | |
| | | }
|
| | | break;
|
| | | case FuncPowerType.Wash:
|
| | | foreach (WashProCount wash in equipWashModel.GetWashInfoDict().Values)
|
| | | {
|
| | | if (wash == null)
|
| | | continue;
|
| | | selfValue += wash.XLAttrLV;
|
| | | }
|
| | | targetValue = viewPlayerData.rolePlusData.GetAllEquipWashLv();
|
| | | break;
|
| | | case FuncPowerType.Pet:
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public int GetAllStoneLv(Dictionary<int, uint[]> dict)
|
| | | public int GetAllStoneLv(Dictionary<int, int[]> dict)
|
| | | {
|
| | | int allStoneLv = 0;
|
| | | foreach (uint[] array in dict.Values)
|
| | | foreach (int[] array in dict.Values)
|
| | | {
|
| | | if (array == null || array.Length == 0)
|
| | | continue;
|
| | |
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
|
| | | }
|
| | |
|
| | | EquipGemModel equipGemModel { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | |
| | | PetModel.Event_H0704Add += OnRefreshPetData;
|
| | | PetModel.Event_H0704Update += OnRefreshPetData;
|
| | | petmodel.PlayerLoginOkData += OnRefreshPetData;
|
| | | equipWashModel.RefreshWashModelEvent += RefreshWashModelEvent;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
|
| | | ItemLogicUtility.Instance.GetBetterEquipEvent += RefreshGetBetterEquipEvent;
|
| | | MountModel.PlayerLoginOKData += PlayerLoginOKData;
|
| | |
| | |
|
| | | public void RefreshData()
|
| | | {
|
| | | GetWashCntDic();
|
| | | GetPetCntDic();
|
| | | GetMountCntDic();
|
| | | }
|
| | |
|
| | | EquipWashModel m_EquipWashModel;
|
| | | EquipWashModel equipWashModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_EquipWashModel ?? (m_EquipWashModel = ModelCenter.Instance.GetModel<EquipWashModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | TreasureModel m_TreasureModel;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | GemModel gemModel { get { return ModelCenter.Instance.GetModel<GemModel>(); } }
|
| | |
|
| | | BlastFurnaceModel blastFurnaceModel { get { return ModelCenter.Instance.GetModel<BlastFurnaceModel>(); } }
|
| | |
|
| | |
| | | #endregion
|
| | |
|
| | | #region 洗练
|
| | | private void RefreshWashModelEvent()
|
| | | {
|
| | | GetWashCntDic();
|
| | | }
|
| | | private Dictionary<int, int> washCntDic = new Dictionary<int, int>();
|
| | | private void GetWashCntDic()
|
| | | {
|
| | | washCntDic.Clear();
|
| | | var dict = equipWashModel.GetWashInfoDict();
|
| | | if (dict == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | foreach (var wash in dict.Values)
|
| | | {
|
| | | if (!washCntDic.ContainsKey(wash.XLAttrLV))
|
| | | {
|
| | | washCntDic.Add(wash.XLAttrLV, 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | washCntDic[wash.XLAttrLV]++;
|
| | | }
|
| | | }
|
| | | }
|
| | | public int GetWashCnt(int lv)
|
| | | {
|
| | | int val = 0;
|
| | | foreach (var key in washCntDic.Keys)
|
| | | {
|
| | | if (lv <= key)
|
| | | {
|
| | | val += washCntDic[key];
|
| | | }
|
| | | }
|
| | | return val;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | _id == magicianModel.magicianRedpoint.id ||
|
| | | _id == methodData.fairyHeartRedpoint.id ||
|
| | | _id == realmModel.realmRedpoint.id ||
|
| | | _id == gemModel.gemTagRedPoint.id ||
|
| | | _id == equipGemModel.redpoint.id ||
|
| | | _id == rolePointModel.redpoint.id)
|
| | | {
|
| | | CheckPromoteDetailEffect();
|
| | |
| | | case PromoteDetailType.TreasurePotential:
|
| | | return false;
|
| | | case PromoteDetailType.Gem:
|
| | | return gemModel.gemTagRedPoint.state == RedPointState.Simple;
|
| | | return equipGemModel.redpoint.state == RedPointState.Simple;
|
| | | case PromoteDetailType.Wash:
|
| | | return MainRedDot.Instance.redPointWashFunc.state == RedPointState.Simple;
|
| | | case PromoteDetailType.RolePromote:
|
| | |
| | | private WingsRedDotModel model { get { return W_ModelRedDit ?? (W_ModelRedDit = ModelCenter.Instance.GetModel<WingsRedDotModel>()); } }
|
| | | private StrengthenModel M_Strengtheng;
|
| | | private StrengthenModel strengtheng { get { return M_Strengtheng ?? (M_Strengtheng = ModelCenter.Instance.GetModel<StrengthenModel>()); } }
|
| | | private WashTips _washTips;
|
| | | public WashTips WashTip {
|
| | | get {
|
| | | if (_washTips == null)
|
| | | _washTips = transform.Find("CommonPanel/WashTips").GetComponent<WashTips>();
|
| | | return _washTips;
|
| | | }
|
| | | }
|
| | | private Button _closeBtn;
|
| | |
|
| | | private StrengtheningSripts _strengtheningPanel;
|
| | |
| | | private GameObject _InlaidGemPanel; //宝石
|
| | | private GameObject _wingsRefinePanel;
|
| | |
|
| | | EquipWashModel m_EquipWashModel;
|
| | | EquipWashModel equipWashModel {
|
| | | get {
|
| | | return m_EquipWashModel ?? (m_EquipWashModel = ModelCenter.Instance.GetModel<EquipWashModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | GemModel m_gemModel;
|
| | | GemModel gemModel {
|
| | | get {
|
| | | return m_gemModel ?? (m_gemModel = ModelCenter.Instance.GetModel<GemModel>());
|
| | | }
|
| | | }
|
| | | WingsRedDotModel m_WingsRedDot;
|
| | | WingsRedDotModel wingsRedDot {
|
| | | get {
|
| | |
| | | {
|
| | | StrengthenPnl.gameObject.SetActive(false);
|
| | | _InlaidGemPanel.gameObject.SetActive(false);
|
| | | WashTip.gameObject.SetActive(false);
|
| | | _wingsRefinePanel.SetActive(false);
|
| | |
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | |
| | | if (strengtheng.redPointStre.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = _strengthTitle.order;
|
| | | }
|
| | | else if (gemModel.gemTagRedPoint.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = _inlayTitle.order;
|
| | | }
|
| | | else if (wingsRedDot.redPointStre.state == RedPointState.Simple)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | _InlaidGemPanel.gameObject.SetActive(false);
|
| | | WashTip.gameObject.SetActive(true);
|
| | | _wingsRefinePanel.SetActive(false);
|
| | | functionOrder = _washTitle.order;
|
| | | }
|
| | |
|
| | | private void OnClickEquipSuit()
|
| | | {
|
| | | equipWashModel.SetCurWashModel(0);
|
| | | if (StrengthenPnl.gameObject.activeSelf)
|
| | | {
|
| | | StrengthenPnl.gameObject.SetActive(false);
|
| | | }
|
| | | _InlaidGemPanel.gameObject.SetActive(false);
|
| | | WashTip.gameObject.SetActive(false);
|
| | | _wingsRefinePanel.SetActive(false);
|
| | | functionOrder = _equipSuitTitle.order;
|
| | | }
|
| | |
|
| | | private void OnClickWingsRefine()
|
| | | {
|
| | | equipWashModel.SetCurWashModel(0);
|
| | | if (StrengthenPnl.gameObject.activeSelf)
|
| | | {
|
| | | StrengthenPnl.gameObject.SetActive(false);
|
| | | }
|
| | | _InlaidGemPanel.gameObject.SetActive(false);
|
| | | WashTip.gameObject.SetActive(false);
|
| | | _wingsRefinePanel.SetActive(true);
|
| | | model.redPointStre.state = RedPointState.None;
|
| | | functionOrder = _wingsRefineTitle.order;
|
| | |
| | |
|
| | | private void OnClickInlayTitle()
|
| | | {
|
| | | equipWashModel.SetCurWashModel(0);
|
| | | if (StrengthenPnl.gameObject.activeSelf)
|
| | | {
|
| | | StrengthenPnl.gameObject.SetActive(false);
|
| | | }
|
| | | _InlaidGemPanel.gameObject.SetActive(true);
|
| | | WashTip.gameObject.SetActive(false);
|
| | | _wingsRefinePanel.SetActive(false);
|
| | | functionOrder = _inlayTitle.order;
|
| | | }
|
| | |
|
| | | private void OnClickStrengthTitle()
|
| | | {
|
| | | equipWashModel.SetCurWashModel(0);
|
| | | StrengthenPnl.gameObject.SetActive(true);
|
| | | _InlaidGemPanel.gameObject.SetActive(false);
|
| | | WashTip.gameObject.SetActive(false);
|
| | | _wingsRefinePanel.SetActive(false);
|
| | | functionOrder = _strengthTitle.order;
|
| | | }
|
| | |
| | | RegisterModel<StoreModel>();
|
| | | RegisterModel<GetItemPathModel>();
|
| | | RegisterModel<RuneModel>();
|
| | | RegisterModel<GemModel>();
|
| | | RegisterModel<TreasureModel>();
|
| | | RegisterModel<DailyQuestModel>();
|
| | | RegisterModel<WashProModel>();
|
| | | RegisterModel<FairyLeagueModel>();
|
| | | RegisterModel<LoginModel>();
|
| | | RegisterModel<EquipWashModel>();
|
| | | RegisterModel<HeavenBattleModel>();
|
| | | RegisterModel<WingsRedDotModel>();
|
| | | RegisterModel<TeamModel>();
|
| | |
| | | RegisterModel<JadeDynastyEquipModel>();
|
| | | RegisterModel<FestivalRedpackModel>();
|
| | | RegisterModel<NewYearFairylandCeremonyModel>();
|
| | | RegisterModel<JadeDynastyGemModel>();
|
| | | RegisterModel<LuckyTreasureModel>();
|
| | | RegisterModel<EquipModel>();
|
| | | RegisterModel<EquipStarModel>();
|
| | |
| | | RegisterModel<AuctionInquiryModel>();
|
| | | RegisterModel<AllianceBossModel>();
|
| | | RegisterModel<AuctionHelpModel>();
|
| | | RegisterModel<EquipTrainModel>();
|
| | | inited = true;
|
| | | }
|
| | |
|
| | |
| | | } |
| | | } |
| | | |
| | | public void SetListener(UnityAction action ) |
| | | { |
| | | if (button != null) |
| | | { |
| | | button.SetListener(action); |
| | | } |
| | | } |
| | | |
| | | public void AddListener(UnityAction _action) |
| | | { |
| | | if (button != null) |
| | |
| | | normalTasks.Add(new ConfigInitTask("EquipControlConfig", () => { EquipControlConfig.Init(); }, () => { return EquipControlConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipSuitConfig", () => { EquipSuitConfig.Init(); }, () => { return EquipSuitConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipStarConfig", () => { EquipStarConfig.Init(); }, () => { return EquipStarConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("WashLevelMaxConfig", () => { WashLevelMaxConfig.Init(); }, () => { return WashLevelMaxConfig.inited; })); |
| | | } |
| | | |
| | | static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>(); |