Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
4 文件已复制
71个文件已删除
1 文件已重命名
99个文件已修改
5个文件已添加
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Saturday, April 20, 2019 |
| | | // [ Date ]: Tuesday, April 23, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | public readonly int[] CollectNPC;
|
| | | public readonly int FabaoID;
|
| | | public readonly int clue;
|
| | | public readonly string clueName; |
| | | public readonly string clueName;
|
| | | public readonly int induction; |
| | | |
| | | public TaskListConfig() |
| | | { |
| | |
| | |
|
| | | int.TryParse(tables[9],out clue);
|
| | |
|
| | | clueName = tables[10]; |
| | | clueName = tables[10];
|
| | |
|
| | | int.TryParse(tables[11],out induction); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: f73c099fbaf92ca46b2efc87300b8342 |
| | | timeCreated: 1555731989 |
| | | timeCreated: 1555984003 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Monday, April 22, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class TreasureChapterConfig |
| | | { |
| | | |
| | | public readonly int id;
|
| | | public readonly int taskId;
|
| | | public readonly string taskTitle;
|
| | | public readonly int chapterIndex;
|
| | | public readonly string description; |
| | | |
| | | public TreasureChapterConfig() |
| | | { |
| | | } |
| | | |
| | | public TreasureChapterConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out id); |
| | |
|
| | | int.TryParse(tables[1],out taskId); |
| | |
|
| | | taskTitle = tables[2];
|
| | |
|
| | | int.TryParse(tables[3],out chapterIndex); |
| | |
|
| | | description = tables[4]; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, TreasureChapterConfig> configs = new Dictionary<string, TreasureChapterConfig>(); |
| | | public static TreasureChapterConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("TreasureChapterConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | TreasureChapterConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new TreasureChapterConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static TreasureChapterConfig 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<TreasureChapterConfig> GetValues() |
| | | { |
| | | var values = new List<TreasureChapterConfig>(); |
| | | 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 +"/TreasureChapter.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/TreasureChapter.txt"); |
| | | } |
| | | |
| | | var tempConfig = new TreasureChapterConfig(); |
| | | 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 TreasureChapterConfig(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 TreasureChapterConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
copy from System/BlastFurnace/MakerDrugFailWin.cs.meta
copy to Core/GameEngine/Model/Config/TreasureChapterConfig.cs.meta
| File was copied from System/BlastFurnace/MakerDrugFailWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 92ef078487b28784cadd931e3421d852 |
| | | timeCreated: 1510366702 |
| | | guid: ba38325a271f27842bd40cb84858a5e3 |
| | | timeCreated: 1555933809 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // A0 04 查询副本功能线路人数 #tagCGGetFBLinePlayerCnt |
| | | |
| | | public class CA004_tagCGGetFBLinePlayerCnt : GameNetPackBasic |
| | | { |
| | | public uint MapID; |
| | | public byte FBLineID; |
| | | public byte IsAllLine; |
| | | |
| | | public CA004_tagCGGetFBLinePlayerCnt() |
| | | { |
| | | combineCmd = (ushort)0x1801; |
| | | _cmd = (ushort)0xA004; |
| | | } |
| | | |
| | | public override void WriteToBytes() |
| | | { |
| | | WriteBytes(MapID, NetDataType.DWORD); |
| | | WriteBytes(FBLineID, NetDataType.BYTE); |
| | | WriteBytes(IsAllLine, NetDataType.BYTE); |
| | | } |
| | | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A0 04 查询副本功能线路人数 #tagCGGetFBLinePlayerCnt
|
| | |
|
| | | public class CA004_tagCGGetFBLinePlayerCnt : GameNetPackBasic
|
| | | {
|
| | |
|
| | | public uint MapID;
|
| | |
|
| | | public byte LineCount;
|
| | |
|
| | | public byte[] LineIDList; //个数为0时代表全部
|
| | |
|
| | |
|
| | |
|
| | | public CA004_tagCGGetFBLinePlayerCnt()
|
| | | {
|
| | |
|
| | | combineCmd = (ushort)0x1801;
|
| | |
|
| | | _cmd = (ushort)0xA004;
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | public override void WriteToBytes()
|
| | | {
|
| | |
|
| | | WriteBytes(MapID, NetDataType.DWORD);
|
| | |
|
| | | WriteBytes(LineCount, NetDataType.BYTE);
|
| | |
|
| | | WriteBytes(LineIDList, NetDataType.BYTE, LineCount);
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | } |
| | |
| | | { |
| | | |
| | | public static event Action<H0721_tagMakeItemAnswer> MakeItemAnswerEvent; |
| | | BlastFurnaceModel FurnaceModel { get { return ModelCenter.Instance.GetModel<BlastFurnaceModel>(); } } |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | |
| | | var vNetData = vNetPack as H0721_tagMakeItemAnswer; |
| | | FurnaceModel.GetMakerResult(vNetData); |
| | | |
| | | if (PlayerDatas.Instance.hero != null && vNetData.Result == 1) |
| | | { |
| | |
| | | return m_TaskModel ?? (m_TaskModel = ModelCenter.Instance.GetModel<TaskModel>()); |
| | | } |
| | | } |
| | | |
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } } |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | |
| | | |
| | | taskmodel.RefreshMissionState((int)vNetData.MissionID, vNetData.MissionState, vNetData.DiscriptionIndex); |
| | | PreFightMission.Instance.HandleUpdatePackage(vNetData); |
| | | treasureModel.ReceivePackage(vNetData); |
| | | } |
| | | |
| | | } |
| | |
| | | ModelCenter.Instance.GetModel<JadeDynastyBossModel>().OnReceivePackage(package);
|
| | | ModelCenter.Instance.GetModel<RidingPetBossModel>().ReceivePackage(package);
|
| | | ModelCenter.Instance.GetModel<AllianceBossModel>().ReceivePackage(package);
|
| | | ModelCenter.Instance.GetModel<HazyDemonKingModel>().ReceivePackage(package);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | public class DTCA321_tagMCPrayElixirResult : DtcBasic {
|
| | |
|
| | | PrayForDurgModel prayModel { get { return ModelCenter.Instance.GetModel<PrayForDurgModel>(); } }
|
| | |
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | |
|
| | | base.Done(vNetPack);
|
| | |
|
| | | HA321_tagMCPrayElixirResult vNetData = vNetPack as HA321_tagMCPrayElixirResult;
|
| | | prayModel.SetPrayResult(vNetData);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | |
| | | public class DTCA3BE_tagMCMagicWeaponMsg : DtcBasic { |
| | | |
| | | BlastFurnaceModel _furnaceModel; |
| | | BlastFurnaceModel FurnaceModel |
| | | { |
| | | get |
| | | { |
| | | return _furnaceModel ?? (_furnaceModel = ModelCenter.Instance.GetModel<BlastFurnaceModel>()); |
| | | } |
| | | } |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | |
| | | base.Done(vNetPack); |
| | |
| | | #endif |
| | | } |
| | | |
| | | public GetItemPathModel __Gen_Delegate_Imp146(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); |
| | | |
| | | |
| | | GetItemPathModel __gen_ret = (GetItemPathModel)translator.GetObject(L, errFunc + 1, typeof(GetItemPathModel)); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public System.Collections.Generic.Dictionary<int, int> __Gen_Delegate_Imp147(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | |
| | | { |
| | | Snxxz.UI.ItemModel _itemModel = (Snxxz.UI.ItemModel)translator.GetObject(L, 2, typeof(Snxxz.UI.ItemModel)); |
| | | |
| | | gen_to_be_invoked.SetCompareAttrData( _itemModel ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnMapInitOk", _m_OnMapInitOk); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestMapTransport", _m_RequestMapTransport); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestSelectedLine", _m_RequestSelectedLine); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestQueryMapLineState", _m_RequestQueryMapLineState); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMapLines", _m_GetMapLines); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateMapLines", _m_UpdateMapLines); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateDungeonMapLines", _m_UpdateDungeonMapLines); |
| | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_RequestQueryMapLineState(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.MapModel gen_to_be_invoked = (Snxxz.UI.MapModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4)) |
| | | { |
| | | int __mapId = LuaAPI.xlua_tointeger(L, 2); |
| | | int __lineId = LuaAPI.xlua_tointeger(L, 3); |
| | | bool __isAllLine = LuaAPI.lua_toboolean(L, 4); |
| | | |
| | | gen_to_be_invoked.RequestQueryMapLineState( __mapId, __lineId, __isAllLine ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | int __mapId = LuaAPI.xlua_tointeger(L, 2); |
| | | int __lineId = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.RequestQueryMapLineState( __mapId, __lineId ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | int __mapId = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.RequestQueryMapLineState( __mapId ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.MapModel.RequestQueryMapLineState!"); |
| | | |
| | | } |
| | | |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsHaveDrugUse", _m_IsHaveDrugUse); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsHaveDrugRecycle", _m_IsHaveDrugRecycle); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsReachMaxUseDrug", _m_IsReachMaxUseDrug); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAlchemyProgress", _m_GetAlchemyProgress); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "refrechPackEvent", _e_refrechPackEvent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "refreshItemCountEvent", _e_refreshItemCountEvent); |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetAlchemyProgress(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.PackModel gen_to_be_invoked = (Snxxz.UI.PackModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | AlchemyConfig _alchemy = (AlchemyConfig)translator.GetObject(L, 2, typeof(AlchemyConfig)); |
| | | |
| | | float gen_ret = gen_to_be_invoked.GetAlchemyProgress( _alchemy ); |
| | | 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 _g_get_makeDruglist(RealStatePtr L) |
| | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RealmBetterEquipModel), SnxxzUIRealmBetterEquipModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(BlastFurnaceModel), BlastFurnaceModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(GetItemPathModel), GetItemPathModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.PrayForDurgModel), SnxxzUIPrayForDurgModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.BossRebornModel), SnxxzUIBossRebornModelWrap.__Register); |
| | |
| | | static DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } }
|
| | | static FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | | static DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | | static BlastFurnaceModel blastFurnaceModel { get { return ModelCenter.Instance.GetModel<BlastFurnaceModel>(); } }
|
| | | static AlchemyModel alchemyModel { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } }
|
| | | static TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | |
|
| | | public static void GotoKillNpc(int _achievementId)
|
| | |
| | |
|
| | | public static void GotoStove(int _achievementId)
|
| | | {
|
| | | if (blastFurnaceModel.StoveLV < 1)
|
| | | if (alchemyModel.stoveLevel < 1)
|
| | | {
|
| | | treasureModel.currentCategory = TreasureCategory.Fairy;
|
| | | treasureModel.selectedTreasure = 301;
|
| | |
| | | { |
| | | if (config == null) return; |
| | | |
| | | BlastFurnaceModel model = ModelCenter.Instance.GetModel<BlastFurnaceModel>(); |
| | | if(model.StoveLV > 1) |
| | | AlchemyModel model = ModelCenter.Instance.GetModel<AlchemyModel>(); |
| | | if(model.stoveLevel > 1) |
| | | { |
| | | guideAchievementId = _achievementId; |
| | | } |
| | |
| | |
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | TaskModel taskmodel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
|
| | | GetItemPathModel getItemPathModel { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
|
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | | Dictionary<int, int> equipQualityItemIdTables = new Dictionary<int, int>() { { 1, 2110 }, { 2, 2111 }, { 3, 2112 }, { 4, 2113 }, { 5, 2114 } };
|
| | |
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(2103);
|
| | | EquipTipUtility.Show(2103);
|
| | | }
|
| | | break;
|
| | | case 13:
|
| | | getItemPathModel.SetChinItemModel(2100);
|
| | | EquipTipUtility.Show(2100);
|
| | | break;
|
| | | case 4:
|
| | | case 86:
|
| | |
| | | var guid = GetHighestSorceEquipByPlace(new List<int>() { config.Condition[0] });
|
| | | if (string.IsNullOrEmpty(guid))
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(2108);
|
| | | EquipTipUtility.Show(2108);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | var itemQuality = config.Condition[1];
|
| | | if (equipQualityItemIdTables.ContainsKey(itemQuality))
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(equipQualityItemIdTables[itemQuality]);
|
| | | EquipTipUtility.Show(equipQualityItemIdTables[itemQuality]);
|
| | | }
|
| | | else
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(2108);
|
| | | EquipTipUtility.Show(2108);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var itemQuality = config.Condition[0];
|
| | | if (equipQualityItemIdTables.ContainsKey(itemQuality))
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(equipQualityItemIdTables[itemQuality]);
|
| | | EquipTipUtility.Show(equipQualityItemIdTables[itemQuality]);
|
| | | }
|
| | | else
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(2108);
|
| | | EquipTipUtility.Show(2108);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | var itemQuality = config.Condition[0];
|
| | | if (equipQualityItemIdTables.ContainsKey(itemQuality))
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(equipQualityItemIdTables[itemQuality]);
|
| | | EquipTipUtility.Show(equipQualityItemIdTables[itemQuality]);
|
| | | }
|
| | | else
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(2108);
|
| | | EquipTipUtility.Show(2108);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | var itemQuality = config.Condition[0];
|
| | | if (equipQualityItemIdTables.ContainsKey(itemQuality))
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(equipQualityItemIdTables[itemQuality]);
|
| | | EquipTipUtility.Show(equipQualityItemIdTables[itemQuality]);
|
| | | }
|
| | | else
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(2108);
|
| | | EquipTipUtility.Show(2108);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | var itemQuality = config.Condition[0];
|
| | | if (equipQualityItemIdTables.ContainsKey(itemQuality))
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(equipQualityItemIdTables[itemQuality]);
|
| | | EquipTipUtility.Show(equipQualityItemIdTables[itemQuality]);
|
| | | }
|
| | | else
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(2108);
|
| | | EquipTipUtility.Show(2108);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | var guid90 = GetBetterEquipByPlace(new List<int>() { 11 });
|
| | | if (string.IsNullOrEmpty(guid90))
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(2108);
|
| | | EquipTipUtility.Show(2108);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | break;
|
| | | case 116:
|
| | | getItemPathModel.SetChinItemModel(config.Condition[0]);
|
| | | EquipTipUtility.Show(config.Condition[0]);
|
| | | break;
|
| | | default:
|
| | | WindowCenter.Instance.Close<TreasureBaseWin>();
|
| | |
| | | var count = ModelCenter.Instance.GetModel<PackModel>().GetItemCountByID(PackType.Item, drugUseLimit.addItem.id);
|
| | | if (count < drugUseLimit.addItem.count)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(drugUseLimit.addItem.id);
|
| | | EquipTipUtility.Show(drugUseLimit.addItem.id);
|
| | | return;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | void SetDefaultSelect()
|
| | | {
|
| | | Int2 position;
|
| | | if (model.IsStoveAlcheming(model.selectAlchemyType, out position))
|
| | | {
|
| | | model.selectQuality = position.x;
|
| | | model.selectAlchemy = position.y;
|
| | | return;
|
| | | }
|
| | |
|
| | | var qualities = AlchemyConfig.GetAlchemyQualities((int)m_AlchemyType);
|
| | | model.selectQuality = qualities.First();
|
| | |
|
| | |
| | | Dictionary<int, AlchemyDrugUseLimit> m_AlchemyDrugUseLimits = new Dictionary<int, AlchemyDrugUseLimit>();
|
| | | List<int> m_AlchemyDrugs = new List<int>();
|
| | | List<int> m_AlchemyDrugQualitys = new List<int>();
|
| | | List<int> m_AssociationItems = new List<int>();
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(MainRedDot.RedPoint_key, 110);
|
| | | public readonly Redpoint alchemyDrugRedpoint1 = new Redpoint(110, 11001);
|
| | | public readonly Redpoint alchemyDrugRedpoint2 = new Redpoint(110, 11002);
|
| | | public readonly Redpoint alchemyDrugREdpoint3 = new Redpoint(110, 11003);
|
| | | Dictionary<int, Dictionary<int, Redpoint>> alchemyQualityRedpoints = new Dictionary<int, Dictionary<int, Redpoint>>();
|
| | | Dictionary<int, AlchemyRedpoint> alchemyRedpoints = new Dictionary<int, AlchemyRedpoint>();
|
| | |
|
| | | public static int redpointIndex = 110010000;
|
| | |
|
| | | int m_SelectQuality = 0;
|
| | | public int selectQuality
|
| | |
| | |
|
| | | public bool isServerPrepare { get; private set; }
|
| | |
|
| | | Clock m_AlchemingClock = null;
|
| | |
|
| | | public event Action selectQualityRefresh;
|
| | | public event Action selectAlchemyRefresh;
|
| | | public event Action alchemyStateRefresh;
|
| | |
| | |
|
| | | public override void Init()
|
| | | {
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
|
| | | packModel.refreshItemCountEvent += RefreshItemCountEvent;
|
| | |
|
| | | ParseConfig();
|
| | | }
|
| | |
|
| | |
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | isServerPrepare = true;
|
| | | CheckRedpoint();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
|
| | | packModel.refreshItemCountEvent -= RefreshItemCountEvent;
|
| | | }
|
| | |
|
| | | private void RefreshItemCountEvent(PackType packType, int arg2, int itemId)
|
| | | {
|
| | | if (m_AssociationItems.Contains(itemId))
|
| | | {
|
| | | CheckRedpoint();
|
| | | }
|
| | |
|
| | | if (m_AlchemyDrugs.Contains(itemId))
|
| | | {
|
| | | RefreshUseDrugRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void PlayerDataRefreshEvent(PlayerDataType dataType)
|
| | | {
|
| | | if (dataType == PlayerDataType.LuckValue)
|
| | | {
|
| | | CheckRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnFuncStateChangeEvent(int id)
|
| | | {
|
| | | if (id == (int)FuncOpenEnum.BlastFurnace)
|
| | | {
|
| | | CheckRedpoint();
|
| | | RefreshUseDrugRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | void ParseConfig()
|
| | |
| | | id = key,
|
| | | count = dict[key],
|
| | | });
|
| | |
|
| | | if (!m_AssociationItems.Contains(key))
|
| | | {
|
| | | m_AssociationItems.Add(key);
|
| | | }
|
| | | }
|
| | |
|
| | | if (!m_AssociationItems.Contains(config.LearnNeedItemID))
|
| | | {
|
| | | m_AssociationItems.Add(config.LearnNeedItemID);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | m_AlchemyDrugQualitys.Sort();
|
| | | }
|
| | |
|
| | | var qualitys = AlchemyConfig.GetAlchemyQualities((int)AlchemyType.Normal);
|
| | | alchemyQualityRedpoints.Add((int)AlchemyType.Normal, new Dictionary<int, Redpoint>());
|
| | | foreach (var quality in qualitys)
|
| | | {
|
| | | var qualityRedpoint = new Redpoint(alchemyDrugRedpoint1.id, redpointIndex++); ;
|
| | | alchemyQualityRedpoints[(int)AlchemyType.Normal].Add(quality, qualityRedpoint);
|
| | | var alchemys = AlchemyConfig.GetAlchemies((int)AlchemyType.Normal, quality);
|
| | | foreach (var id in alchemys)
|
| | | {
|
| | | alchemyRedpoints.Add(id, new AlchemyRedpoint(qualityRedpoint.id));
|
| | | }
|
| | | }
|
| | |
|
| | | qualitys = AlchemyConfig.GetAlchemyQualities((int)AlchemyType.Fairy);
|
| | | alchemyQualityRedpoints.Add((int)AlchemyType.Fairy, new Dictionary<int, Redpoint>());
|
| | | foreach (var quality in qualitys)
|
| | | {
|
| | | var qualityRedpoint = new Redpoint(alchemyDrugRedpoint2.id, redpointIndex++); ;
|
| | | alchemyQualityRedpoints[(int)AlchemyType.Fairy].Add(quality, qualityRedpoint);
|
| | | var alchemys = AlchemyConfig.GetAlchemies((int)AlchemyType.Fairy, quality);
|
| | | foreach (var id in alchemys)
|
| | | {
|
| | | alchemyRedpoints.Add(id, new AlchemyRedpoint(qualityRedpoint.id));
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public bool TryGetAlchemyUseLimit(int id,out AlchemyDrugUseLimit drugUseLimit)
|
| | | {
|
| | | return m_AlchemyDrugUseLimits.TryGetValue(id, out drugUseLimit);
|
| | | }
|
| | |
|
| | | public int GetAlchemyRedpointId(int id)
|
| | | {
|
| | | return alchemyRedpoints.ContainsKey(id) ? alchemyRedpoints[id].redpoint.id : 0;
|
| | | }
|
| | |
|
| | | public int GetQualityRedpointId(int alchemyType, int quality)
|
| | | {
|
| | | if (alchemyQualityRedpoints.ContainsKey(alchemyType))
|
| | | {
|
| | | if (alchemyQualityRedpoints[alchemyType].ContainsKey(quality))
|
| | | {
|
| | | return alchemyQualityRedpoints[alchemyType][quality].id;
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public float GetAlchemySuccRate(int alchemyId)
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | public bool IsStoveAlcheming(AlchemyType alchemyType)
|
| | | public bool IsStoveAlcheming(AlchemyType alchemyType, out Int2 alchemyPosition)
|
| | | {
|
| | | alchemyPosition = default(Int2);
|
| | | var qualities = AlchemyConfig.GetAlchemyQualities((int)alchemyType);
|
| | | foreach (var quality in qualities)
|
| | | {
|
| | |
| | | var state = GetStoveState(alchemyId);
|
| | | if (state != 0)
|
| | | {
|
| | | alchemyPosition.x = quality;
|
| | | alchemyPosition.y = alchemyId;
|
| | | return true;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | public void ReceivePackage(HA3BF_tagMCPlayerStoveMsg package)
|
| | | {
|
| | | var seconds = 0;
|
| | |
|
| | | for (int i = 0; i < package.StoveCnt; i++)
|
| | | {
|
| | | var data = package.InfoList[i];
|
| | | m_AlchemyTimes[(int)data.AlchemyID] = data.StartTime;
|
| | |
|
| | | if (data.StartTime > 0)
|
| | | {
|
| | | var config = AlchemyConfig.Get((int)data.AlchemyID);
|
| | | var time = TimeUtility.GetTime(data.StartTime);
|
| | | var _seconds = (int)(TimeUtility.ServerNow - time).TotalSeconds;
|
| | | if (_seconds < config.NeedTime && config.NeedTime - _seconds > seconds)
|
| | | {
|
| | | seconds = config.NeedTime - _seconds;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (m_AlchemingClock != null)
|
| | | {
|
| | | Clock.Stop(m_AlchemingClock);
|
| | | m_AlchemingClock = null;
|
| | | }
|
| | | if (seconds > 0)
|
| | | {
|
| | | m_AlchemingClock = Clock.AlarmAfter(seconds, CheckRedpoint);
|
| | | }
|
| | |
|
| | | stoveLevel = package.StoveLV;
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | CheckRedpoint();
|
| | |
|
| | | if (alchemyStateRefresh != null)
|
| | | {
|
| | |
| | | {
|
| | | alchemyDrugUseRefresh();
|
| | | }
|
| | | }
|
| | |
|
| | | static List<int> s_Endables = new List<int>();
|
| | | static List<int> s_Studyables = new List<int>();
|
| | | static List<int> s_Alchemyables = new List<int>();
|
| | |
|
| | | static Dictionary<AlchemyType, List<int>> s_SortQualitys = new Dictionary<AlchemyType, List<int>>();
|
| | |
|
| | | public List<int> GetSortQualitys(AlchemyType alchemyType)
|
| | | {
|
| | | if (!s_SortQualitys.ContainsKey(alchemyType))
|
| | | {
|
| | | s_SortQualitys.Add(alchemyType, new List<int>(AlchemyConfig.GetAlchemyQualities((int)alchemyType)));
|
| | | s_SortQualitys[alchemyType].Sort(QualityCompare);
|
| | | }
|
| | | return s_SortQualitys[alchemyType];
|
| | | }
|
| | |
|
| | | private int QualityCompare(int x, int y)
|
| | | {
|
| | | return -x.CompareTo(y);
|
| | | }
|
| | |
|
| | | void CheckRedpoint()
|
| | | {
|
| | | s_Endables.Clear();
|
| | | s_Studyables.Clear();
|
| | | s_Alchemyables.Clear();
|
| | |
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace))
|
| | | {
|
| | | RefreshRedpoint();
|
| | | return;
|
| | | }
|
| | |
|
| | | CheckRedpoint(AlchemyType.Normal);
|
| | | CheckRedpoint(AlchemyType.Fairy);
|
| | |
|
| | | RefreshRedpoint();
|
| | | }
|
| | |
|
| | | void CheckRedpoint(AlchemyType alchemyType)
|
| | | {
|
| | | Int2 position;
|
| | | if (IsStoveAlcheming(alchemyType, out position))
|
| | | {
|
| | | var state = GetStoveState(position.y);
|
| | | if (state == 2)
|
| | | {
|
| | | s_Endables.Add(position.y);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | var qualitys = AlchemyConfig.GetAlchemyQualities((int)alchemyType);
|
| | | foreach (var quality in qualitys)
|
| | | {
|
| | | var alchemys = AlchemyConfig.GetAlchemies((int)alchemyType, quality);
|
| | | foreach (var id in alchemys)
|
| | | {
|
| | | if (!IsGraspRecipe(id))
|
| | | {
|
| | | var config = AlchemyConfig.Get(id);
|
| | | var count = packModel.GetItemCountByID(PackType.Item, config.LearnNeedItemID);
|
| | | if (count <= 0 || stoveLevel < config.LearnNeedAlchemLV
|
| | | || PlayerDatas.Instance.extersion.luckValue < config.LearnNeedLuck)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | s_Studyables.Add(id);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | qualitys = GetSortQualitys(alchemyType);
|
| | | foreach (var quality in qualitys)
|
| | | {
|
| | | var alchemyable = false;
|
| | | var alchemys = AlchemyConfig.GetAlchemies((int)alchemyType, quality);
|
| | | foreach (var id in alchemys)
|
| | | {
|
| | | if (!IsGraspRecipe(id))
|
| | | {
|
| | | continue;
|
| | | }
|
| | | Item item;
|
| | | if (IsAlchemyEnoughMaterial(id, out item))
|
| | | {
|
| | | s_Alchemyables.Add(id);
|
| | | alchemyable = true;
|
| | | }
|
| | | }
|
| | |
|
| | | if (alchemyable)
|
| | | {
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void RefreshRedpoint()
|
| | | {
|
| | | var qualitys = AlchemyConfig.GetAlchemyQualities((int)AlchemyType.Normal);
|
| | | foreach (var quality in qualitys)
|
| | | {
|
| | | var alchemys = AlchemyConfig.GetAlchemies((int)AlchemyType.Normal, quality);
|
| | | foreach (var id in alchemys)
|
| | | {
|
| | | var redpoint = alchemyRedpoints[id];
|
| | | redpoint.studyRedpoint.state = s_Studyables.Contains(id) ? RedPointState.Simple : RedPointState.None;
|
| | | redpoint.endRedpoint.state = s_Endables.Contains(id) ? RedPointState.Simple : RedPointState.None;
|
| | | redpoint.alchemyRedpoint.state = s_Alchemyables.Contains(id) ? RedPointState.Simple : RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | | qualitys = AlchemyConfig.GetAlchemyQualities((int)AlchemyType.Fairy);
|
| | | foreach (var quality in qualitys)
|
| | | {
|
| | | var alchemys = AlchemyConfig.GetAlchemies((int)AlchemyType.Fairy, quality);
|
| | | foreach (var id in alchemys)
|
| | | {
|
| | | var redpoint = alchemyRedpoints[id];
|
| | | redpoint.studyRedpoint.state = s_Studyables.Contains(id) ? RedPointState.Simple : RedPointState.None;
|
| | | redpoint.endRedpoint.state = s_Endables.Contains(id) ? RedPointState.Simple : RedPointState.None;
|
| | | redpoint.alchemyRedpoint.state = s_Alchemyables.Contains(id) ? RedPointState.Simple : RedPointState.None;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void RefreshUseDrugRedpoint()
|
| | | {
|
| | | var useable = false;
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace))
|
| | | {
|
| | | foreach (var itemId in m_AlchemyDrugs)
|
| | | {
|
| | | if (GetAlchemyDrugState(itemId) == 0)
|
| | | {
|
| | | useable = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | alchemyDrugREdpoint3.state = useable ? RedPointState.Simple : RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | return 0;
|
| | | }
|
| | | }
|
| | |
|
| | | public class AlchemyRedpoint
|
| | | {
|
| | | public readonly Redpoint redpoint;
|
| | | public readonly Redpoint studyRedpoint;
|
| | | public readonly Redpoint endRedpoint;
|
| | | public readonly Redpoint alchemyRedpoint;
|
| | |
|
| | | public AlchemyRedpoint(int baseId)
|
| | | {
|
| | | redpoint = new Redpoint(baseId, AlchemyModel.redpointIndex++);
|
| | | studyRedpoint = new Redpoint(redpoint.id, AlchemyModel.redpointIndex++);
|
| | | endRedpoint = new Redpoint(redpoint.id, AlchemyModel.redpointIndex++);
|
| | | alchemyRedpoint = new Redpoint(redpoint.id, AlchemyModel.redpointIndex++);
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | |
| | | [SerializeField] Image m_Arrow;
|
| | | [SerializeField] Transform m_ContainerSelect;
|
| | | [SerializeField] Button m_Func;
|
| | | [SerializeField] RedpointBehaviour m_Redpoint;
|
| | |
|
| | | int quality = 0;
|
| | |
|
| | |
| | | m_QualityName.text = Language.Get("AlchemyQualityName", Language.Get("Num_CHS_" + quality));
|
| | | m_ContainerSelect.gameObject.SetActive(model.selectQuality == quality);
|
| | | m_Arrow.transform.localEulerAngles = new Vector3(0, 0, model.selectQuality == quality ? -90 : 0);
|
| | | m_Redpoint.redpointId = model.GetQualityRedpointId((int)model.selectAlchemyType, quality);
|
| | | }
|
| | |
|
| | | private void OnSelect()
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | Int2 position;
|
| | | if (model.IsStoveAlcheming(model.selectAlchemyType, out position))
|
| | | {
|
| | | if (position.x != quality)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("AlchemingSwitchError");
|
| | | return;
|
| | | }
|
| | | }
|
| | | model.selectQuality = quality;
|
| | | }
|
| | | }
|
| | |
| | | [SerializeField] Text m_UnGrasp;
|
| | | [SerializeField] Transform m_ContainerSelect;
|
| | | [SerializeField] Button m_Func;
|
| | | [SerializeField] RedpointBehaviour m_Redpoint;
|
| | |
|
| | | int id = 0;
|
| | |
|
| | |
| | | m_UnGrasp.gameObject.SetActive(!model.IsGraspRecipe(id));
|
| | |
|
| | | m_ContainerSelect.gameObject.SetActive(model.selectAlchemy == id);
|
| | |
|
| | | m_Redpoint.redpointId = model.GetAlchemyRedpointId(id);
|
| | | }
|
| | |
|
| | | private void OnSelect()
|
| | | {
|
| | | Int2 position;
|
| | | if (model.IsStoveAlcheming(model.selectAlchemyType, out position))
|
| | | {
|
| | | if (position.y != id)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("AlchemingSwitchError");
|
| | | return;
|
| | | }
|
| | | }
|
| | | model.selectAlchemy = id;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | DisplayRecipes();
|
| | |
|
| | | var qualities = new List<int>(AlchemyConfig.GetAlchemyQualities(alchemyType));
|
| | | var index = qualities.IndexOf(model.selectQuality);
|
| | | if (index != -1)
|
| | | {
|
| | | m_Controller.JumpIndex(index);
|
| | | }
|
| | |
|
| | | model.selectQualityRefresh += SelectQualityRefresh;
|
| | | model.selectAlchemyRefresh += SelectAlchemyRefresh;
|
| | | model.alchemyStateRefresh += AlchemyStateRefresh;
|
| | | }
|
| | |
|
| | | void DisplayRecipes()
|
| | |
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
|
| | | private void AlchemyStateRefresh()
|
| | | {
|
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
|
| | | public void Dispose()
|
| | | {
|
| | | model.selectQualityRefresh -= SelectQualityRefresh;
|
| | | model.selectAlchemyRefresh -= SelectAlchemyRefresh;
|
| | | model.alchemyStateRefresh -= AlchemyStateRefresh;
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | |
| | | switch (state)
|
| | | {
|
| | | case 0:
|
| | | if (model.IsStoveAlcheming(model.selectAlchemyType))
|
| | | Int2 alchemyPosition;
|
| | | if (model.IsStoveAlcheming(model.selectAlchemyType, out alchemyPosition))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("AlchemingError");
|
| | | return;
|
| | |
| | | Item item;
|
| | | if (!model.IsAlchemyEnoughMaterial(model.selectAlchemy, out item))
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(item.id);
|
| | | EquipTipUtility.Show(item.id);
|
| | | return;
|
| | | }
|
| | | var succRate = model.GetAlchemySuccRate(model.selectAlchemy);
|
| | |
| | |
|
| | | m_Func.SetListener(() =>
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(id);
|
| | | EquipTipUtility.Show(id);
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | m_ContainerItem.gameObject.SetActive(!_lock);
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class BlastFurnaceModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public BlastFurnaceFuncTitle funcTitle = BlastFurnaceFuncTitle.MakeDan;
|
| | |
| | |
|
| | | if (isMakeDan)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen<MakerDrugSuccessWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MakerDrugSuccessWin>();
|
| | | }
|
| | | isMakeDan = false;
|
| | | }
|
| | | else
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<MakerDrugSuccessWin>())
|
| | | {
|
| | | WindowCenter.Instance.Close<MakerDrugSuccessWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (makerItemID != 0)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen<MakerDrugSuccessWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MakerDrugSuccessWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen<MakerDrugFailWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MakerDrugFailWin>();
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using UnityEngine.Events; |
| | | |
| | | public class WayCell : MonoBehaviour |
| | | namespace Snxxz.UI |
| | | { |
| | | private Image _icon; |
| | | public Image icon |
| | | public class WayCell : MonoBehaviour |
| | | { |
| | | get |
| | | { |
| | | if (_icon == null) |
| | | _icon = transform.Find("Icon").GetComponent<Image>(); |
| | | return _icon; |
| | | } |
| | | } |
| | | [SerializeField] Text m_WayName; |
| | | [SerializeField] Text m_FunctionName; |
| | | [SerializeField] Image m_Icon; |
| | | [SerializeField] Button m_Goto; |
| | | |
| | | private Button _wayBtn; |
| | | public Button wayButton |
| | | { |
| | | get |
| | | { |
| | | if (_wayBtn == null) |
| | | _wayBtn = this.GetComponent<Button>(); |
| | | return _wayBtn; |
| | | } |
| | | } |
| | | UnityAction onClick; |
| | | int getWay = 0; |
| | | |
| | | private Text _wayName; |
| | | public Text wayName |
| | | { |
| | | get |
| | | public void Display(int getWay) |
| | | { |
| | | if (_wayName == null) |
| | | _wayName = transform.Find("WayText").GetComponent<Text>(); |
| | | return _wayName; |
| | | } |
| | | } |
| | | this.getWay = getWay; |
| | | var confg = GetItemWaysConfig.Get(getWay); |
| | | |
| | | private Text _funcName; |
| | | public Text funcName |
| | | { |
| | | get |
| | | m_Icon.SetSprite(confg.Icon); |
| | | m_WayName.text = confg.Text; |
| | | m_FunctionName.text = confg.name; |
| | | } |
| | | |
| | | public void AddListener(UnityAction action) |
| | | { |
| | | if (_funcName == null) |
| | | _funcName = transform.Find("IconText").GetComponent<Text>(); |
| | | return _funcName; |
| | | onClick += action; |
| | | } |
| | | } |
| | | |
| | | } |
| | | public void RemoveAllListeners() |
| | | { |
| | | onClick = null; |
| | | } |
| | | |
| | | private void Start() |
| | | { |
| | | m_Goto.AddListener(OnClick); |
| | | } |
| | | |
| | | private void OnClick() |
| | | { |
| | | if (onClick != null) |
| | | { |
| | | onClick.Invoke(); |
| | | } |
| | | |
| | | var config = GetItemWaysConfig.Get(getWay); |
| | | if (config != null) |
| | | { |
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.OpenpanelId); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | public ItemModel itemModel { get; private set;}
|
| | | ItemCompoundConfig itemCompound;
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | GetItemPathModel pathModel { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | SelectEquipModel selectModel {get { return ModelCenter.Instance.GetModel<SelectEquipModel>(); }}
|
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
|
| | |
| | | case NeedMatType.fixedItem:
|
| | | if (itemConfig.GetWay != null && itemConfig.GetWay.Length > 0)
|
| | | {
|
| | | pathModel.SetChinItemModel(itemId);
|
| | | EquipTipUtility.Show(itemId);
|
| | | return;
|
| | | }
|
| | | break;
|
| | |
| | | SelectEquipModel selectModel { get { return ModelCenter.Instance.GetModel<SelectEquipModel>(); } }
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | GetItemPathModel itemPathModel { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
|
| | |
|
| | | private bool isUpdatePlayerLv;
|
| | | public override void Init()
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | itemPathModel.SetChinItemModel(fixedConfig.ID);
|
| | | EquipTipUtility.Show(fixedConfig.ID);
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | itemPathModel.SetChinItemModel(fixedConfig.ID);
|
| | | EquipTipUtility.Show(fixedConfig.ID);
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | [SerializeField] GameObject m_Type_One;//类型1
|
| | | ResourcesBackModel m_ResourcesBackModel;
|
| | | ResourcesBackModel resourcesBackModel { get { return m_ResourcesBackModel ?? (m_ResourcesBackModel = ModelCenter.Instance.GetModel<ResourcesBackModel>()); } }
|
| | | GetItemPathModel _GetItemPath;
|
| | | GetItemPathModel GetItemPath { get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); } }
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } }
|
| | | public static bool isBool = false;//是否绑玉找回
|
| | |
| | | [SerializeField] GameObject m_Container_NoRecords;
|
| | | ResourcesBackModel m_ResourcesBackModel;
|
| | | ResourcesBackModel resourcesBackModel { get { return m_ResourcesBackModel ?? (m_ResourcesBackModel = ModelCenter.Instance.GetModel<ResourcesBackModel>()); } }
|
| | | GetItemPathModel _GetItemPath;
|
| | | GetItemPathModel GetItemPath {
|
| | | get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); }
|
| | | }
|
| | | public static event Action IsAccordingRedPoint;
|
| | | List<ResourcesBackClass> _list = new List<ResourcesBackClass>();//用来控制进行排序
|
| | | private bool IsBool = true;
|
| | |
| | | [SerializeField] Text m_BtnText;
|
| | | DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | GetItemPathModel getItemPath { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
|
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | |
| | | break;
|
| | | case 3:
|
| | | var tickets = model.GetTicketCost(model.currentDungeon.mapId, model.currentDungeon.lineId);
|
| | | getItemPath.SetChinItemModel(tickets.id);
|
| | | EquipTipUtility.Show(tickets.id);
|
| | | break;
|
| | | case 4:
|
| | | var cost = model.GetSweepCost(model.currentDungeon);
|
| | |
| | |
|
| | | DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | GetItemPathModel getItemPathModel { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | |
| | | break;
|
| | | case 2:
|
| | | var tickets = model.GetTicketCost(model.currentDungeon.mapId, model.currentDungeon.lineId);
|
| | | getItemPathModel.SetChinItemModel(tickets.id);
|
| | | EquipTipUtility.Show(tickets.id);
|
| | | break;
|
| | | case 3:
|
| | | var cost = model.GetSweepCost(model.currentDungeon);
|
| | |
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_268121", dungeonConfig.MapID);
|
| | | break;
|
| | | case 5:
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(dungeonConfig.TicketID);
|
| | | EquipTipUtility.Show(dungeonConfig.TicketID);
|
| | | break;
|
| | | case 6:
|
| | | SysNotifyMgr.Instance.ShowTip("CrossMap10");
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(dungeonConfig.TicketID);
|
| | | EquipTipUtility.Show(dungeonConfig.TicketID);
|
| | | break;
|
| | | case 6:
|
| | | SysNotifyMgr.Instance.ShowTip("CrossMap10");
|
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | using System;
|
| | |
| | | {
|
| | | if (error == 1)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(config.tokenId);
|
| | | EquipTipUtility.Show(config.tokenId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | && PlayerDatas.Instance.baseData.LV < model.trialExchangeRemindLevel);
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | break;
|
| | | case 3:
|
| | | var tickets = model.GetTicketCost(model.currentDungeon.mapId, model.currentDungeon.lineId);
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(tickets.id);
|
| | | EquipTipUtility.Show(tickets.id);
|
| | | break;
|
| | | case 4:
|
| | | var cost = model.GetSweepCost(model.currentDungeon);
|
| | |
| | | if (i < getWays.Count) |
| | | { |
| | | behaviour.gameObject.SetActive(true); |
| | | var config = GetItemWaysConfig.Get(getWays[i]); |
| | | behaviour.icon.SetSprite(config.Icon); |
| | | behaviour.wayName.text = config.Text; |
| | | behaviour.funcName.text = config.name; |
| | | behaviour.wayButton.SetListener(() => |
| | | { |
| | | WindowCenter.Instance.Close<EquipFrameWin>(); |
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().ClickGetWay(config.ID); |
| | | }); |
| | | behaviour.Display(getWays[i]); |
| | | } |
| | | else |
| | | { |
| | |
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemCell.button.SetListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(evolve.CostItemID, false, (ulong)1);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | EquipTipUtility.Show(evolve.CostItemID);
|
| | | });
|
| | | string strItemCount = string.Empty;
|
| | | string strEquipLevel = string.Empty;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, March 11, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, March 11, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI; |
| | | |
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class EquipStrengthWin : Window |
| | | {
|
| | |
|
| | | public class EquipStrengthWin : Window
|
| | | {
|
| | | [SerializeField] ScrollerController m_Controller;
|
| | |
|
| | |
| | | [SerializeField] UIEffect m_UIEffect1C;
|
| | |
|
| | | EquipStrengthModel model { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
|
| | | EquipGemModel equipGemModel { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | EquipGemModel equipGemModel { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } }
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | EquipStarModel equipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | | |
| | | private bool IsAutomaticBool = false; |
| | | private float WaitTime = 0.1f; |
| | | private float Times = 0f; |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Controller.OnRefreshCell += OnRefreshCell; |
| | | m_StrengBtn.AddListener(OnClickStrengBtn); |
| | | m_AutomaticBtn.AddListener(OnClickAutomaticBtn); |
| | | m_StopBtn.AddListener(OnClickStopBtn); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | EquipStarModel equipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } }
|
| | |
|
| | | private bool IsAutomaticBool = false;
|
| | | private float WaitTime = 0.1f;
|
| | | private float Times = 0f;
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Controller.OnRefreshCell += OnRefreshCell;
|
| | | m_StrengBtn.AddListener(OnClickStrengBtn);
|
| | | m_AutomaticBtn.AddListener(OnClickAutomaticBtn);
|
| | | m_StopBtn.AddListener(OnClickStopBtn);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | model.IsChangeBool = true;
|
| | | IsAutomaticBool = false;
|
| | |
| | | model.SelectEquipRefresh += SelectEquipRefresh;
|
| | | model.SelectLevelRefresh += SelectLevelRefresh;
|
| | | model.EquipStrengthUpdate += EquipStrengthUpdate;
|
| | | model.EquipStrengthLvUpdate += EquipStrengthLvUpdate; |
| | | model.EquipStrengthLvUpdate += EquipStrengthLvUpdate;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
|
| | |
|
| | | m_Controller.JumpIndex(GetJumpIndex(model.SelectLevel, model.SelectEquipPlace)); |
| | | m_Controller.JumpIndex(GetJumpIndex(model.SelectLevel, model.SelectEquipPlace));
|
| | | }
|
| | |
|
| | |
|
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | model.SelectEquipRefresh -= SelectEquipRefresh;
|
| | | model.SelectLevelRefresh -= SelectLevelRefresh;
|
| | | model.EquipStrengthUpdate -= EquipStrengthUpdate; |
| | | model.EquipStrengthUpdate -= EquipStrengthUpdate;
|
| | | model.EquipStrengthLvUpdate -= EquipStrengthLvUpdate;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent; |
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | protected override void LateUpdate()
|
| | | {
|
| | |
| | | }
|
| | | DisplayEquips();
|
| | | SetStrengthenedState();
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void OnRefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | switch (type)
|
| | |
| | | equipSelectCell.Display(level, place);
|
| | | break;
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void SetStrengthenedState()
|
| | | {
|
| | | if (model.SelectLevel == -1)
|
| | |
| | | m_BottomFrame.SetActive(false);
|
| | | m_NotEquipped.SetActive(true);
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void OpenSelect()
|
| | | {
|
| | | model.SelectLevel = -1;
|
| | |
| | | ulong needMoney = (ulong)itemPlus.costCount;
|
| | | if (money < needMoney)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(2100);
|
| | | EquipTipUtility.Show(2100);
|
| | | return false;
|
| | | }
|
| | |
|
| | |
| | | m_EquipStrengthUpper.DisplayMoney();
|
| | | }
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | | if (i < ways.Count) |
| | | { |
| | | behaviour.gameObject.SetActive(true); |
| | | var getWayConfig = GetItemWaysConfig.Get(ways[i]); |
| | | behaviour.icon.SetSprite(getWayConfig.Icon); |
| | | behaviour.wayName.text = getWayConfig.Text; |
| | | behaviour.funcName.text = getWayConfig.name; |
| | | behaviour.wayButton.SetListener(() => |
| | | { |
| | | WindowCenter.Instance.Close<EquipFrameWin>(); |
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().ClickGetWay(getWayConfig.ID); |
| | | }); |
| | | behaviour.Display(ways[i]); |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | private void AddMaterials() |
| | | { |
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(itemId); |
| | | EquipTipUtility.Show(itemId); |
| | | } |
| | | |
| | | } |
| | |
| | |
|
| | | private void OnFoodGetWay()
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(fairyBossModel.fairyBossFood);
|
| | | EquipTipUtility.Show(fairyBossModel.fairyBossFood);
|
| | | }
|
| | |
|
| | | void UpdateTimeTip()
|
| | |
| | | private int _FamilyPosition;//家族职位等级 // Use this for initialization
|
| | |
|
| | | private int GetFamilyLV = 0;//获得仙盟等级
|
| | | GetItemPathModel _GetItemPath;
|
| | | GetItemPathModel GetItemPath { get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); } }
|
| | | PlayerMainDate M_mainModel;
|
| | | PlayerMainDate mainModel { get { return M_mainModel ?? (M_mainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
|
| | | PlayerMethodData M_Method;
|
| | |
| | | }
|
| | | private void ObtainBtn()
|
| | | {
|
| | | GetItemPath.SetChinItemModel(mainModel.GetCurrencyItemID[6]);
|
| | | EquipTipUtility.Show(mainModel.GetCurrencyItemID[6]);
|
| | | }
|
| | |
|
| | | public void Initialize()//信息初始化
|
| | |
| | | using UnityEngine.UI;
|
| | | using System.Linq;
|
| | | using System.Text.RegularExpressions;
|
| | | using System; |
| | | using System;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class MethodToWin : Window
|
| | |
| | | }
|
| | | PlayerMethodData M_Method;
|
| | | PlayerMethodData method { get { return M_Method ?? (M_Method = ModelCenter.Instance.GetModel<PlayerMethodData>()); } }
|
| | | GetItemPathModel _GetItemPath;
|
| | | GetItemPathModel GetItemPath { get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); } }
|
| | | PlayerMainDate M_mainModel;
|
| | | PlayerMainDate mainModel { get { return M_mainModel ?? (M_mainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
|
| | | protected override void BindController()
|
| | |
| | |
|
| | | private void ApproachButton()
|
| | | {
|
| | | GetItemPath.SetChinItemModel(mainModel.GetCurrencyItemID[6]);
|
| | | EquipTipUtility.Show(mainModel.GetCurrencyItemID[6]);
|
| | |
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | GetItemPath.SetChinItemModel(mainModel.GetCurrencyItemID[6]);
|
| | | EquipTipUtility.Show(mainModel.GetCurrencyItemID[6]);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | |
|
| | | }
|
| | | }
|
| | | } |
| | | }
|
| | |
| | | FashionDress fashionDress = null;
|
| | | ItemConfig itemConfig = null;
|
| | | FashionDressModel fashionModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } }
|
| | | GetItemPathModel itemPathModel { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | }
|
| | | protected override void AddListeners()
|
| | | {
|
| | | _waysCtrl.OnRefreshCell += RefreshWayCell;
|
| | | }
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | |
| | | }
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | |
|
| | | private void SetDisplay()
|
| | | {
|
| | | |
| | | fashionModel.TryGetFashionDress(fashionModel.viewFashionDressId,out fashionDress);
|
| | |
|
| | | fashionModel.TryGetFashionDress(fashionModel.viewFashionDressId, out fashionDress);
|
| | | if (fashionDress == null) return;
|
| | |
|
| | | container.SetActive(false);
|
| | |
| | | SetBotttomUI();
|
| | | bool isShowGetWays = itemConfig != null && itemConfig.GetWay != null && itemConfig.GetWay.Length > 0 ? true : false;
|
| | | getWaysObj.SetActive(isShowGetWays);
|
| | | if(isShowGetWays)
|
| | | if (isShowGetWays)
|
| | | {
|
| | | CreateWayCell();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (fashionDress == null) return;
|
| | | int minStar = 1;
|
| | | int curSatr = fashionModel.GetFashionDressLevel(fashionDress.id);
|
| | | if(curSatr < minStar)
|
| | | if (curSatr < minStar)
|
| | | {
|
| | | currentFashionAttr.gameObject.SetActive(false);
|
| | | nextFashionAttr.gameObject.SetActive(true);
|
| | | nextFashionAttr.SetDisplay(minStar,curSatr);
|
| | | nextFashionAttr.SetDisplay(minStar, curSatr);
|
| | | }
|
| | | else if(curSatr >= fashionDress.maxLevel)
|
| | | else if (curSatr >= fashionDress.maxLevel)
|
| | | {
|
| | | currentFashionAttr.gameObject.SetActive(true);
|
| | | nextFashionAttr.gameObject.SetActive(false);
|
| | | currentFashionAttr.SetDisplay(fashionDress.maxLevel,curSatr);
|
| | | currentFashionAttr.SetDisplay(fashionDress.maxLevel, curSatr);
|
| | | }
|
| | | else
|
| | | {
|
| | | currentFashionAttr.gameObject.SetActive(true);
|
| | | nextFashionAttr.gameObject.SetActive(true);
|
| | | currentFashionAttr.SetDisplay(curSatr,curSatr);
|
| | | nextFashionAttr.SetDisplay(curSatr+1,curSatr);
|
| | | currentFashionAttr.SetDisplay(curSatr, curSatr);
|
| | | nextFashionAttr.SetDisplay(curSatr + 1, curSatr);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | #region getWaysTips逻辑
|
| | | private List<GetItemWaysConfig> getWayslist;
|
| | | protected virtual void CreateWayCell()
|
| | | {
|
| | | getWayslist = itemPathModel.GetWaysList(itemConfig);
|
| | | _waysCtrl.Refresh();
|
| | | int i = 0;
|
| | | int remain = getWayslist.Count % waysLineCell.childCount;
|
| | | int line = (int)getWayslist.Count / waysLineCell.childCount;
|
| | | if (remain > 0)
|
| | | {
|
| | | line += 1;
|
| | | }
|
| | |
|
| | | for (i = 0; i < line; i++)
|
| | | {
|
| | | _waysCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | _waysCtrl.Restart();
|
| | | }
|
| | |
|
| | | private void RefreshWayCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int i = 0;
|
| | | for (i = 0; i < cell.transform.childCount; i++)
|
| | | {
|
| | | WayCell wayCell = cell.transform.GetChild(i).GetComponent<WayCell>();
|
| | | if (wayCell == null)
|
| | | wayCell = cell.transform.GetChild(i).gameObject.AddComponent<WayCell>();
|
| | |
|
| | | int index = (cell.transform.childCount) * cell.index + i;
|
| | | if (index <= getWayslist.Count - 1)
|
| | | {
|
| | | cell.transform.GetChild(i).gameObject.SetActive(true);
|
| | | GetItemWaysConfig itemWaysModel = getWayslist[index];
|
| | | wayCell.icon.SetSprite(itemWaysModel.Icon);
|
| | | wayCell.wayName.text = itemWaysModel.Text;
|
| | | wayCell.funcName.text = itemWaysModel.name;
|
| | | wayCell.wayButton.RemoveAllListeners();
|
| | | wayCell.wayButton.AddListener(() =>
|
| | | {
|
| | | ClickWayCell(itemWaysModel);
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | cell.transform.GetChild(i).gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void ClickWayCell(GetItemWaysConfig itemWaysModel)
|
| | | {
|
| | | CloseImmediately();
|
| | | itemPathModel.ClickGetWay(itemWaysModel.ID);
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | using UnityEngine; |
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | |
| | |
|
| | | private void OnFunc()
|
| | | {
|
| | | var itemPathModel = ModelCenter.Instance.GetModel<GetItemPathModel>();
|
| | | var displayId = GeneralDefine.moneyDisplayIds.ContainsKey(moneyType) ? GeneralDefine.moneyDisplayIds[moneyType] : 0;
|
| | | if (displayId != 0)
|
| | | {
|
| | | itemPathModel.SetChinItemModel(displayId);
|
| | | EquipTipUtility.Show(displayId);
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | public class HazyDemonKingModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | Dictionary<uint, HazyDemonKingPlayerInfo> m_PlayerInfos = new Dictionary<uint, HazyDemonKingPlayerInfo>();
|
| | | Dictionary<int, Dictionary<int, int>> m_MapPlayerCounts = new Dictionary<int, Dictionary<int, int>>();
|
| | | List<uint> m_AttackHeroPlayers = new List<uint>();
|
| | |
|
| | | public bool IsInDungeon { get; private set; }
|
| | |
| | | public const int DEMONKINGMAPID2 = 32030;
|
| | |
|
| | | public event Action onPlayerInfoRefresh;
|
| | | public event Action onPlayerCountRefresh;
|
| | |
|
| | | HazyRegionModel hazyRegionModel { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
|
| | |
|
| | |
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | m_PlayerInfos.Clear();
|
| | | m_MapPlayerCounts.Clear();
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | |
| | | return m_PlayerInfos.Keys;
|
| | | }
|
| | |
|
| | | public int GetDungeonPlayerCount(int mapId, int lineId)
|
| | | {
|
| | | if (m_MapPlayerCounts.ContainsKey(mapId))
|
| | | {
|
| | | return m_MapPlayerCounts[mapId].ContainsKey(lineId) ? m_MapPlayerCounts[mapId][lineId] : 0;
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public void SendSelectAtkTarget(uint serverInstId)
|
| | | {
|
| | | var actor = GAMgr.Instance.GetBySID(serverInstId);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HA007_tagGCFBLinePlayerCnt package)
|
| | | {
|
| | | var mapId = (int)package.MapID;
|
| | | if (IsInDemonKingDungeon(mapId))
|
| | | {
|
| | | Dictionary<int, int> dict = null;
|
| | | if (!m_MapPlayerCounts.TryGetValue(mapId, out dict))
|
| | | {
|
| | | dict = new Dictionary<int, int>();
|
| | | m_MapPlayerCounts.Add(mapId, dict);
|
| | | }
|
| | | for (int i = 0; i < package.Count; i++)
|
| | | {
|
| | | var data = package.FBLineInfoList[i];
|
| | | dict[data.FBLineID] = data.PlayerCnt;
|
| | | }
|
| | |
|
| | | if (onPlayerCountRefresh != null)
|
| | | {
|
| | | onPlayerCountRefresh();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void RequestEnterClientDungeon()
|
| | | {
|
| | | var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
|
| | |
| | | var itemCount = packModel.GetItemCountByID(PackType.Item, dailyQuestOpenTime.DayItemID);
|
| | | if (itemCount <= 0)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(dailyQuestOpenTime.DayItemID);
|
| | | EquipTipUtility.Show(dailyQuestOpenTime.DayItemID);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | HazyRegionModel model { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
|
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | | HazyDemonKingModel hazyDemonKingModel { get { return ModelCenter.Instance.GetModel<HazyDemonKingModel>(); } }
|
| | |
|
| | | int incidentId = 0;
|
| | |
|
| | |
| | | {
|
| | | m_BossAlive = value;
|
| | | DisplayBossState();
|
| | |
|
| | | if (m_BossAlive)
|
| | | {
|
| | | model.incidentDirty = true;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var config = HazyRegionConfig.Get(incidentId);
|
| | | incidentType = (HazyRegionIncidentType)config.incidentType;
|
| | |
|
| | | m_BossAlive = false;
|
| | | if (incidentType == HazyRegionIncidentType.DemonKing)
|
| | | {
|
| | | m_BossAlive = findPreciousModel.IsBossAlive(config.npcId);
|
| | |
| | | model.onHazyRegionIncidentRefresh += OnHazyRegionIncidentRefresh;
|
| | | findPreciousModel.bossInfoUpdateEvent -= BossInfoUpdateEvent;
|
| | | findPreciousModel.bossInfoUpdateEvent += BossInfoUpdateEvent;
|
| | | hazyDemonKingModel.onPlayerCountRefresh -= OnPlayerCountRefresh;
|
| | | hazyDemonKingModel.onPlayerCountRefresh += OnPlayerCountRefresh;
|
| | | }
|
| | |
|
| | | void DisplayBase()
|
| | |
| | | {
|
| | | if (model.InFakeHazyRegion)
|
| | | {
|
| | | var fighting = ClientDungeonStageUtility.isClientDungeon;
|
| | | var fighting = ClientDungeonStageUtility.isClientDungeon &&
|
| | | ClientDungeonStageUtility.clientMapId == HazyDemonKingModel.Client_MapID;
|
| | | m_PlayerCount.gameObject.SetActive(true);
|
| | | m_RebornTime.gameObject.SetActive(false);
|
| | | m_PlayerCount.text = Language.Get("HazyDemonKingPlayerCount", fighting ? 1 : 0);
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | m_PlayerCount.text = Language.Get("HazyDemonKingPlayerCount", 0);
|
| | | DisplayPlayerCount();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | m_RebornTime.text = Language.Get("BossReborn_RefreshTime1");
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayPlayerCount()
|
| | | {
|
| | | var config = HazyRegionConfig.Get(incidentId);
|
| | | if (config != null)
|
| | | {
|
| | | m_PlayerCount.text = Language.Get("HazyDemonKingPlayerCount",
|
| | | hazyDemonKingModel.GetDungeonPlayerCount(config.dungeonId, config.lineId));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnPlayerCountRefresh()
|
| | | {
|
| | | if (incidentType == HazyRegionIncidentType.DemonKing
|
| | | && !model.InFakeHazyRegion && bossAlive)
|
| | | {
|
| | | DisplayPlayerCount();
|
| | | }
|
| | | }
|
| | |
|
| | | public override void Dispose()
|
| | | {
|
| | | base.Dispose();
|
| | | hazyDemonKingModel.onPlayerCountRefresh -= OnPlayerCountRefresh;
|
| | | findPreciousModel.bossInfoUpdateEvent -= BossInfoUpdateEvent;
|
| | | model.selectIncidentRefresh -= SelectIncidentRefresh;
|
| | | model.onHazyRegionIncidentRefresh -= OnHazyRegionIncidentRefresh;
|
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | |
| | | HazyRegionModel model { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | |
|
| | | DateTime requestTime = DateTime.Now;
|
| | | int requestCount = 0;
|
| | | float timer = 0f;
|
| | | Dictionary<int, List<byte>> requestLines = new Dictionary<int, List<byte>>();
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | |
| | | DisplayPoint();
|
| | | DisplayIncidents();
|
| | | DisplayBackButton();
|
| | |
|
| | | requestCount = 0;
|
| | | model.incidentDirty = false;
|
| | | SendRequestPlayerCount();
|
| | | }
|
| | |
|
| | | void DisplayIncidents()
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(item.id);
|
| | | EquipTipUtility.Show(item.id);
|
| | | }
|
| | | });
|
| | | return;
|
| | |
| | | }
|
| | | }
|
| | | model.SendGotoIncident(model.selectIncident);
|
| | | }
|
| | | }
|
| | |
|
| | | private void LateUpdate()
|
| | | {
|
| | | timer += Time.deltaTime;
|
| | | if (timer >= 0.5f && !model.InFakeHazyRegion)
|
| | | {
|
| | | if (model.incidentDirty)
|
| | | {
|
| | | model.incidentDirty = false;
|
| | | requestCount = 0;
|
| | | requestTime = DateTime.Now;
|
| | | SendRequestPlayerCount();
|
| | | return;
|
| | | }
|
| | | timer = 0f;
|
| | | if ((DateTime.Now - requestTime).TotalSeconds > 5
|
| | | && requestCount < 10)
|
| | | {
|
| | | SendRequestPlayerCount();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void SendRequestPlayerCount()
|
| | | {
|
| | | requestLines.Clear();
|
| | | if (model.InFakeHazyRegion)
|
| | | {
|
| | | return;
|
| | | }
|
| | | for (int i = 0; i < incidents.Count; i++)
|
| | | {
|
| | | var config = HazyRegionConfig.Get(incidents[i]);
|
| | | if (config.incidentType != (int)HazyRegionIncidentType.DemonKing)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | if (findPreciousModel.IsBossAlive(config.npcId))
|
| | | {
|
| | | if (!requestLines.ContainsKey(config.dungeonId))
|
| | | {
|
| | | requestLines.Add(config.dungeonId, new List<byte>());
|
| | | }
|
| | | if (!requestLines[config.dungeonId].Contains((byte)config.lineId))
|
| | | {
|
| | | requestLines[config.dungeonId].Add((byte)config.lineId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (requestLines.Count > 0)
|
| | | {
|
| | | foreach (var mapId in requestLines.Keys)
|
| | | {
|
| | | var pak = new CA004_tagCGGetFBLinePlayerCnt();
|
| | | pak.MapID = (uint)mapId;
|
| | | pak.LineCount = (byte)requestLines[mapId].Count;
|
| | | pak.LineIDList = requestLines[mapId].ToArray();
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | | requestCount++;
|
| | | requestTime = DateTime.Now;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | #endif
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | public int fakeOpenTimes { get; private set; }
|
| | | public bool isServerPrepare { get; private set; }
|
| | | public bool requireIncidentAnimation { get; set; }
|
| | | public bool incidentDirty { get; set; }
|
| | |
|
| | | int m_SelectIncident;
|
| | | public int selectIncident
|
| | |
| | | public TrainProperty trainProperty; |
| | | public List<ItemOperateType> operates; |
| | | public WingRefineMaterials refineMaterials; |
| | | |
| | | public GetWay getWay; |
| | | } |
| | | |
| | | public struct BaseInfo |
| | |
| | | public int overdueSurplusTime; |
| | | public int levelLimit; |
| | | public int realmLimit; |
| | | public int moneyLimit; |
| | | } |
| | | |
| | | public struct BaseProperty |
| | |
| | | public List<Int2> materials; |
| | | } |
| | | |
| | | public struct GetWay |
| | | { |
| | | public List<int> ways; |
| | | } |
| | | |
| | | public struct BuyInfo |
| | | { |
| | | |
| | | } |
| | | |
| | | static PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | static EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | static EquipStarModel starModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | |
| | | public static TipData mainTipData { get; private set; } |
| | | public static TipData secondaryData { get; private set; } |
| | | |
| | | public static void Show(TipType type, int itemId) |
| | | public static void Show(int itemId, TipType type = TipType.Normal) |
| | | { |
| | | tipType = type; |
| | | secondaryData = null; |
| | |
| | | skillInfo = GetSkillInfo(itemId), |
| | | suitInfo = GetSuitInfo(itemId), |
| | | gemInfo = GetGemInfo(itemId), |
| | | starInfo = GetStarInfo(itemId) |
| | | starInfo = GetStarInfo(itemId), |
| | | getWay = GetGetWay(itemId) |
| | | }; |
| | | } |
| | | |
| | |
| | | baseProperty = GetBaseProperty(itemId), |
| | | legendProperty = GetLegendProperty(itemId), |
| | | petMountBaseProperty = GetPetMountBaseProperty(itemId), |
| | | getWay = GetGetWay(itemId) |
| | | }; |
| | | } |
| | | |
| | |
| | | private static BaseInfo GetBaseInfo(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | var money = 0; |
| | | if (config.Type == 81) |
| | | { |
| | | var chestConfig = ChestsConfig.Get(itemId); |
| | | money = chestConfig.OpenMoney; |
| | | } |
| | | |
| | | var baseInfo = new BaseInfo() |
| | | { |
| | | itemId = itemId, |
| | |
| | | auctionSurplusTime = 0, |
| | | levelLimit = config.UseLV, |
| | | realmLimit = config.RealmLimit, |
| | | moneyLimit = money, |
| | | }; |
| | | |
| | | return baseInfo; |
| | |
| | | var maxStrengthenLevel = strengthenModel.GetEquipLevelMax(type, Mathf.Min(star, maxStar)); |
| | | var placeStrengthenLevel = strengthenModel.GetStrengthLevel(level, place); |
| | | |
| | | var money = 0; |
| | | if (item.config.Type == 81) |
| | | { |
| | | var chestConfig = ChestsConfig.Get(item.itemId); |
| | | money = chestConfig.OpenMoney; |
| | | } |
| | | |
| | | var baseInfo = new BaseInfo() |
| | | { |
| | | itemId = item.itemId, |
| | |
| | | levelLimit = item.isAuction ? 0 : item.config.UseLV, |
| | | realmLimit = item.isAuction ? 0 : item.config.RealmLimit, |
| | | star = isEquiped ? star : -1, |
| | | strengthenLevel = isEquiped ? Mathf.Min(placeStrengthenLevel, maxStrengthenLevel) : 0 |
| | | strengthenLevel = isEquiped ? Mathf.Min(placeStrengthenLevel, maxStrengthenLevel) : 0, |
| | | moneyLimit = money, |
| | | }; |
| | | |
| | | return baseInfo; |
| | |
| | | var ids = LegendPropertyUtility.GetWingProperties(config.LV); |
| | | var values = LegendPropertyUtility.GetWingProperties(config.LV); |
| | | data.properties = new List<Int2>(); |
| | | var min = Mathf.Min(ids.Count, values.Count); |
| | | for (int i = 0; i < min; i++) |
| | | if (!ids.IsNullOrEmpty() && !values.IsNullOrEmpty()) |
| | | { |
| | | data.properties.Add(new Int2(ids[i], values[i])); |
| | | var min = Mathf.Min(ids.Count, values.Count); |
| | | for (int i = 0; i < min; i++) |
| | | { |
| | | data.properties.Add(new Int2(ids[i], values[i])); |
| | | } |
| | | } |
| | | |
| | | break; |
| | | default: |
| | | data.trueCount = LegendPropertyUtility.GetEquipPropertyCount(itemId); |
| | |
| | | return refineMaterials; |
| | | } |
| | | |
| | | private static GetWay GetGetWay(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | var getWay = new GetWay(); |
| | | getWay.ways = new List<int>(); |
| | | foreach (var way in config.GetWay) |
| | | { |
| | | var wayConfig = GetItemWaysConfig.Get(way); |
| | | if (FuncOpen.Instance.IsFuncOpen(wayConfig.FuncOpenId)) |
| | | { |
| | | if (wayConfig.ActiveType == -1 || OpenServerActivityCenter.Instance.IsActivityOpen(wayConfig.ActiveType)) |
| | | { |
| | | getWay.ways.Add(way); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return getWay; |
| | | } |
| | | |
| | | private static List<ItemOperateType> GetOperates(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | |
| | | public TipStrengthenPropertyWidget strengthenPropertyWidget; |
| | | public TipTrainPropertyWidget trainPropertyWidget; |
| | | public TipAuctionTipWidget auctionTipWidget; |
| | | public Text job; |
| | | public Text equipPlace; |
| | | public TipJobAndPlaceWidget jobAndPlaceWidget; |
| | | public TipGetWayEntranceWidget getWayEntranceWidget; |
| | | public TipGetWaysWidget getWaysWidget; |
| | | |
| | | public void SetActive(bool active) |
| | | { |
| | |
| | | auctionTipWidget.Display(overdueTime); |
| | | } |
| | | |
| | | var itemConfig = ItemConfig.Get(data.itemId); |
| | | if (JobNameConfig.Has(itemConfig.JobLimit)) |
| | | jobAndPlaceWidget.Display(data.itemId); |
| | | |
| | | if (getWayEntranceWidget != null && getWaysWidget != null) |
| | | { |
| | | job.text = Language.Get("EquipWin_JobTitleText_1") + JobNameConfig.Get(itemConfig.JobLimit).name; |
| | | } |
| | | else |
| | | { |
| | | job.text = Language.Get("EquipWin_JobTitleText_1") + Language.Get("StoreWin110"); |
| | | var getWay = EquipTipUtility.mainTipData.getWay; |
| | | var hasGetWay = !getWay.ways.IsNullOrEmpty(); |
| | | getWayEntranceWidget.gameObject.SetActive(hasGetWay); |
| | | getWaysWidget.gameObject.SetActive(false); |
| | | if (hasGetWay) |
| | | { |
| | | getWayEntranceWidget.SetListener(() => |
| | | { |
| | | if (!getWaysWidget.gameObject.activeSelf) |
| | | { |
| | | getWaysWidget.Display(getWay); |
| | | } |
| | | else |
| | | { |
| | | getWaysWidget.Hide(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | equipPlace.text = Language.Get("EquipWin_PartTitleText_1") + UIHelper.GetEquipPlaceName(itemConfig.EquipPlace); |
| | | } |
| | | |
| | | } |
| | |
| | | [SerializeField] TipItemBaseInfoWidget m_BaseInfoWidget; |
| | | [SerializeField] TipBasePropertyWidget m_BasePropertyWidget; |
| | | [SerializeField] TipItemDescriptionWidget m_DescriptionWidget; |
| | | [SerializeField] Text m_Job; |
| | | [SerializeField] Text m_Place; |
| | | [SerializeField] TipGetWayEntranceWidget m_GetWayEntranceWidget; |
| | | [SerializeField] TipGetWaysWidget m_GetWaysWidget; |
| | | [SerializeField] TipJobAndPlaceWidget m_JobAndPlaceWidget; |
| | | [SerializeField] OperateButton[] m_OperateButtons; |
| | | [SerializeField] Button m_Close; |
| | | |
| | |
| | | DisplayBaseProperty(); |
| | | DisplayItemDescription(); |
| | | DisplayJobAndPlace(); |
| | | DisplayGetWays(); |
| | | DisplayOperateButton(); |
| | | } |
| | | |
| | |
| | | m_DescriptionWidget.Display(itemId); |
| | | } |
| | | |
| | | private void DisplayGetWays() |
| | | { |
| | | var getWay = EquipTipUtility.mainTipData.getWay; |
| | | var hasGetWay = !getWay.ways.IsNullOrEmpty(); |
| | | m_GetWayEntranceWidget.gameObject.SetActive(hasGetWay); |
| | | m_GetWaysWidget.gameObject.SetActive(false); |
| | | if (hasGetWay) |
| | | { |
| | | m_GetWayEntranceWidget.SetListener(() => |
| | | { |
| | | if (!m_GetWaysWidget.gameObject.activeSelf) |
| | | { |
| | | m_GetWaysWidget.Display(getWay); |
| | | } |
| | | else |
| | | { |
| | | m_GetWaysWidget.Hide(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | private void DisplayJobAndPlace() |
| | | { |
| | | var itemId = EquipTipUtility.mainTipData.baseInfo.itemId; |
| | | var itemConfig = ItemConfig.Get(itemId); |
| | | if (JobNameConfig.Has(itemConfig.JobLimit)) |
| | | { |
| | | m_Job.text = Language.Get("EquipWin_JobTitleText_1") + JobNameConfig.Get(itemConfig.JobLimit).name; |
| | | } |
| | | else |
| | | { |
| | | m_Job.text = Language.Get("EquipWin_JobTitleText_1") + Language.Get("StoreWin110"); |
| | | } |
| | | |
| | | m_Place.text = Language.Get("EquipWin_PartTitleText_1") + UIHelper.GetEquipPlaceName(itemConfig.EquipPlace); |
| | | m_JobAndPlaceWidget.Display(itemId); |
| | | } |
| | | |
| | | private void DisplayOperateButton() |
| | |
| | | [SerializeField] TipItemDescriptionWidget m_DescriptionWidget; |
| | | [SerializeField] TipAuctionTipWidget m_AuctionWidget; |
| | | [SerializeField] TipModelWidget m_ModelWidget; |
| | | [SerializeField] TipGetWayEntranceWidget m_GetWayEntranceWidget; |
| | | [SerializeField] TipGetWaysWidget m_GetWaysWidget; |
| | | |
| | | [SerializeField] OperateButton[] m_OperateButtons; |
| | | |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | this.transform.localScale = Vector3.zero; |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | |
| | | { |
| | | base.OnActived(); |
| | | |
| | | StartCoroutine(Co_DelayOneFrame()); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | IEnumerator Co_DelayOneFrame() |
| | | { |
| | | this.transform.localScale = Vector3.zero; |
| | | DisplayBaseInfo(); |
| | | DisplayItemDescription(); |
| | | DisplayItemUseState(); |
| | | DisplayAuctionInfo(); |
| | | DisplayGetWays(); |
| | | DisplayOperateButton(); |
| | | DisplayModel(); |
| | | } |
| | | |
| | | #endregion |
| | | yield return null; |
| | | yield return null; |
| | | this.transform.localScale = Vector3.one; |
| | | } |
| | | |
| | | private void DisplayBaseInfo() |
| | | { |
| | |
| | | |
| | | } |
| | | |
| | | private void DisplayGetWays() |
| | | { |
| | | var getWay = EquipTipUtility.mainTipData.getWay; |
| | | var hasGetWay = !getWay.ways.IsNullOrEmpty(); |
| | | m_GetWayEntranceWidget.gameObject.SetActive(hasGetWay); |
| | | m_GetWaysWidget.gameObject.SetActive(false); |
| | | if (hasGetWay) |
| | | { |
| | | m_GetWayEntranceWidget.SetListener(() => |
| | | { |
| | | if (!m_GetWaysWidget.gameObject.activeSelf) |
| | | { |
| | | m_GetWaysWidget.Display(getWay); |
| | | } |
| | | else |
| | | { |
| | | m_GetWaysWidget.Hide(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | private void DisplayOperateButton() |
| | | { |
| | | var operates = EquipTipUtility.mainTipData.operates; |
| | |
| | | [SerializeField] TipPetMountSkillWidget m_PetMountSkill; |
| | | [SerializeField] TipAuctionTipWidget m_AuctionWidget; |
| | | [SerializeField] TipPetMountDescriptionWidget m_DescriptionWidget; |
| | | [SerializeField] TipGetWayEntranceWidget m_GetWayEntranceWidget; |
| | | [SerializeField] TipGetWaysWidget m_GetWaysWidget; |
| | | [SerializeField] TipModelWidget m_Model; |
| | | [SerializeField] OperateButton[] m_OperateButtons; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private void DisplayGetWays() |
| | | { |
| | | var getWay = EquipTipUtility.mainTipData.getWay; |
| | | var hasGetWay = !getWay.ways.IsNullOrEmpty(); |
| | | m_GetWayEntranceWidget.gameObject.SetActive(hasGetWay); |
| | | m_GetWaysWidget.gameObject.SetActive(false); |
| | | if (hasGetWay) |
| | | { |
| | | m_GetWayEntranceWidget.SetListener(() => |
| | | { |
| | | if (!m_GetWaysWidget.gameObject.activeSelf) |
| | | { |
| | | m_GetWaysWidget.Display(getWay); |
| | | } |
| | | else |
| | | { |
| | | m_GetWaysWidget.Hide(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | IEnumerator Co_DelayDisplay() |
| | | { |
| | | yield return null; |
| | |
| | | DisplaySkills(); |
| | | DisplayAuctionInfo(); |
| | | DisplayDescription(); |
| | | DisplayGetWays(); |
| | | DisplayModel(); |
| | | DisplayOperateButton(); |
| | | } |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, April 22, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class TipBuyItemWidget : MonoBehaviour |
| | | { |
| | | [SerializeField] Text m_VipInfo; |
| | | [SerializeField] Text m_Count; |
| | | [SerializeField] Button m_Reduce; |
| | | [SerializeField] Button m_Add; |
| | | |
| | | [SerializeField] Image m_MoneyIcon; |
| | | [SerializeField] Text m_Money; |
| | | |
| | | [SerializeField] NumKeyBoard m_KeyBoard; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/BlastFurnace/MakerDrugFailWin.cs.meta
copy to System/ItemTip/TipBuyItemWidget.cs.meta
| File was copied from System/BlastFurnace/MakerDrugFailWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 92ef078487b28784cadd931e3421d852 |
| | | timeCreated: 1510366702 |
| | | guid: 2ed165aea3b7cb946a23c8e29ed7482f |
| | | timeCreated: 1555936336 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, April 22, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using UnityEngine.Events; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class TipGetWayEntranceWidget : MonoBehaviour |
| | | { |
| | | [SerializeField] Button m_ViewWays; |
| | | |
| | | public void SetListener(UnityAction action) |
| | | { |
| | | m_ViewWays.SetListener(action); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/BlastFurnace/MakerDrugFailWin.cs.meta
copy to System/ItemTip/TipGetWayEntranceWidget.cs.meta
| File was copied from System/BlastFurnace/MakerDrugFailWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 92ef078487b28784cadd931e3421d852 |
| | | timeCreated: 1510366702 |
| | | guid: 6c1370a4cf848ee45a76988791e50de1 |
| | | timeCreated: 1555914834 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, April 22, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using DG.Tweening; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class TipGetWaysWidget : MonoBehaviour |
| | | { |
| | | [SerializeField] WayCell[] m_GetWays; |
| | | [SerializeField] CanvasGroup m_AlphaTween; |
| | | |
| | | public void Display(EquipTipUtility.GetWay getWay) |
| | | { |
| | | for (var i = 0; i < m_GetWays.Length; i++) |
| | | { |
| | | var behaviour = m_GetWays[i]; |
| | | if (i < getWay.ways.Count) |
| | | { |
| | | var way = getWay.ways[i]; |
| | | behaviour.gameObject.SetActive(true); |
| | | behaviour.Display(way); |
| | | } |
| | | else |
| | | { |
| | | behaviour.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | this.gameObject.SetActive(true); |
| | | m_AlphaTween.alpha = 0; |
| | | m_AlphaTween.DOFade(1, 0.5f); |
| | | } |
| | | |
| | | public void Hide() |
| | | { |
| | | m_AlphaTween.alpha = 1; |
| | | m_AlphaTween.DOFade(0, 0.5f).OnComplete(() => { this.gameObject.SetActive(false); }); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| File was renamed from System/BlastFurnace/MakerDrugFailWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 92ef078487b28784cadd931e3421d852 |
| | | timeCreated: 1510366702 |
| | | guid: b92585143962434459fb9865b88dd425 |
| | | timeCreated: 1555914813 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | [SerializeField] ItemBehaviour m_Item; |
| | | [SerializeField] Text m_Type; |
| | | |
| | | [SerializeField] RectTransform m_LevelConditionContainer; |
| | | [SerializeField] Text m_LevelCondition; |
| | | |
| | | [SerializeField] RectTransform m_RealmConditionContainer; |
| | | [SerializeField] Text m_RealmCondition; |
| | | [SerializeField] Text m_Condition; |
| | | |
| | | [SerializeField] RectTransform m_SurplusTimeContainer; |
| | | [SerializeField] Text m_SurplusTime; |
| | |
| | | m_Item.SetItem(baseInfo.itemId, 1); |
| | | m_Type.text = itemConfig.ItemTypeName; |
| | | |
| | | if (baseInfo.realmLimit > 0) |
| | | if (baseInfo.moneyLimit > 0) |
| | | { |
| | | m_LevelConditionContainer.gameObject.SetActive(false); |
| | | m_RealmConditionContainer.gameObject.SetActive(true); |
| | | var myMoney = UIHelper.GetMoneyCnt(1); |
| | | m_Condition.text = Language.Get("OpenBoxCostMoney", baseInfo.moneyLimit); |
| | | m_Condition.color = UIHelper.GetUIColor(myMoney <(ulong) baseInfo.moneyLimit ? TextColType.Red : TextColType.Green); |
| | | } |
| | | else if (baseInfo.realmLimit > 0) |
| | | { |
| | | var realmConfig = RealmConfig.Get(baseInfo.realmLimit); |
| | | m_RealmCondition.text = StringUtility.Contact(Language.Get("RealmLimit1"), " ", realmConfig.Name); |
| | | |
| | | m_Condition.text = StringUtility.Contact(Language.Get("RealmLimit1"), " ", realmConfig.Name); |
| | | var realmLevel = PlayerDatas.Instance.baseData.realmLevel; |
| | | m_LevelCondition.color = UIHelper.GetUIColor(realmLevel < itemConfig.UseLV ? TextColType.Red : TextColType.Green); |
| | | m_Condition.color = UIHelper.GetUIColor(realmLevel < itemConfig.UseLV ? TextColType.Red : TextColType.Green); |
| | | } |
| | | else |
| | | { |
| | | m_RealmConditionContainer.gameObject.SetActive(false); |
| | | |
| | | if (baseInfo.levelLimit > 0) |
| | | { |
| | | m_LevelConditionContainer.gameObject.SetActive(true); |
| | | m_LevelCondition.text = StringUtility.Contact(Language.Get("KnapS110"), " ", baseInfo.levelLimit); |
| | | |
| | | var playerLevel = PlayerDatas.Instance.baseData.LV; |
| | | m_LevelCondition.color = UIHelper.GetUIColor(playerLevel < itemConfig.UseLV ? TextColType.Red : TextColType.Green); |
| | | } |
| | | else |
| | | { |
| | | m_LevelConditionContainer.gameObject.SetActive(false); |
| | | } |
| | | m_Condition.text = StringUtility.Contact(Language.Get("KnapS110"), " ", baseInfo.levelLimit); |
| | | var playerLevel = PlayerDatas.Instance.baseData.LV; |
| | | m_Condition.color = UIHelper.GetUIColor(playerLevel < itemConfig.UseLV ? TextColType.Red : TextColType.Green); |
| | | } |
| | | |
| | | if (baseInfo.isAuction) |
| | |
| | | public void Display(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | var description = itemTipModel.curAttrData.GetAllInfoDes(); |
| | | var description = config.Description; |
| | | if (description.Contains("{Exp}")) |
| | | { |
| | | var expValue = itemTipModel.GetAddExpValue(config.EffectValueA1, config.EffectValueB1); |
| | |
| | | [SerializeField] TipLegendPropertyWidget m_LegendPropertyWidget; |
| | | [SerializeField] TipWingRefineMaterialsWidget m_RefineMaterialsWidget; |
| | | [SerializeField] TipItemDescriptionWidget m_DescriptionWidget; |
| | | [SerializeField] TipGetWayEntranceWidget m_GetWayEntranceWidget; |
| | | [SerializeField] TipGetWaysWidget m_GetWaysWidget; |
| | | [SerializeField] TipJobAndPlaceWidget m_JobAndPlaceWidget; |
| | | [SerializeField] OperateButton[] m_OperateButtons; |
| | | [SerializeField] Button m_Close; |
| | |
| | | DisplayRefineMaterials(); |
| | | DisplayItemDescription(); |
| | | DisplayJobAndPlace(); |
| | | DisplayGetWays(); |
| | | DisplayOperateButton(); |
| | | } |
| | | |
| | |
| | | m_DescriptionWidget.Display(itemId); |
| | | } |
| | | |
| | | private void DisplayGetWays() |
| | | { |
| | | var getWay = EquipTipUtility.mainTipData.getWay; |
| | | var hasGetWay = !getWay.ways.IsNullOrEmpty(); |
| | | m_GetWayEntranceWidget.gameObject.SetActive(hasGetWay); |
| | | m_GetWaysWidget.gameObject.SetActive(false); |
| | | if (hasGetWay) |
| | | { |
| | | m_GetWayEntranceWidget.SetListener(() => |
| | | { |
| | | if (!m_GetWaysWidget.gameObject.activeSelf) |
| | | { |
| | | m_GetWaysWidget.Display(getWay); |
| | | } |
| | | else |
| | | { |
| | | m_GetWaysWidget.Hide(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | private void DisplayJobAndPlace() |
| | | { |
| | | var itemId = EquipTipUtility.mainTipData.baseInfo.itemId; |
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void SetCompareAttrData(ItemModel itemModel)
|
| | | {
|
| | | compareAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | | , itemModel.gridIndex, true
|
| | | , itemModel.packType, itemModel.guid, ConfigParse.Analysis(itemModel.itemInfo.userData));
|
| | | }
|
| | |
|
| | | private void SetCompareAttrData(PackType type, int equipPlace)
|
| | | {
|
| | | compareAttrData = null;
|
| | |
| | | case ItemWinType.wingsWin:
|
| | | case ItemWinType.guardWin:
|
| | | case ItemWinType.itemWin:
|
| | | case ItemWinType.boxWin:
|
| | | if (curAttrData.isPreview)
|
| | | {
|
| | | EquipTipUtility.Show(TipType.Normal, curAttrData.itemId);
|
| | | EquipTipUtility.Show(curAttrData.itemId, TipType.Normal);
|
| | | }
|
| | | else
|
| | | {
|
| | | EquipTipUtility.Show(curAttrData.guid);
|
| | | }
|
| | | break;
|
| | | case ItemWinType.boxWin:
|
| | | WindowCenter.Instance.Open<BoxInfoWin>();
|
| | | break;
|
| | | case ItemWinType.equipWin:
|
| | | if (ItemLogicUtility.Instance.IsEquip(curAttrData.itemId))
|
| | | {
|
| | | if (curAttrData.isPreview)
|
| | | {
|
| | | EquipTipUtility.Show(TipType.Normal, curAttrData.itemId);
|
| | | EquipTipUtility.Show(curAttrData.itemId, TipType.Normal);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | case ItemWinType.petMatWin:
|
| | | if (curAttrData.isPreview)
|
| | | {
|
| | | EquipTipUtility.Show(TipType.Normal, curAttrData.itemId);
|
| | | EquipTipUtility.Show(curAttrData.itemId, TipType.Normal);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | Dictionary<int, List<int>> sharedUseCountItemDict { get; set; } |
| | | bool isUpdatePlayerLv = false; |
| | | |
| | | BlastFurnaceModel FurnaceModel { get { return ModelCenter.Instance.GetModel<BlastFurnaceModel>(); } } |
| | | AlchemyModel alchemyModel { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } } |
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } |
| | | |
| | | public override void Init() |
| | |
| | | |
| | | public bool IsReachMaxUseDrug(AttrFruitConfig fruitConfig) |
| | | { |
| | | if (fruitConfig == null) return false; |
| | | if (fruitConfig == null)
|
| | | {
|
| | | return false;
|
| | | } |
| | | |
| | | if (fruitConfig.FuncID == 2)
|
| | | {
|
| | | AlchemyDrugUseLimit drugUseLimit;
|
| | | if (alchemyModel.TryGetAlchemyUseLimit(fruitConfig.ID, out drugUseLimit))
|
| | | {
|
| | | return drugUseLimit.IsReachLimit();
|
| | | }
|
| | | } |
| | | |
| | | int useNum = GetItemTotalUsedTimes(fruitConfig.ID); |
| | | if (useNum >= fruitConfig.basicUseLimit) |
| | |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | List<AttrFruitConfig> limitlist = new List<AttrFruitConfig>(); |
| | | public float GetAlchemyProgress(AlchemyConfig alchemy) |
| | | { |
| | | var previewDanlist = FurnaceModel.GetPreviewIdlist(alchemy); |
| | | float progress = 0; |
| | | limitlist.Clear(); |
| | | for (int i = 0; i < previewDanlist.Count; i++) |
| | | { |
| | | AttrFruitConfig fruitConfig = AttrFruitConfig.Get(previewDanlist[i]); |
| | | if (fruitConfig != null) |
| | | { |
| | | limitlist.Add(fruitConfig); |
| | | } |
| | | } |
| | | |
| | | for (int i = 0; i < limitlist.Count; i++) |
| | | { |
| | | progress += ((float)1 / limitlist.Count) * ((float)GetItemTotalUsedTimes(limitlist[i].ID) / limitlist[i].basicUseLimit); |
| | | } |
| | | return progress * 100; |
| | | } |
| | | #endregion |
| | | } |
| | |
| | |
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | ItemTipsModel tipModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | GetItemPathModel pathModel { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
|
| | |
|
| | | RoleEquipType equipType;
|
| | |
|
| | |
| | | int pathId = packModel.GetRoleEquipPathId((int)equipType);
|
| | | if (pathId != 0)
|
| | | {
|
| | | pathModel.SetChinItemModel(pathId);
|
| | | EquipTipUtility.Show(pathId);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | WingsTip wingsTip;
|
| | | [SerializeField]
|
| | | BuyWingsTip buyTip;
|
| | | [SerializeField] GetWingsPathTips getWingsPathTip;
|
| | | [SerializeField]
|
| | | CanvasGroup wingsTipAlpha;
|
| | | [SerializeField]
|
| | |
| | | TempCreatelist.Clear();
|
| | | wingsTip.gameObject.SetActive(false);
|
| | | buyTip.gameObject.SetActive(false);
|
| | | getWingsPathTip.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | buyTip.gameObject.SetActive(true);
|
| | | break;
|
| | | case ItemTipChildType.GetWingsPath:
|
| | | getWingsPathTip.InitModel(itemTipsModel.curAttrData);
|
| | | getWingsPathTip.gameObject.SetActive(true);
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | wingsTip.gameObject.SetActive(true);
|
| | | break;
|
| | | case ItemTipChildType.GetWingsPath:
|
| | | getWingsPathTip.InitModel(itemTipsModel.curAttrData);
|
| | | getWingsPathTip.gameObject.SetActive(true);
|
| | | wingsTip.InitModel(itemTipsModel.compareAttrData);
|
| | | wingsTip.gameObject.SetActive(true);
|
| | | break;
|
| | |
| | |
|
| | | TaskModel taskmodel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
|
| | | PlayerMainDate mainModel { get { return ModelCenter.Instance.GetModel<PlayerMainDate>(); } }
|
| | | GetItemPathModel GetItemPath { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
|
| | | FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | |
| | | m_Cancel.AddListener(CloseClick);
|
| | | m_OKButton.AddListener(OnclickOKButton);
|
| | | m_Toggle.onValueChanged.AddListener(OnClickToggle);
|
| | | m_button.AddListener(() => { GetItemPath.SetChinItemModel(FlyShoseID); });
|
| | | m_button.AddListener(() => { EquipTipUtility.Show(FlyShoseID); });
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | | bool IsBossBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域
|
| | | if (atkInt.Length > 1)
|
| | | {
|
| | | var activityline = 0;
|
| | | fairyGrabBossModel.TryGetFairyGrabBossLine(out activityline);
|
| | | if (PlayerDatas.Instance.baseData.MapID == 10040 && activityline == PlayerDatas.Instance.baseData.FBID)//逍遥城活动线不允许切换模式
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("Map_AtkType");
|
| | | return;
|
| | | }
|
| | | if (PlayerDatas.Instance.baseData.MapID == 10040 && IsBossBool && !fairyGrabBossModel.grabBossHintOpen)//逍遥城boss区域特殊处理(可切换状态)
|
| | | {
|
| | | WindowCenter.Instance.Open<CombatModeWin>();
|
| | | if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
|
| | | {
|
| | | WindowCenter.Instance.Close<FunctionForecastWin>();
|
| | | }
|
| | | return;
|
| | | }
|
| | | //var activityline = 0;
|
| | | //fairyGrabBossModel.TryGetFairyGrabBossLine(out activityline);
|
| | | //if (PlayerDatas.Instance.baseData.MapID == 10040 && activityline == PlayerDatas.Instance.baseData.FBID)//逍遥城活动线不允许切换模式
|
| | | //{
|
| | | // SysNotifyMgr.Instance.ShowTip("Map_AtkType");
|
| | | // return;
|
| | | //}
|
| | | //if (PlayerDatas.Instance.baseData.MapID == 10040 && IsBossBool && !fairyGrabBossModel.grabBossHintOpen)//逍遥城boss区域特殊处理(可切换状态)
|
| | | //{
|
| | | // WindowCenter.Instance.Open<CombatModeWin>();
|
| | | // if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
|
| | | // {
|
| | | // WindowCenter.Instance.Close<FunctionForecastWin>();
|
| | | // }
|
| | | // return;
|
| | | //}
|
| | |
|
| | | if (onMainModel.ShieldedArea.Contains(mapID))//Boss争夺战前三只保底只能是和平模式
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (onMainModel.ActivityList.Contains(PlayerDatas.Instance.baseData.MapID) && activityline != PlayerDatas.Instance.baseData.FBID)//再前四章新手地图且不在活动区域
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("Map_AtkType");
|
| | | return;
|
| | | }
|
| | | //if (onMainModel.ActivityList.Contains(PlayerDatas.Instance.baseData.MapID) && activityline != PlayerDatas.Instance.baseData.FBID)//再前四章新手地图且不在活动区域
|
| | | //{
|
| | | // SysNotifyMgr.Instance.ShowTip("Map_AtkType");
|
| | | // return;
|
| | | //}
|
| | |
|
| | | WindowCenter.Instance.Open<CombatModeWin>();
|
| | | if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
|
| | |
| | | {
|
| | | ActivityList.Add(Activity_List[i]);
|
| | | }
|
| | | ShieldedArea.Add(10010);
|
| | | ShieldedArea.Add(10020);
|
| | | ShieldedArea.Add(10030);
|
| | | ShieldedArea.Add(10040);
|
| | | //ShieldedArea.Add(10010);
|
| | | //ShieldedArea.Add(10020);
|
| | | //ShieldedArea.Add(10030);
|
| | | //ShieldedArea.Add(10040);
|
| | | string WaHuangHighestFloorStr= FuncConfigConfig.Get("WaHuangHighestFloor").Numerical1;
|
| | | WaHuangHighestFloor = int.Parse(WaHuangHighestFloorStr);
|
| | | ruinsTranscriptMapId = int.Parse(FuncConfigConfig.Get("SpRewardMapID").Numerical1);//娲皇地图ID
|
| | |
| | | {
|
| | | int _id = 0;
|
| | | int.TryParse(href.mSplits["getway"], out _id);
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(_id, 0, true);
|
| | | if (!WindowCenter.Instance.IsOpen<GetWaysWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<GetWaysWin>();
|
| | | }
|
| | | EquipTipUtility.Show(_id);
|
| | | }
|
| | | break;
|
| | | case RichTextEventEnum.AuctionBidding:
|
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using Snxxz.UI;
|
| | |
| | | private int mount_ID = 0;//用来标记坐骑的ID
|
| | | MountModel m_MountModel;
|
| | | MountModel mountModel { get { return m_MountModel ?? (m_MountModel = ModelCenter.Instance.GetModel<MountModel>()); } }
|
| | | GetItemPathModel _GetItemPath;
|
| | | GetItemPathModel GetItemPath { get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); } }
|
| | |
|
| | | PackModel _playerPack;
|
| | | PackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); } }
|
| | |
| | | {
|
| | | FuncConfigConfig _tagfun = FuncConfigConfig.Get("HorseUpItem");
|
| | | ItemConfig _tagchine = ItemConfig.Get(int.Parse(_tagfun.Numerical1));
|
| | | GetItemPath.SetChinItemModel(_tagchine.ID);
|
| | | EquipTipUtility.Show(_tagchine.ID);
|
| | | }
|
| | |
|
| | | private void OnClickNotUnlockButton()
|
| | | {
|
| | | HorseConfig _Horse = HorseConfig.Get(pitchOnHorseID);
|
| | | ItemConfig _item = ItemConfig.Get(_Horse.UnlockItemID);
|
| | | GetItemPath.SetPetMatUnlockModel(_item.ID);
|
| | | var _Horse = HorseConfig.Get(pitchOnHorseID);
|
| | | var _item = ItemConfig.Get(_Horse.UnlockItemID);
|
| | |
|
| | | EquipTipUtility.Show(_item.ID);
|
| | | }
|
| | |
|
| | | public void PanelAssignment(int mountID)
|
| | | {
|
| | | SetSkillimage();
|
| | |
| | |
|
| | | #region Built-in
|
| | |
|
| | | GetItemPathModel _GetItemPath;
|
| | | GetItemPathModel GetItemPath { get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); } }
|
| | | PackModel _playerPack;
|
| | | PackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); } }
|
| | | MountModel m_MountModel;
|
| | |
| | | ItemConfig _tagchine = ItemConfig.Get(int.Parse(_tagfun.Numerical1));
|
| | | if (!WindowCenter.Instance.IsOpen<RidingAndPetActivationWin>())
|
| | | {
|
| | | GetItemPath.SetChinItemModel(_tagchine.ID);
|
| | | EquipTipUtility.Show(_tagchine.ID);
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | private bool CheckGuideCondition(int _guideId)
|
| | | {
|
| | | var config = GuideConfig.Get(_guideId);
|
| | | if (config == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | if (config.PreGuideId != 0 && !completeGuidesBuf.Contains(config.PreGuideId))
|
| | | {
|
| | |
| | | { |
| | | m_WayCells[i].gameObject.SetActive(true); |
| | | var _way = _array[_index]; |
| | | GetItemWaysConfig _cfg = GetItemWaysConfig.Get(_way); |
| | | m_WayCells[i].icon.SetSprite(_cfg.Icon); |
| | | m_WayCells[i].wayName.text = _cfg.Text; |
| | | m_WayCells[i].funcName.text = _cfg.name; |
| | | m_WayCells[i].wayButton.RemoveAllListeners(); |
| | | m_WayCells[i].wayButton.AddListener(() => { |
| | | ClickWayCell(_cfg); |
| | | }); |
| | | m_WayCells[i].Display(_way); |
| | | } |
| | | else |
| | | { |
| | | m_WayCells[i].gameObject.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void ClickWayCell(GetItemWaysConfig cfg) |
| | | { |
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)cfg.OpenpanelId); |
| | | } |
| | | } |
| | | } |
| | |
| | | private float timePlay = 0;//灵宠动作播放时间
|
| | | PetModel m_petModel;
|
| | | PetModel petmodel { get { return m_petModel ?? (m_petModel = ModelCenter.Instance.GetModel<PetModel>()); } }
|
| | | GetItemPathModel pathModel { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
|
| | | PackModel _playerPack;
|
| | | PackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); } }
|
| | | RidingAndPetActivationModel ridingModel { get { return ModelCenter.Instance.GetModel<RidingAndPetActivationModel>(); } }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(petmodel.petUpgradeToolId);
|
| | | EquipTipUtility.Show(petmodel.petUpgradeToolId);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | int haveCnt = playerPack.GetItemCountByID(PackType.Item, petmodel.petUpgradeToolId);
|
| | | if (haveCnt < costNum)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(petmodel.petUpgradeToolId);
|
| | | EquipTipUtility.Show(petmodel.petUpgradeToolId);
|
| | | return;
|
| | | }
|
| | | isAutoTrain = !isAutoTrain;
|
| | |
| | | FragmentBtn.RemoveAllListeners();
|
| | | FragmentBtn.AddListener(() =>
|
| | | {
|
| | | pathModel.SetPetMatUnlockModel(_item.ID);
|
| | | EquipTipUtility.Show(_item.ID);
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | [SerializeField] PetAttributeMethods _PetAttributeMethods;
|
| | | [SerializeField] GameObject m_PetTrainBtnObj;
|
| | | List<PetInfoConfig> sortlist = new List<PetInfoConfig>();//灵兽顺序排列
|
| | | GetItemPathModel _GetItemPath;
|
| | | GetItemPathModel GetItemPath { get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); } }
|
| | | PetModel m_petModel;
|
| | | PetModel petmodel { get { return m_petModel ?? (m_petModel = ModelCenter.Instance.GetModel<PetModel>()); } }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public static void StoveUpgrade(int stoveLv)
|
| | | {
|
| | | activateType = ActivateFunc.Stove;
|
| | | propertyCompares.Clear();
|
| | | currentPropertyDict.Clear();
|
| | | lastPropertyDict.Clear();
|
| | | skills.Clear();
|
| | | beforeLv = stoveLv - 1;
|
| | | currentLv = stoveLv;
|
| | |
|
| | | var model = ModelCenter.Instance.GetModel<BlastFurnaceModel>();
|
| | | for(int i = 0; i < model.alchemyModellist.Count; i++)
|
| | | {
|
| | | //if(stoveLv == model.alchemyModellist[i].BlastFurnaceLV)
|
| | | //{
|
| | | // skills.Add(model.alchemyModellist[i].AlchemyID);
|
| | | //}
|
| | | }
|
| | |
|
| | | var _beforeConfig = RefineStoveConfig.Get(beforeLv);
|
| | | List<int> _beforeProperties = new List<int>();
|
| | | if (_beforeConfig != null)
|
| | | {
|
| | | _beforeProperties.AddRange(_beforeConfig.AttrID);
|
| | | for (int i = 0; i < _beforeConfig.AttrID.Length; i++)
|
| | | {
|
| | | lastPropertyDict.Add(_beforeConfig.AttrID[i], _beforeConfig.AttrValue[i]);
|
| | | }
|
| | | }
|
| | | var config = RefineStoveConfig.Get(stoveLv);
|
| | | for (int i = 0; i < config.AttrID.Length; i++)
|
| | | {
|
| | | var _index = _beforeProperties.IndexOf(config.AttrID[i]);
|
| | | if (_index == -1 || config.AttrValue[i] > _beforeConfig.AttrValue[_index])
|
| | | {
|
| | | propertyCompares.Add(new PropertyCompare()
|
| | | {
|
| | | key = config.AttrID[i],
|
| | | beforeValue = _index == -1 ? 0 : _beforeConfig.AttrValue[_index],
|
| | | currentValue = config.AttrValue[i]
|
| | | });
|
| | | }
|
| | |
|
| | | currentPropertyDict.Add(config.AttrID[i], config.AttrValue[i]);
|
| | | }
|
| | | fightPower = UIHelper.GetFightPower(currentPropertyDict) - UIHelper.GetFightPower(lastPropertyDict);
|
| | | titleIconKey = "XT_LD_01";
|
| | |
|
| | | if (!WindowCenter.Instance.IsOpen<StoveUpgradWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<StoveUpgradWin>();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public static void JadeDynastySkillUnlock(int skillId)
|
| | | {
|
| | | activateType = ActivateFunc.JadeDynastySkill;
|
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | |
| | | break;
|
| | | case 3:
|
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(config.NeedGood);
|
| | | EquipTipUtility.Show(config.NeedGood);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | m_Container.gameObject.SetActive(active);
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | var count = packModel.GetItemCountByID(PackType.Item, itemId);
|
| | | if (count < 1)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(itemId);
|
| | | EquipTipUtility.Show(itemId);
|
| | | return;
|
| | | }
|
| | | CA555_tagCMGodWeaponPlus pak = new CA555_tagCMGodWeaponPlus();
|
| | |
| | |
|
| | | [SerializeField, Header("滑动条时间")] float m_SliderDelay = 0.1f;
|
| | |
|
| | | MagicianModel model
|
| | | {
|
| | | MagicianModel model {
|
| | | get { return ModelCenter.Instance.GetModel<MagicianModel>(); }
|
| | | }
|
| | |
|
| | | PackModel packModel
|
| | | {
|
| | | PackModel packModel {
|
| | | get { return ModelCenter.Instance.GetModel<PackModel>(); }
|
| | | }
|
| | |
|
| | |
| | | bool lockItemUpdate = false;
|
| | | AutoHammerState m_LastAutoHammerState = AutoHammerState.None;
|
| | | AutoHammerState m_AutoHammerState = AutoHammerState.None;
|
| | | AutoHammerState autoHammerState
|
| | | {
|
| | | AutoHammerState autoHammerState {
|
| | | get { return m_AutoHammerState; }
|
| | | set
|
| | | {
|
| | | set {
|
| | | m_LastAutoHammerState = m_AutoHammerState;
|
| | | m_AutoHammerState = value;
|
| | | switch (m_AutoHammerState)
|
| | |
| | | if (model.selectItemIndex == index && tip)
|
| | | {
|
| | | var items = model.GetLevelUpItemByType(model.selectType);
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(items[model.selectItemIndex]);
|
| | | EquipTipUtility.Show(items[model.selectItemIndex]);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | if (selectItemCount <= 0)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen<GetItemPathWin>())
|
| | | {
|
| | | var items = model.GetLevelUpItemByType(model.selectType);
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(items[model.selectItemIndex]);
|
| | | }
|
| | | var items = model.GetLevelUpItemByType(model.selectType);
|
| | | EquipTipUtility.Show(items[model.selectItemIndex]);
|
| | | return;
|
| | | }
|
| | | }
|
| | |
| | | else
|
| | | {
|
| | | var items = model.GetLevelUpItemByType(model.selectType);
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(items[0]);
|
| | | EquipTipUtility.Show(items[0]);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | |
| | |
|
| | |
|
| | | enum AutoHammerState
|
| | | {
|
| | |
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | RoleModel roleModel { get { return ModelCenter.Instance.GetModel<RoleModel>(); } }
|
| | | GetItemPathModel pathModel { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
|
| | | public const int renameToolId = 953;
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | }
|
| | | if(GetRenameToolNum() < 1)
|
| | | {
|
| | | pathModel.SetChinItemModel(renameToolId);
|
| | | EquipTipUtility.Show(renameToolId);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
|
| | | ItemLogicUtility.Instance.GetBetterEquipEvent += RefreshGetBetterEquipEvent;
|
| | | MountModel.PlayerLoginOKData += PlayerLoginOKData;
|
| | | blastFurnaceModel.blastFurnacePromoteUpdate += BlastFurnacePromoteUpdate;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshInfoEvent;
|
| | | OnBeforePlayerDataInitialize();
|
| | | }
|
| | |
| | | }
|
| | |
|
| | |
|
| | | BlastFurnaceModel blastFurnaceModel { get { return ModelCenter.Instance.GetModel<BlastFurnaceModel>(); } }
|
| | | AlchemyModel alchemyModel { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } }
|
| | |
|
| | | RoleModel roleModel { get { return ModelCenter.Instance.GetModel<RoleModel>(); } }
|
| | |
|
| | |
| | |
|
| | | private void RedpointValueChangeEvent(int _id)
|
| | | {
|
| | | if (_id ==999999 /*strengthengmodel.StrengthRedpoint.id*/ ||
|
| | | if (_id == 999999 /*strengthengmodel.StrengthRedpoint.id*/ ||
|
| | | _id == MainRedDot.RedPoint_MountPackKey ||
|
| | | _id == MainRedDot.Instance.redPonintPetFunc2.id ||
|
| | | _id == MainRedDot.Instance.redPointWashFunc.id ||
|
| | |
| | | _id == methodData.fairyHeartRedpoint.id ||
|
| | | _id == realmModel.levelUpRedpoint.id ||
|
| | | _id == equipGemModel.redpoint.id ||
|
| | | _id == reikiRootModel.redpoint.id)
|
| | | _id == reikiRootModel.redpoint.id ||
|
| | | _id == alchemyModel.alchemyDrugREdpoint3.id)
|
| | | {
|
| | | CheckPromoteDetailEffect();
|
| | | }
|
| | |
| | | case PromoteDetailType.FairyHeart:
|
| | | return ModelCenter.Instance.GetModel<PlayerMethodData>().fairyHeartRedpoint.state == RedPointState.Simple;
|
| | | case PromoteDetailType.BlastFurnace:
|
| | | return blastFurnaceModel.CheckUseDrugLimit();
|
| | | return alchemyModel.alchemyDrugREdpoint3.state == RedPointState.Simple;
|
| | | case PromoteDetailType.max:
|
| | | break;
|
| | | }
|
| | |
| | | [SerializeField] Text gainWayTxt;
|
| | | [SerializeField] Button resourceBtn;
|
| | |
|
| | | GetItemPathModel m_GetItemPathModel;
|
| | | GetItemPathModel getItemPathModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_GetItemPathModel ?? (m_GetItemPathModel = ModelCenter.Instance.GetModel<GetItemPathModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | private static StringBuilder textBuilder = new StringBuilder();
|
| | |
|
| | | public override void Refresh(CellView cell)
|
| | |
| | | }
|
| | | resourceBtn.onClick.AddListener(() =>
|
| | | {
|
| | | getItemPathModel.SetChinItemModel(_tagChinItemModel.ID,0,true);
|
| | | if (!WindowCenter.Instance.IsOpen<GetWaysWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<GetWaysWin>();
|
| | | }
|
| | | EquipTipUtility.Show(_tagChinItemModel.ID);
|
| | | });
|
| | | }
|
| | | gainWayTxt.text = textBuilder.ToString();
|
| | |
| | |
|
| | | private void OnClickRune(int _index)
|
| | | {
|
| | | RuneComposeConfig _cfg = model.GetRuneCompose(model.presentSelectRuneQuality, model.presentSelectComposeRune);
|
| | | var _cfg = model.GetRuneCompose(model.presentSelectRuneQuality, model.presentSelectComposeRune);
|
| | | if (_cfg != null)
|
| | | {
|
| | | var _itemPathModel = ModelCenter.Instance.GetModel<GetItemPathModel>();
|
| | |
|
| | | RuneConfig _runeCfg = RuneConfig.Get(_cfg.NeedItem[_index]);
|
| | | RuneTowerConfig _towerCfg = null;
|
| | | RuneTowerFloorConfig _runeTowerCfg = null;
|
| | | if (_runeCfg.TowerID != 0)
|
| | | {
|
| | | _runeTowerCfg = RuneTowerFloorConfig.Get(_runeCfg.TowerID);
|
| | | _towerCfg = RuneTowerConfig.Get(_runeTowerCfg.TowerId);
|
| | | }
|
| | | RuneItem _rune = null;
|
| | | var _runeCnt = runeModel.TryGetComposeRuneCount(_cfg.NeedItem[_index], out _rune);
|
| | | var propertyDescrition = runeModel.GetRunePropertyDescription(_cfg.NeedItem[_index], _rune != null ? _rune.level : 1);
|
| | | var towerLabel = _runeCfg.TowerID == 0 ? Language.Get("L1062") :
|
| | | Language.Get("RuneItemOrigin", _towerCfg.TowerName, _runeTowerCfg.FloorName);
|
| | | _itemPathModel.SetRuneModel(_cfg.NeedItem[_index], _rune != null ? _rune.level : 1, propertyDescrition, towerLabel);
|
| | | EquipTipUtility.Show(_cfg.NeedItem[_index]);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void OnMagicEssenceBtn()
|
| | | {
|
| | | var _itemPath = ModelCenter.Instance.GetModel<GetItemPathModel>();
|
| | | var _displayId = GeneralDefine.moneyDisplayIds.ContainsKey(14) ? GeneralDefine.moneyDisplayIds[14] : 0;
|
| | | if (_displayId != 0)
|
| | | {
|
| | | _itemPath.SetChinItemModel(_displayId);
|
| | | EquipTipUtility.Show(_displayId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private void ShowRunePath(ItemConfig itemCfg)
|
| | | {
|
| | | var _itemPathModel = ModelCenter.Instance.GetModel<GetItemPathModel>();
|
| | | |
| | | RuneConfig _runeCfg = RuneConfig.Get(itemCfg.ID);
|
| | | RuneTowerConfig _towerCfg = null;
|
| | | RuneTowerFloorConfig _runeTowerCfg = null;
|
| | | if (_runeCfg.TowerID != 0)
|
| | | {
|
| | | _runeTowerCfg = RuneTowerFloorConfig.Get(_runeCfg.TowerID);
|
| | | _towerCfg = RuneTowerConfig.Get(_runeTowerCfg.TowerId);
|
| | | }
|
| | | _itemPathModel.SetRuneModel(itemCfg.ID, 1, model.GetRunePropertyDescription(itemCfg.ID, 1),
|
| | | _runeCfg.TowerID == 0 ? Language.Get("L1062") : Language.Get("RuneItemOrigin", _towerCfg.TowerName, _runeTowerCfg.FloorName));
|
| | | EquipTipUtility.Show(itemCfg.ID);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var runeModel = ModelCenter.Instance.GetModel<RuneModel>();
|
| | | var propertyValue = runeModel.GetRunePropertyDescription(runeId, 1);
|
| | |
|
| | | var model = ModelCenter.Instance.GetModel<GetItemPathModel>();
|
| | | model.SetRuneModel(runeId, 1, propertyValue, Language.Get("RuneItemOrigin", runeTowerConfig.TowerName, towerFloorConfig.FloorName));
|
| | | EquipTipUtility.Show(runeId,TipType.Normal);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | if (model.TryGetPotential(selectPotentialId, out potential))
|
| | | {
|
| | | var upConfig = potential.GetSkillConfig(potential.level + 1);
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(upConfig.ExAttr4);
|
| | | EquipTipUtility.Show(upConfig.ExAttr4);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | private void ClickGetPathBtn()
|
| | | {
|
| | | int itemId = GeneralDefine.moneyDisplayIds[15];
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(itemId);
|
| | | EquipTipUtility.Show(itemId);
|
| | | }
|
| | | private void CloseWin()
|
| | | {
|
| | |
| | | |
| | | #endregion |
| | | |
| | | GetItemPathModel _itemPathModel; |
| | | GetItemPathModel itemPathModel |
| | | { |
| | | get { return _itemPathModel ?? (_itemPathModel = ModelCenter.Instance.GetModel<GetItemPathModel>()); } |
| | | } |
| | | |
| | | private void Awake() |
| | | { |
| | | InitUI(); |
| | |
| | | |
| | | private void ClickAddOfflinePlugin() |
| | | { |
| | | itemPathModel.SetChinItemModel(952); |
| | | EquipTipUtility.Show(952); |
| | | } |
| | | |
| | | } |
| | |
| | | itemIcon.SetSprite(itemConfig.IconKey);
|
| | | iconBtn.AddListener(() =>
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(itemConfig.ID);
|
| | | EquipTipUtility.Show(itemConfig.ID);
|
| | | });
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if(itemConfig.GetWay != null && itemConfig.GetWay.Length > 0)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(ConfirmCancel.generalItemId);
|
| | | EquipTipUtility.Show(ConfirmCancel.generalItemId);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | //WindowCenter.Instance.Open<EquipReinforceWin>(false, 1);
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.BlastFurnace:
|
| | | WindowCenter.Instance.Open<AlchemyBaseWin>(false, 0);
|
| | | WindowCenter.Instance.Open<AlchemyBaseWin>(false, 2);
|
| | | break;
|
| | | }
|
| | | CloseClick();
|
| | |
| | | [SerializeField] Button m_ItemPath; |
| | | |
| | | int itemId = 0; |
| | | GetItemPathModel getItemPath { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } } |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | |
| | | public void Display(int _itemId, int _need) |
| | |
| | | |
| | | private void ShowItemPath() |
| | | { |
| | | getItemPath.SetChinItemModel(itemId); |
| | | EquipTipUtility.Show(itemId); |
| | | } |
| | | |
| | | } |
| | |
| | |
|
| | | [SerializeField] Button m_GotoStove;
|
| | |
|
| | | BlastFurnaceModel blastFurnaceModel { get { return ModelCenter.Instance.GetModel<BlastFurnaceModel>(); } }
|
| | | AlchemyModel alchemyModel { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } }
|
| | |
|
| | | AchievementModel achievementModel
|
| | | {
|
| | |
| | | m_ContainerFurnace.gameObject.SetActive(treasure.state == TreasureState.Collected && treasure.level >= 2);
|
| | | if (treasure.state == TreasureState.Collected && treasure.level >= 2)
|
| | | {
|
| | | var stoveLevel = blastFurnaceModel.StoveLV;
|
| | | var stoveLevel = alchemyModel.stoveLevel;
|
| | | m_FurnaceLv.text = Language.Get("BlastFurnace101", stoveLevel);
|
| | | var configNow = RefineStoveConfig.Get(stoveLevel);
|
| | | var min = Mathf.Min(m_CurrentPropertyNames.Length, m_CurrentPropertyValues.Length);
|
| | | for (int i = 0; i < min; i++)
|
| | | {
|
| | | if (i < configNow.AttrID.Length)
|
| | | {
|
| | | m_CurrentPropertyNames[i].gameObject.SetActive(true);
|
| | | m_CurrentPropertyValues[i].gameObject.SetActive(true);
|
| | |
|
| | | var propertyId = configNow.AttrID[i];
|
| | | var propertyConfig = PlayerPropertyConfig.Get(propertyId);
|
| | | m_CurrentPropertyNames[i].text = propertyConfig.Name;
|
| | | m_CurrentPropertyValues[i].text = StringUtility.Contact("+", configNow.AttrValue[i]);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_CurrentPropertyNames[i].gameObject.SetActive(false);
|
| | | m_CurrentPropertyValues[i].gameObject.SetActive(false);
|
| | | }
|
| | | m_CurrentPropertyNames[i].gameObject.SetActive(false);
|
| | | m_CurrentPropertyValues[i].gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | var configNext = RefineStoveConfig.Get(stoveLevel + 1);
|
| | | var isMax = configNext==null;
|
| | | m_NextProperty.gameObject.SetActive(!isMax);
|
| | | m_MaxLevelContainer.gameObject.SetActive(isMax);
|
| | | m_NextProperty.gameObject.SetActive(false);
|
| | | m_MaxLevelContainer.gameObject.SetActive(false);
|
| | |
|
| | | if (!isMax)
|
| | | {
|
| | | var min1 = Mathf.Min(m_NextPropertyNames.Length, m_NextPropertyValues.Length);
|
| | | for (int i = 0; i < min1; i++)
|
| | | {
|
| | | if (i < configNext.AttrID.Length)
|
| | | {
|
| | | m_NextPropertyNames[i].gameObject.SetActive(true);
|
| | | m_NextPropertyValues[i].gameObject.SetActive(true);
|
| | |
|
| | | var propertyId = configNext.AttrID[i];
|
| | | var propertyConfig = PlayerPropertyConfig.Get(propertyId);
|
| | | m_NextPropertyNames[i].text = propertyConfig.Name;
|
| | | m_NextPropertyValues[i].text = StringUtility.Contact("+", configNext.AttrValue[i]);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_NextPropertyNames[i].gameObject.SetActive(false);
|
| | | m_NextPropertyValues[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | var isMax = !RefineStoveConfig.Has(stoveLevel + 1);
|
| | | var stoveConfig = RefineStoveConfig.Get(stoveLevel);
|
| | |
|
| | | m_StoveSlider.minValue = 0;
|
| | | if (blastFurnaceModel.GetBlastFurnaceUpgradExp() <= 0)
|
| | | m_StoveSlider.maxValue = 1;
|
| | |
|
| | | if (isMax)
|
| | | {
|
| | | m_StoveSlider.maxValue = 1;
|
| | | m_StoveSlider.value = 1;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_StoveSlider.maxValue = blastFurnaceModel.GetBlastFurnaceUpgradExp();
|
| | | m_StoveSlider.value = blastFurnaceModel.StoveExp;
|
| | | m_StoveSlider.value = Mathf.Clamp01((float)alchemyModel.stoveExp / stoveConfig.Exp);
|
| | | }
|
| | |
|
| | | if (!blastFurnaceModel.IsReachMaxStoveLv())
|
| | | if (!isMax)
|
| | | {
|
| | | m_Progress.text = blastFurnaceModel.StoveExp + "/" + blastFurnaceModel.GetBlastFurnaceUpgradExp();
|
| | | m_Progress.text = StringUtility.Contact(alchemyModel.stoveExp, "/", stoveConfig.Exp);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | [SerializeField] Image m_SkillIcon;
|
| | | [SerializeField] Text m_SkillName;
|
| | | [SerializeField] Text m_SkillDescription;
|
| | | [SerializeField] Transform m_ContainerCollect;
|
| | | [SerializeField] Button m_Challenge;
|
| | | [SerializeField] Button m_Goto;
|
| | | [SerializeField] Slider m_TaskSlider;
|
| | | [SerializeField] Text m_TaskProgress;
|
| | | [SerializeField] Transform m_ContainerCollected;
|
| | | [SerializeField] Transform m_ContainerUnknown;
|
| | |
|
| | | [SerializeField] ScrollerController m_TaskController;
|
| | |
|
| | |
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Challenge.AddListener(Challenge);
|
| | | m_Goto.AddListener(GotoTask);
|
| | | m_Preview.SetListener(Preview);
|
| | |
|
| | | m_TaskController.OnRefreshCell += OnRefreshCell;
|
| | |
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(model.selectedTreasure, out treasure))
|
| | | {
|
| | | m_ContainerCollect.gameObject.SetActive(treasure.state == TreasureState.Collecting);
|
| | | m_ContainerCollected.gameObject.SetActive(treasure.state == TreasureState.Collected);
|
| | | m_ContainerUnknown.gameObject.SetActive(treasure.state == TreasureState.Locked);
|
| | | var satisfyChallenge = model.SatisfyChallenge(model.selectedTreasure);
|
| | |
|
| | | if (treasure.state == TreasureState.Collecting)
|
| | | m_Challenge.gameObject.SetActive(satisfyChallenge);
|
| | |
|
| | | var progress = 1f;
|
| | |
|
| | | Dictionary<int, List<int>> clues;
|
| | | if (model.TryGetTreasureClues(model.selectedTreasure, out clues))
|
| | | {
|
| | | var satisfyChallenge = model.SatisfyChallenge(model.selectedTreasure);
|
| | |
|
| | | //m_Goto.gameObject.SetActive(!satisfyChallenge);
|
| | | m_Challenge.gameObject.SetActive(satisfyChallenge);
|
| | |
|
| | | var progress = 1f;
|
| | |
|
| | | Dictionary<int, List<int>> clues;
|
| | | if (model.TryGetTreasureClues(model.selectedTreasure, out clues))
|
| | | {
|
| | | var count = model.GetCompleteTaskCount(model.selectedTreasure);
|
| | | m_TaskProgress.text = StringUtility.Contact(count, "/", clues.Count);
|
| | | progress = Mathf.Clamp01((float)count / clues.Count);
|
| | | }
|
| | |
|
| | | m_TaskSlider.value = progress;
|
| | | var count = model.GetCompleteTaskCount(model.selectedTreasure);
|
| | | progress = Mathf.Clamp01((float)count / clues.Count);
|
| | | m_TaskProgress.text = StringUtility.Contact((int)(progress * 100), "%");
|
| | | }
|
| | |
|
| | | m_TaskSlider.value = progress;
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayTasks()
|
| | | {
|
| | | var inductionTaskId = 0;
|
| | | model.TryGetInductionTask(model.selectedTreasure, out inductionTaskId);
|
| | |
|
| | | var inductionState = model.GetTreasureInductionState(model.selectedTreasure);
|
| | |
|
| | | m_TaskController.Refresh();
|
| | | Dictionary<int, List<int>> clues;
|
| | | if (model.TryGetTreasureClues(model.selectedTreasure, out clues))
|
| | | {
|
| | | foreach (var clue in clues.Keys)
|
| | | {
|
| | | m_TaskController.AddCell(ScrollerDataType.Header, clue);
|
| | | var display = false;
|
| | | var tasks = clues[clue];
|
| | | switch (inductionState)
|
| | | {
|
| | | case -1:
|
| | | case 0:
|
| | | display = inductionTaskId > tasks[tasks.Count - 1];
|
| | | break;
|
| | | case 1:
|
| | | display = true;
|
| | | break;
|
| | | }
|
| | | if (display)
|
| | | {
|
| | | m_TaskController.AddCell(ScrollerDataType.Header, clue);
|
| | | }
|
| | | }
|
| | | if (inductionState == 0)
|
| | | {
|
| | | m_TaskController.AddCell(ScrollerDataType.Normal, inductionTaskId);
|
| | | }
|
| | | }
|
| | | m_TaskController.Restart();
|
| | |
| | | ModelCenter.Instance.GetModel<DungeonModel>().SingleChallenge(TreasureModel.TREASURE_DATAMAPID, config.LineId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void GotoTask()
|
| | | {
|
| | | WindowJumpMgr.Instance.ClearJumpData();
|
| | | WindowCenter.Instance.Close<TreasureBaseWin>();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | var taskId = taskModel.GetLatestMainTaskId();
|
| | | taskModel.TaskMove(taskId);
|
| | | }
|
| | |
|
| | | private bool AllowSelectTreasure(int treasureId)
|
| | |
| | | {
|
| | | if (NewBieCenter.Instance.inGuiding
|
| | | || WindowCenter.Instance.IsOpen<TreasureSoulActiveWin>()
|
| | | || WindowCenter.Instance.IsOpen<GetItemPathWin>()
|
| | | || WindowCenter.Instance.IsOpen<DemonTreasurePropertyWin>()
|
| | | || WindowCenter.Instance.IsOpen<ItemTipWin>())
|
| | | {
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, April 22, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | |
|
| | | public class TreasureChapterWin : Window
|
| | | {
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
copy from System/BlastFurnace/MakerDrugFailWin.cs.meta
copy to System/Treasure/TreasureChapterWin.cs.meta
| File was copied from System/BlastFurnace/MakerDrugFailWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 92ef078487b28784cadd931e3421d852 |
| | | timeCreated: 1510366702 |
| | | guid: 304645f98d99db741a3e0b93d94ba390 |
| | | timeCreated: 1555934905 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | Dictionary<TreasureCategory, int> treasureUnlockShowDict = new Dictionary<TreasureCategory, int>();
|
| | | Dictionary<int, int> treasureTaskCompletedCounts = new Dictionary<int, int>();
|
| | | Dictionary<int, int> treasureSignInPropertys = new Dictionary<int, int>();
|
| | | Dictionary<int, int> treasureInductionTasks = new Dictionary<int, int>();
|
| | | List<int> eightFurnacesAchievements = new List<int>();
|
| | | List<int> treasureUnOpens = new List<int>();
|
| | |
|
| | |
| | | public int exitRecord { get; set; }
|
| | | public int entranceOpenCondition { get; private set; }
|
| | |
|
| | | public int treasureChapterId { get; private set; }
|
| | |
|
| | | TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
|
| | |
|
| | | VIPKillNPCTreasure m_VIPKillNPCTreasure;
|
| | |
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | exitRecord = 0;
|
| | | treasureChapterId = 0;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | treasureTasks.Add(config.FabaoID, tasks);
|
| | | }
|
| | | tasks.Add(config.TaskID);
|
| | |
|
| | | if (config.induction == 1)
|
| | | {
|
| | | treasureInductionTasks.Add(config.FabaoID, config.TaskID);
|
| | | }
|
| | | }
|
| | |
|
| | | funcConfig = FuncConfigConfig.Get("MWSignDayAttr");
|
| | |
| | | demonDungeonChallengeNext();
|
| | | }
|
| | | }
|
| | |
|
| | | public void ReceivePackage(H0827_tagMissionDesc vNetData)
|
| | | {
|
| | | if (isServerReady)
|
| | | {
|
| | | if (vNetData.MissionState == 3)
|
| | | {
|
| | | TryShowTreasureChapter((int)vNetData.MissionID);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TryGetInductionTask(int id, out int taskId)
|
| | | {
|
| | | return treasureInductionTasks.TryGetValue(id, out taskId);
|
| | | }
|
| | |
|
| | | public int GetTreasureInductionState(int treasurId)
|
| | | {
|
| | | if (treasures[treasurId].state == TreasureState.Collected)
|
| | | {
|
| | | return 1;
|
| | | }
|
| | | var latestTask = taskModel.GetLatestMainTaskId();
|
| | | if (treasureInductionTasks.ContainsKey(treasurId))
|
| | | {
|
| | | var inductionTask = treasureInductionTasks[treasurId];
|
| | | return latestTask.CompareTo(inductionTask);
|
| | | }
|
| | | return 1;
|
| | | }
|
| | |
|
| | | void TryShowTreasureChapter(int taskId)
|
| | | {
|
| | | var configs = TreasureChapterConfig.GetValues();
|
| | | foreach (var config in configs)
|
| | | {
|
| | | if (config.taskId == taskId)
|
| | | {
|
| | | treasureChapterId = config.id;
|
| | | //PopupWindowsProcessor.Instance.Add()
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | TreasureFindHostModel hostModel { get { return ModelCenter.Instance.GetModel<TreasureFindHostModel>(); } }
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | GetItemPathModel pathModel { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
|
| | |
|
| | | int progress = 0;
|
| | | int findId = 0;
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | pathModel.SetChinItemModel(adviceIdlist[0]);
|
| | | EquipTipUtility.Show(adviceIdlist[0]);
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | RegisterModel<FairyModel>();
|
| | | RegisterModel<SkillModel>();
|
| | | RegisterModel<StoreModel>();
|
| | | RegisterModel<GetItemPathModel>();
|
| | | RegisterModel<TreasureModel>();
|
| | | RegisterModel<DailyQuestModel>();
|
| | | RegisterModel<FairyLeagueModel>();
|
| | |
| | | RegisterModel<DungeonLiquidModel>();
|
| | | RegisterModel<FindPreciousModel>();
|
| | | RegisterModel<VipModel>();
|
| | | RegisterModel<BlastFurnaceModel>();
|
| | | RegisterModel<SignInModel>();
|
| | | RegisterModel<TitleModel>();
|
| | | RegisterModel<KingFairyModel>();
|
| | |
| | | RegisterModel<DogzModel>();
|
| | | RegisterModel<FairyGrabBossModel>();
|
| | | RegisterModel<GodBeastModel>();
|
| | | RegisterModel<PrayForDurgModel>();
|
| | | RegisterModel<FeatureNoticeModel>();
|
| | | RegisterModel<AwardExchangeModel>();
|
| | | RegisterModel<WheelOfFortuneModel>();
|
| | |
| | | case JumpUIType.MakeDrug:
|
| | | if (ItemOperateUtility.Instance.useItemModel != null)
|
| | | {
|
| | | RoleElixirTipWin.makeUseId = ItemOperateUtility.Instance.useItemModel.itemId;
|
| | | //RoleElixirTipWin.makeUseId = ItemOperateUtility.Instance.useItemModel.itemId;
|
| | | }
|
| | | SetJumpLogic<AlchemyBaseWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | |
| | | break;
|
| | | case JumpUIType.Alchemyrescripte104:
|
| | | case JumpUIType.Alchemyrescripte105:
|
| | | ModelCenter.Instance.GetModel<BlastFurnaceModel>().jumpToPrescripe = int.Parse(_tagWinSearchModel.SelectActive);
|
| | | SetJumpLogic<AlchemyBaseWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.AttackMagicianType1:
|
| | |
| | | SetJumpLogic<FirstRechargeWin>(_tagWinSearchModel.TABID, true);
|
| | | break;
|
| | | case JumpUIType.PrayforDrug:
|
| | | SetJumpLogic<PrayforDrugWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.JadeDynastyTower288:
|
| | | SetJumpLogic<TowerWin>(_tagWinSearchModel.TABID);
|
| | |
| | | }
|
| | | break;
|
| | | case JumpUIType.PrayforDrug:
|
| | | var prayModel = ModelCenter.Instance.GetModel<PrayForDurgModel>();
|
| | | if (!prayModel.CheckPrayDrugIsOpen())
|
| | | {
|
| | | return false;
|
| | | }
|
| | | break;
|
| | | return false;
|
| | | case JumpUIType.FaBaoSoul_BenYuan:
|
| | | case JumpUIType.FaBaoSoul_FengMo:
|
| | | case JumpUIType.FaBaoSoul_Strength:
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void RequestQueryMapLineState(int _mapId, int _lineId = 0, bool _isAllLine = true)
|
| | | public void RequestQueryMapLineState(int _mapId, byte[] _lineIds = null, bool _isAllLine = true)
|
| | | {
|
| | | var config = MapConfig.Get(_mapId);
|
| | | if (config.MapFBType == (int)MapType.OpenCountry)
|
| | |
| | | {
|
| | | var lineState = new CA004_tagCGGetFBLinePlayerCnt();
|
| | | lineState.MapID = (uint)_mapId;
|
| | | lineState.IsAllLine = (byte)(_isAllLine ? 1 : 0);
|
| | | lineState.LineCount = (byte)(_isAllLine ? 0 : _lineIds.Length);
|
| | | if (_isAllLine)
|
| | | {
|
| | | lineState.FBLineID = (byte)_lineId;
|
| | | lineState.LineIDList = new byte[0];
|
| | | }
|
| | | GameNetSystem.Instance.SendInfo(lineState);
|
| | | }
|
| | |
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | break;
|
| | | case ItemType.Use:
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(itemId);
|
| | | EquipTipUtility.Show(itemId);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | normalTasks.Add(new ConfigInitTask("MapNpcRefreshConfig", () => { MapNpcRefreshConfig.Init(); }, () => { return MapNpcRefreshConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DungeonUseBuffConfig", () => { DungeonUseBuffConfig.Init(); }, () => { return DungeonUseBuffConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("AlchemyCountConfig", () => { AlchemyCountConfig.Init(); }, () => { return AlchemyCountConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("CollectNpcConfig", () => { CollectNpcConfig.Init(); }, () => { return CollectNpcConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("CollectNpcConfig", () => { CollectNpcConfig.Init(); }, () => { return CollectNpcConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("TreasureChapterConfig", () => { TreasureChapterConfig.Init(); }, () => { return TreasureChapterConfig.inited; })); |
| | | } |
| | | |
| | | static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>(); |