Merge branch 'master' into 技能升级修改
Conflicts:
Core/GameEngine/DataToCtl/PackageRegedit.cs
1个文件已删除
68个文件已修改
6个文件已添加
4 文件已复制
1 文件已重命名
| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HB108_tagMCYinjiStartTime) ,typeof(DTCB108_tagMCYinjiStartTime));
|
| | | Register(typeof(HA309_tagMCSkillElementInfo), typeof(DTCA309_tagMCSkillElementInfo));
|
| | | Register(typeof(HA325_tagMCNPCAttackCountInfo), typeof(DTCA325_tagMCNPCAttackCountInfo));
|
| | | Register(typeof(HB215_tagMCFBBuyBuffInfo), typeof(DTCB215_tagMCFBBuyBuffInfo));
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: Fish
|
| | | // [ Date ]: Thursday, February 14, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public partial class ActorShowConfig
|
| | | {
|
| | |
|
| | | public readonly int ID;
|
| | | public readonly int NpcID;
|
| | | public readonly int MapID;
|
| | | public readonly int line;
|
| | | public readonly int[] showNpcs;
|
| | | public readonly int length;
|
| | | public readonly int showNameTime;
|
| | | public readonly int BindMissionID;
|
| | | public readonly int type;
|
| | | public readonly int[] scale;
|
| | | public readonly int[] NpcFace;
|
| | | public readonly int[] PosX;
|
| | | public readonly int[] PosY;
|
| | | public readonly int shadow;
|
| | | public readonly int effect;
|
| | | public readonly int uieffect;
|
| | | public readonly string[] mob;
|
| | | public readonly string cam;
|
| | | public readonly int[] Height;
|
| | | public readonly int DialogueTime;
|
| | | public readonly int Dialogue;
|
| | | public readonly int soundId;
|
| | | public readonly int soundTime;
|
| | | public readonly int step;
|
| | |
|
| | | public ActorShowConfig()
|
| | | {
|
| | | }
|
| | |
|
| | | public ActorShowConfig(string input)
|
| | | {
|
| | | try
|
| | | {
|
| | | var tables = input.Split('\t');
|
| | |
|
| | | int.TryParse(tables[0],out ID); |
| | |
|
| | | int.TryParse(tables[1],out NpcID); |
| | |
|
| | | int.TryParse(tables[2],out MapID); |
| | |
|
| | | int.TryParse(tables[3],out line); |
| | |
|
| | | string[] showNpcsStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | showNpcs = new int[showNpcsStringArray.Length]; |
| | | for (int i=0;i<showNpcsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(showNpcsStringArray[i],out showNpcs[i]); |
| | | }
|
| | |
|
| | | int.TryParse(tables[5],out length); |
| | |
|
| | | int.TryParse(tables[6],out showNameTime); |
| | |
|
| | | int.TryParse(tables[7],out BindMissionID); |
| | |
|
| | | int.TryParse(tables[8],out type); |
| | |
|
| | | string[] scaleStringArray = tables[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | scale = new int[scaleStringArray.Length]; |
| | | for (int i=0;i<scaleStringArray.Length;i++) |
| | | { |
| | | int.TryParse(scaleStringArray[i],out scale[i]); |
| | | }
|
| | |
|
| | | string[] NpcFaceStringArray = tables[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | NpcFace = new int[NpcFaceStringArray.Length]; |
| | | for (int i=0;i<NpcFaceStringArray.Length;i++) |
| | | { |
| | | int.TryParse(NpcFaceStringArray[i],out NpcFace[i]); |
| | | }
|
| | |
|
| | | string[] PosXStringArray = tables[11].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | PosX = new int[PosXStringArray.Length]; |
| | | for (int i=0;i<PosXStringArray.Length;i++) |
| | | { |
| | | int.TryParse(PosXStringArray[i],out PosX[i]); |
| | | }
|
| | |
|
| | | string[] PosYStringArray = tables[12].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | PosY = new int[PosYStringArray.Length]; |
| | | for (int i=0;i<PosYStringArray.Length;i++) |
| | | { |
| | | int.TryParse(PosYStringArray[i],out PosY[i]); |
| | | }
|
| | |
|
| | | int.TryParse(tables[13],out shadow); |
| | |
|
| | | int.TryParse(tables[14],out effect); |
| | |
|
| | | int.TryParse(tables[15],out uieffect); |
| | |
|
| | | mob = tables[16].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
| | |
|
| | | cam = tables[17];
|
| | |
|
| | | string[] HeightStringArray = tables[18].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Height = new int[HeightStringArray.Length]; |
| | | for (int i=0;i<HeightStringArray.Length;i++) |
| | | { |
| | | int.TryParse(HeightStringArray[i],out Height[i]); |
| | | }
|
| | |
|
| | | int.TryParse(tables[19],out DialogueTime); |
| | |
|
| | | int.TryParse(tables[20],out Dialogue); |
| | |
|
| | | int.TryParse(tables[21],out soundId); |
| | |
|
| | | int.TryParse(tables[22],out soundTime); |
| | |
|
| | | int.TryParse(tables[23],out step); |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | | }
|
| | |
|
| | | static Dictionary<string, ActorShowConfig> configs = new Dictionary<string, ActorShowConfig>();
|
| | | public static ActorShowConfig Get(string id)
|
| | | { |
| | | if (!inited)
|
| | | {
|
| | | Debug.Log("ActorShowConfig 还未完成初始化。");
|
| | | return null;
|
| | | }
|
| | | |
| | | if (configs.ContainsKey(id))
|
| | | {
|
| | | return configs[id];
|
| | | }
|
| | |
|
| | | ActorShowConfig config = null;
|
| | | if (rawDatas.ContainsKey(id))
|
| | | {
|
| | | config = configs[id] = new ActorShowConfig(rawDatas[id]);
|
| | | rawDatas.Remove(id);
|
| | | }
|
| | |
|
| | | return config;
|
| | | }
|
| | |
|
| | | public static ActorShowConfig 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<ActorShowConfig> GetValues()
|
| | | {
|
| | | var values = new List<ActorShowConfig>();
|
| | | 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 +"/ActorShow.txt";
|
| | | }
|
| | | else
|
| | | {
|
| | | path = AssetVersionUtility.GetAssetFilePath("config/ActorShow.txt");
|
| | | }
|
| | |
|
| | | var tempConfig = new ActorShowConfig();
|
| | | 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 ActorShowConfig(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 ActorShowConfig(line);
|
| | | configs[id] = config;
|
| | | (config as IConfigPostProcess).OnConfigParseCompleted();
|
| | | }
|
| | | else
|
| | | {
|
| | | rawDatas[id] = line;
|
| | | }
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | | Debug.LogError(ex);
|
| | | }
|
| | | }
|
| | |
|
| | | inited = true;
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Saturday, April 27, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class ActorShowConfig |
| | | { |
| | | |
| | | public readonly int ID; |
| | | public readonly int NpcID; |
| | | public readonly int MapID; |
| | | public readonly int line; |
| | | public readonly int[] showNpcs; |
| | | public readonly int length; |
| | | public readonly int showNameTime; |
| | | public readonly int BindMissionID; |
| | | public readonly int type; |
| | | public readonly int[] scale; |
| | | public readonly int[] NpcFace; |
| | | public readonly int[] PosX; |
| | | public readonly int[] PosY; |
| | | public readonly int shadow; |
| | | public readonly int[] effect; |
| | | public readonly int uieffect; |
| | | public readonly string[] mob; |
| | | public readonly int[] clipActions; |
| | | public readonly string cam; |
| | | public readonly int[] Height; |
| | | public readonly int DialogueTime; |
| | | public readonly int Dialogue; |
| | | public readonly int soundId; |
| | | public readonly int soundTime; |
| | | public readonly int step; |
| | | |
| | | public ActorShowConfig() |
| | | { |
| | | } |
| | | |
| | | public ActorShowConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0], out ID); |
| | | |
| | | int.TryParse(tables[1], out NpcID); |
| | | |
| | | int.TryParse(tables[2], out MapID); |
| | | |
| | | int.TryParse(tables[3], out line); |
| | | |
| | | string[] showNpcsStringArray = tables[4].Trim().Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | showNpcs = new int[showNpcsStringArray.Length]; |
| | | for (int i = 0; i < showNpcsStringArray.Length; i++) |
| | | { |
| | | int.TryParse(showNpcsStringArray[i], out showNpcs[i]); |
| | | } |
| | | |
| | | int.TryParse(tables[5], out length); |
| | | |
| | | int.TryParse(tables[6], out showNameTime); |
| | | |
| | | int.TryParse(tables[7], out BindMissionID); |
| | | |
| | | int.TryParse(tables[8], out type); |
| | | |
| | | string[] scaleStringArray = tables[9].Trim().Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | scale = new int[scaleStringArray.Length]; |
| | | for (int i = 0; i < scaleStringArray.Length; i++) |
| | | { |
| | | int.TryParse(scaleStringArray[i], out scale[i]); |
| | | } |
| | | |
| | | string[] NpcFaceStringArray = tables[10].Trim().Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | NpcFace = new int[NpcFaceStringArray.Length]; |
| | | for (int i = 0; i < NpcFaceStringArray.Length; i++) |
| | | { |
| | | int.TryParse(NpcFaceStringArray[i], out NpcFace[i]); |
| | | } |
| | | |
| | | string[] PosXStringArray = tables[11].Trim().Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | PosX = new int[PosXStringArray.Length]; |
| | | for (int i = 0; i < PosXStringArray.Length; i++) |
| | | { |
| | | int.TryParse(PosXStringArray[i], out PosX[i]); |
| | | } |
| | | |
| | | string[] PosYStringArray = tables[12].Trim().Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | PosY = new int[PosYStringArray.Length]; |
| | | for (int i = 0; i < PosYStringArray.Length; i++) |
| | | { |
| | | int.TryParse(PosYStringArray[i], out PosY[i]); |
| | | } |
| | | |
| | | int.TryParse(tables[13], out shadow); |
| | | |
| | | string[] effectStringArray = tables[14].Trim().Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | effect = new int[effectStringArray.Length]; |
| | | for (int i = 0; i < effectStringArray.Length; i++) |
| | | { |
| | | int.TryParse(effectStringArray[i], out effect[i]); |
| | | } |
| | | |
| | | int.TryParse(tables[15], out uieffect); |
| | | |
| | | mob = tables[16].Trim().Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | |
| | | string[] clipActionsStringArray = tables[17].Trim().Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | clipActions = new int[clipActionsStringArray.Length]; |
| | | for (int i = 0; i < clipActionsStringArray.Length; i++) |
| | | { |
| | | int.TryParse(clipActionsStringArray[i], out clipActions[i]); |
| | | } |
| | | |
| | | cam = tables[18]; |
| | | |
| | | string[] HeightStringArray = tables[19].Trim().Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); |
| | | Height = new int[HeightStringArray.Length]; |
| | | for (int i = 0; i < HeightStringArray.Length; i++) |
| | | { |
| | | int.TryParse(HeightStringArray[i], out Height[i]); |
| | | } |
| | | |
| | | int.TryParse(tables[20], out DialogueTime); |
| | | |
| | | int.TryParse(tables[21], out Dialogue); |
| | | |
| | | int.TryParse(tables[22], out soundId); |
| | | |
| | | int.TryParse(tables[23], out soundTime); |
| | | |
| | | int.TryParse(tables[24], out step); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, ActorShowConfig> configs = new Dictionary<string, ActorShowConfig>(); |
| | | public static ActorShowConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("ActorShowConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | ActorShowConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new ActorShowConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static ActorShowConfig 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<ActorShowConfig> GetValues() |
| | | { |
| | | var values = new List<ActorShowConfig>(); |
| | | 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 + "/ActorShow.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/ActorShow.txt"); |
| | | } |
| | | |
| | | var tempConfig = new ActorShowConfig(); |
| | | 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 ActorShowConfig(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 ActorShowConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ef8ad14c092549545a7623899eb26c2a |
| | | timeCreated: 1550121904 |
| | | timeCreated: 1556351379 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Wednesday, April 17, 2019 |
| | | // [ Date ]: Saturday, April 27, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | public partial class AlchemyCountConfig |
| | | { |
| | | |
| | | public readonly int AlchemyQuality;
|
| | | public readonly int id;
|
| | | public readonly int AlchemyQuality;
|
| | | public readonly int LuckValue;
|
| | | public readonly string CntRateList; |
| | | |
| | |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out AlchemyQuality); |
| | | int.TryParse(tables[0],out id); |
| | |
|
| | | int.TryParse(tables[1],out LuckValue); |
| | | int.TryParse(tables[1],out AlchemyQuality); |
| | |
|
| | | CntRateList = tables[2]; |
| | | int.TryParse(tables[2],out LuckValue); |
| | |
|
| | | CntRateList = tables[3]; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5f36f1c0496212c43ab7871e4d3d42dd |
| | | timeCreated: 1555489466 |
| | | timeCreated: 1556343422 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | public int reduceHeartHurt;//会心一击伤害固定值减免
|
| | | public int reduceFinalHurt;//最终伤害百分比减免
|
| | |
|
| | | public int yinjiCount;//当前印记数量
|
| | | public int yinjiTime;//印记转圈时间
|
| | |
|
| | | public long treasurePotentialSp
|
| | | {
|
| | | get
|
| | |
| | | case PlayerDataType.MaxMP:
|
| | | extersion.MaxMP = (int)value;
|
| | | break;
|
| | | case PlayerDataType.XP:
|
| | | break;
|
| | |
|
| | | case PlayerDataType.HPRestoreSetting:
|
| | | break;
|
| | | case PlayerDataType.MPRestoreSetting:
|
| | |
| | | case PlayerDataType.CDBPlayerRefresh_FinalHurtReducePer:
|
| | | baseData.reduceFinalHurt = (int)value;
|
| | | break;
|
| | | case PlayerDataType.CDBPlayerRefresh_YinjiTime:
|
| | | baseData.yinjiTime = (int)value;
|
| | | break;
|
| | | case PlayerDataType.CDBPlayerRefresh_YinjiCount:
|
| | | baseData.yinjiCount = (int)value;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | //B1 08 开始印记流失时间 #tagMCYinjiStartTime
|
| | |
|
| | | public class DTCB108_tagMCYinjiStartTime : DtcBasic
|
| | | {
|
| | | YinJiModel model { get { return ModelCenter.Instance.GetModel<YinJiModel>(); } }
|
| | |
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | | model.BeginFadeAway();
|
| | | }
|
| | | }
|
copy from Lua/Gen/SnxxzUITreasureFindHostModelWrap.cs.meta
copy to Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB108_tagMCYinjiStartTime.cs.meta
| File was copied from Lua/Gen/SnxxzUITreasureFindHostModelWrap.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 46f7e1d408789ee41a746a47b78d9480 |
| | | timeCreated: 1550120577 |
| | | guid: 14fac966cd3cd2247817bd50678402d0 |
| | | timeCreated: 1556337541 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | //B1 08 开始印记流失时间 #tagMCYinjiStartTime
|
| | |
|
| | | public class HB108_tagMCYinjiStartTime : GameNetPackBasic {
|
| | |
|
| | | public HB108_tagMCYinjiStartTime () {
|
| | | _cmd = (ushort)0xB108;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | }
|
| | |
|
| | | }
|
copy from Lua/Gen/SnxxzUITreasureFindHostModelWrap.cs.meta
copy to Core/NetworkPackage/ServerPack/HB1_Role/HB108_tagMCYinjiStartTime.cs.meta
| File was copied from Lua/Gen/SnxxzUITreasureFindHostModelWrap.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 46f7e1d408789ee41a746a47b78d9480 |
| | | timeCreated: 1550120577 |
| | | guid: a37d7e81722084247b0bde35c6c9a12d |
| | | timeCreated: 1556337541 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | m_Target.OnAttackObj += OnAttackObj; |
| | | |
| | | #if UNITY_EDITOR |
| | | Debug.LogFormat("开始检测NPC攻击次数, 需要攻击: {0} 次"); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | Debug.LogFormat("开始检测NPC攻击次数, 需要攻击: {0} 次"); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | private void OnAttackObj(uint sid, int skillId) |
| | | { |
| | | m_AttackCount += 1; |
| | | #if UNITY_EDITOR |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | Debug.LogFormat("NPC攻击次数: {0} 次", m_AttackCount); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public override bool IsOver() |
| | |
| | | public override void Init() |
| | | { |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("恢复自动AI状态"); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("恢复自动AI状态"); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | { |
| | | m_Target.OnAttacked += OnBeAttacked; |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("开始计算被攻击次数"); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("开始计算被攻击次数"); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | { |
| | | m_BeAttackCount += 1; |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("被攻击次数: {0}", m_BeAttackCount); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("被攻击次数: {0}", m_BeAttackCount); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | { |
| | | m_Target.OnAttacked -= OnBeAttacked; |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("被攻击检测节点结束"); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("被攻击检测节点结束"); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | { |
| | | m_Target.lockSkillID = param; |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("进入释放技能: {0} 节点", param); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("进入释放技能: {0} 节点", param); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | { |
| | | m_Target.lockSkillID = -1; |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("{0} 技能释放结束", param); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("{0} 技能释放结束", param); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | { |
| | | m_Target.lockCommonAtk = true; |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("开始锁定普攻"); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("开始锁定普攻"); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | ClientSceneManager.Instance.NpcDead(m_Target.belongEventID, m_Target, m_Target.NpcConfig.NPCID); |
| | | } |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("强制对象死亡"); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("强制对象死亡"); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | public override void Init() |
| | | { |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("开始等待血量下降到: {0}", m_Target.ActorInfo.RealMaxHp * m_Per); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("开始等待血量下降到: {0}", m_Target.ActorInfo.RealMaxHp * m_Per); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | public override void UnInit() |
| | | { |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("血量下降到: {0} 了", m_Target.ActorInfo.RealHp); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("血量下降到: {0} 了", m_Target.ActorInfo.RealHp); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | { |
| | | m_Target.LockHp(0); |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("解除锁定血量"); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("解除锁定血量"); |
| | | } |
| | | #endif |
| | | } |
| | | else |
| | | { |
| | | m_Target.LockHp(param * Constants.F_BETA); |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("开始锁定血量: {0}", param * Constants.F_BETA); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("开始锁定血量: {0}", param * Constants.F_BETA); |
| | | } |
| | | #endif |
| | | } |
| | | } |
| | |
| | | _hero.Behaviour.StopHandupAI(); |
| | | } |
| | | #if UNITY_EDITOR |
| | | Debug.LogFormat("开始对话: {0}", param); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | Debug.LogFormat("开始对话: {0}", param); |
| | | } |
| | | #endif |
| | | m_Target.isTalking = true; |
| | | } |
| | |
| | | { |
| | | m_IsOver = true; |
| | | #if UNITY_EDITOR |
| | | Debug.LogFormat("对话: {0} 结束", param); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | Debug.LogFormat("对话: {0} 结束", param); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | public sealed override void Init() |
| | | { |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("进入播放特效: {0} 节点", param); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("进入播放特效: {0} 节点", param); |
| | | } |
| | | #endif |
| | | m_Target.ProcessEffectDict[param] = SFXPlayUtility.Instance.PlayBattleEffect(param, m_Target); |
| | | } |
| | |
| | | public sealed override void UnInit() |
| | | { |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("{0} 特效播放结束", param); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("{0} 特效播放结束", param); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("开始播放动画: {0}", param); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("开始播放动画: {0}", param); |
| | | } |
| | | #endif |
| | | |
| | | var _actorShow = ActorShowConfig.Get(param); |
| | |
| | | public override void UnInit() |
| | | { |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("动画: {0} 播放结束", param); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("动画: {0} 播放结束", param); |
| | | } |
| | | #endif |
| | | m_Target.isTalking = false; |
| | | } |
| New file |
| | |
| | | public class PN_StartPlayerAI : ProcessNode |
| | | { |
| | | public sealed override void Init() |
| | | { |
| | | #if UNITY_EDITOR |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("恢复自动AI状态"); |
| | | } |
| | | #endif |
| | | |
| | | GA_Hero _hero = PlayerDatas.Instance.hero; |
| | | if (_hero != null) |
| | | { |
| | | _hero.Behaviour.StartHandupAI(); |
| | | } |
| | | } |
| | | |
| | | public sealed override bool IsOver() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | public sealed override void UnInit() |
| | | { |
| | | } |
| | | |
| | | public sealed override void Update() |
| | | { |
| | | } |
| | | } |
| File was renamed from Lua/Gen/SnxxzUITreasureFindHostModelWrap.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 46f7e1d408789ee41a746a47b78d9480 |
| | | timeCreated: 1550120577 |
| | | guid: 9fffea103d73be04180589050fb008e4 |
| | | timeCreated: 1556285864 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | public sealed override void Init() |
| | | { |
| | | m_Target.isStopAI = (param == 1); |
| | | #if UNITY_EDITOR |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("停止AI逻辑"); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public sealed override bool IsOver() |
| | |
| | | SFXPlayUtility.Instance.Release(_sfx); |
| | | m_Target.ProcessEffectDict.Remove(param); |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("进入停止特效: {0} 节点", param); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("进入停止特效: {0} 节点", param); |
| | | } |
| | | #endif |
| | | } |
| | | } |
| | |
| | | public sealed override void UnInit() |
| | | { |
| | | #if UNITY_EDITOR |
| | | UnityEngine.Debug.LogFormat("{0} 特效停止结束", param); |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("{0} 特效停止结束", param); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | |
| | | public override void Init() |
| | | { |
| | | m_StartTime = Time.time; |
| | | #if UNITY_EDITOR |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("开始等待时间 {0} 毫秒", param); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public override bool IsOver() |
| | |
| | | |
| | | public override void UnInit() |
| | | { |
| | | #if UNITY_EDITOR |
| | | if (RuntimeLogUtility.s_LogProcessInfo) |
| | | { |
| | | UnityEngine.Debug.LogFormat("等待时间结束"); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public override void Update() |
| | |
| | | case ProcessNode.E_ProcessType.StopEffect: |
| | | m_NodeQueue.Enqueue(new PN_StopEffect(npc, _node.param)); |
| | | break; |
| | | case ProcessNode.E_ProcessType.StartPlayerAI: |
| | | m_NodeQueue.Enqueue(new PN_StartPlayerAI()); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | |
| | | StopAI, |
| | | PlayEffect, |
| | | StopEffect, |
| | | StartPlayerAI, |
| | | } |
| | | |
| | | public int param; |
| | |
| | | { |
| | | _Item(ref _node, "停止特效"); |
| | | } |
| | | else if (_node.nodeType == ProcessNode.E_ProcessType.StartPlayerAI) |
| | | { |
| | | } |
| | | EditorGUILayout.EndVertical(); |
| | | EditorGUILayout.BeginVertical(); |
| | | if (GUILayout.Button("删除", GUILayout.Height(20))) |
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (PreFightMission.Instance.IsFinished() == false)
|
| | | if (!PreFightMission.Instance.IsFinished())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | lockHp = 0; |
| | | isTalking = false; |
| | | isStopAI = false; |
| | | heroAttacked = false; |
| | | |
| | | AutoAI(); |
| | | |
| | | if (m_ProcessManager == null) |
| | |
| | | m_ProcessManager.Load(this); |
| | | |
| | | InitAI(); |
| | | |
| | | heroAttacked = false; |
| | | } |
| | | |
| | | protected virtual void InitAI() |
| | |
| | | public override void RefreshLifeBar(ulong value) |
| | | { |
| | | var _hero = PlayerDatas.Instance.hero; |
| | | if (_hero != null && _hero.SelectTarget == this) |
| | | if ((_hero != null |
| | | && _hero.SelectTarget == this) |
| | | || ModelCenter.Instance.GetModel<HazyDemonKingModel>().IsInDungeon) |
| | | { |
| | | // 非选中状态下不刷新 |
| | | if (s_HpRefresh != null) |
| | |
| | | #region 装备穿戴相关
|
| | |
|
| | | private GameObject m_ClothesModel;
|
| | | public GameObject ClothedModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_ClothesModel;
|
| | | }
|
| | | }
|
| | | private GameObject m_WeaponModel;
|
| | | private GameObject m_SecondaryModel;
|
| | | private GameObject m_WingModel;
|
| | |
| | | {
|
| | | public int npcID;
|
| | | public int sid;
|
| | | public bool directTransfer;
|
| | | }
|
| | |
|
| | | public void MoveToNPC(int _npcID, int _sid = 0)
|
| | | public void MoveToNPC(int _npcID, int _sid = 0, bool direct = false)
|
| | | {
|
| | | #if UNITY_EDITOR
|
| | | Debug.LogFormat("想要切换至目标npc: {0}", _npcID);
|
| | |
| | | var _data = new MoveToData
|
| | | {
|
| | | npcID = _npcID,
|
| | | sid = _sid
|
| | | sid = _sid,
|
| | | directTransfer = direct
|
| | | };
|
| | | StartCoroutine("CoMoveToNPC", _data);
|
| | | }
|
| | |
| | | // 判断是否在同一张地图中
|
| | | if (_npcLocation.mapId != PlayerDatas.Instance.baseData.MapID)
|
| | | {
|
| | | int _idx1 = m_TransMapLine.IndexOf(PlayerDatas.Instance.baseData.MapID);
|
| | | int _idx2 = m_TransMapLine.IndexOf(_npcLocation.mapId);
|
| | | bool _valid = true;
|
| | | if (_idx1 == -1)
|
| | | if (data.directTransfer)
|
| | | {
|
| | | _valid = false;
|
| | | Debug.LogErrorFormat("寻找的地图ID不在线路中: {0}", PlayerDatas.Instance.baseData.MapID);
|
| | | _MoveToNPC(NpcID, sid);
|
| | | }
|
| | | if (_idx2 == -1)
|
| | | else
|
| | | {
|
| | | _valid = false;
|
| | | Debug.LogErrorFormat("寻找的地图ID不在线路中: {0}", _npcLocation.mapId);
|
| | | }
|
| | | if (_valid)
|
| | | {
|
| | | int _nextMapID = -1;
|
| | | // 顺序
|
| | | if (_idx2 > _idx1)
|
| | | int _idx1 = m_TransMapLine.IndexOf(PlayerDatas.Instance.baseData.MapID);
|
| | | int _idx2 = m_TransMapLine.IndexOf(_npcLocation.mapId);
|
| | | bool _valid = true;
|
| | | if (_idx1 == -1)
|
| | | {
|
| | | _nextMapID = m_TransMapLine[_idx1 + 1];
|
| | | _valid = false;
|
| | | Debug.LogErrorFormat("寻找的地图ID不在线路中: {0}", PlayerDatas.Instance.baseData.MapID);
|
| | | }
|
| | | // 逆序
|
| | | else
|
| | | if (_idx2 == -1)
|
| | | {
|
| | | _nextMapID = m_TransMapLine[_idx1 - 1];
|
| | | _valid = false;
|
| | | Debug.LogErrorFormat("寻找的地图ID不在线路中: {0}", _npcLocation.mapId);
|
| | | }
|
| | |
|
| | | // 先寻找传送点
|
| | | int _transportID = GetNextTransportID(PlayerDatas.Instance.baseData.MapID,
|
| | | _nextMapID);
|
| | | if (_transportID != -1)
|
| | | if (_valid)
|
| | | {
|
| | | if (_curStage)
|
| | | int _nextMapID = -1;
|
| | | // 顺序
|
| | | if (_idx2 > _idx1)
|
| | | {
|
| | | Vector3 _moveToPos;
|
| | | if (_curStage.TryGetTransportPosition(_transportID, out _moveToPos))
|
| | | _nextMapID = m_TransMapLine[_idx1 + 1];
|
| | | }
|
| | | // 逆序
|
| | | else
|
| | | {
|
| | | _nextMapID = m_TransMapLine[_idx1 - 1];
|
| | | }
|
| | |
|
| | | // 先寻找传送点
|
| | | int _transportID = GetNextTransportID(PlayerDatas.Instance.baseData.MapID,
|
| | | _nextMapID);
|
| | | if (_transportID != -1)
|
| | | {
|
| | | if (_curStage)
|
| | | {
|
| | | while (true)
|
| | | Vector3 _moveToPos;
|
| | | if (_curStage.TryGetTransportPosition(_transportID, out _moveToPos))
|
| | | {
|
| | | if (PathFinder.WalkAble(_hero.Pos, _moveToPos))
|
| | | while (true)
|
| | | {
|
| | | break;
|
| | | if (PathFinder.WalkAble(_hero.Pos, _moveToPos))
|
| | | {
|
| | | break;
|
| | | }
|
| | | var _nextPos = ClientSceneManager.Instance.GetTransPoint(_hero.Pos, _moveToPos);
|
| | | // 如果找到的下一个点
|
| | | if (!PathFinder.WalkAble(_hero.Pos, _nextPos)
|
| | | || _nextPos == Vector3.zero)
|
| | | {
|
| | | Debug.LogErrorFormat("移动至NPC: {0} 时找不到任何跳跃点", NpcID);
|
| | | break;
|
| | | }
|
| | | float _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
|
| | | while (_dis > 0.01f)
|
| | | {
|
| | | _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
|
| | | _hero.MoveToPosition(_nextPos);
|
| | | yield return null;
|
| | | }
|
| | | while (!GA_Hero.s_Flying)
|
| | | {
|
| | | yield return null;
|
| | | }
|
| | | while (GA_Hero.s_Flying)
|
| | | {
|
| | | yield return null;
|
| | | }
|
| | | }
|
| | | var _nextPos = ClientSceneManager.Instance.GetTransPoint(_hero.Pos, _moveToPos);
|
| | | // 如果找到的下一个点
|
| | | if (!PathFinder.WalkAble(_hero.Pos, _nextPos)
|
| | | || _nextPos == Vector3.zero)
|
| | | {
|
| | | Debug.LogErrorFormat("移动至NPC: {0} 时找不到任何跳跃点", NpcID);
|
| | | break;
|
| | | }
|
| | | float _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
|
| | | while (_dis > 0.01f)
|
| | | {
|
| | | _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
|
| | | _hero.MoveToPosition(_nextPos);
|
| | | yield return null;
|
| | | }
|
| | | while (!GA_Hero.s_Flying)
|
| | | {
|
| | | yield return null;
|
| | | }
|
| | | while (GA_Hero.s_Flying)
|
| | | {
|
| | | yield return null;
|
| | | }
|
| | | _hero.MoveToPosition(_moveToPos);
|
| | | yield break;
|
| | | }
|
| | | _hero.MoveToPosition(_moveToPos);
|
| | | yield break;
|
| | | }
|
| | | }
|
| | | }
|
| | | _MoveToNPC(NpcID, sid);
|
| | | }
|
| | | _MoveToNPC(NpcID, sid);
|
| | | yield break;
|
| | | }
|
| | | _destPostion = new Vector3(_npcLocation.position.x, 0, _npcLocation.position.y);
|
| | |
| | | {
|
| | | var _actorShowConfig = ActorShowConfig.Get(9);
|
| | |
|
| | | GameObject _prefab = InstanceResourcesLoader.LoadEffect(_actorShowConfig.effect);
|
| | | GameObject _prefab = InstanceResourcesLoader.LoadEffect(_actorShowConfig.effect.Length > 0 ? _actorShowConfig.effect[0] : 0);
|
| | | GameObjectPoolManager.Instance.CacheGameObject(_prefab, 1, false);
|
| | | _prefab = InstanceResourcesLoader.LoadEffect(_actorShowConfig.uieffect);
|
| | | GameObjectPoolManager.Instance.CacheGameObject(_prefab, 1, false);
|
| | |
| | |
|
| | | _actorShowConfig = ActorShowConfig.Get(12);
|
| | |
|
| | | _prefab = InstanceResourcesLoader.LoadEffect(_actorShowConfig.effect);
|
| | | _prefab = InstanceResourcesLoader.LoadEffect(_actorShowConfig.effect.Length > 0 ? _actorShowConfig.effect[0] : 0);
|
| | | GameObjectPoolManager.Instance.CacheGameObject(_prefab, 1, false);
|
| | | _prefab = InstanceResourcesLoader.LoadEffect(_actorShowConfig.uieffect);
|
| | | GameObjectPoolManager.Instance.CacheGameObject(_prefab, 1, false);
|
| | |
| | | using Snxxz.UI; |
| | | using UnityEngine.SceneManagement; |
| | | using UnityEngine; |
| | | using System;
|
| | |
|
| | | using System; |
| | | |
| | | public class AdventureStage : Singleton<AdventureStage> |
| | | { |
| | | public bool IsInAdventureStage { get; private set; } |
| | | |
| | | private Vector3 m_CacheHeroPos; |
| | | private GA_NpcClientFunc m_Npc; |
| | | |
| | | private bool dungeonFightWinOpenRecord = false; |
| | | |
| | | public event Action onLoadAdventureStage; |
| | | public event Action onExitAdventureStage; |
| | |
| | | |
| | | public void Enter() |
| | | { |
| | | IsInAdventureStage = true;
|
| | | IsInAdventureStage = true; |
| | | ClientDungeonStageUtility.RequestStartClientDungeon(0, 0); |
| | | m_CacheHeroPos = PlayerDatas.Instance.hero.Pos; |
| | | SnxxzGame.Instance.StartCoroutine(_Enter()); |
| | |
| | | |
| | | private IEnumerator _Enter() |
| | | { |
| | | WindowCenter.Instance.Open<LoadingWin>();
|
| | | WindowCenter.Instance.Open<LoadingWin>(); |
| | | WindowCenter.Instance.Close<MainInterfaceWin>(); |
| | | if (!AssetSource.sceneFromEditor) |
| | | { |
| | |
| | | if (_hero != null) |
| | | { |
| | | _hero.Pos = new Vector3(9.517f, 18.742f, 7.485f); |
| | | _hero.Behaviour.StopHandupAI(); |
| | | _hero.Behaviour.StopKillUntilDieAI(); |
| | | } |
| | | CameraController.Instance.Apply(); |
| | | yield return null; |
| | | WindowCenter.Instance.Close<LoadingWin>();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Close<LoadingWin>(); |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | dungeonFightWinOpenRecord = WindowCenter.Instance.IsOpen<DungeonFightWin>(); |
| | | if (!dungeonFightWinOpenRecord) |
| | | { |
| | | WindowCenter.Instance.Open<DungeonFightWin>(); |
| | | } |
| | | BossShowModel.Instance.bossShowCompletedEvent -= BossShowCompletedEvent; |
| | | BossShowModel.Instance.bossShowCompletedEvent += BossShowCompletedEvent; |
| | | |
| | | if (onLoadAdventureStage != null)
|
| | | {
|
| | | onLoadAdventureStage();
|
| | | if (onLoadAdventureStage != null) |
| | | { |
| | | onLoadAdventureStage(); |
| | | } |
| | | }
|
| | |
|
| | | private void BossShowCompletedEvent()
|
| | | {
|
| | | } |
| | | |
| | | private void BossShowCompletedEvent() |
| | | { |
| | | m_Npc = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientFunc>((uint)hazyRegionModel.GetAdventureNpcId(), E_ActorGroup.FuncNpc); |
| | | m_Npc.Pos = new Vector3(9.012f, 18.76f, 9.089f); |
| | | m_Npc.Rotation = Quaternion.Euler(0f, 165f, 0f); |
| | | NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent; |
| | | NPCInteractProcessor.s_NpcInteractEvent += OnNpcTalkEvent;
|
| | | }
|
| | |
|
| | | NPCInteractProcessor.s_NpcInteractEvent += OnNpcTalkEvent; |
| | | } |
| | | |
| | | private IEnumerator _Exit() |
| | | { |
| | | NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent;
|
| | | NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent; |
| | | BossShowModel.Instance.bossShowCompletedEvent -= BossShowCompletedEvent; |
| | | GAMgr.Instance.ServerDie(m_Npc.ServerInstID); |
| | | GAMgr.Instance.Release(m_Npc); |
| | | |
| | | WindowCenter.Instance.Open<LoadingWin>();
|
| | | WindowCenter.Instance.Open<LoadingWin>(); |
| | | WindowCenter.Instance.Close<MainInterfaceWin>(); |
| | | var _async = SceneManager.UnloadSceneAsync("Map140_Qy"); |
| | | yield return _async; |
| | |
| | | _hero.Pos = m_CacheHeroPos; |
| | | } |
| | | CameraController.Instance.Apply(); |
| | | yield return null;
|
| | | yield return null; |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | WindowCenter.Instance.Close<LoadingWin>();
|
| | | WindowCenter.Instance.Close<LoadingWin>(); |
| | | if (!dungeonFightWinOpenRecord) |
| | | { |
| | | WindowCenter.Instance.Close<DungeonFightWin>(); |
| | | } |
| | | |
| | | if (onExitAdventureStage != null)
|
| | | {
|
| | | onExitAdventureStage();
|
| | | if (onExitAdventureStage != null) |
| | | { |
| | | onExitAdventureStage(); |
| | | } |
| | | } |
| | | |
| | |
| | | if (m_Npc.NpcConfig.NPCID == npcid |
| | | && m_Npc.ServerInstID == sid) |
| | | { |
| | | if (!WindowCenter.Instance.IsOpen<HazyRegionDialogueWin>())
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen<HazyRegionDialogueWin>()) |
| | | { |
| | | hazyRegionModel.StartAdventureDialogue(); |
| | | } |
| | | } |
| | |
| | | WindowCenter.Instance.Open<ElderGodAngerWin>();
|
| | | }
|
| | | break;
|
| | | case ClientTreasureDungeon.Client_DataMap:
|
| | | case TreasureModel.TREASURE_MAPID:
|
| | | WindowCenter.Instance.Open<TreasureDungeonMissionHintWin>();
|
| | | break;
|
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "PosX", _g_get_PosX); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "PosY", _g_get_PosY); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "shadow", _g_get_shadow); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "effect", _g_get_effect); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "uieffect", _g_get_uieffect); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "mob", _g_get_mob); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "cam", _g_get_cam); |
| | |
| | | |
| | | ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.shadow); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_effect(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.effect); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | translator.DelayWrapLoader(typeof(PwdKeyboard), PwdKeyboardWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.TreasureFindHostModel), SnxxzUITreasureFindHostModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(FairyJadeInvestmentModel), FairyJadeInvestmentModelWrap.__Register); |
| | | |
| | | |
| | |
| | |
|
| | | SetDefaultSelect();
|
| | |
|
| | | model.jumpAlchemy = 0;
|
| | |
|
| | | m_AlchemyScroll.Display((int)m_AlchemyType);
|
| | | DisplayAlchmey();
|
| | | m_AlchemyDrug.Display();
|
| | |
| | | }
|
| | |
|
| | | var qualities = AlchemyConfig.GetAlchemyQualities((int)m_AlchemyType);
|
| | | model.selectQuality = qualities.First();
|
| | |
|
| | | var alchemys = AlchemyConfig.GetAlchemies((int)m_AlchemyType, model.selectQuality);
|
| | | model.selectAlchemy = alchemys[0];
|
| | | if (model.jumpAlchemy != 0)
|
| | | {
|
| | | foreach (var quality in qualities)
|
| | | {
|
| | | var alchemys = AlchemyConfig.GetAlchemies((int)m_AlchemyType, quality);
|
| | | if (alchemys.Contains(model.jumpAlchemy))
|
| | | {
|
| | | model.selectQuality = quality;
|
| | | model.selectAlchemy = model.jumpAlchemy;
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | {
|
| | | model.selectQuality = qualities.First();
|
| | |
|
| | | var alchemys = AlchemyConfig.GetAlchemies((int)m_AlchemyType, model.selectQuality);
|
| | | model.selectAlchemy = alchemys[0];
|
| | | }
|
| | | }
|
| | |
|
| | | private void SelectQualityRefresh()
|
| | |
| | | public int stoveExp { get; private set; }
|
| | | public string alchemySuccRate { get; private set; }
|
| | |
|
| | | public int jumpAlchemy { get; set; }
|
| | |
|
| | | public bool isServerPrepare { get; private set; }
|
| | |
|
| | | Clock m_AlchemingClock = null;
|
| | |
| | | alchemyCount = dict[_luckValue];
|
| | | }
|
| | | }
|
| | | return alchemyCount.Equals(default(AlchemyCount));
|
| | | return !alchemyCount.Equals(default(AlchemyCount));
|
| | | }
|
| | |
|
| | | public bool TryGetAlchemyMaterials(int alchemyId, out List<Item> items)
|
| | |
| | | {
|
| | | error = 0;
|
| | | var config = AlchemyConfig.Get(model.selectAlchemy);
|
| | | var count = packModel.GetItemCountByID(PackType.Item, config.LearnNeedItemID);
|
| | | if (count <= 0)
|
| | | {
|
| | | error = 1;
|
| | | return false;
|
| | | }
|
| | | if (model.stoveLevel < config.LearnNeedAlchemLV)
|
| | | {
|
| | | error = 2;
|
| | |
| | | error = 3;
|
| | | return false;
|
| | | }
|
| | | var count = packModel.GetItemCountByID(PackType.Item, config.LearnNeedItemID);
|
| | | if (count <= 0)
|
| | | {
|
| | | error = 1;
|
| | | return false;
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | |
| | | switch (error)
|
| | | {
|
| | | case 1:
|
| | | SysNotifyMgr.Instance.ShowTip("AlchemyLearnError_1");
|
| | | var config = AlchemyConfig.Get(model.selectAlchemy);
|
| | | ItemTipUtility.Show(config.LearnNeedItemID);
|
| | | //SysNotifyMgr.Instance.ShowTip("AlchemyLearnError_1");
|
| | | break;
|
| | | case 2:
|
| | | SysNotifyMgr.Instance.ShowTip("AlchemyLearnError_2");
|
| | |
| | | catch (Exception e)
|
| | | {
|
| | | BossShowing = false;
|
| | | Debug.LogError(e.Message);
|
| | | Debug.LogError(e.Message + e.StackTrace);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | var _hero = PlayerDatas.Instance.hero;
|
| | | if (_handleFight && _hero != null && !_hero.ActorInfo.serverDie)
|
| | | {
|
| | | bool _needStart = false;
|
| | | int _dgDataID = ModelCenter.Instance.GetModel<DungeonModel>().GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | var dungeonOpen = DungeonOpenTimeConfig.Get(_dgDataID);
|
| | | if (dungeonOpen != null)
|
| | | {
|
| | | if (dungeonOpen.DoFight == 1)
|
| | | {
|
| | | _hero.Behaviour.StartHandupAI();
|
| | | _needStart = true;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (!ClientSceneManager.Instance.IsClientFightMode)
|
| | | {
|
| | | _needStart = true;
|
| | | }
|
| | | }
|
| | |
|
| | | if (_needStart)
|
| | | {
|
| | | _hero.Behaviour.StartHandupAI();
|
| | | }
|
| | |
| | | {
|
| | | for (int i = 0; i < showTargetList.Count; i++)
|
| | | {
|
| | | if (showTargetList[i].npcId == 1)
|
| | | {
|
| | | showTargetList[i].Destroy();
|
| | | continue;
|
| | | }
|
| | | List<ShowActor> list = GetShowActor(showTargetList[i].npcId);
|
| | | if (list == null)
|
| | | {
|
| | |
| | | this.m_Index = index;
|
| | | this.m_Instance = instanceid;
|
| | |
|
| | | m_NpcCfg = NPCConfig.Get(npcID);
|
| | | Appear(index, _actorShowConfig);
|
| | | if (npcId == 1)
|
| | | {
|
| | | Appear(index, _actorShowConfig);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_NpcCfg = NPCConfig.Get(npcID);
|
| | | Appear(index, _actorShowConfig);
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | public void Appear(int index, ActorShowConfig _actorShowConfig)
|
| | |
| | | this.actorShowModel = _actorShowConfig;
|
| | | if (m_Model == null)
|
| | | {
|
| | | m_Model = GameObjectPoolManager.Instance.RequestNpcGameObject(m_NpcId);
|
| | | m_Animator = m_Model.AddMissingComponent<Animator>();
|
| | | m_CacheLayer = m_Model.layer;
|
| | | m_Model.gameObject.SetLayer(LayerUtility.BossShow, true);
|
| | | if (npcId != 1)
|
| | | {
|
| | | m_Model = GameObjectPoolManager.Instance.RequestNpcGameObject(m_NpcId);
|
| | | m_Animator = m_Model.AddMissingComponent<Animator>();
|
| | | m_CacheLayer = m_Model.layer;
|
| | | m_Model.gameObject.SetLayer(LayerUtility.BossShow, true);
|
| | | }
|
| | | else
|
| | | {
|
| | | var hero = PlayerDatas.Instance.hero;
|
| | | m_Model = GameObject.Instantiate(hero.ClothedModel) as GameObject;
|
| | | m_Animator = m_Model.AddMissingComponent<Animator>();
|
| | | m_CacheLayer = m_Model.layer;
|
| | | m_Model.gameObject.SetLayer(LayerUtility.BossShow, true);
|
| | | }
|
| | | }
|
| | | m_Model.SetActive(true);
|
| | | m_Model.transform.position = new Vector3((float)actorShowModel.PosX[m_Index] / 200, 0, (float)actorShowModel.PosY[m_Index] / 200);
|
| | |
| | |
|
| | | RaycastHit _hit;
|
| | | var _heightPos = m_Model.transform.position;
|
| | | if (actorShowModel.Height.Length > 1)
|
| | | if (actorShowModel.Height.Length > 1 && m_Index == 0)
|
| | | {
|
| | | _heightPos.x = (float)actorShowModel.Height[0] / 200;
|
| | | _heightPos.y = 0;
|
| | |
| | | }
|
| | |
|
| | | m_Model.transform.rotation = MathUtility.GetClientRotationFromAngle(actorShowModel.NpcFace[m_Index]);
|
| | | var controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerShowSuffix, actorShowModel.mob[m_Index]);
|
| | | RuntimeAnimatorController controller = null;
|
| | | if (npcId == 1)
|
| | | {
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | var _controllerName = "A_Zs";
|
| | | if (job == 2)
|
| | | {
|
| | | _controllerName = "A_Fs";
|
| | | }
|
| | | controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerShowSuffix, _controllerName);
|
| | | }
|
| | | else
|
| | | {
|
| | | controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerShowSuffix, actorShowModel.mob[m_Index]);
|
| | | }
|
| | | if (controller != null)
|
| | | {
|
| | | m_CacheAnimator = m_Animator.runtimeAnimatorController;
|
| | |
| | | if (m_Animator != null)
|
| | | {
|
| | | m_Animator.enabled = true;
|
| | | m_Animator.Play(Animator.StringToHash("Show"), 0, 0);
|
| | | nextAction = GAStaticDefine.Act_Show;
|
| | | m_Animator.Play(Animator.StringToHash("Idle"), 0, 0);
|
| | | nextAction = 0;
|
| | | if (m_Index < actorShowModel.clipActions.Length)
|
| | | {
|
| | | nextAction = actorShowModel.clipActions[m_Index];
|
| | | }
|
| | | else
|
| | | {
|
| | | nextAction = GAStaticDefine.Act_Show;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (actorShowModel.effect != 0)
|
| | | if (actorShowModel.effect != null && m_Index < actorShowModel.effect.Length
|
| | | && actorShowModel.effect[m_Index] != 0)
|
| | | {
|
| | | sfxController = SFXPlayUtility.Instance.Play(actorShowModel.effect, m_Model.transform);
|
| | | sfxController = SFXPlayUtility.Instance.Play(actorShowModel.effect[m_Index], m_Model.transform);
|
| | | if (sfxController != null)
|
| | | {
|
| | | sfxController.duration = 0;
|
| | | }
|
| | | }
|
| | | RequestCircleShadow();
|
| | | if (shadow)
|
| | | if (shadow && m_NpcId != 1)
|
| | | {
|
| | | shadow.transform.localScale = m_NpcCfg.IsBoss == 1 ? Vector3.one * 3 : Vector3.one;
|
| | | shadow.gameObject.SetLayer(LayerUtility.BossShow, true);
|
| | |
| | |
|
| | | RecyleCircleShadow();
|
| | | }
|
| | |
|
| | | public void Destroy()
|
| | | {
|
| | | if (m_Model != null)
|
| | | {
|
| | | GameObject.Destroy(m_Model);
|
| | | m_Model = null;
|
| | | }
|
| | | if (sfxController != null)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(sfxController);
|
| | | sfxController = null;
|
| | | }
|
| | | RecyleCircleShadow();
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private void ExitDungeon()
|
| | | {
|
| | | if (AdventureStage.Instance.IsInAdventureStage)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("HazyExitAdventureConfirm"), (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | AdventureStage.Instance.Exit();
|
| | | }
|
| | | });
|
| | | return;
|
| | | }
|
| | |
|
| | | var dataMapId = model.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | var config = DungeonOpenTimeConfig.Get(dataMapId);
|
| | | string language = string.Empty;
|
| | |
| | | {
|
| | | if (immedidately)
|
| | | {
|
| | | m_ContainerFuncBtn.localPosition = MainPositionTween.isDefaultState ? m_ContainerFuncBottom.localPosition : m_ContainerFuncUp.localPosition;
|
| | | }
|
| | | else
|
| | | {
|
| | | if (MainPositionTween.isDefaultState)
|
| | | {
|
| | | m_Tweener = m_ContainerFuncBtn.DOLocalMoveY(m_ContainerFuncBottom.localPosition.y, 1);
|
| | |
| | | {
|
| | | m_Tweener = m_ContainerFuncBtn.DOLocalMoveY(m_ContainerFuncUp.localPosition.y, 1);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ContainerFuncBtn.localPosition = MainPositionTween.isDefaultState ? m_ContainerFuncBottom.localPosition : m_ContainerFuncUp.localPosition;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public static PlayerInfo playerInfo { get; private set; }
|
| | | public static MonsterInfo bossInfo { get; private set; }
|
| | |
|
| | | static HazyDemonKingModel hazyDemonKingModel { get { return ModelCenter.Instance.GetModel<HazyDemonKingModel>(); } }
|
| | |
|
| | | public static void Init()
|
| | | {
|
| | | GA_NpcFightBoss.s_OnSelect += OnShowBossLifeBar;
|
| | |
| | | static void OnShowBossLifeBar(uint _instanceId, int _npcId, bool _show)
|
| | | {
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne() && _show)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (hazyDemonKingModel.IsInDungeon && !_show)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (hazyDemonKingModel.IsInDungeon)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (_show)
|
| | | {
|
| | | var player = GAMgr.Instance.GetBySID(_instanceId) as GActorPlayerBase;
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (hazyDemonKingModel.IsInDungeon)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | bossInfo = default(MonsterInfo);
|
| | | var player = GAMgr.Instance.GetBySID(_instanceId) as GActorPlayerBase;
|
| | | if (player != null)
|
| | |
| | | BossShowModel.Instance.bossShowCompletedEvent += BossShowCompletedEvent;
|
| | | model.demonDungeonChallengeNext += ChallengeNextEvent;
|
| | |
|
| | | var allConfigs = TreasureConfig.GetValues();
|
| | | foreach (var value in allConfigs)
|
| | | if (ClientDungeonStageUtility.isClientDungeon
|
| | | && ClientDungeonStageUtility.clientMapId == ClientTreasureDungeon.Client_DataMap)
|
| | | {
|
| | | if (value.MapId == PlayerDatas.Instance.baseData.MapID && value.LineId == PlayerDatas.Instance.baseData.dungeonLineId)
|
| | | treasureId = ClientTreasureDungeon.challengeTreasureId;
|
| | | }
|
| | | else
|
| | | {
|
| | | var allConfigs = TreasureConfig.GetValues();
|
| | | foreach (var value in allConfigs)
|
| | | {
|
| | | treasureId = value.ID;
|
| | | break;
|
| | | if (value.MapId == PlayerDatas.Instance.baseData.MapID && value.LineId == PlayerDatas.Instance.baseData.dungeonLineId)
|
| | | {
|
| | | treasureId = value.ID;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | void DisplayNormalTreasureDungeon()
|
| | | {
|
| | | var config = TreasureConfig.Get(treasureId);
|
| | | var dungeonId = dungeonModel.GetDungeonId(config.MapId, config.LineId);
|
| | | var dungeonId = 0;
|
| | | if (ClientDungeonStageUtility.isClientDungeon)
|
| | | {
|
| | | dungeonId = dungeonModel.GetDungeonId(ClientTreasureDungeon.Client_DataMap, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | dungeonId = dungeonModel.GetDungeonId(config.MapId, config.LineId);
|
| | | }
|
| | | var dungeonConfig = DungeonConfig.Get(dungeonId);
|
| | | m_Title.text = dungeonConfig.FBName;
|
| | | m_Description.text = dungeonConfig.Description;
|
| | |
| | |
|
| | | readonly List<int> m_GemHoleItemIds = new List<int> { 0, 0, 0, 0 };
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(106, 10609);
|
| | | public readonly Redpoint redpoint = new Redpoint(106, 10602);
|
| | |
|
| | | public const int EQUIPGEM_HOLE_COUNT = 4;
|
| | | public static int REDPOINTBASE = 106090000;
|
| | | public static int REDPOINTBASE = 106020000;
|
| | |
|
| | | int m_SelectLevel = 0;
|
| | | public int selectLevel
|
| | |
| | | foreach (var level in totalEquipLevels)
|
| | | {
|
| | | var equipSetRedpointBase = REDPOINTBASE++;
|
| | | m_EquipSetRedpoints[level] = new Redpoint(10609, equipSetRedpointBase);
|
| | | m_EquipSetRedpoints[level] = new Redpoint(redpoint.id, equipSetRedpointBase);
|
| | | foreach (var place in m_EquipPlaces)
|
| | | {
|
| | | var packIndex = EquipPlaceMapConfig.GetServerPlace(level, place);
|
| | | if (!m_EquipGemRedpoints.ContainsKey(packIndex))
|
| | | {
|
| | | EquipGemRedpoint redpoint = new EquipGemRedpoint(equipSetRedpointBase);
|
| | | m_EquipGemRedpoints.Add(packIndex, redpoint);
|
| | | EquipGemRedpoint _redpoint = new EquipGemRedpoint(equipSetRedpointBase);
|
| | | m_EquipGemRedpoints.Add(packIndex, _redpoint);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | return m_GemTypes.TryGetValue(type, out gemType);
|
| | | }
|
| | |
|
| | | public bool TryGetRedpoint(int level, int place, out EquipGemRedpoint redpoint)
|
| | | public bool TryGetRedpoint(int level, int place, out EquipGemRedpoint _redpoint)
|
| | | {
|
| | | var packIndex = EquipPlaceMapConfig.GetServerPlace(level, place);
|
| | | return m_EquipGemRedpoints.TryGetValue(packIndex, out redpoint);
|
| | | return m_EquipGemRedpoints.TryGetValue(packIndex, out _redpoint);
|
| | | }
|
| | |
|
| | | public bool TryGetRedpoint(int level, out Redpoint redpoint)
|
| | | public bool TryGetRedpoint(int level, out Redpoint _redpoint)
|
| | | {
|
| | | return m_EquipSetRedpoints.TryGetValue(level, out redpoint);
|
| | | return m_EquipSetRedpoints.TryGetValue(level, out _redpoint);
|
| | | }
|
| | |
|
| | | public Int2 TryGotoUseGem(int itemId)
|
| | |
| | | return level;
|
| | | }
|
| | |
|
| | | public int GetEmptyGemHoleCount(int level, int place)
|
| | | {
|
| | | var count = 0;
|
| | | for (int i = 0; i < EQUIPGEM_HOLE_COUNT; i++)
|
| | | {
|
| | | var itemId = 0;
|
| | | if (IsEquipGemHoleOpen(level, place, i)
|
| | | && !TryGetEquipGem(level, place, i, out itemId))
|
| | | {
|
| | | count++;
|
| | | }
|
| | | }
|
| | | return count;
|
| | | }
|
| | |
|
| | | public int GetGemLevel(int itemId)
|
| | | {
|
| | | var config = ItemConfig.Get(itemId);
|
| | | return config == null ? 0 : config.EffectValueB1;
|
| | | }
|
| | |
|
| | | public int Compare(string lhs, string rhs)
|
| | | {
|
| | | var lhsItem = packModel.GetItemByGuid(lhs);
|
| | |
| | | return m_CacheEquipSets;
|
| | | }
|
| | | }
|
| | | List<int> cacheInlayGemTypes = new List<int>();
|
| | | List<int> cacheComposeGemTypes = new List<int>();
|
| | | Dictionary<int, List<bool>> inlayAbles = new Dictionary<int, List<bool>>();
|
| | | Dictionary<int, List<bool>> composeAbles = new Dictionary<int, List<bool>>();
|
| | |
|
| | | void RefreshRedpoint()
|
| | | {
|
| | | cacheInlayGemTypes.Clear();
|
| | |
|
| | | foreach (var level in cacheEquipSets)
|
| | | {
|
| | | foreach (var place in m_EquipPlaces)
|
| | | {
|
| | | var packIndex = EquipPlaceMapConfig.GetServerPlace(level, place);
|
| | | if (!inlayAbles.ContainsKey(packIndex))
|
| | | {
|
| | | inlayAbles[packIndex] = new List<bool>(EQUIPGEM_HOLE_COUNT) { false, false, false, false };
|
| | | }
|
| | | if (!composeAbles.ContainsKey(packIndex))
|
| | | {
|
| | | composeAbles[packIndex] = new List<bool>(EQUIPGEM_HOLE_COUNT) { false, false, false, false };
|
| | | }
|
| | | for (int i = 0; i < EQUIPGEM_HOLE_COUNT; i++)
|
| | | {
|
| | | inlayAbles[packIndex][i] = false;
|
| | | composeAbles[packIndex][i] = false;
|
| | | }
|
| | | }
|
| | | }
|
| | | List<int> places = new List<int>(m_EquipPlaces);
|
| | |
|
| | | #region 检查空的孔位
|
| | | places.Sort((int x, int y) =>
|
| | | {
|
| | | List<int> x_types;
|
| | | List<int> y_types;
|
| | | if (TryGetGemTypes(x, out x_types)
|
| | | && TryGetGemTypes(y, out y_types))
|
| | | {
|
| | | if (x_types[0] != y_types[0])
|
| | | {
|
| | | return -x_types[0].CompareTo(y_types[0]);
|
| | | }
|
| | | }
|
| | | return x.CompareTo(y);
|
| | | });
|
| | |
|
| | | foreach (var level in cacheEquipSets)
|
| | | {
|
| | | foreach (var place in m_EquipPlaces)
|
| | | foreach (var place in places)
|
| | | {
|
| | | EquipGemRedpoint equipGemRedpoint;
|
| | | TryGetRedpoint(level, place, out equipGemRedpoint);
|
| | | for (int i = 0; i < EQUIPGEM_HOLE_COUNT; i++)
|
| | | {
|
| | | int equipGem;
|
| | |
| | | {
|
| | | if (SatisfyInlayBetterGem(level, place, i))
|
| | | {
|
| | | var packIndex = EquipPlaceMapConfig.GetServerPlace(level, place);
|
| | | inlayAbles[packIndex][i] = true;
|
| | | cacheInlayGemTypes.AddRange(m_EquipGemTypes[place]);
|
| | | break;
|
| | | SetRedpoint(new Int2(level, place), i, 1);
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | #region 检查所有孔位
|
| | | foreach (var level in cacheEquipSets)
|
| | | {
|
| | | foreach (var place in m_EquipPlaces)
|
| | | foreach (var place in places)
|
| | | {
|
| | | EquipGemRedpoint equipGemRedpoint;
|
| | | TryGetRedpoint(level, place, out equipGemRedpoint);
|
| | | for (int i = 0; i < EQUIPGEM_HOLE_COUNT; i++)
|
| | | {
|
| | | if (SatisfyInlayBetterGem(level, place, i))
|
| | | {
|
| | | var packIndex = EquipPlaceMapConfig.GetServerPlace(level, place);
|
| | | inlayAbles[packIndex][i] = true;
|
| | | cacheInlayGemTypes.AddRange(m_EquipGemTypes[place]);
|
| | | break;
|
| | | SetRedpoint(new Int2(level, place), i, 1);
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | cacheComposeGemTypes.Clear();
|
| | | #region 检查非空孔位
|
| | | int cacheLevel = 0;
|
| | | Int2 position = Int2.zero;
|
| | | int hole = 0;
|
| | | int type = 0;
|
| | | foreach (var level in cacheEquipSets)
|
| | | {
|
| | | foreach (var place in m_EquipPlaces)
|
| | | foreach (var place in places)
|
| | | {
|
| | | EquipGemRedpoint equipGemRedpoint;
|
| | | TryGetRedpoint(level, place, out equipGemRedpoint);
|
| | | for (int i = 0; i < EQUIPGEM_HOLE_COUNT; i++)
|
| | | {
|
| | | int equipGem;
|
| | |
| | | {
|
| | | if (SatisfyComposeGem(level, place, i))
|
| | | {
|
| | | var packIndex = EquipPlaceMapConfig.GetServerPlace(level, place);
|
| | | composeAbles[packIndex][i] = true;
|
| | | var config = ItemConfig.Get(equipGem);
|
| | | var type = config.EffectValueA1;
|
| | | cacheComposeGemTypes.Add(type);
|
| | | if (cacheLevel == 0 || cacheLevel > GetGemLevel(equipGem))
|
| | | {
|
| | | cacheLevel = GetGemLevel(equipGem);
|
| | | position.x = level;
|
| | | position.y = place;
|
| | | hole = i;
|
| | | type = 2;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | SetRedpoint(position, hole, type);
|
| | | }
|
| | |
|
| | | void SetRedpoint(Int2 position, int hole, int type)
|
| | | {
|
| | | foreach (var level in cacheEquipSets)
|
| | | {
|
| | | foreach (var place in m_EquipPlaces)
|
| | |
| | | TryGetRedpoint(level, place, out equipGemRedpoint);
|
| | | for (int i = 0; i < EQUIPGEM_HOLE_COUNT; i++)
|
| | | {
|
| | | equipGemRedpoint.SetInlayRedpoint(i, inlayAbles[packIndex][i]);
|
| | | equipGemRedpoint.SetComposeRedpoint(i, composeAbles[packIndex][i]);
|
| | | var inlayAble = position.x == level && position.y == place && hole == i && type == 1;
|
| | | var composeAble = position.x == level && position.y == place && hole == i && type == 2;
|
| | | equipGemRedpoint.SetInlayRedpoint(i, inlayAble);
|
| | | equipGemRedpoint.SetComposeRedpoint(i, composeAble);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | List<int> gemTypes = m_EquipGemTypes[place];
|
| | | foreach (var type in gemTypes)
|
| | | {
|
| | | if (cacheInlayGemTypes.Contains(type))
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var count = GetBetterGemCount(type, equipGemLevel);
|
| | | if (count > 0)
|
| | | {
|
| | |
| | | }
|
| | | var config = ItemConfig.Get(equipGem);
|
| | | var type = config.EffectValueA1;
|
| | | if (cacheComposeGemTypes.Contains(type))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | var emptyHoleCount = GetSameTypeEmptyUnlockHole(cacheEquipSets, type);
|
| | | var sameLevelCount = GetSameLevelGemCount(type, config.EffectValueB1);
|
| | | sameLevelCount -= emptyHoleCount;
|
| | |
| | | [SerializeField] ItemCell m_EquipItem;
|
| | | [SerializeField] Text m_EquipStar;
|
| | | [SerializeField] EquipGemHoleBehaviour[] m_GemHoles;
|
| | |
|
| | | List<int> m_Sorts = new List<int>();
|
| | | |
| | | EquipGemModel model
|
| | | {
|
| | |
| | |
|
| | | if (level == 0)
|
| | | {
|
| | | level = equipModel.GetLastestUnLockEquipSet();
|
| | | var equipSets = equipModel.GetAllEquipSets();
|
| | | level = equipSets[0];
|
| | | foreach (var equipSet in equipSets)
|
| | | {
|
| | | equipModel.GetEquipSet(equipSet);
|
| | | bool existAnyEquip = false;
|
| | | foreach (var place in model.GetMosaicEquipPlaces())
|
| | | {
|
| | | if (!string.IsNullOrEmpty(equipModel.GetEquip(new Int2(equipSet, place))))
|
| | | {
|
| | | level = equipSet;
|
| | | existAnyEquip = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (existAnyEquip)
|
| | | {
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | var slotCount = model.GetUnlockEquipSlotCount(level);
|
| | | if (slotCount > 0)
|
| | | {
|
| | | model.selectLevel = level;
|
| | | var equipSet = equipModel.GetEquipSet(level);
|
| | | foreach (var place in model.GetMosaicEquipPlaces())
|
| | | {
|
| | | if (equipSet.IsSlotUnLocked(place))
|
| | | {
|
| | | model.selectEquipPlace = place;
|
| | | break;
|
| | | }
|
| | | }
|
| | | var places = new List<int>(model.GetMosaicEquipPlaces());
|
| | | places.Sort(EquipCompare);
|
| | | model.selectEquipPlace = places[0];
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
| | | jumpIndex++;
|
| | | if (model.selectLevel == level)
|
| | | {
|
| | | var places = model.GetMosaicEquipPlaces();
|
| | | foreach (var place in places)
|
| | | foreach (var place in m_Sorts)
|
| | | {
|
| | | if (equipSet.IsSlotUnLocked(place))
|
| | | {
|
| | |
| | | var slotCount = model.GetUnlockEquipSlotCount(level);
|
| | | if (slotCount > 0)
|
| | | {
|
| | | m_Sorts.Clear();
|
| | | m_Controller.AddCell(ScrollerDataType.Header, level);
|
| | | if (model.selectLevel == level)
|
| | | {
|
| | | var places = model.GetMosaicEquipPlaces();
|
| | | foreach (var place in places)
|
| | | m_Sorts.AddRange(model.GetMosaicEquipPlaces());
|
| | | m_Sorts.Sort(EquipCompare);
|
| | | foreach (var place in m_Sorts)
|
| | | {
|
| | | if (equipSet.IsSlotUnLocked(place))
|
| | | {
|
| | |
| | | m_Controller.Restart();
|
| | | }
|
| | |
|
| | | private int EquipCompare(int x, int y)
|
| | | {
|
| | | var x_equipGuid = equipModel.GetEquip(new Int2(model.selectLevel, x));
|
| | | var y_equipGuid = equipModel.GetEquip(new Int2(model.selectLevel, y));
|
| | | var x_hasEquip = !string.IsNullOrEmpty(x_equipGuid);
|
| | | var y_hasEquip = !string.IsNullOrEmpty(y_equipGuid);
|
| | | if (x_hasEquip != y_hasEquip)
|
| | | {
|
| | | return -x_hasEquip.CompareTo(y_hasEquip);
|
| | | }
|
| | | var x_emptyCount = model.GetEmptyGemHoleCount(model.selectLevel, x);
|
| | | var y_emptyCount = model.GetEmptyGemHoleCount(model.selectLevel, y);
|
| | | if (x_emptyCount != y_emptyCount)
|
| | | {
|
| | | return -x_emptyCount.CompareTo(y_emptyCount);
|
| | | }
|
| | | return x.CompareTo(y);
|
| | | }
|
| | |
|
| | | void DisplayGems()
|
| | | {
|
| | | if (model.selectLevel == -1)
|
| | |
| | |
|
| | | private void PerSecond()
|
| | | {
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (IsInDungeon)
|
| | | {
|
| | | var requireRefreshPlayer = false;
|
| | |
| | |
|
| | | public bool IsInDemonKingDungeon(int mapId)
|
| | | {
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | if (mapId == Client_MapID)
|
| | | {
|
| | | return true;
|
| | |
| | |
|
| | | public bool IsInGrassDungeon(int mapId)
|
| | | {
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | if (mapId == Client_ReikiGrassMapID
|
| | | || mapId == Client_FairyGrassMapID)
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (questState == DailyQuestModel.DailyQuestState.Completed)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("OpenHazyRegionError_3");
|
| | | return;
|
| | | }
|
| | |
|
| | | if (!model.TryAddTimes())
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("OpenHazyAddTimesError_1");
|
| | |
| | | [SerializeField] Text m_PlayerCount;
|
| | | [SerializeField] Text m_RebornTime;
|
| | |
|
| | | [Header("宝藏")]
|
| | | [SerializeField] UIEffect m_TitleEffect;
|
| | |
|
| | | public UIAlphaTween alphaTween { get { return m_AlphaTween; } }
|
| | | public UILinerMove linerMove { get { return m_LinerMove; } }
|
| | |
|
| | |
| | | findPreciousModel.bossInfoUpdateEvent += BossInfoUpdateEvent;
|
| | | hazyDemonKingModel.onPlayerCountRefresh -= OnPlayerCountRefresh;
|
| | | hazyDemonKingModel.onPlayerCountRefresh += OnPlayerCountRefresh;
|
| | |
|
| | | m_TitleEffect.gameObject.SetActive(false);
|
| | | switch (incidentType)
|
| | | {
|
| | | case HazyRegionIncidentType.Precious:
|
| | | m_TitleEffect.gameObject.SetActive(true);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayBase()
|
| | |
| | | [SerializeField] Text m_Point;
|
| | | [SerializeField] Button m_Back;
|
| | | [SerializeField] Button m_Goto;
|
| | | [SerializeField] Text m_GotoLabel;
|
| | |
|
| | | List<int> incidents = new List<int>();
|
| | |
|
| | |
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | |
|
| | | DateTime requestTime = DateTime.Now;
|
| | | int requestCount = 0;
|
| | |
| | | DisplayPoint();
|
| | | DisplayIncidents();
|
| | | DisplayBackButton();
|
| | | DisplayGotoState();
|
| | |
|
| | | requestCount = 0;
|
| | | model.incidentDirty = false;
|
| | | SendRequestPlayerCount();
|
| | |
|
| | | DailyQuestActionTimer.Instance.RefreshDailyQuestState -= RefreshDailyQuestState;
|
| | | DailyQuestActionTimer.Instance.RefreshDailyQuestState += RefreshDailyQuestState;
|
| | | }
|
| | |
|
| | | void DisplayIncidents()
|
| | |
| | | {
|
| | | var lhs_config = HazyRegionConfig.Get(lhs);
|
| | | var rhs_config = HazyRegionConfig.Get(rhs);
|
| | | var lhs_precious = lhs_config.incidentType == (int)HazyRegionIncidentType.Precious;
|
| | | var rhs_precious = rhs_config.incidentType == (int)HazyRegionIncidentType.Precious;
|
| | | if (lhs_precious != rhs_precious)
|
| | | {
|
| | | return -lhs_precious.CompareTo(rhs_precious);
|
| | | }
|
| | | if (lhs_config.incidentType != rhs_config.incidentType)
|
| | | {
|
| | | return lhs_config.incidentType.CompareTo(rhs_config.incidentType);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayGotoState()
|
| | | {
|
| | | var questState = dailyQuestModel.GetQuestState((int)DailyQuestType.HazyRegion);
|
| | | m_Goto.SetColorful(m_GotoLabel, questState != DailyQuestModel.DailyQuestState.OutTime);
|
| | | }
|
| | |
|
| | | private void Goto()
|
| | | {
|
| | | var questState = dailyQuestModel.GetQuestState((int)DailyQuestType.HazyRegion);
|
| | | if (questState == DailyQuestModel.DailyQuestState.OutTime)
|
| | | {
|
| | | DailyQuestOpenTime dailyQuestOpenTime;
|
| | | if (dailyQuestModel.TryGetOpenTime((int)DailyQuestType.HazyRegion, out dailyQuestOpenTime))
|
| | | {
|
| | | HourMinute hourMinute;
|
| | | if (dailyQuestOpenTime.TryGetTodayNearestOpenTime(out hourMinute))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("OpenHazyRegionError_1",
|
| | | hourMinute.hourBegin.ToString("D2"),
|
| | | hourMinute.hourEnd.ToString("D2"));
|
| | | }
|
| | | }
|
| | | return;
|
| | | }
|
| | |
|
| | | var error = 0;
|
| | | if (!model.TryGotoIncident(model.selectIncident, out error))
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshDailyQuestState()
|
| | | {
|
| | | DisplayGotoState();
|
| | | }
|
| | |
|
| | | public void Dispose()
|
| | | {
|
| | | m_CyclicScroll.Dispose();
|
| | | DailyQuestActionTimer.Instance.RefreshDailyQuestState -= RefreshDailyQuestState;
|
| | | }
|
| | |
|
| | | #if UNITY_EDITOR
|
| | |
| | | { |
| | | var starValue = PlayerPropertyConfig.GetValueDescription((int)PropertyType.ATK, attack.z); |
| | | var starDescription = UIHelper.AppendColor(TextColType.Green, string.Format(" ({0}星+{1})", data.star, starValue)); |
| | | lines[lineIndex++] = string.Format("{0} +{1}-{2}{3}", name, attack.x, attack.y, starDescription); |
| | | lines[lineIndex++] = string.Format("{0}: {1}-{2}{3}", name, attack.x, attack.y, starDescription); |
| | | } |
| | | else |
| | | { |
| | | lines[lineIndex++] = string.Format("{0} +{1}-{2}", name, attack.x, attack.y); |
| | | lines[lineIndex++] = string.Format("{0}: {1}-{2}", name, attack.x, attack.y); |
| | | } |
| | | } |
| | | |
| | | foreach (var property in normalProperties) |
| | | { |
| | | var config = PlayerPropertyConfig.Get(property.x); |
| | | var name = config.Name; |
| | | if (property.z > 0) |
| | | { |
| | | var starValue = PlayerPropertyConfig.GetValueDescription(property.x, property.z); |
| | | var starDescription = UIHelper.AppendColor(TextColType.Green, string.Format(" ({0}星+{1})", data.star, starValue)); |
| | | lines[lineIndex++] = string.Format("{0}{1}", PlayerPropertyConfig.GetFullDescription(property.x, property.y), starDescription); |
| | | lines[lineIndex++] = string.Format("{0}: {1}{2}", name, PlayerPropertyConfig.GetValueDescription(property.x, property.y), starDescription); |
| | | } |
| | | else |
| | | { |
| | | lines[lineIndex++] = PlayerPropertyConfig.GetFullDescription(property.x,property.y); |
| | | lines[lineIndex++] = string.Format("{0}: {1}", name, PlayerPropertyConfig.GetValueDescription(property.x, property.y)); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (baseInfo.score != 0) |
| | | { |
| | | if (baseInfo.isEquiped) |
| | | if (!baseInfo.isPreview && !baseInfo.isAuction) |
| | | { |
| | | m_ScoreOrType.text = Language.Get("EquipWin_EquipPointText_1") + baseInfo.score; |
| | | } |
| | |
| | | return config.Type >= 113 && config.Type <= 117; |
| | | } |
| | | |
| | | public bool IsSuitEquip(int itemId) |
| | | { |
| | | if (!ItemConfig.Has(itemId)) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | var config = ItemConfig.Get(itemId); |
| | | return config.SuiteiD > 0 && config.Type >= 101 && config.Type <= 112; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | }
|
| | | }
|
| | |
|
| | | this.score = ItemLogicUtility.Instance.GetEquipScore(packType, itemId, useDataDict);
|
| | | this.score = ItemLogicUtility.Instance.GetEquipScore(packType, itemId, useDataDict, isAuction);
|
| | | }
|
| | |
|
| | | public void RefreshCount(int count)
|
| | |
| | | _Information.gameObject.SetActive(true);
|
| | | _FunctionIcon.SetSprite(FunctionForecastConfig.Get(ID).FuncIconKey);
|
| | | _NameText.text = FunctionForecastConfig.Get(ID).Describe;
|
| | | FuncOpenLVConfig funcoPenConfig = FuncOpenLVConfig.Get(ID);
|
| | | if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
|
| | | {
|
| | | if (funcoPenConfig.LimitMagicWeapon != 0)
|
| | | {
|
| | | int faBaoID = funcoPenConfig.LimitMagicWeapon / 100;
|
| | | TreasureConfig treasure = TreasureConfig.Get(faBaoID);
|
| | | _Information.text = string.Format(Language.Get("FuncFBOpen"), treasure.Name);
|
| | | return;
|
| | | }
|
| | | if (funcoPenConfig.LimitMissionID != 0)
|
| | | {
|
| | | _Information.text = string.Format(Language.Get("TaskFuncOpen"), funcoPenConfig.LimitLV);
|
| | | return;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | _Information.text = string.Format(Language.Get("FuncLevelOpen"), funcoPenConfig.LimitLV);
|
| | | }
|
| | | _Information.text= FunctionForecastConfig.Get(ID).OpenDescribe;
|
| | |
|
| | | }
|
| | |
|
| | |
| | | FunctionImage.SetSprite(functionForcecastConfig.FuncIconKey);
|
| | | IconText.text = functionForcecastConfig.FuncName;
|
| | | ContentText.text = functionForcecastConfig.DetailDescribe;
|
| | | if (openLvConfig.LimitMagicWeapon != 0 || openLvConfig.LimitMissionID != 0)
|
| | | {
|
| | | if (openLvConfig.LimitMagicWeapon != 0)
|
| | | {
|
| | | int faBaoID = openLvConfig.LimitMagicWeapon / 100;
|
| | | TreasureConfig treasure = TreasureConfig.Get(faBaoID);
|
| | | ContentText1.text = string.Format(Language.Get("FuncFBOpen"), treasure.Name);
|
| | | return;
|
| | | }
|
| | | if (openLvConfig.LimitMissionID != 0)
|
| | | {
|
| | | ContentText1.text = string.Format(Language.Get("TaskFuncOpen"), openLvConfig.LimitLV);
|
| | | return;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | ContentText1.text = string.Format(Language.Get("FuncLevelOpen"), openLvConfig.LimitLV);
|
| | | }
|
| | | ContentText1.text = functionForcecastConfig.OpenDescribe;
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | |
| | | }
|
| | |
|
| | | var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID);
|
| | | if (isNeutralMap)
|
| | | if (isNeutralMap && !AdventureStage.Instance.IsInAdventureStage)
|
| | | {
|
| | | m_BossBriefInfos.gameObject.SetActive(true);
|
| | | if (PlayerDatas.Instance.baseData.MapID == DogzDungeonModel.DATA_MAPID)
|
| | |
| | | m_ContainerBossList.gameObject.SetActive(isNeutralMap);
|
| | |
|
| | | rightTopState = RightTopState.Function;
|
| | | if ((isDungeon || isNeutralMap || isBossArea) && !isGuiding && switchParams.showDefault)
|
| | | if ((isDungeon || isNeutralMap || isBossArea || AdventureStage.Instance.IsInAdventureStage)
|
| | | && !isGuiding && switchParams.showDefault)
|
| | | {
|
| | | rightTopState = RightTopState.Boss;
|
| | | }
|
| | |
| | | public void Init()
|
| | | {
|
| | | int MapID = PlayerDatas.Instance.baseData.MapID;
|
| | | if (MapIdList.Contains(MapID))
|
| | | if (MapIdList.Contains(MapID) && !AdventureStage.Instance.IsInAdventureStage)
|
| | | {
|
| | | m_Btn_MapSwitch.gameObject.SetActive(true);
|
| | | }
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, April 27, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class MainWinYinJiBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] RectTransform m_Content; |
| | | [SerializeField] Image m_Circle; |
| | | [SerializeField] Text m_Number; |
| | | |
| | | float circleTotalTime = 1f; |
| | | |
| | | YinJiModel model { get { return ModelCenter.Instance.GetModel<YinJiModel>(); } } |
| | | |
| | | private void OnEnable() |
| | | { |
| | | PlayerDatas.Instance.playerDataRefreshEvent += OnPlayerDataRefresh; |
| | | DisplayYinJiCount(); |
| | | } |
| | | |
| | | private void OnDisable() |
| | | { |
| | | PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerDataRefresh; |
| | | } |
| | | |
| | | private void LateUpdate() |
| | | { |
| | | if (model.yinjiEndTime > Time.time) |
| | | { |
| | | var fillAmount = 0f; |
| | | if (circleTotalTime != 0f) |
| | | { |
| | | fillAmount = (model.yinjiEndTime - Time.time) / circleTotalTime; |
| | | } |
| | | |
| | | m_Circle.fillAmount = fillAmount; |
| | | } |
| | | else |
| | | { |
| | | if (m_Circle.fillAmount != 0f) |
| | | { |
| | | m_Circle.fillAmount = 0f; |
| | | } |
| | | } |
| | | |
| | | if (PlayerDatas.Instance.baseData.yinjiCount > 0) |
| | | { |
| | | if (!this.gameObject.activeSelf) |
| | | { |
| | | m_Content.gameObject.SetActive(true); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (this.gameObject.activeSelf) |
| | | { |
| | | m_Content.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void OnPlayerDataRefresh(PlayerDataType type) |
| | | { |
| | | switch (type) |
| | | { |
| | | case PlayerDataType.CDBPlayerRefresh_YinjiCount: |
| | | DisplayYinJiCount(); |
| | | break; |
| | | case PlayerDataType.CDBPlayerRefresh_YinjiTime: |
| | | circleTotalTime = PlayerDatas.Instance.baseData.yinjiTime * 0.001f; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void DisplayYinJiCount() |
| | | { |
| | | if (PlayerDatas.Instance.baseData.yinjiCount > 0) |
| | | { |
| | | m_Content.gameObject.SetActive(true); |
| | | var count = PlayerDatas.Instance.baseData.yinjiCount; |
| | | m_Number.text = count > 0 ? count.ToString() : ""; |
| | | } |
| | | else |
| | | { |
| | | m_Content.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from Lua/Gen/SnxxzUITreasureFindHostModelWrap.cs.meta
copy to System/MainWin/MainWinYinJiBehaviour.cs.meta
| File was copied from Lua/Gen/SnxxzUITreasureFindHostModelWrap.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 46f7e1d408789ee41a746a47b78d9480 |
| | | timeCreated: 1550120577 |
| | | guid: cf633c396e5c6b94ca6e73bfe2440548 |
| | | timeCreated: 1556335353 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | case RichTextEventEnum.MOVENPC:
|
| | | {
|
| | | int id = int.Parse(href.mSplits["movenpc"]);
|
| | | var movetype = 1;
|
| | | if (href.mSplits.ContainsKey("movetype"))
|
| | | {
|
| | | movetype = int.Parse(href.mSplits["movetype"]);
|
| | | }
|
| | | var error = 0;
|
| | | if (!TestMoveNpc(id, out error))
|
| | | {
|
| | |
| | | if (hero != null)
|
| | | {
|
| | | PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
|
| | | SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(id));
|
| | | SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(id, movetype));
|
| | | }
|
| | | }
|
| | | break;
|
| | |
| | | SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(new Vector3(m_Posx / 2, 0, m_Posy / 2)));
|
| | | }
|
| | |
|
| | | private IEnumerator WaitForSkillFinished(int id)
|
| | | private IEnumerator WaitForSkillFinished(int id, int movetype)
|
| | | {
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | |
|
| | |
| | | yield break;
|
| | | }
|
| | |
|
| | | MapTransferUtility.Instance.MoveToNPC(id);
|
| | | MapTransferUtility.Instance.MoveToNPC(id, 0, movetype == 1);
|
| | | }
|
| | |
|
| | | private IEnumerator WaitForSkillFinished(Vector3 pos)
|
| | |
| | | var _itemCnt = ModelCenter.Instance.GetModel<PackModel>().GetItemCountByID(PackType.Item, ConfirmCancel.generalItemId);
|
| | | if (_itemCnt < ConfirmCancel.generalItemCnt)
|
| | | {
|
| | | ScrollTip.ShowTip(Language.Get("InsufficientQIR_Z"));
|
| | | ItemTipUtility.Show(ConfirmCancel.generalItemId);
|
| | | return;
|
| | | }
|
| | | CloseClick();
|
| | |
| | | [SerializeField] Slider m_TaskSlider;
|
| | | [SerializeField] Text m_TaskProgress;
|
| | | [SerializeField] UIEffect m_EffectInduction;
|
| | | [SerializeField] UIEffect m_EffectInduction1;
|
| | |
|
| | | [SerializeField] Transform m_ContainerSkillDetial;
|
| | | [SerializeField] Image m_SkillDetailIcon;
|
| | |
| | | var count = m_TaskController.GetNumberOfCells(m_TaskController.m_Scorller);
|
| | | m_TaskController.JumpIndex(count - 1);
|
| | | m_EffectInduction.Play();
|
| | | m_EffectInduction1.Play();
|
| | | m_TaskController.mScrollRect.enabled = false;
|
| | | StartCoroutine(Co_DelayShowTask());
|
| | | }
|
| | |
| | | [SerializeField] List<CommonItemBaisc> itemlist = new List<CommonItemBaisc>();
|
| | |
|
| | | TreasureFindHostModel hostModel { get { return ModelCenter.Instance.GetModel<TreasureFindHostModel>(); } }
|
| | | |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | |
|
| | | int progress = 0;
|
| | | int findId = 0;
|
| | | StringBuilder condiSB = new StringBuilder();
|
| | | public void SetModel(int findId)
|
| | | {
|
| | | FindTreasureInfo info = null;
|
| | | hostModel.TryGetFindTreasureInfo(findId, out info);
|
| | | if (info == null) return;
|
| | |
|
| | | condiSB.Length = 0;
|
| | | findId = info.id;
|
| | | bool isReach = hostModel.IsReachCondition(info, out progress);
|
| | | SetReceiveAwardInfo(info);
|
| | | switch (info.type)
|
| | | public void Display(int findId)
|
| | | {
|
| | | FindTreasureInfo findHosts = null;
|
| | | hostModel.TryGetFindTreasureInfo(findId, out findHosts);
|
| | |
|
| | | if (findHosts == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | findId = findHosts.id;
|
| | |
|
| | | bool isReach = hostModel.IsReachCondition(findHosts);
|
| | |
|
| | | SetReceiveAwardInfo(findHosts);
|
| | |
|
| | | switch (findHosts.type)
|
| | | {
|
| | | case 1:
|
| | | conditionText.text = Language.Get("TreasureFindHost_Type1", GetFindProgressStr(info));
|
| | | break;
|
| | | case 2:
|
| | | int equipPlace = 0;
|
| | | foreach (var value in info.needConditionsDict.Values)
|
| | | var index = 0;
|
| | | var sb = new StringBuilder();
|
| | | sb.Append(Language.Get("FindHostEquip_1"));
|
| | | foreach (var findHostEquip in findHosts.findHostEquips)
|
| | | {
|
| | | string s = s = Language.Get("TreasureFindHost_Type2Split1", value[0], UIHelper.GetColorNameByItemColor(value[1]), value[2]);
|
| | | if (condiSB.Length > 0)
|
| | | if (index > 0)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("TreasureFindHost_Type2Split2"), s);
|
| | | sb.Append(Language.Get("FindHostEquip_2"));
|
| | | }
|
| | | equipPlace = value[3];
|
| | | condiSB.Append(s);
|
| | | var equipSet = equipModel.GetEquipSet(findHostEquip.level);
|
| | | var realmConfig = RealmConfig.Get(equipSet.realm);
|
| | | sb.Append(UIHelper.GetRealmName(equipSet.realm, true));
|
| | | sb.Append(UIHelper.AppendColor(findHostEquip.itemColor,
|
| | | UIHelper.GetColorNameByItemColor(findHostEquip.itemColor), true));
|
| | | if (findHostEquip.isSuit)
|
| | | {
|
| | | var suits = EquipSuitConfig.GetConfigs(PlayerDatas.Instance.baseData.Job, findHostEquip.level, EquipSuitType.TwoSuit);
|
| | | sb.Append(EquipSuitConfig.GetEquipSuitName(suits[0].suiteID));
|
| | | }
|
| | | sb.Append(UIHelper.GetEquipPlaceName(findHostEquip.place));
|
| | | index++;
|
| | | }
|
| | | conditionText.text = Language.Get("TreasureFindHost_Type2", condiSB.ToString(), UIHelper.GetEquipPlaceName(equipPlace), GetFindProgressStr(info));
|
| | | break;
|
| | | case 3:
|
| | | conditionText.text = Language.Get("TreasureFindHost_Type3", info.targetNum, GetFindProgressStr(info));
|
| | | break;
|
| | | case 4:
|
| | | foreach (var value in info.needConditionsDict.Values)
|
| | | {
|
| | | string s = "";
|
| | | switch (value[1])
|
| | | {
|
| | | case 1:
|
| | | s = Language.Get("TreasureFindHost_Type4Split1", value[0], Language.Get("TreasureFindHost_Type4Split2"));
|
| | | break;
|
| | | case 2:
|
| | | s = Language.Get("TreasureFindHost_Type4Split1", value[0], Language.Get("TreasureFindHost_Type4Split3"));
|
| | | break;
|
| | | }
|
| | |
|
| | | if (condiSB.Length > 0)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("TreasureFindHost_Type2Split2"), s);
|
| | | }
|
| | |
|
| | | condiSB.Append(s);
|
| | | }
|
| | | conditionText.text = Language.Get("TreasureFindHost_Type4", info.targetNum, condiSB.ToString(), GetFindProgressStr(info));
|
| | | break;
|
| | | default:
|
| | | DebugEx.LogError("暂无此类型需要添加:" + info.type);
|
| | | conditionText.text = StringUtility.Contact(sb.ToString(), "\n", GetFindProgressStr(findHosts));
|
| | | break;
|
| | | }
|
| | |
|
| | | List<int> adviceIdlist = info.adviceItemIdDict[PlayerDatas.Instance.baseData.Job];
|
| | | List<int> adviceIdlist = findHosts.findRecommandItems[PlayerDatas.Instance.baseData.Job];
|
| | | receiveBtn.RemoveAllListeners();
|
| | | if (info.IsCompleted)
|
| | | if (findHosts.IsCompleted)
|
| | | {
|
| | | receiveEffect.gameObject.SetActive(false);
|
| | | receivedImg.SetActive(true);
|
| | |
| | | btnText.text = Language.Get("HallowsWin_Btn_ReceiveAward");
|
| | | receiveBtn.AddListener(() =>
|
| | | {
|
| | | hostModel.SendGetRewardQuest(info.id);
|
| | | hostModel.SendGetRewardQuest(findHosts.id);
|
| | | });
|
| | | }
|
| | | else
|
| | |
| | | adviceText.SetActive(false);
|
| | | }
|
| | |
|
| | | public void SetReceiveAwardInfo(FindTreasureInfo info)
|
| | | public void SetReceiveAwardInfo(FindTreasureInfo findHost)
|
| | | {
|
| | | foreach (var value in info.awardMoneyDict.Values)
|
| | | foreach (var findHostMoney in findHost.findHostMoneys)
|
| | | {
|
| | | int rewardMoneyCnt = value[1];
|
| | | int rewardMoneyCnt = findHostMoney.count;
|
| | | rewardCntTex.text = UIHelper.ReplaceLargeNum(rewardMoneyCnt);
|
| | | int itemId = GeneralDefine.moneyDisplayIds[value[0]];
|
| | | int itemId = GeneralDefine.moneyDisplayIds[findHostMoney.moneyType];
|
| | | ItemConfig itemConfig = ItemConfig.Get(itemId);
|
| | | if (itemConfig != null)
|
| | | {
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | foreach (var value in info.awardItemDict.Values)
|
| | | foreach (var item in findHost.findHostItems)
|
| | | {
|
| | | ItemConfig itemConfig = ItemConfig.Get(value[0]);
|
| | | ItemConfig itemConfig = ItemConfig.Get(item.id);
|
| | | if (itemConfig != null)
|
| | | {
|
| | | rewardIcon.SetSprite(itemConfig.IconKey);
|
| | | rewardBg.SetItemBackGround(itemConfig.ItemColor);
|
| | | int rewardCnt = value[1];
|
| | | int rewardCnt = item.count;
|
| | | rewardCntTex.text = UIHelper.ReplaceLargeNum(rewardCnt);
|
| | | rewardBtn.RemoveAllListeners();
|
| | | rewardBtn.AddListener(() =>
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if (progress < info.targetNum)
|
| | | if (!hostModel.IsReachCondition(info))
|
| | | {
|
| | | return UIHelper.AppendColor(TextColType.Red, StringUtility.Contact(progress, "/", info.targetNum), true);
|
| | | return UIHelper.AppendColor(TextColType.Red, StringUtility.Contact(0, "/", info.targetNum), true);
|
| | | }
|
| | | else
|
| | | {
|
| | | return UIHelper.AppendColor(TextColType.Green, StringUtility.Contact(progress, "/", info.targetNum));
|
| | | return UIHelper.AppendColor(TextColType.Green, StringUtility.Contact(1, "/", info.targetNum), true);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | | }
|
| | |
| | | [XLua.LuaCallCSharp]
|
| | | public class TreasureFindHostModel : Model,IBeforePlayerDataInitialize,IAfterPlayerDataInitialize,IPlayerLoginOk
|
| | | {
|
| | | private Dictionary<int, List<FindTreasureInfo>> findTreasureDict = new Dictionary<int, List<FindTreasureInfo>>();
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | | |
| | | Dictionary<int, List<FindTreasureInfo>> findTreasures = new Dictionary<int, List<FindTreasureInfo>>();
|
| | |
|
| | | public List<int> treasureIdlist { get; set; }
|
| | | public event Action TreasureFindHostCompleteAct;
|
| | | public int[] specEquipIds { get; private set;}
|
| | |
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | findTreasureDict.Clear();
|
| | | List<TreasureFindHostConfig> findlist = TreasureFindHostConfig.GetValues();
|
| | | for(int i = 0; i < findlist.Count; i++)
|
| | | var configs = TreasureFindHostConfig.GetValues();
|
| | | foreach (var config in configs)
|
| | | {
|
| | | int treasureId = findlist[i].MagicWeaponID;
|
| | | if(!findTreasureDict.ContainsKey(treasureId))
|
| | | int treasureId = config.MagicWeaponID;
|
| | | List<FindTreasureInfo> list;
|
| | | if (!findTreasures.TryGetValue(treasureId, out list))
|
| | | {
|
| | | List<FindTreasureInfo> infolist = new List<FindTreasureInfo>();
|
| | | FindTreasureInfo treasureInfo = new FindTreasureInfo(findlist[i].ID);
|
| | | infolist.Add(treasureInfo);
|
| | | findTreasureDict.Add(treasureId,infolist);
|
| | | list = new List<FindTreasureInfo>();
|
| | | findTreasures.Add(treasureId, list);
|
| | | }
|
| | | else
|
| | | {
|
| | | FindTreasureInfo treasureInfo = new FindTreasureInfo(findlist[i].ID);
|
| | | findTreasureDict[treasureId].Add(treasureInfo);
|
| | | }
|
| | | var treasureInfo = new FindTreasureInfo(config.ID);
|
| | | list.Add(treasureInfo);
|
| | | }
|
| | |
|
| | | treasureIdlist = findTreasureDict.Keys.ToList();
|
| | | treasureIdlist = findTreasures.Keys.ToList();
|
| | | SetTreasureCellRedKey();
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += RefreshPlayerData;
|
| | | playerPack.refreshItemCountEvent += RefreshEquipInfo;
|
| | | packModel.refreshItemCountEvent += RefreshEquipInfo;
|
| | | treasureModel.treasureStateChangeEvent += RefreshTreasureState;
|
| | | FuncConfigConfig SamboSpecialUnlock = FuncConfigConfig.Get("SamboSpecialUnlock");
|
| | | specEquipIds = ConfigParse.GetMultipleStr<int>(SamboSpecialUnlock.Numerical1);
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | jumpTreasureId = 0;
|
| | | foreach (var list in findTreasureDict.Values)
|
| | | foreach (var list in findTreasures.Values)
|
| | | {
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | |
| | | public override void UnInit()
|
| | | {
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= RefreshPlayerData;
|
| | | playerPack.refreshItemCountEvent -= RefreshEquipInfo;
|
| | | packModel.refreshItemCountEvent -= RefreshEquipInfo;
|
| | | treasureModel.treasureStateChangeEvent -= RefreshTreasureState;
|
| | | }
|
| | |
|
| | | public Dictionary<int, List<FindTreasureInfo>> GetFindTreasureInfoDict()
|
| | | {
|
| | | return findTreasureDict;
|
| | | return findTreasures;
|
| | | }
|
| | |
|
| | | public bool IsReachCondition(FindTreasureInfo treasureInfo,out int progress)
|
| | | public bool IsReachCondition(FindTreasureInfo treasureInfo)
|
| | | {
|
| | | progress = 0;
|
| | | if (treasureInfo == null) return false;
|
| | | if (treasureInfo == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | switch(treasureInfo.type)
|
| | | {
|
| | | case 1:
|
| | | return CheckType1IsReachCondition(treasureInfo, out progress);
|
| | | case 2:
|
| | | return CheckType2IsReachCondition(treasureInfo, out progress);
|
| | | case 3:
|
| | | return CheckType3IsReachCondition(treasureInfo, out progress);
|
| | | case 4:
|
| | | return CheckType4IsReachCondition(treasureInfo,out progress);
|
| | | return CheckType1IsReachCondition(treasureInfo);
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | private bool CheckType1IsReachCondition(FindTreasureInfo treasureInfo, out int progress)
|
| | | private bool CheckType1IsReachCondition(FindTreasureInfo treasureInfo)
|
| | | {
|
| | | progress = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.CDBPlayerRefresh_FuncDef);
|
| | | if(progress < treasureInfo.targetNum)
|
| | | foreach (var findHostEquip in treasureInfo.findHostEquips)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | else
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | |
|
| | | private bool CheckType2IsReachCondition(FindTreasureInfo treasureInfo, out int progress)
|
| | | {
|
| | | progress = 0;
|
| | | SinglePack singlePack = playerPack.GetSinglePack(PackType.Equip);
|
| | | if (singlePack == null) return false;
|
| | |
|
| | |
|
| | | foreach (var condi in treasureInfo.needConditionsDict.Values)
|
| | | {
|
| | | progress = 0;
|
| | | ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip,condi[3]);
|
| | | if(itemModel != null)
|
| | | var equipGuid = equipModel.GetEquip(new Int2(findHostEquip.level, findHostEquip.place));
|
| | | if (!string.IsNullOrEmpty(equipGuid))
|
| | | {
|
| | | if(specEquipIds != null && specEquipIds.Contains(itemModel.itemId))
|
| | | var itemModel = packModel.GetItemByGuid(equipGuid);
|
| | | if (itemModel != null)
|
| | | {
|
| | | progress += 1;
|
| | | return true;
|
| | | }
|
| | | if(itemModel.config.LV >= condi[0]
|
| | | && itemModel.config.ItemColor >= condi[1]
|
| | | && itemModel.config.StarLevel >= condi[2])
|
| | | {
|
| | | progress += 1;
|
| | | return true;
|
| | | if (itemModel.config.ItemColor >= findHostEquip.itemColor)
|
| | | {
|
| | | if (findHostEquip.isSuit)
|
| | | {
|
| | | if (ItemLogicUtility.Instance.IsSuitEquip(itemModel.itemId))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | private bool CheckType3IsReachCondition(FindTreasureInfo treasureInfo, out int progress)
|
| | | {
|
| | | progress = 0;
|
| | | SinglePack singlePack = playerPack.GetSinglePack(PackType.Equip);
|
| | | if (singlePack == null) return false;
|
| | |
|
| | | Dictionary<int, ItemModel> equipDict = singlePack.GetAllItems();
|
| | | foreach(var model in equipDict.Values)
|
| | | {
|
| | | progress += model.config.StarLevel;
|
| | | }
|
| | | if(progress >= treasureInfo.targetNum)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | private bool CheckType4IsReachCondition(FindTreasureInfo treasureInfo,out int progress)
|
| | | {
|
| | | progress = 0;
|
| | | SinglePack singlePack = playerPack.GetSinglePack(PackType.Equip);
|
| | | if (singlePack == null) return false;
|
| | |
|
| | | Dictionary<int, ItemModel> equipDict = singlePack.GetAllItems();
|
| | | foreach(var condi in treasureInfo.needConditionsDict.Values)
|
| | | {
|
| | | progress = 0;
|
| | | if(progress >= treasureInfo.targetNum)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | |
| | | return false;
|
| | | }
|
| | |
|
| | |
| | | if (hostConfig != null)
|
| | | {
|
| | | List<FindTreasureInfo> infolist = null;
|
| | | findTreasureDict.TryGetValue(hostConfig.MagicWeaponID,out infolist);
|
| | | findTreasures.TryGetValue(hostConfig.MagicWeaponID,out infolist);
|
| | | if(infolist != null)
|
| | | {
|
| | | for (int i = 0; i < infolist.Count; i++)
|
| | |
| | | {
|
| | | progress = 0;
|
| | | List<FindTreasureInfo> infolist = null;
|
| | | findTreasureDict.TryGetValue(treasureId,out infolist);
|
| | | if (infolist == null) return false;
|
| | | findTreasures.TryGetValue(treasureId,out infolist);
|
| | | if (infolist == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | for(int i = 0; i < infolist.Count; i++)
|
| | | {
|
| | |
| | |
|
| | | private void RefreshTreasureState(int id)
|
| | | {
|
| | | if (!findTreasureDict.ContainsKey(id)) return;
|
| | | if (!findTreasures.ContainsKey(id)) return;
|
| | |
|
| | | Treasure treasure = null;
|
| | | treasureModel.TryGetTreasure(id, out treasure);
|
| | |
| | | public bool CheckTreasureFindHostFinish()
|
| | | {
|
| | | bool isfinish = true;
|
| | | foreach (var id in findTreasureDict.Keys)
|
| | | foreach (var id in findTreasures.Keys)
|
| | | {
|
| | | Treasure treasure = null;
|
| | | treasureModel.TryGetTreasure(id, out treasure);
|
| | |
| | | {
|
| | | treasureCellRedDict.Clear();
|
| | | int i = 0;
|
| | | foreach(var id in findTreasureDict.Keys)
|
| | | foreach(var id in findTreasures.Keys)
|
| | | {
|
| | | int redKey = TreasureFindHost_RedKey * 100 + i;
|
| | | Redpoint redpoint = new Redpoint(TreasureFindHost_RedKey,redKey);
|
| | |
| | |
|
| | | private void RefreshEquipInfo(PackType type, int index, int itemId)
|
| | | {
|
| | | if (type != PackType.Equip) return;
|
| | | if (type != PackType.Equip)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | for (int i = 0; i < treasureIdlist.Count; i++)
|
| | | {
|
| | |
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.TreasureFindHost)) return;
|
| | |
|
| | | List<FindTreasureInfo> list = findTreasureDict[treasureId];
|
| | | int progress = 0;
|
| | | List<FindTreasureInfo> list = findTreasures[treasureId];
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | bool isReach = IsReachCondition(list[i],out progress);
|
| | | bool isReach = IsReachCondition(list[i]);
|
| | | if(!list[i].IsCompleted && isReach)
|
| | | {
|
| | | treasureCellRedDict[treasureId].state = RedPointState.Simple;
|
| | |
| | | Treasure treasure = null;
|
| | | treasureModel.TryGetTreasure(treasureId, out treasure);
|
| | |
|
| | | var progress = 0;
|
| | | if (IsReachUnlock(treasureId,out progress)
|
| | | && treasure != null && treasure.state != TreasureState.Collected)
|
| | | {
|
| | |
| | |
|
| | | public class FindTreasureInfo
|
| | | {
|
| | | public int id;
|
| | | public int treasureId;
|
| | | public int type;
|
| | | public int targetNum;
|
| | | public int jumpId;
|
| | | public Dictionary<int, List<int>> needConditionsDict = new Dictionary<int, List<int>>();
|
| | | public Dictionary<int, List<int>> awardItemDict = new Dictionary<int, List<int>>();
|
| | | public Dictionary<int, List<int>> awardMoneyDict = new Dictionary<int, List<int>>();
|
| | | public Dictionary<int, List<int>> adviceItemIdDict = new Dictionary<int, List<int>>();
|
| | | public readonly int id;
|
| | | public readonly int treasureId;
|
| | | public readonly int type;
|
| | | public readonly int targetNum;
|
| | | public readonly int jumpId;
|
| | |
|
| | | public List<FindHostEquip> findHostEquips { get; private set; }
|
| | | public List<Item> findHostItems = new List<Item>();
|
| | | public List<FindHostMoney> findHostMoneys = new List<FindHostMoney>();
|
| | | public Dictionary<int, List<int>> findRecommandItems = new Dictionary<int, List<int>>();
|
| | |
|
| | | public bool IsCompleted;
|
| | |
|
| | | public FindTreasureInfo(int id)
|
| | | {
|
| | | needConditionsDict.Clear();
|
| | | awardItemDict.Clear();
|
| | | awardMoneyDict.Clear();
|
| | | adviceItemIdDict.Clear();
|
| | | var config = TreasureFindHostConfig.Get(id);
|
| | |
|
| | | this.id = id;
|
| | | this.type = config.Type;
|
| | | this.targetNum = config.NeedCnt;
|
| | | this.jumpId = config.JumpID;
|
| | | this.treasureId = config.MagicWeaponID;
|
| | |
|
| | | IsCompleted = false;
|
| | | TreasureFindHostConfig hostConfig = TreasureFindHostConfig.Get(id);
|
| | | this.type = hostConfig.Type;
|
| | | this.targetNum = hostConfig.NeedCnt;
|
| | | this.jumpId = hostConfig.JumpID;
|
| | | this.treasureId = hostConfig.MagicWeaponID;
|
| | | JsonData needCondiData = JsonMapper.ToObject(hostConfig.Condition);
|
| | | if(needCondiData.IsArray)
|
| | |
|
| | | switch (type)
|
| | | {
|
| | | for(int i = 0; i < needCondiData.Count; i++)
|
| | | {
|
| | | List<int> condlist = new List<int>();
|
| | | needConditionsDict.Add(i,condlist);
|
| | | if (needCondiData[i].IsArray)
|
| | | case 1:
|
| | | var equipArray = JsonMapper.ToObject<int[][]>(config.Condition);
|
| | | findHostEquips = new List<FindHostEquip>();
|
| | | for (int i = 0; i < equipArray.Length; i++)
|
| | | {
|
| | | for(int j = 0; j < needCondiData[i].Count;j++)
|
| | | findHostEquips.Add(new FindHostEquip()
|
| | | {
|
| | | condlist.Add(int.Parse(needCondiData[i][j].ToString()));
|
| | | }
|
| | | level = equipArray[i][0],
|
| | | itemColor = equipArray[i][1],
|
| | | isSuit = equipArray[i][2] == 1,
|
| | | place = equipArray[i][3],
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | condlist.Add(int.Parse(needCondiData[i].ToString()));
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | JsonData awardItemData = JsonMapper.ToObject(hostConfig.AwardItemList);
|
| | | if(awardItemData.IsArray)
|
| | | var itemArray = JsonMapper.ToObject<int[][]>(config.AwardItemList);
|
| | | for (int i = 0; i < itemArray.Length; i++)
|
| | | {
|
| | | for(int i= 0; i < awardItemData.Count;i++)
|
| | | findHostItems.Add(new Item()
|
| | | {
|
| | | List<int> awardlist = new List<int>();
|
| | | awardItemDict.Add(i, awardlist);
|
| | | if (awardItemData[i].IsArray)
|
| | | {
|
| | | for(int j = 0; j < awardItemData[i].Count; j++)
|
| | | {
|
| | | awardlist.Add(int.Parse(awardItemData[i][j].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | | id = itemArray[i][0],
|
| | | count = itemArray[i][1],
|
| | | });
|
| | | }
|
| | |
|
| | | JsonData awardMoneyData = JsonMapper.ToObject(hostConfig.Money);
|
| | | if (awardMoneyData.IsArray)
|
| | | var moneyArray = JsonMapper.ToObject<int[][]>(config.Money);
|
| | | for (int i = 0; i < moneyArray.Length; i++)
|
| | | {
|
| | | for (int i = 0; i < awardMoneyData.Count; i++)
|
| | | findHostMoneys.Add(new FindHostMoney()
|
| | | {
|
| | | List<int> awardlist = new List<int>();
|
| | | awardMoneyDict.Add(i, awardlist);
|
| | | if (awardMoneyData[i].IsArray)
|
| | | {
|
| | | for (int j = 0; j < awardMoneyData[i].Count; j++)
|
| | | {
|
| | | awardlist.Add(int.Parse(awardMoneyData[i][j].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | | moneyType = moneyArray[i][0],
|
| | | count = moneyArray[i][1],
|
| | | });
|
| | | }
|
| | |
|
| | | JsonData adviceData = JsonMapper.ToObject(hostConfig.AdviceIds);
|
| | | foreach(var job in adviceData.Keys)
|
| | | var recommandJson = JsonMapper.ToObject(config.AdviceIds);
|
| | | foreach (var jobKey in recommandJson.Keys)
|
| | | {
|
| | | List<int> idlist = new List<int>();
|
| | | adviceItemIdDict.Add(int.Parse(job),idlist);
|
| | | if(adviceData[job].IsArray)
|
| | | var items = new List<int>();
|
| | | findRecommandItems.Add(int.Parse(jobKey), items);
|
| | | var array = LitJson.JsonMapper.ToObject<int[]>(recommandJson[jobKey].ToJson());
|
| | | for (int i = 0; i < array.Length; i++)
|
| | | {
|
| | | for(int i = 0; i < adviceData[job].Count; i++)
|
| | | {
|
| | | idlist.Add(int.Parse(adviceData[job][i].ToString()));
|
| | | }
|
| | | items.Add(array[i]);
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | public struct FindHostEquip
|
| | | {
|
| | | public int level;
|
| | | public int place;
|
| | | public int itemColor;
|
| | | public bool isSuit;
|
| | | }
|
| | |
|
| | | public struct FindHostMoney
|
| | | {
|
| | | public int moneyType;
|
| | | public int count;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | int progress = 0;
|
| | | if (hostModel.IsReachCondition(info, out progress))
|
| | | if (hostModel.IsReachCondition(info))
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | int progress = 0;
|
| | | if (hostModel.IsReachCondition(info, out progress))
|
| | | if (hostModel.IsReachCondition(info))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | private void RefreshConditionCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | ReciveConditionCell conditionCell = cell.GetComponent<ReciveConditionCell>();
|
| | | conditionCell.SetModel(cell.index);
|
| | | conditionCell.Display(cell.index);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | float checkTimer = 0f;
|
| | | private void LateUpdate()
|
| | | {
|
| | | var checkMainWinImmedidately = closeCommands.Count + openCommands.Count > 0;
|
| | | while (closeCommands.Count > 0)
|
| | | {
|
| | | var command = closeCommands[0];
|
| | |
| | |
|
| | | }
|
| | |
|
| | | checkTimer += Time.deltaTime;
|
| | | checkTimer += checkMainWinImmedidately ? 1f : Time.deltaTime;
|
| | | if (checkTimer > 0.5f)
|
| | | {
|
| | | checkTimer = 0f;
|
| | |
| | | && !IsOpen("HazyRegionDialogueWin")
|
| | | && !IsOpen("NormalDialogueWin");
|
| | |
|
| | | if (exceptOpen != IsOpen("MainInterfaceWin"))
|
| | | if (exceptOpen != IsOpen("MainInterfaceWin") && windows.ContainsKey("MainInterfaceWin"))
|
| | | {
|
| | | if (exceptOpen)
|
| | | {
|
| | | Open("MainInterfaceWin", true);
|
| | | windows["MainInterfaceWin"].Open();
|
| | | }
|
| | | else
|
| | | {
|
| | | Close("MainInterfaceWin");
|
| | | windows["MainInterfaceWin"].CloseImmediately();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | case JumpUIType.SkillFunc2:
|
| | | case JumpUIType.SkillFunc3:
|
| | | case JumpUIType.SkillFunc2Type2:
|
| | | case JumpUIType.TreasureSkill:
|
| | | SetJumpLogic<SkillWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.StrengthFunc1:
|
| | |
| | | break;
|
| | | case JumpUIType.HazyRegion:
|
| | | SetJumpLogic<CrossServerWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.Alchemy1:
|
| | | case JumpUIType.Alchemy2:
|
| | | case JumpUIType.Alchemy3:
|
| | | case JumpUIType.Alchemy4:
|
| | | case JumpUIType.Alchemy5:
|
| | | var selectAlchemy = 0;
|
| | | int.TryParse(_tagWinSearchModel.SelectActive, out selectAlchemy);
|
| | | ModelCenter.Instance.GetModel<AlchemyModel>().jumpAlchemy = selectAlchemy;
|
| | | SetJumpLogic<AlchemyBaseWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | default:
|
| | | DebugEx.Log("未添加此跳转界面:" + jumpType);
|
| | |
| | | AllianceBoss1 = 308,//仙盟Boss1
|
| | | AllianceBoss2 = 309,//仙盟Boss2
|
| | | FairyAuction = 310,//仙盟拍卖行
|
| | | TreasureSkill = 311,//技能升级
|
| | | Alchemy1 = 312,//炼丹
|
| | | Alchemy2 = 313,
|
| | | Alchemy3 = 314,
|
| | | Alchemy4 = 315,
|
| | | Alchemy5 = 316,
|
| | |
|
| | | DhszTs = 1001,//定海神针功法提升界面
|
| | | HyqTs = 1002,//皓月枪功法提升界面
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 80212c8f087439f4a8bd063acaf6d098 |
| | | folderAsset: yes |
| | | timeCreated: 1556337107 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, April 27, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class YinJiModel : Model, IBeforePlayerDataInitialize |
| | | { |
| | | public float yinjiEndTime { get; private set; } |
| | | |
| | | public override void Init() |
| | | { |
| | | } |
| | | |
| | | public override void UnInit() |
| | | { |
| | | } |
| | | |
| | | public void OnBeforePlayerDataInitialize() |
| | | { |
| | | yinjiEndTime = 0f; |
| | | } |
| | | |
| | | public void BeginFadeAway() |
| | | { |
| | | yinjiEndTime = Time.time + PlayerDatas.Instance.baseData.yinjiTime * 0.001f; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from Lua/Gen/SnxxzUITreasureFindHostModelWrap.cs.meta
copy to System/YinJi/YinJiModel.cs.meta
| File was copied from Lua/Gen/SnxxzUITreasureFindHostModelWrap.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 46f7e1d408789ee41a746a47b78d9480 |
| | | timeCreated: 1550120577 |
| | | guid: 1032dcc4efb61bf4ea34d11cfe05d62b |
| | | timeCreated: 1556337085 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | CDBPlayerRefresh_SuperHitRateReduce = 210,//暴击抗性
|
| | | CDBPlayerRefresh_LuckyHitReduce = 211,//会心一击伤害固定值减免
|
| | | CDBPlayerRefresh_FinalHurtReducePer = 212,//最终伤害百分比减少
|
| | | CDBPlayerRefresh_YinjiTime=213,//印记持续时间,单位毫秒
|
| | | CDBPlayerRefresh_YinjiCount = 214,//印记持续时间,单位毫秒
|
| | | };
|
| | |
|
| | | /** 背包类型码定义 */
|
| | |
| | | #endif
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using Snxxz.UI;
|
| | |
|
| | | public class RuntimeLogUtility : MonoBehaviour
|
| | | {
|
| | |
| | | public static bool s_ShowZZAtkValue = false;
|
| | | public static bool s_ForceSupperHit = false;
|
| | | public static bool s_ForceLuckHit = false;
|
| | | public static bool s_LogProcessInfo = false;
|
| | | public static bool s_forceAutoFight
|
| | | {
|
| | | get
|
| | |
| | | if (GUILayout.Button("触发客户端触发器"))
|
| | | {
|
| | | // ClientSceneManager.Instance.TriggerTest(_triggerID);
|
| | | GA_NpcFunc.SetNpcFuncVisible(10104003, true);
|
| | | // GA_NpcFunc.SetNpcFuncVisible(10104003, true);
|
| | | }
|
| | | EditorGUILayout.EndHorizontal();
|
| | |
|
| | |
| | | if (GUILayout.Button("测试寻路"))
|
| | | {
|
| | | // Debug.Log(PathFinder.WalkAble(_start3, _end3));
|
| | | MapTransferUtility.Instance.MoveToNPC(10904012);
|
| | | // MapTransferUtility.Instance.MoveToNPC(10904012);
|
| | | MapTransferUtility.Instance.MoveToLocalMapPosition(new Vector2(_end3.x, _end3.z));
|
| | | }
|
| | |
|
| | | EditorGUILayout.LabelField("Log存储路径", RuntimeLogUtility.s_LogPath);
|
| | |
| | | RuntimeLogUtility.TEST_CLIENT_PVP_AI = EditorGUILayout.Toggle("模拟客户端PVP的AI状态", RuntimeLogUtility.TEST_CLIENT_PVP_AI);
|
| | | RuntimeLogUtility.s_ForceSupperHit = EditorGUILayout.Toggle("强制暴击", RuntimeLogUtility.s_ForceSupperHit);
|
| | | RuntimeLogUtility.s_ForceLuckHit = EditorGUILayout.Toggle("强制会心一击", RuntimeLogUtility.s_ForceLuckHit);
|
| | | RuntimeLogUtility.s_LogProcessInfo = EditorGUILayout.Toggle("输出AI流程控制", RuntimeLogUtility.s_LogProcessInfo);
|
| | |
|
| | | if (GUILayout.Button("创建PVP敌方"))
|
| | | {
|
| | | var _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightNorm>(30102003, E_ActorGroup.Enemy);
|
| | | var _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightBoss>(10103001, E_ActorGroup.Enemy);
|
| | | _npc.BornPos = _npc.Pos = PlayerDatas.Instance.hero.Pos;
|
| | | _npc.ActorInfo.ResetHp(9999999, -1, 9999999);
|
| | |
|
| | | // BossShowModel.Instance.Start(PlayerDatas.Instance.baseData.MapID, 10103001);
|
| | | // ClientDropItemUtility.Instance.Drop(PlayerDatas.Instance.hero.Pos,
|
| | | // new int[] { 5006, 5301, 5410, 5505, 10543, 1043050,
|
| | | // 5301, 5410, 5505, 10543, 1043050,
|
| | | // 5301, 5410, 5505, 10543, 1043050,
|
| | | // 5301, 5410, 5505, 10543, 1043050,
|
| | | // 5301, 5410, 5505, 10543, 1043050 });
|
| | | // 5301, 5410, 5505, 10543, 1043050});
|
| | |
|
| | | // var _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightBoss>(10103001, E_ActorGroup.Enemy);
|
| | |
|
| | |
| | | {
|
| | | // GA_PVPClientPlayer.Reset();
|
| | | // AdventureStage.Instance.Exit();
|
| | | ClientSceneManager.Instance.ExitClientFightMode();
|
| | | }
|
| | |
|
| | | _navChkPos = EditorGUILayout.Vector3Field("检测点", _navChkPos);
|