Merge branch 'master' into ClientPreciousDungeon
| | |
| | |
|
| | | switch (Application.platform)
|
| | | {
|
| | | case RuntimePlatform.WindowsEditor:
|
| | | tasks.Enqueue(getVersionInfoTask);
|
| | | break;
|
| | | case RuntimePlatform.Android:
|
| | | if (Application.isEditor)
|
| | | {
|
| | | tasks.Enqueue(getVersionInfoTask);
|
| | | }
|
| | | else
|
| | | {
|
| | | tasks.Enqueue(assetCopyTask);
|
| | | tasks.Enqueue(assetDecompressTask);
|
| | | }
|
| | | tasks.Enqueue(assetCopyTask);
|
| | | tasks.Enqueue(assetDecompressTask);
|
| | | break;
|
| | | case RuntimePlatform.IPhonePlayer:
|
| | | tasks.Enqueue(getVersionInfoTask);
|
| | | if (!Application.isEditor)
|
| | | {
|
| | | tasks.Enqueue(assetCopyTask);
|
| | | }
|
| | | tasks.Enqueue(assetCopyTask);
|
| | | break;
|
| | | case RuntimePlatform.WindowsPlayer:
|
| | | if (!Application.isEditor)
|
| | | {
|
| | | tasks.Enqueue(assetCopyTask);
|
| | | }
|
| | | tasks.Enqueue(assetCopyTask);
|
| | | tasks.Enqueue(getVersionInfoTask);
|
| | | break;
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: Fish
|
| | | // [ Date ]: Wednesday, May 15, 2019
|
| | | // [ Date ]: Friday, May 17, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | |
| | | public readonly int Type;
|
| | | public readonly int TriggerType;
|
| | | public readonly int Condition;
|
| | | public readonly int SupplementCondition;
|
| | | public readonly int PreGuideId;
|
| | | public readonly int[] Steps;
|
| | | public readonly int CanSkip;
|
| | | public readonly int RemoveWhenOtherGuide;
|
| | | public readonly int CannotCompleteByClick;
|
| | | public readonly int[] UnfoldAreas;
|
| | | public readonly int AutoCompleteTime;
|
| | |
|
| | | public GuideConfig()
|
| | | {
|
| | |
| | |
|
| | | int.TryParse(tables[3],out Condition);
|
| | |
|
| | | int.TryParse(tables[4],out PreGuideId); |
| | | int.TryParse(tables[4],out SupplementCondition); |
| | |
|
| | | string[] StepsStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | int.TryParse(tables[5],out PreGuideId); |
| | |
|
| | | string[] StepsStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Steps = new int[StepsStringArray.Length]; |
| | | for (int i=0;i<StepsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(StepsStringArray[i],out Steps[i]); |
| | | }
|
| | |
|
| | | int.TryParse(tables[6],out CanSkip); |
| | | int.TryParse(tables[7],out CanSkip); |
| | |
|
| | | int.TryParse(tables[7],out RemoveWhenOtherGuide); |
| | | int.TryParse(tables[8],out RemoveWhenOtherGuide); |
| | |
|
| | | int.TryParse(tables[8],out CannotCompleteByClick); |
| | | int.TryParse(tables[9],out CannotCompleteByClick); |
| | |
|
| | | string[] UnfoldAreasStringArray = tables[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | UnfoldAreas = new int[UnfoldAreasStringArray.Length]; |
| | | for (int i=0;i<UnfoldAreasStringArray.Length;i++) |
| | | { |
| | | int.TryParse(UnfoldAreasStringArray[i],out UnfoldAreas[i]); |
| | | }
|
| | |
|
| | | int.TryParse(tables[11],out AutoCompleteTime); |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: b8fc091fd0fa850459269b011b63ab49 |
| | | timeCreated: 1557892240 |
| | | timeCreated: 1558080698 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | public readonly string items;
|
| | | public readonly string sideTasks;
|
| | | public readonly string reikiRoot;
|
| | | public readonly int[] succGuide;
|
| | | public readonly int succGuide;
|
| | | public readonly int jump;
|
| | | public readonly int[] failFuncs;
|
| | | public readonly string failFuncs;
|
| | | public readonly string[] remind; |
| | | |
| | | public TaskFeedbackConfig() |
| | |
| | |
|
| | | reikiRoot = tables[6];
|
| | |
|
| | | string[] succGuideStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | succGuide = new int[succGuideStringArray.Length]; |
| | | for (int i=0;i<succGuideStringArray.Length;i++) |
| | | { |
| | | int.TryParse(succGuideStringArray[i],out succGuide[i]); |
| | | }
|
| | | int.TryParse(tables[7],out succGuide); |
| | |
|
| | | int.TryParse(tables[8],out jump);
|
| | |
|
| | | string[] failFuncsStringArray = tables[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | failFuncs = new int[failFuncsStringArray.Length]; |
| | | for (int i=0;i<failFuncsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(failFuncsStringArray[i],out failFuncs[i]); |
| | | }
|
| | | failFuncs = tables[9];
|
| | |
|
| | | remind = tables[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | } |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b80a883f246077d46ab59d6938182ec9 |
| | | timeCreated: 1558059182 |
| | | timeCreated: 1558075313 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: Fish
|
| | | // [ Date ]: Wednesday, May 15, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public partial class TreasureDungeonConfig
|
| | | {
|
| | |
|
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Friday, May 17, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class TreasureDungeonConfig |
| | | { |
| | | |
| | | public readonly int ID;
|
| | | public readonly int MWID;
|
| | | public readonly int LineID;
|
| | |
| | | public readonly int fightPower;
|
| | | public readonly string icon;
|
| | | public readonly string bossName;
|
| | |
|
| | | public TreasureDungeonConfig()
|
| | | {
|
| | | }
|
| | |
|
| | | public TreasureDungeonConfig(string input)
|
| | | {
|
| | | try
|
| | | {
|
| | | var tables = input.Split('\t');
|
| | |
|
| | | public readonly int defense; |
| | | |
| | | public TreasureDungeonConfig() |
| | | { |
| | | } |
| | | |
| | | public TreasureDungeonConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out ID);
|
| | |
|
| | | int.TryParse(tables[1],out MWID);
|
| | |
| | | icon = tables[6];
|
| | |
|
| | | bossName = tables[7];
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | | }
|
| | |
|
| | | static Dictionary<string, TreasureDungeonConfig> configs = new Dictionary<string, TreasureDungeonConfig>();
|
| | | public static TreasureDungeonConfig Get(string id)
|
| | | { |
| | | if (!inited)
|
| | | {
|
| | | Debug.Log("TreasureDungeonConfig 还未完成初始化。");
|
| | | return null;
|
| | | }
|
| | | |
| | | if (configs.ContainsKey(id))
|
| | | {
|
| | | return configs[id];
|
| | | }
|
| | |
|
| | | TreasureDungeonConfig config = null;
|
| | | if (rawDatas.ContainsKey(id))
|
| | | {
|
| | | config = configs[id] = new TreasureDungeonConfig(rawDatas[id]);
|
| | | rawDatas.Remove(id);
|
| | | }
|
| | |
|
| | | return config;
|
| | | }
|
| | |
|
| | | public static TreasureDungeonConfig 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<TreasureDungeonConfig> GetValues()
|
| | | {
|
| | | var values = new List<TreasureDungeonConfig>();
|
| | | 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 +"/TreasureDungeon.txt";
|
| | | }
|
| | | else
|
| | | {
|
| | | path = AssetVersionUtility.GetAssetFilePath("config/TreasureDungeon.txt");
|
| | | }
|
| | |
|
| | | configs.Clear();
|
| | | var tempConfig = new TreasureDungeonConfig();
|
| | | 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 TreasureDungeonConfig(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 TreasureDungeonConfig(line);
|
| | | configs[id] = config;
|
| | | (config as IConfigPostProcess).OnConfigParseCompleted();
|
| | | }
|
| | | else
|
| | | {
|
| | | rawDatas[id] = line;
|
| | | }
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | | Debug.LogError(ex);
|
| | | }
|
| | | }
|
| | |
|
| | | inited = true;
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | int.TryParse(tables[8],out defense); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, TreasureDungeonConfig> configs = new Dictionary<string, TreasureDungeonConfig>(); |
| | | public static TreasureDungeonConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("TreasureDungeonConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | TreasureDungeonConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new TreasureDungeonConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static TreasureDungeonConfig 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<TreasureDungeonConfig> GetValues() |
| | | { |
| | | var values = new List<TreasureDungeonConfig>(); |
| | | 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 +"/TreasureDungeon.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/TreasureDungeon.txt"); |
| | | } |
| | | |
| | | var tempConfig = new TreasureDungeonConfig(); |
| | | 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 TreasureDungeonConfig(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 TreasureDungeonConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 03f67cc7383990b4da0f2e2d600e3ea5 |
| | | timeCreated: 1557892448 |
| | | timeCreated: 1558084867 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "QuestCanAccept", GuideTriggerType.QuestCanAccept); |
| | | |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "QuestCanDo", GuideTriggerType.QuestCanDo); |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "QuestCanDo", GuideTriggerType.MainLineQuestCanDo); |
| | | |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "QuestCanAward", GuideTriggerType.QuestCanAward); |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "QuestCanAward", GuideTriggerType.MainLineQuestCanAward); |
| | | |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "QuestLimit", GuideTriggerType.QuestLimit); |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "QuestLimit", GuideTriggerType.MainLineQuestLimit); |
| | | |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "QuestContinue", GuideTriggerType.QuestContinue); |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "QuestContinue", GuideTriggerType.MainLineQuestContinue); |
| | | |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BranchQuestCando", GuideTriggerType.BranchQuestCando); |
| | | |
| | |
| | | } |
| | | else if (LuaAPI.xlua_is_eq_str(L, 1, "QuestCanDo")) |
| | | { |
| | | translator.PushGuideTriggerType(L, GuideTriggerType.QuestCanDo); |
| | | translator.PushGuideTriggerType(L, GuideTriggerType.MainLineQuestCanDo); |
| | | } |
| | | else if (LuaAPI.xlua_is_eq_str(L, 1, "QuestCanAward")) |
| | | { |
| | | translator.PushGuideTriggerType(L, GuideTriggerType.QuestCanAward); |
| | | translator.PushGuideTriggerType(L, GuideTriggerType.MainLineQuestCanAward); |
| | | } |
| | | else if (LuaAPI.xlua_is_eq_str(L, 1, "QuestLimit")) |
| | | { |
| | | translator.PushGuideTriggerType(L, GuideTriggerType.QuestLimit); |
| | | translator.PushGuideTriggerType(L, GuideTriggerType.MainLineQuestLimit); |
| | | } |
| | | else if (LuaAPI.xlua_is_eq_str(L, 1, "QuestContinue")) |
| | | { |
| | | translator.PushGuideTriggerType(L, GuideTriggerType.QuestContinue); |
| | | translator.PushGuideTriggerType(L, GuideTriggerType.MainLineQuestContinue); |
| | | } |
| | | else if (LuaAPI.xlua_is_eq_str(L, 1, "BranchQuestCando")) |
| | | { |
| | |
| | | Do("global.object"); |
| | | Do("global.define"); |
| | | Do("global.stringutil"); |
| | | Do("protocol.LuaProtocalRegister"); |
| | | Do("protocol.manager.LuaProtocalRegister"); |
| | | |
| | | #if !UNITY_EDITOR |
| | | Do("hotfix.hotfix"); |
| | |
| | |
|
| | | public bool isServerPrepare { get; private set; }
|
| | |
|
| | | Clock m_AlchemingClock = null;
|
| | |
|
| | | public event Action selectQualityRefresh;
|
| | | public event Action selectAlchemyRefresh;
|
| | | public event Action alchemyStateRefresh;
|
| | |
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
|
| | | packModel.refreshItemCountEvent += RefreshItemCountEvent;
|
| | | GlobalTimeEvent.Instance.secondEvent += PerSecond;
|
| | |
|
| | | ParseConfig();
|
| | | }
|
| | |
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
|
| | | packModel.refreshItemCountEvent -= RefreshItemCountEvent;
|
| | | GlobalTimeEvent.Instance.secondEvent -= PerSecond;
|
| | | }
|
| | |
|
| | | private void RefreshItemCountEvent(PackType packType, int arg2, int itemId)
|
| | |
| | | return m_AlchemyDrugUseLimits.TryGetValue(id, out drugUseLimit);
|
| | | }
|
| | |
|
| | | public bool TryLearn(int alchmeyId, out int error)
|
| | | {
|
| | | error = 0;
|
| | | var config = AlchemyConfig.Get(alchmeyId);
|
| | | if (stoveLevel < config.LearnNeedAlchemLV)
|
| | | {
|
| | | error = 2;
|
| | | return false;
|
| | | }
|
| | | if (PlayerDatas.Instance.extersion.luckValue < config.LearnNeedLuck)
|
| | | {
|
| | | error = 3;
|
| | | return false;
|
| | | }
|
| | | var count = packModel.GetItemCountByID(PackType.Item, config.LearnNeedItemID);
|
| | | if (count <= 0)
|
| | | {
|
| | | error = 1;
|
| | | return false;
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | public bool TryGetAlchemyByStudyMaterial(int id, out int alchemyId)
|
| | | {
|
| | | alchemyId = 0;
|
| | | var configs = AlchemyConfig.GetValues();
|
| | | foreach (var config in configs)
|
| | | {
|
| | | if (config.LearnNeedItemID == id)
|
| | | {
|
| | | alchemyId = config.ID;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public int GetAlchemyRedpointId(int id)
|
| | | {
|
| | | return alchemyRedpoints.ContainsKey(id) ? alchemyRedpoints[id].redpoint.id : 0;
|
| | |
| | |
|
| | | 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);
|
| | | }
|
| | |
|
| | | var lastLevel = stoveLevel;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void PerSecond()
|
| | | {
|
| | | if (isServerPrepare)
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var requireCheckRedpoint = false;
|
| | |
|
| | | Int2 position;
|
| | | if (IsStoveAlcheming(AlchemyType.Normal, out position)
|
| | | && GetStoveState(position.y) == 2
|
| | | && alchemyRedpoints.ContainsKey(position.y)
|
| | | && alchemyRedpoints[position.y].endRedpoint.state != RedPointState.Simple)
|
| | | {
|
| | | requireCheckRedpoint = true;
|
| | | }
|
| | |
|
| | | if (IsStoveAlcheming(AlchemyType.Fairy, out position)
|
| | | && GetStoveState(position.y) == 2
|
| | | && alchemyRedpoints.ContainsKey(position.y)
|
| | | && alchemyRedpoints[position.y].endRedpoint.state != RedPointState.Simple)
|
| | | {
|
| | | requireCheckRedpoint = true;
|
| | | }
|
| | |
|
| | | if (requireCheckRedpoint)
|
| | | {
|
| | | CheckRedpoint();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | static List<int> s_Endables = new List<int>();
|
| | | static List<int> s_Studyables = new List<int>();
|
| | | static List<int> s_Alchemyables = new List<int>();
|
| | |
| | | void DisplayFuncState()
|
| | | {
|
| | | var error = 0;
|
| | | var satisfyLearn = TryLearn(out error);
|
| | | var satisfyLearn = model.TryLearn(model.selectAlchemy, out error);
|
| | | m_Func.SetColorful(m_FuncLabel, satisfyLearn);
|
| | | }
|
| | |
|
| | | private void Learn()
|
| | | {
|
| | | var error = 0;
|
| | | if (TryLearn(out error))
|
| | | if (model.TryLearn(model.selectAlchemy, out error))
|
| | | {
|
| | | var pak = new CA576_tagCMPlayerRefine();
|
| | | pak.AlchemyID = (uint)model.selectAlchemy;
|
| | |
| | | {
|
| | | DisplayErrorTip(error);
|
| | | }
|
| | | }
|
| | |
|
| | | bool TryLearn(out int error)
|
| | | {
|
| | | error = 0;
|
| | | var config = AlchemyConfig.Get(model.selectAlchemy);
|
| | | if (model.stoveLevel < config.LearnNeedAlchemLV)
|
| | | {
|
| | | error = 2;
|
| | | return false;
|
| | | }
|
| | | if (PlayerDatas.Instance.extersion.luckValue < config.LearnNeedLuck)
|
| | | {
|
| | | error = 3;
|
| | | return false;
|
| | | }
|
| | | var count = packModel.GetItemCountByID(PackType.Item, config.LearnNeedItemID);
|
| | | if (count <= 0)
|
| | | {
|
| | | error = 1;
|
| | | return false;
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | void DisplayErrorTip(int error)
|
| | |
| | | {
|
| | | if (isServerPrepare)
|
| | | {
|
| | | RecommandAlchemyStudyItems();
|
| | | RecommandAlchemyDrugs();
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void RecommandAlchemyStudyItems()
|
| | | {
|
| | | var items = playerPack.GetItems(PackType.Item, new SinglePack.FilterParams()
|
| | | {
|
| | | itemTypes = new List<int>() { 55 },
|
| | | });
|
| | | if (items != null)
|
| | | {
|
| | | foreach (var item in items)
|
| | | {
|
| | | ItemLogicUtility.Instance.RecommendItem(item);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void Trim()
|
| | | {
|
| | | for (int i = itemGuids.Count - 1; i >= 0; i--)
|
| | |
| | | _animNodde.Play(GAStaticDefine.State_IdleHash);
|
| | | }
|
| | | }
|
| | | LayerUtility.SetLayer(sfxController.gameObject, LayerUtility.BossShow, true);
|
| | | }
|
| | | }
|
| | | RequestCircleShadow();
|
| | |
| | | |
| | | public class CreateRoleMovieSkipWin : Window |
| | | { |
| | | [SerializeField] RectTransform m_SkipContainer; |
| | | [SerializeField] Button m_Skip; |
| | | |
| | | #region Built-in |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | m_SkipContainer.gameObject.SetActive(false); |
| | | Clock.AlarmAfter(5, () => { m_SkipContainer.gameObject.SetActive(true); }); |
| | | m_Skip.gameObject.SetActive(false); |
| | | Clock.AlarmAfter(5, () => { m_Skip.gameObject.SetActive(true); }); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | |
| | | {
|
| | | var parentDirectory = Directory.GetParent(Application.persistentDataPath);
|
| | | debugAccount = File.Exists(parentDirectory + "/Debug");
|
| | | }
|
| | |
|
| | | if (debugAccount)
|
| | | if (debugAccount)
|
| | | {
|
| | | var parentDirectory = Directory.GetParent(Application.persistentDataPath);
|
| | | var content = File.ReadAllText(parentDirectory + "/Debug");
|
| | | if (!string.IsNullOrEmpty(content))
|
| | | {
|
| | | var content = File.ReadAllText(parentDirectory + "/Debug");
|
| | | if (!string.IsNullOrEmpty(content))
|
| | | {
|
| | | var json = JsonMapper.ToObject<DebugBranch>(File.ReadAllText(parentDirectory + "/Debug"));
|
| | | debugBranch = json.branch;
|
| | | }
|
| | | var json = JsonMapper.ToObject<DebugBranch>(File.ReadAllText(parentDirectory + "/Debug"));
|
| | | debugBranch = json.branch;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | var hero = PlayerDatas.Instance.hero;
|
| | | hero.Pos = playerBornPosition;
|
| | | if (hero.Behaviour != null)
|
| | | {
|
| | | hero.Behaviour.StartHandupAI();
|
| | | }
|
| | | CameraController.Instance.Apply();
|
| | | }
|
| | |
|
| | |
| | | using UnityEngine;
|
| | | public class ClientHazyGrassStage : DungeonStage
|
| | | {
|
| | | static readonly Vector3 PlayerBornPosition1 = new Vector3(17.25f, 5.12f, 3.70f);
|
| | | static readonly Vector3 PlayerBornPosition2 = new Vector3(17.25f, 5.12f, 3.70f);
|
| | | static readonly Vector3 PlayerBornPosition1 = new Vector3(19.401f, 4.985f, 5.494f);
|
| | |
|
| | | static List<HazyMapNpcScriptableObject.NpcInfo> s_NpcInfos = new List<HazyMapNpcScriptableObject.NpcInfo>();
|
| | | static Dictionary<Vector3, GA_NpcClientCollect> s_CollectNpcs = new Dictionary<Vector3, GA_NpcClientCollect>();
|
| | |
| | | void InitialPlayer()
|
| | | {
|
| | | var hero = PlayerDatas.Instance.hero;
|
| | | if (incidentType == HazyRegionIncidentType.ReikiGrass)
|
| | | {
|
| | | hero.Pos = PlayerBornPosition1;
|
| | | }
|
| | | else if (incidentType == HazyRegionIncidentType.FairyGrass)
|
| | | {
|
| | | hero.Pos = PlayerBornPosition2;
|
| | | }
|
| | | hero.Pos = PlayerBornPosition1;
|
| | | hero.Rotation = Quaternion.Euler(0, -9.537001f, 0);
|
| | | CameraController.Instance.Apply();
|
| | | }
|
| | |
|
| | |
| | | MagicianModel magicianModel { get { return ModelCenter.Instance.GetModel<MagicianModel>(); } } |
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | AlchemyModel alchemyModel { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } } |
| | | |
| | | public void Init() |
| | | { |
| | |
| | | { |
| | | return false; |
| | | } |
| | | break;
|
| | | case 55: |
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace))
|
| | | {
|
| | | return false;
|
| | | } |
| | | var alchemyId = 0; |
| | | if (alchemyModel.TryGetAlchemyByStudyMaterial(item.itemId, out alchemyId))
|
| | | {
|
| | | var alchemyConfig = AlchemyConfig.Get(alchemyId);
|
| | | Int2 position;
|
| | | if (alchemyModel.IsStoveAlcheming((AlchemyType)alchemyConfig.AlchemType, out position))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | if (alchemyModel.IsGraspRecipe(alchemyId))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | var studyError = 0;
|
| | | if (!alchemyModel.TryLearn(alchemyId, out studyError))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | } |
| | | break; |
| | | case 127: |
| | | var error = 0; |
| | |
| | | case 83: |
| | | var fashionModel = ModelCenter.Instance.GetModel<FashionDressModel>(); |
| | | fashionModel.jumpFashionDress = useItemModel.config.EffectValueA1; |
| | | break; |
| | | break;
|
| | | case 55: |
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace))
|
| | | {
|
| | | FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.BlastFurnace);
|
| | | return;
|
| | | } |
| | | var alchemyId = 0; |
| | | if (alchemyModel.TryGetAlchemyByStudyMaterial(useItemModel.itemId, out alchemyId))
|
| | | {
|
| | | var alchemyConfig = AlchemyConfig.Get(alchemyId);
|
| | | Int2 position;
|
| | | if (alchemyModel.IsStoveAlcheming((AlchemyType)alchemyConfig.AlchemType, out position))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("AlchemyStudyJumpError_1");
|
| | | return;
|
| | | }
|
| | | if (alchemyModel.IsGraspRecipe(alchemyId))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("AlchemyStudyJumpError_2");
|
| | | return;
|
| | | }
|
| | | alchemyModel.jumpAlchemy = alchemyId;
|
| | | WindowJumpMgr.Instance.WindowJumpTo((AlchemyType)alchemyConfig.AlchemType == AlchemyType.Normal ? |
| | | JumpUIType.AlchemyNormal : JumpUIType.AlchemyFairy); |
| | | }
|
| | | return; |
| | | } |
| | | |
| | | switch (useItemModel.config.ID) |
| | |
| | | [SerializeField] MainButtonMisc m_MainButtonMisc;
|
| | |
|
| | | #region
|
| | | private bool TaskSwithBool = true;
|
| | | private float ExpValueFloat = 0;
|
| | | private bool SliderOpen = true;
|
| | |
|
| | |
| | | protected override void BindController()
|
| | | {
|
| | | m_MapSwitchingBehaviour.InitAwake();
|
| | | m_MainPositionTween.ShowTaskImmedidately(true,true);
|
| | | m_MainPositionTween.ShowTaskImmedidately(true, true);
|
| | | m_MailObj.SetActive(true);
|
| | | ListBossMapId.Clear();
|
| | | string strBoss = FuncConfigConfig.Get("TaskRetract").Numerical1;
|
| | |
| | | CheckChatTipOpen();
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += Updatefighting;
|
| | | FunctionUnlockFlyObject.functionUnLockShowBeginEvent += UnFlodFunctionArea;
|
| | | FunctionalGuideCenter.Instance.beginGuideEvent += OnBeginFunctionalGuide;
|
| | | GA_Hero.OnEnterOrExitArea += OnEnterOrExitArea;
|
| | | NewBieCenter.Instance.guideBeginEvent += OnGuideBegin;
|
| | | WindowCenter.Instance.windowAfterOpenEvent += WindowAfterEvent;
|
| | |
| | |
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= Updatefighting;
|
| | | FunctionUnlockFlyObject.functionUnLockShowBeginEvent -= UnFlodFunctionArea;
|
| | | FunctionalGuideCenter.Instance.beginGuideEvent -= OnBeginFunctionalGuide;
|
| | | GA_Hero.OnEnterOrExitArea -= OnEnterOrExitArea;
|
| | | NewBieCenter.Instance.guideBeginEvent -= OnGuideBegin;
|
| | | WindowCenter.Instance.windowAfterOpenEvent -= WindowAfterEvent;
|
| | |
| | |
|
| | | private void UnFlodFunctionArea(bool _unflod, int _skillGroup)
|
| | | {
|
| | | if (_unflod)
|
| | | if (NewBieCenter.Instance.IsAreaNeedUnflod(1))
|
| | | {
|
| | | m_MainPositionTween.ShowTaskImmedidately(true,true);
|
| | | m_MainPositionTween.ShowTaskImmedidately(true, true);
|
| | | }
|
| | |
|
| | | if (NewBieCenter.Instance.IsAreaNeedUnflod(2))
|
| | | {
|
| | | m_MainPositionTween.SwitchFunctions(new MainPositionTween.SwitchParam() { showDefault = true, immediately = false });
|
| | | m_HighSettingFadeInFadeOut.SwitchImmedidately(true);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnBeginFunctionalGuide(int guideId)
|
| | | {
|
| | | if (FunctionalGuideCenter.Instance.IsAreaNeedUnflod(1))
|
| | | {
|
| | | m_MainPositionTween.ShowTaskImmedidately(true, true);
|
| | | }
|
| | |
|
| | | if (FunctionalGuideCenter.Instance.IsAreaNeedUnflod(2))
|
| | | {
|
| | | m_MainPositionTween.SwitchFunctions(new MainPositionTween.SwitchParam() { showDefault = true, immediately = false });
|
| | | m_HighSettingFadeInFadeOut.SwitchImmedidately(true);
|
| | | }
|
| | |
| | |
|
| | | void LateUpdate()
|
| | | {
|
| | | if (resetToDefaultTimer > 0f)
|
| | | var alwayShow = NewBieCenter.Instance.IsAreaNeedUnflod(2) || FunctionalGuideCenter.Instance.IsAreaNeedUnflod(2);
|
| | | if (!alwayShow)
|
| | | {
|
| | | resetToDefaultTimer -= Time.deltaTime;
|
| | | if (resetToDefaultTimer <= 0f)
|
| | | if (resetToDefaultTimer > 0f)
|
| | | {
|
| | | SwitchFunctions(new SwitchParam() { showDefault = true, immediately = false });
|
| | | resetToDefaultTimer -= Time.deltaTime;
|
| | | if (resetToDefaultTimer <= 0f)
|
| | | {
|
| | | SwitchFunctions(new SwitchParam() { showDefault = true, immediately = false });
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | ReikiRootModel reikiRootModel { get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
|
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
| | | break;
|
| | | }
|
| | |
|
| | | if (!string.IsNullOrEmpty(config.failFuncs))
|
| | | {
|
| | | var funcArray = LitJson.JsonMapper.ToObject<int[][]>(config.failFuncs);
|
| | | if (funcArray != null)
|
| | | {
|
| | | List<int[]> failFuncs = new List<int[]>(funcArray.Length);
|
| | | for (int i = 0; i < funcArray.Length; i++)
|
| | | {
|
| | | failFuncs.Add(funcArray[i]);
|
| | | }
|
| | | feedback.failFuns = failFuncs;
|
| | | }
|
| | | }
|
| | |
|
| | | m_TaskFeedbacks.Add(config.taskId, feedback);
|
| | | }
|
| | | }
|
| | |
| | | switch (feedback.type)
|
| | | {
|
| | | case TaskFeedbackType.FightPower:
|
| | | case TaskFeedbackType.Copper:
|
| | | case TaskFeedbackType.ReikiPoint:
|
| | | case TaskFeedbackType.Guide:
|
| | | case TaskFeedbackType.Equip:
|
| | | case TaskFeedbackType.ItemCount:
|
| | | case TaskFeedbackType.SkyTowerFightPoint:
|
| | | case TaskFeedbackType.DemonTreasure:
|
| | | {
|
| | | int condition = 0;
|
| | | if (IsSatisfyCondition(feedback, out condition))
|
| | | {
|
| | | var guide = config.succGuide != null
|
| | | && config.succGuide.Length > 0 ? config.succGuide[0] : 0;
|
| | | if (config.jump != 0 && (guide == 0 || NewBieCenter.Instance.IsGuideCompleted(guide)))
|
| | | var guide = config.succGuide;
|
| | | if (guide != 0 && !NewBieCenter.Instance.IsGuideCompleted(guide))
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.jump);
|
| | | ExecuteGuide(guide);
|
| | | }
|
| | | else
|
| | | {
|
| | | ExecuteGuide(guide);
|
| | | if (config.jump != 0)
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.jump);
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | var index = Mathf.Min(condition, config.remind.Length - 1);
|
| | | SysNotifyMgr.Instance.ShowTip(config.remind[index]);
|
| | | }
|
| | | if (config.failFuncs != null && config.failFuncs.Length > 0)
|
| | | if (feedback.failFuns != null)
|
| | | {
|
| | | var index = Mathf.Min(condition, feedback.failFuns.Count - 1);
|
| | | taskFeedbackFuncs.Clear();
|
| | | taskFeedbackFuncs.AddRange(config.failFuncs);
|
| | | taskFeedbackFuncs.AddRange(feedback.failFuns[index]);
|
| | | WindowCenter.Instance.Open<TaskFeedbackFuncWin>();
|
| | | }
|
| | | }
|
| | |
| | | int condition = 0;
|
| | | if (IsSatisfyCondition(feedback, out condition))
|
| | | {
|
| | | var guide = config.succGuide != null
|
| | | && config.succGuide.Length > 0 ? config.succGuide[0] : 0;
|
| | | if (config.jump != 0 && (guide == 0 || NewBieCenter.Instance.IsGuideCompleted(guide)))
|
| | | var guide = config.succGuide;
|
| | | if (guide != 0 && !NewBieCenter.Instance.IsGuideCompleted(guide))
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.jump);
|
| | | ExecuteGuide(guide);
|
| | | }
|
| | | else
|
| | | {
|
| | | ExecuteGuide(guide);
|
| | | if (config.jump != 0)
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.jump);
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | var index = Mathf.Min(taskIndex, config.remind.Length - 1);
|
| | | SysNotifyMgr.Instance.ShowTip(config.remind[index]);
|
| | | }
|
| | | if (config.failFuncs != null && config.failFuncs.Length > 0)
|
| | | if (feedback.failFuns != null)
|
| | | {
|
| | | var index = Mathf.Min(condition, feedback.failFuns.Count - 1);
|
| | | taskFeedbackFuncs.Clear();
|
| | | taskFeedbackFuncs.AddRange(config.failFuncs);
|
| | | taskFeedbackFuncs.AddRange(feedback.failFuns[index]);
|
| | | WindowCenter.Instance.Open<TaskFeedbackFuncWin>();
|
| | | }
|
| | | }
|
| | |
| | | int condition = 0;
|
| | | if (IsSatisfyCondition(feedback, out condition))
|
| | | {
|
| | | var guide = config.succGuide != null
|
| | | && config.succGuide.Length > 0 ? config.succGuide[0] : 0;
|
| | | if (config.jump != 0 && (guide == 0 || NewBieCenter.Instance.IsGuideCompleted(guide)))
|
| | | var guide = config.succGuide;
|
| | | if (guide != 0 && !NewBieCenter.Instance.IsGuideCompleted(guide))
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.jump);
|
| | | ExecuteGuide(guide);
|
| | | }
|
| | | else
|
| | | {
|
| | | ExecuteGuide(guide);
|
| | | if (config.jump != 0)
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.jump);
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | var index = Mathf.Min(taskIndex, config.remind.Length - 1);
|
| | | SysNotifyMgr.Instance.ShowTip(config.remind[index]);
|
| | | }
|
| | | if (config.failFuncs != null && config.failFuncs.Length > 0)
|
| | | if (feedback.failFuns != null)
|
| | | {
|
| | | var index = Mathf.Min(condition, feedback.failFuns.Count - 1);
|
| | | taskFeedbackFuncs.Clear();
|
| | | taskFeedbackFuncs.AddRange(config.failFuncs);
|
| | | taskFeedbackFuncs.AddRange(feedback.failFuns[index]);
|
| | | WindowCenter.Instance.Open<TaskFeedbackFuncWin>();
|
| | | }
|
| | | }
|
| | |
| | | return IsSatisfySideTask(feedback.sideTasks, out condition);
|
| | | case TaskFeedbackType.ReikiPoint:
|
| | | {
|
| | | if (reikiRootModel.GetReikiRootTotalPointWithFree() < config.condition)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | if (feedback.reikiRoots != null)
|
| | | {
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | return reikiRootModel.GetReikiRootTotalPoint() >= config.condition;
|
| | | return true;
|
| | | case TaskFeedbackType.Equip:
|
| | | {
|
| | | var items = packModel.GetItems(PackType.Item, new SinglePack.FilterParams()
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case TaskFeedbackType.DemonTreasure:
|
| | | {
|
| | | TreasureDungeon treasureDungeon;
|
| | | if (treasureModel.TryGetTreasureDungeon(config.condition, out treasureDungeon))
|
| | | {
|
| | | var dungeonInfo = treasureDungeon.Get(treasureDungeon.currentLevel + 1);
|
| | | if (!dungeonInfo.Equals(default(TreasureDungeonInfo)))
|
| | | {
|
| | | return UIHelper.GetPropertyValue(PropertyType.DEF) >= dungeonInfo.defense;
|
| | | }
|
| | | return true;
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
| | | public int[] equipCondition;
|
| | | public List<Item> items;
|
| | | public Dictionary<int, List<int[]>> reikiRoots;
|
| | | public List<int[]> failFuns;
|
| | |
|
| | | public int IndexOfSideTasks(int taskId)
|
| | | {
|
| | |
| | | FightPowerSideTask = 7,
|
| | | ItemCount = 8,
|
| | | SkyTowerFightPoint = 9,
|
| | | DemonTreasure = 10,
|
| | | }
|
| | | } |
| | | |
| | |
| | | |
| | | public static event Action<int> CompletionOfTaskEvent;//任务完成回调 |
| | | |
| | | public event Action<int> taskDescriptionRefresh; |
| | | |
| | | public static event Action TaskCoinTaskEvent;//赏金任务信息字典变更 |
| | | public static event Action FairyTaskEvent;//仙盟任务信息字典变更 |
| | | |
| | |
| | | if (allMissionDict.ContainsKey(MissionID)) |
| | | { |
| | | int missionState = allMissionDict[MissionID].MissionState; |
| | | var lastDescriptionIndex = allMissionDict[MissionID].descIndex; |
| | | |
| | | if (allMissionDict[MissionID].MissionState != MissionState && MissionState == 3 && AutomaticityBool) |
| | | { |
| | | TaskOverBool = true; |
| | |
| | | } |
| | | } |
| | | |
| | | if (lastDescriptionIndex != DiscriptionIndex)
|
| | | {
|
| | | if (taskDescriptionRefresh != null)
|
| | | {
|
| | | taskDescriptionRefresh(MissionID);
|
| | | }
|
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | AddMission(MissionID, MissionState, DiscriptionIndex);//任务的添加 |
| | | AddMission(MissionID, MissionState, DiscriptionIndex);//任务的添加
|
| | | if (taskDescriptionRefresh != null)
|
| | | {
|
| | | taskDescriptionRefresh(MissionID); |
| | | }
|
| | | if (Event_TaskToAdd != null) |
| | | { |
| | | Event_TaskToAdd(MissionID, MissionState, DiscriptionIndex); |
| | |
| | | return taskId; |
| | | } |
| | | |
| | | public bool TryGetTaskData(int _taskId, out MissionDetailDates taskData)
|
| | | {
|
| | | return allMissionDict.TryGetValue(_taskId, out taskData);
|
| | | } |
| | | |
| | | void DefaultDialogue()//关于打开默认对话界面 |
| | | { |
| | | if (NewBieCenter.Instance.inGuiding || ModelCenter.Instance.GetModel<TreasureModel>().newGotShowing) |
| | |
| | | |
| | | private void LateUpdate() |
| | | { |
| | | if (!NewBieCenter.Instance.inGuiding) |
| | | var alwayShow = NewBieCenter.Instance.IsAreaNeedUnflod(2) || FunctionalGuideCenter.Instance.IsAreaNeedUnflod(2); |
| | | if (!alwayShow) |
| | | { |
| | | if (state == State.Opened) |
| | | { |
| | |
| | | Event_MountHA301A((int)info.InfoList[i].HorseID); |
| | | } |
| | | |
| | | |
| | | if (IsOk && (int)info.InfoList[i].HorseID == autoActiveHorseId)
|
| | | {
|
| | | var config = HorseConfig.Get(autoActiveHorseId);
|
| | | if (_horseClass.Lv >= config.UseNeedRank)
|
| | | {
|
| | | AppearanceSwitch(autoActiveHorseId);
|
| | | DTC0428_tagPlayerRideHorse.Send_tagPlayerRideHorse(true);
|
| | | }
|
| | | } |
| | | } |
| | | } |
| | | MountStoneRed(); |
| | |
| | | using System.Collections;
|
| | | using UnityEngine.UI;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | public class FunctionalGuideCenter : Singleton<FunctionalGuideCenter>
|
| | | |
| | | public class FunctionalGuideCenter : Singleton<FunctionalGuideCenter>
|
| | | {
|
| | | public event Action<int> beginGuideEvent;
|
| | | public event Action<int> finishGuideEevent;
|
| | | public event Action<int> removeGuideEvent;
|
| | |
|
| | | List<int> underwayGuides = new List<int>();
|
| | | List<int> allGuides = new List<int>();
|
| | | Dictionary<int, float> guideStartTimes = new Dictionary<int, float>();
|
| | | List<int> unfoldAreas = new List<int>();
|
| | |
|
| | | bool inited = false;
|
| | |
|
| | | TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | | TaskModel taskmodel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
|
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | | AchievementModel achievementModel { get { return ModelCenter.Instance.GetModel<AchievementModel>(); } }
|
| | |
|
| | | LogicUpdate update = new LogicUpdate();
|
| | | public FunctionalGuideCenter()
|
| | | {
|
| | | TaskModel.tryGetTaskAwardEvent += OnTryGetMainLineTaskReward;
|
| | | TaskModel.Event_MainlineTask += OnMainLineTaskUpdate;
|
| | | TaskModel.CardLevelChange += OnMainLineLimitStateChange;
|
| | | TaskModel.CardLevelChange += OnQuestLimitStateChange;
|
| | | TaskModel.SideQuestChangeEvent += OnBranchQuestStateChange;
|
| | | treasureModel.treasureStateChangeEvent += OnTreasureStateChange;
|
| | | taskmodel.taskDescriptionRefresh += OnMainLineDescriptionChange;
|
| | | update.Start(OnUpdate);
|
| | | }
|
| | |
|
| | | public void CheckGuides(int[] _guides)
|
| | | {
|
| | | if (!inited)
|
| | | {
|
| | | var allGuideConfigs = GuideConfig.GetValues();
|
| | | foreach (var config in allGuideConfigs)
|
| | | {
|
| | | if (config.Type == (int)GuideType.Functional)
|
| | | {
|
| | | allGuides.Add(config.ID);
|
| | | }
|
| | | }
|
| | |
|
| | | inited = true;
|
| | | }
|
| | |
|
| | | for (int i = 0; i < _guides.Length; i++)
|
| | | {
|
| | | var guideId = _guides[i];
|
| | |
| | | public void StartGuide(int _id)
|
| | | {
|
| | | RemoveAllUnderWayGuide();
|
| | |
|
| | | underwayGuides.Add(_id);
|
| | |
|
| | | guideStartTimes[_id] = Time.time;
|
| | | UpdateUnfoldAreas();
|
| | | if (beginGuideEvent != null)
|
| | | {
|
| | | beginGuideEvent(_id);
|
| | |
| | | RemoveGuide(guideId);
|
| | | }
|
| | | break;
|
| | | case GuideTriggerType.QuestCanDo:
|
| | | case GuideTriggerType.MainLineQuestCanDo:
|
| | | if (_state > 1)
|
| | | {
|
| | | RemoveGuide(guideId);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnMainLineLimitStateChange(int _taskId)
|
| | | private void OnQuestLimitStateChange(int _taskId)
|
| | | {
|
| | | for (int i = underwayGuides.Count - 1; i >= 0; i--)
|
| | | {
|
| | |
| | |
|
| | | switch ((GuideTriggerType)config.TriggerType)
|
| | | {
|
| | | case GuideTriggerType.QuestLimit:
|
| | | case GuideTriggerType.MainLineQuestLimit:
|
| | | case GuideTriggerType.BranchQuestLimit:
|
| | | if (limitState != TaskModel.TaskStatus.CardLevel || limitState != TaskModel.TaskStatus.TreasureCardLevel)
|
| | | {
|
| | | RemoveGuide(guideId);
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnMainLineDescriptionChange(int taskId)
|
| | | {
|
| | | for (int i = underwayGuides.Count - 1; i >= 0; i--)
|
| | | {
|
| | | var guideId = underwayGuides[i];
|
| | | var config = GuideConfig.Get(guideId);
|
| | |
|
| | | if (config.Condition != taskId)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | switch ((GuideTriggerType)config.TriggerType)
|
| | | {
|
| | | case GuideTriggerType.MainLineQuestCanDo:
|
| | | MissionDetailDates datas;
|
| | | if (taskmodel.TryGetTaskData(config.Condition, out datas))
|
| | | {
|
| | | var descriptionIndex = datas.descIndex;
|
| | | if (descriptionIndex != config.SupplementCondition)
|
| | | {
|
| | | RemoveGuide(guideId);
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | var config = GuideConfig.Get(guideId);
|
| | | switch ((GuideTriggerType)config.TriggerType)
|
| | | {
|
| | | case GuideTriggerType.QuestCanAward:
|
| | | case GuideTriggerType.QuestCanDo:
|
| | | case GuideTriggerType.MainLineQuestCanAward:
|
| | | case GuideTriggerType.MainLineQuestCanDo:
|
| | | case GuideTriggerType.QuestCanAccept:
|
| | | case GuideTriggerType.QuestContinue:
|
| | | case GuideTriggerType.QuestLimit:
|
| | | case GuideTriggerType.MainLineQuestContinue:
|
| | | case GuideTriggerType.MainLineQuestLimit:
|
| | | case GuideTriggerType.BranchQuestLimit:
|
| | | case GuideTriggerType.BranchQuestContinue:
|
| | | RemoveGuide(guideId);
|
| | | break;
|
| | | }
|
| | |
| | | var mainTaskId = taskmodel.currentMission;
|
| | | switch ((GuideTriggerType)config.TriggerType)
|
| | | {
|
| | | case GuideTriggerType.QuestCanDo:
|
| | | return mainTaskId == config.Condition && taskmodel.currentMissionState == 1;
|
| | | case GuideTriggerType.QuestCanAward:
|
| | | case GuideTriggerType.MainLineQuestCanDo:
|
| | | if (config.SupplementCondition == 0)
|
| | | {
|
| | | return mainTaskId == config.Condition && taskmodel.currentMissionState == 1;
|
| | | }
|
| | | else
|
| | | {
|
| | | MissionDetailDates datas;
|
| | | if (taskmodel.TryGetTaskData(config.Condition, out datas))
|
| | | {
|
| | | return mainTaskId == config.Condition && datas.descIndex == config.SupplementCondition;
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | case GuideTriggerType.MainLineQuestCanAward:
|
| | | return mainTaskId == config.Condition && taskmodel.currentMissionState == 2;
|
| | | case GuideTriggerType.QuestLimit:
|
| | | return mainTaskId == config.Condition &&
|
| | | (taskmodel.GetTaskStatus(config.Condition) == TaskModel.TaskStatus.CardLevel || taskmodel.GetTaskStatus(config.Condition) == TaskModel.TaskStatus.TreasureCardLevel);
|
| | | case GuideTriggerType.QuestContinue:
|
| | | case GuideTriggerType.MainLineQuestLimit:
|
| | | case GuideTriggerType.BranchQuestLimit:
|
| | | return taskmodel.GetTaskStatus(config.Condition) == TaskModel.TaskStatus.CardLevel
|
| | | || taskmodel.GetTaskStatus(config.Condition) == TaskModel.TaskStatus.TreasureCardLevel;
|
| | | case GuideTriggerType.MainLineQuestContinue:
|
| | | case GuideTriggerType.BranchQuestContinue:
|
| | | var questState = taskmodel.SideQuestState(config.Condition);
|
| | | var taskStatus = taskmodel.GetTaskStatus(config.Condition);
|
| | | return questState == 1 && (taskStatus == TaskModel.TaskStatus.Normal);
|
| | | case GuideTriggerType.Treasure:
|
| | | if (!model.newGotShowing)
|
| | | if (!treasureModel.newGotShowing)
|
| | | {
|
| | | Treasure treasure1;
|
| | | return model.TryGetTreasure(config.Condition, out treasure1) && treasure1.state == TreasureState.Collected;
|
| | | return treasureModel.TryGetTreasure(config.Condition, out treasure1) && treasure1.state == TreasureState.Collected;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | if (underwayGuides.Contains(_guideId))
|
| | | {
|
| | | underwayGuides.Remove(_guideId);
|
| | | guideStartTimes.Remove(_guideId);
|
| | | UpdateUnfoldAreas();
|
| | | }
|
| | |
|
| | | var send = new CA222_tagCMSetGuideOK();
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsAreaNeedUnflod(int area)
|
| | | {
|
| | | return unfoldAreas.Contains(area);
|
| | | }
|
| | |
|
| | | private void UpdateUnfoldAreas()
|
| | | {
|
| | | unfoldAreas.Clear();
|
| | | foreach (var guid in underwayGuides)
|
| | | {
|
| | | var config = GuideConfig.Get(guid);
|
| | | foreach (var unfoldArea in config.UnfoldAreas)
|
| | | {
|
| | | if (!unfoldAreas.Contains(unfoldArea))
|
| | | {
|
| | | unfoldAreas.Add(unfoldArea);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnUpdate()
|
| | | {
|
| | | for (var i = underwayGuides.Count - 1; i >= 0; i--)
|
| | | {
|
| | | var guideId = underwayGuides[i];
|
| | | var config = GuideConfig.Get(guideId);
|
| | | if (config.AutoCompleteTime != 0)
|
| | | {
|
| | | var startTime = guideStartTimes.ContainsKey(guideId) ? guideStartTimes[guideId] : Time.time;
|
| | | if (Time.time > startTime + config.AutoCompleteTime)
|
| | | {
|
| | | RemoveGuide(guideId);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public struct UnderWayGuide
|
| | | {
|
| | | public int guideId;
|
| | | public float startTime;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | | AchievementModel achievementModel { get { return ModelCenter.Instance.GetModel<AchievementModel>(); } }
|
| | | TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
|
| | |
|
| | | Window m_Parent;
|
| | | Window parent { get { return m_Parent ?? (m_Parent = this.transform.GetComponentInParent<Window>()); } }
|
| | |
| | | FunctionalGuideCenter.Instance.beginGuideEvent += BeginFunctionalGuide;
|
| | | FunctionalGuideCenter.Instance.removeGuideEvent += OnGuideRemove;
|
| | |
|
| | | taskModel.taskDescriptionRefresh += OnMainLineTaskDescriptionIndexUpdate;
|
| | | treasureModel.treasureCollectProgressRefresh += OnTreasureCollectingStateChange;
|
| | | treasureModel.treasureStageUpEvent += OnTreasureStageChange;
|
| | | achievementModel.achievementAwardableEvent += OnAchievementAwardAble;
|
| | |
| | | FunctionalGuideCenter.Instance.beginGuideEvent -= BeginFunctionalGuide;
|
| | | FunctionalGuideCenter.Instance.removeGuideEvent -= OnGuideRemove;
|
| | |
|
| | | taskModel.taskDescriptionRefresh -= OnMainLineTaskDescriptionIndexUpdate;
|
| | | treasureModel.treasureCollectProgressRefresh -= OnTreasureCollectingStateChange;
|
| | | treasureModel.treasureStageUpEvent -= OnTreasureStageChange;
|
| | | achievementModel.achievementAwardableEvent -= OnAchievementAwardAble;
|
| | |
| | | CheckGuide();
|
| | | }
|
| | |
|
| | | private void OnMainLineTaskDescriptionIndexUpdate(int _taskId)
|
| | | {
|
| | | CheckGuide();
|
| | | }
|
| | |
|
| | | private void OnMainLineTaskLimitStateChange(int _taskId)
|
| | | {
|
| | | CheckGuide();
|
| | |
| | |
|
| | | List<int> allGuides = new List<int>();
|
| | | public List<int> completeGuidesBuf = new List<int>();
|
| | | List<int> unfoldAreas = new List<int>();
|
| | |
|
| | | Dictionary<int, Window> triggerWindows = new Dictionary<int, Window>();
|
| | |
|
| | |
| | | BetterEquipGetModel betterItemGetModel { get { return ModelCenter.Instance.GetModel<BetterEquipGetModel>(); } }
|
| | | PreciousItemGetModel preciousItemGetModel { get { return ModelCenter.Instance.GetModel<PreciousItemGetModel>(); } }
|
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | | AchievementModel achievementModel { get { return ModelCenter.Instance.GetModel<AchievementModel>(); } }
|
| | | RuneModel runeModel { get { return ModelCenter.Instance.GetModel<RuneModel>(); } }
|
| | | RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
|
| | | PrayerModel prayerModel { get { return ModelCenter.Instance.GetModel<PrayerModel>(); } }
|
| | | PlayerDeadModel playerDeadModel { get { return ModelCenter.Instance.GetModel<PlayerDeadModel>(); } }
|
| | |
| | | FunctionalGuideCenter.Instance.RemoveAllUnderWayGuide();
|
| | |
|
| | | currentGuide = _id;
|
| | | UpdateUnfoldAreas();
|
| | | if (PlayerDatas.Instance.hero != null)
|
| | | {
|
| | | HeroAIRecorder.Record();
|
| | |
| | | {
|
| | | var guideRecord = currentGuide;
|
| | | currentGuide = 0;
|
| | | WindowCenter.Instance.CloseImmediately("NewBieWin");
|
| | | UpdateUnfoldAreas();
|
| | |
|
| | | WindowCenter.Instance.CloseImmediately("NewBieWin");
|
| | | if (!completeGuidesBuf.Contains(guideRecord))
|
| | | {
|
| | | completeGuidesBuf.Add(guideRecord);
|
| | |
| | | {
|
| | | var guideRecord = currentGuide;
|
| | | currentGuide = 0;
|
| | | UpdateUnfoldAreas();
|
| | | completeGuidesBuf.Add(guideRecord);
|
| | |
|
| | | var send = new CA222_tagCMSetGuideOK();
|
| | |
| | | return false;
|
| | | case GuideTriggerType.QuestCanAccept:
|
| | | return taskmodel.currentMission == config.Condition && taskmodel.currentMissionState == 0;
|
| | | case GuideTriggerType.QuestCanDo:
|
| | | case GuideTriggerType.MainLineQuestCanDo:
|
| | | return taskmodel.currentMission == config.Condition && taskmodel.currentMissionState == 1;
|
| | | case GuideTriggerType.QuestCanAward:
|
| | | case GuideTriggerType.MainLineQuestCanAward:
|
| | | return taskmodel.currentMission == config.Condition && taskmodel.currentMissionState == 2;
|
| | | case GuideTriggerType.QuestLimit:
|
| | | return taskmodel.currentMission == config.Condition &&
|
| | | (taskmodel.GetTaskStatus(config.Condition) == TaskModel.TaskStatus.CardLevel || taskmodel.GetTaskStatus(config.Condition) == TaskModel.TaskStatus.TreasureCardLevel);
|
| | | case GuideTriggerType.QuestContinue:
|
| | | return taskmodel.currentMission == config.Condition && (taskmodel.GetTaskStatus(config.Condition) == TaskModel.TaskStatus.Normal);
|
| | | case GuideTriggerType.MainLineQuestLimit:
|
| | | case GuideTriggerType.BranchQuestLimit:
|
| | | return taskmodel.GetTaskStatus(config.Condition) == TaskModel.TaskStatus.CardLevel
|
| | | || taskmodel.GetTaskStatus(config.Condition) == TaskModel.TaskStatus.TreasureCardLevel;
|
| | | case GuideTriggerType.MainLineQuestContinue:
|
| | | case GuideTriggerType.BranchQuestContinue:
|
| | | return taskmodel.GetTaskStatus(config.Condition) == TaskModel.TaskStatus.Normal;
|
| | | case GuideTriggerType.Map:
|
| | | return PlayerDatas.Instance.baseData.MapID == config.Condition;
|
| | | case GuideTriggerType.RealmSitDown:
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool IsAreaNeedUnflod(int area)
|
| | | {
|
| | | return unfoldAreas.Contains(area);
|
| | | }
|
| | |
|
| | | private void UpdateUnfoldAreas()
|
| | | {
|
| | | unfoldAreas.Clear();
|
| | | if (currentGuide != 0)
|
| | | {
|
| | | var config = GuideConfig.Get(currentGuide);
|
| | | if (config != null)
|
| | | {
|
| | | unfoldAreas.AddRange(config.UnfoldAreas);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | return point;
|
| | | }
|
| | |
|
| | | public int GetReikiRootTotalPointWithFree()
|
| | | {
|
| | | return GetReikiRootTotalPoint() + freePoint;
|
| | | }
|
| | |
|
| | | public List<ReikiRootRecommend> GetReikiRootRecommendPoint(int point)
|
| | | {
|
| | | if (point == 0)
|
| | |
| | |
|
| | | if (reikiRootModel.freePoint >= point)
|
| | | {
|
| | | model.autoActiveSkillId = skillId;
|
| | | reikiRootModel.SendAddPoint(new byte[1] { (byte)requireProperty }, new ushort[1] { (ushort)point });
|
| | | }
|
| | | }
|
| | |
| | | bool m_OpenDetail = false;
|
| | |
|
| | | int m_SelectExpert = 0;
|
| | | int selectExpert
|
| | | public int selectExpert
|
| | | {
|
| | | get { return m_SelectExpert; }
|
| | | set
|
| | |
| | |
|
| | | public bool selectActivePriority { get; set; }
|
| | |
|
| | | public int autoActiveSkillId { get; set; }
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(103, 10304);
|
| | | public const int REDPOINTID_BASE = 10304000;
|
| | | public static int redpointIndex = 100;
|
| | |
| | | m_ExpertSkills.Clear();
|
| | | m_ExpertActiveLevels.Clear();
|
| | | serverInited = false;
|
| | | autoActiveSkillId = 0;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (serverInited)
|
| | | {
|
| | | var error = 0;
|
| | | if (WindowCenter.Instance.IsOpen<ExpertSkillSelectWin>())
|
| | | {
|
| | | var window = WindowCenter.Instance.Get<ExpertSkillSelectWin>();
|
| | | if (window.selectExpert == autoActiveSkillId
|
| | | && SatisfyActiveExpert(autoActiveSkillId, out error))
|
| | | {
|
| | | var pak = new CA516_tagCMSelectSkillElement();
|
| | | pak.SkillTypeID = (uint)autoActiveSkillId;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | autoActiveSkillId = 0;
|
| | | }
|
| | | else if (dataType == PlayerDataType.LV)
|
| | | {
|
| | |
| | |
|
| | | Vector3 originalPosition = Vector3.zero;
|
| | | float originalScale = 2f;
|
| | | float speed = 3f;
|
| | | float speed =4.5f;
|
| | | float durationLimit = 10f;
|
| | | float timer = 0f;
|
| | |
|
| | |
| | | fightPower = config.fightPower,
|
| | | level = config.Level,
|
| | | propertyDict = propertyDict,
|
| | | lineId = config.LineID
|
| | | lineId = config.LineID,
|
| | | defense = config.defense,
|
| | | };
|
| | | dungeonInfos.Add(dungeonInfo);
|
| | |
|
| | |
| | | public int level;
|
| | | public Dictionary<int, int> propertyDict;
|
| | | public int fightPower;
|
| | | public int defense;
|
| | | }
|
| | |
|
| | | public enum TreasureStageUnlock
|
| | |
| | | SetJumpLogic<LootPreciousFrameWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.BlastFurnaceFunc1:
|
| | | case JumpUIType.AlchemyNormal:
|
| | | case JumpUIType.AlchemyFairy:
|
| | | SetJumpLogic<AlchemyBaseWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.MyTeamType1:
|
| | |
| | | RealmEquip1 = 317,
|
| | | Alchemy6 = 318,
|
| | | FullServerAuction = 319,
|
| | | AlchemyNormal = 320,
|
| | | AlchemyFairy = 321,
|
| | |
|
| | | DhszTs = 1001,//定海神针功法提升界面
|
| | | HyqTs = 1002,//皓月枪功法提升界面
|
| | |
| | | ResetCameraColor(_gray);
|
| | | m_CameraColor.saturation = _gray ? 0.08f : 1f;
|
| | |
|
| | | BindGestureCatcher(_rawImage, interactable);
|
| | | if (_npcId == 10104001)
|
| | | {
|
| | | _rawImage.gameObject.SetActive(false);
|
| | | UI3DModelShowSpecialNPC.Display(npcModel);
|
| | | }
|
| | | else
|
| | | {
|
| | | BindGestureCatcher(_rawImage, interactable);
|
| | | }
|
| | | }
|
| | |
|
| | | public void StopShow()
|
| | |
| | | godWeaponEffect = null;
|
| | | }
|
| | |
|
| | | UI3DModelShowSpecialNPC.Dispose();
|
| | | interactable = false;
|
| | | }
|
| | |
|
| | |
| | | rawImage.rectTransform.sizeDelta = new Vector2(x, y);
|
| | | rawImage.texture = m_ShowCamera.targetTexture;
|
| | | rawImage.material = MaterialUtility.GetGUIRenderTextureMaterial();
|
| | | rawImage.gameObject.SetActive(true);
|
| | |
|
| | | if (interable)
|
| | | {
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, May 17, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 这个仅仅是给仙皇残魂用的 |
| | | /// </summary> |
| | | public class UI3DModelShowSpecialNPC : MonoBehaviour |
| | | { |
| | | [SerializeField] Transform m_StandPoint; |
| | | public Transform standPoint { get { return m_StandPoint; } } |
| | | |
| | | static UI3DModelShowSpecialNPC showPlatform; |
| | | |
| | | public static void Display(GameObject model) |
| | | { |
| | | if (showPlatform == null) |
| | | { |
| | | var prefab = BuiltInLoader.LoadPrefab("UI3DModelShowSpecialNPC"); |
| | | var instance = Instantiate(prefab); |
| | | instance.transform.position = new Vector3(1000, 3000, 5000); |
| | | showPlatform = instance.GetComponent<UI3DModelShowSpecialNPC>(); |
| | | showPlatform.gameObject.name = "UI3DModelShowSpecialNPC"; |
| | | } |
| | | |
| | | model.transform.SetParentEx(showPlatform.standPoint, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | } |
| | | |
| | | public static void Dispose() |
| | | { |
| | | if (showPlatform != null) |
| | | { |
| | | DestroyImmediate(showPlatform); |
| | | showPlatform = null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: f7b8d7e81351bcd4d909f10df6a26ee1 |
| | | timeCreated: 1558072373 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | TrialExchange = 22,//宗门试炼兑换材料
|
| | |
|
| | | QuestCanAccept = 100,//任务可接
|
| | | QuestCanDo = 101,//任务可进行
|
| | | QuestCanAward = 102,//任务可领奖
|
| | |
|
| | | QuestLimit = 103,//任务被限制
|
| | | QuestContinue = 104,//任务可继续
|
| | | MainLineQuestCanDo = 101,//任务进行中
|
| | | MainLineQuestCanAward = 102,//任务可领奖
|
| | | MainLineQuestLimit = 106,//任务被限制
|
| | | MainLineQuestContinue = 110,//任务可继续
|
| | |
|
| | | BranchQuestCando = 201,//支线任务可做
|
| | | BranchQuestCanAward = 202,//支线任务可领奖
|
| | | BranchQuestLimit = 206,//支线任务被限制
|
| | | BranchQuestContinue = 210,//支线任务可继续
|
| | | }
|
| | |
|
| | | [XLua.LuaCallCSharp]
|