少年修仙传客户端代码仓库
client_Zxw
2018-11-14 252d46b8642ad4ecebe1a8b9d3a0678913413ebf
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
28个文件已修改
1个文件已删除
46个文件已添加
5715 ■■■■ 已修改文件
Core/GameEngine/Model/ConfigManager.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/TelPartialConfig/tagStoreConfig.cs 237 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_Evt.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_Evt.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs 198 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_MapData.cs 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_MapData.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_MapTrigger.cs 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_MapTrigger.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_MonsterData.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_MonsterData.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_TransferPoint.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_TransferPoint.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_Trasfer.cs 159 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_Trasfer.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Event.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Event/Evt.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Event/Evt.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Event/Evt_RefreshMonster.cs 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Event/Evt_RefreshMonster.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Event/MonsterData.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Event/MonsterData.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/MapData.cs 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/MapData.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/MapTrigger.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/MapTrigger.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Transfer.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Transfer/MapTransferPoint.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Transfer/MapTransferPoint.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Transfer/MapTrasfer.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Transfer/MapTrasfer.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Editor.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Editor/EditorResources.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Editor/EditorResources/EditorSkin.guiskin 1559 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Editor/EditorResources/EditorSkin.guiskin.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Editor/EditorResources/box_white.png 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Editor/EditorResources/box_white.png.meta 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Editor/MapEditor.cs 300 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Editor/MapEditor.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ClientPack.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GAMgr.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Guard.cs 202 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcClientFightNorm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcFightBoss.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcFightNorm.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcFunc.cs 207 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcSummonFight.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Pet.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActor.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorNpcFight.cs 305 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorNpcNoFight.cs 189 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/FrontEndDungeon.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/FrontEndDungeon/MapTransferSystem.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/FrontEndDungeon/MapTransferSystem.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/StageManager.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/BlastFurnace/DanDrugRecycleTip.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/BlastFurnace/DanDrugShopCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/DailyQuest/DailyQuestModel.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HappyXB/HappyXBModel.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HappyXB/XBShopCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HappyXB/XBStoreWin.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/FBHelpPointExchageModel.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/HighSettingTip.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/BagStoreWin.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/RuneStoreWin.cs 338 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/StoreModel.cs 755 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/StoreUIBasic.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/StoreWin.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/UnionStoreWin.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/ConfigManager.cs
@@ -15,7 +15,8 @@
    bool isPlaying = true;
    bool m_Inited = false;
    public bool inited {
    public bool inited
    {
        get { return m_Inited; }
        private set { m_Inited = value; }
    }
Core/GameEngine/Model/TelPartialConfig/tagStoreConfig.cs
@@ -6,51 +6,11 @@
    public partial class StoreConfig : ConfigBase, IConfigPostProcess
    {
        private static Dictionary<int, List<StoreConfig>> s_storeModelDict = new Dictionary<int, List<StoreConfig>>();//用于记录商城数据
        private static Dictionary<string, List<StoreConfig>> s_canBuyShopDict = new Dictionary<string, List<StoreConfig>>();  //用于存储可以购买的商品
        private static Dictionary<StoreItem, StoreConfig> s_StoreItemDict = new Dictionary<StoreItem, StoreConfig>();
        private static Dictionary<int, List<StoreConfig>> s_TheOnlyShopDict = new Dictionary<int, List<StoreConfig>>();  //key 唯一商品的物品id
        private static Dictionary<int, List<StoreConfig>> storeConfigs = new Dictionary<int, List<StoreConfig>>();
        public void OnConfigParseCompleted()
        {
            if (ShopType == 0) return;
            if (!s_storeModelDict.ContainsKey(ShopType))
            {
                List<StoreConfig> modellist = new List<StoreConfig>();
                modellist.Add(this);
                s_storeModelDict.Add(ShopType, modellist);
            }
            else
            {
                s_storeModelDict[ShopType].Add(this);
            }
            var key = StringUtility.Contact(ShopType, LimitValue).ToString();
            if (!s_canBuyShopDict.ContainsKey(key))
            {
                List<StoreConfig> modellist = new List<StoreConfig>();
                modellist.Add(this);
                s_canBuyShopDict.Add(key, modellist);
            }
            else
            {
                s_canBuyShopDict[key].Add(this);
            }
            if (TheOnlyShop == 1)
            {
                if (!s_TheOnlyShopDict.ContainsKey(ItemID))
                {
                    List<StoreConfig> modellist = new List<StoreConfig>();
                    modellist.Add(this);
                    s_TheOnlyShopDict.Add(ItemID, modellist);
                }
                else
                {
                    s_TheOnlyShopDict[ItemID].Add(this);
                }
            }
            var _storeItem = new StoreItem()
            {
@@ -69,203 +29,6 @@
                storeConfigs.Add(ShopType, list);
            }
            list.Add(this);
        }
        private static List<StoreConfig> modellist = new List<StoreConfig>();
        public static List<StoreConfig> GetTypeStoreModel(int type, bool _keepOld = false)
        {
            modellist.Clear();
            if (s_storeModelDict.ContainsKey(type))
            {
                for (int i = 0; i < s_storeModelDict[type].Count; i++)
                {
                    if (PlayerDatas.Instance.baseData.LV >= s_storeModelDict[type][i].LV)
                    {
                        StoreConfig storeConfig = s_storeModelDict[type][i];
                        //等于1隐藏
                        if (storeConfig.TheOnlyShop == 1)
                        {
                            bool isSellOut = false;
                            if (s_TheOnlyShopDict.ContainsKey(storeConfig.ItemID))
                            {
                                List<StoreConfig> storelist = s_TheOnlyShopDict[storeConfig.ItemID];
                                for (int j = 0; j < storelist.Count; j++)
                                {
                                    int remainCnt = 0;
                                    if (CheckShopIsSellOut(storelist[j], out remainCnt))
                                    {
                                        isSellOut = true;
                                        break;
                                    }
                                }
                            }
                            if (!isSellOut)
                            {
                                modellist.Add(storeConfig);
                            }
                        }
                        else
                        {
                            if (storeConfig.IsHideSellOut != 1)
                            {
                                switch (storeConfig.ShopType)
                                {
                                    case 12:
                                        if (CheckRuneStoreIsCanBuy(storeConfig))
                                        {
                                            modellist.Add(storeConfig);
                                        }
                                        break;
                                    default:
                                        modellist.Add(storeConfig);
                                        break;
                                }
                            }
                            else
                            {
                                int remainCnt = 0;
                                switch (storeConfig.ShopType)
                                {
                                    case 12:
                                        if (CheckRuneStoreIsCanBuy(storeConfig) && !CheckShopIsSellOut(storeConfig, out remainCnt))
                                        {
                                            modellist.Add(storeConfig);
                                        }
                                        break;
                                    default:
                                        if (!CheckShopIsSellOut(storeConfig, out remainCnt))
                                        {
                                            modellist.Add(storeConfig);
                                        }
                                        break;
                                }
                            }
                        }
                    }
                }
            }
            List<StoreConfig> sortlist = new List<StoreConfig>();
            sortlist.AddRange(modellist);
            sortlist.Sort(CompareByShopSort);
            return sortlist;
        }
        public static bool CheckShopIsSellOut(StoreConfig storeConfig,out int remainCnt)
        {
            int canBuyCnt = 0;
            int addBuyCnt = 0;
            remainCnt = 0;
            bool isLimitBuy = BuyItemPopModel.Instance.CheckIsLimitBuyCnt(storeConfig, out canBuyCnt, out addBuyCnt);
            BuyShopItemLimit shopItemLimit = ModelCenter.Instance.GetModel<StoreModel>().GetBuyShopLimit((uint)storeConfig.ID);
            if (!isLimitBuy) return false;
            if(shopItemLimit != null)
            {
                remainCnt = canBuyCnt - shopItemLimit.BuyCnt;
                if (canBuyCnt <= shopItemLimit.BuyCnt)
                {
                    return true;
                }
            }
            return false;
        }
        public static bool CheckRuneStoreIsCanBuy(StoreConfig storeConfig)
        {
            Dictionary<int, List<int>> unlockRunelist = ModelCenter.Instance.GetModel<RuneModel>().GetAllUnlockRuneIdlist();
            if(unlockRunelist != null)
            {
                foreach (var tower in unlockRunelist.Keys)
                {
                    if(unlockRunelist[tower].Contains(storeConfig.ItemID))
                    {
                        return true;
                    }
                }
            }
            return false;
        }
        public static int CompareByShopSort(StoreConfig start, StoreConfig end)
        {
            int sort1 = start.ShopSort;
            int sort2 = end.ShopSort;
            if (sort1.CompareTo(sort2) != 0) return sort1.CompareTo(sort2);
            sort1 = modellist.IndexOf(start);
            sort2 = modellist.IndexOf(end);
            if (sort1.CompareTo(sort2) != 0) return sort1.CompareTo(sort2);
            return 0;
        }
        public static List<StoreConfig> GetSellShoplist()
        {
            List<StoreConfig> modellist = new List<StoreConfig>();
            foreach (var type in s_storeModelDict.Keys)
            {
                if (type <= 5)
                {
                    List<StoreConfig> list = GetTypeStoreModel(type);
                    modellist.AddRange(list);
                }
            }
            return modellist;
        }
        public static List<StoreConfig> GetAllShoplist()
        {
            List<StoreConfig> modellist = new List<StoreConfig>();
            foreach (var type in s_storeModelDict.Keys)
            {
                if (type <= 5)
                {
                    modellist.AddRange(s_storeModelDict[type]);
                }
            }
            return modellist;
        }
        public static List<StoreConfig> GetCanBuyShopModel(int type, int limitValue)
        {
            List<StoreConfig> modellist = new List<StoreConfig>();
            string id = StringUtility.Contact(type, limitValue).ToString();
            if (s_canBuyShopDict.ContainsKey(id))
            {
                for (int i = 0; i < s_canBuyShopDict[id].Count; i++)
                {
                    if (PlayerDatas.Instance.baseData.LV >= s_canBuyShopDict[id][i].LV)
                    {
                        modellist.Add(s_canBuyShopDict[id][i]);
                    }
                }
            }
            return modellist;
        }
        public static Dictionary<int, List<StoreConfig>> GetTheOnlyShopDict()
        {
            return s_TheOnlyShopDict;
        }
        public static StoreConfig GetDetailStoreModel(int shopType, int moneyType, int itemID)
        {
            List<StoreConfig> list = GetTypeStoreModel(shopType);
            if (list != null)
            {
                for (int i = 0; i < list.Count; i++)
                {
                    if (list[i].MoneyType == moneyType && list[i].ItemID == itemID)
                    {
                        return list[i];
                    }
                }
            }
            return null;
        }
        public static StoreConfig GetStoreCfg(int _item, int _moneyType)
Core/MapEditor.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b0344dc10812b4a459780c854ec6b5cc
folderAsset: yes
timeCreated: 1541130161
licenseType: Free
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Behavior.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4638bdf69b2751946b84fa0b126f7d22
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Behavior/Bhv_Evt.cs
New file
@@ -0,0 +1,42 @@
using UnityEngine;
using System.IO;
namespace H2Engine
{
    public abstract class Bhv_Evt : MonoBehaviour
    {
        [HideInInspector]
        public int id;
        [HideInInspector]
        public Evt.E_EventType type;
        [HideInInspector]
        protected bool showDetail = false;
#if UNITY_EDITOR
        public abstract bool DrawUI(GUISkin guiSkin);
        public virtual void Save(BinaryWriter bw)
        {
            bw.Write((byte)type);
            bw.Write(id);
            bw.Write((float)System.Math.Round(transform.position.x));
            bw.Write((float)System.Math.Round(transform.position.y));
            bw.Write((float)System.Math.Round(transform.position.z));
        }
        public virtual void Load(BinaryReader br)
        {
            id = br.ReadInt32();
            float _x = br.ReadSingle();
            float _y = br.ReadSingle();
            float _z = br.ReadSingle();
            transform.position = new Vector3(_x, _y, _z);
        }
        public virtual void Export(BinaryWriter bw)
        {
            bw.Write((byte)type);
            bw.Write(id);
        }
#endif
    }
}
Core/MapEditor/Behavior/Bhv_Evt.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ad56736fc2a1a6a4ebed455e40f3c338
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs
New file
@@ -0,0 +1,198 @@
using System.Collections.Generic;
using UnityEngine;
using System.IO;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace H2Engine
{
    public class Bhv_Evt_RefreshMonster : Bhv_Evt
    {
        [HideInInspector]
        public Evt_RefreshMonster.E_OverCondition overCondition = Evt_RefreshMonster.E_OverCondition.None;
        [HideInInspector]
        public Evt_RefreshMonster.E_RefreshType refreshType = Evt_RefreshMonster.E_RefreshType.All;
        [HideInInspector]
        public List<Bhv_MonsterData> monsterList = new List<Bhv_MonsterData>();
        [HideInInspector]
        public int conditionParam;
        [HideInInspector]
        public int overParam;
        [HideInInspector]
        private bool showMonsterList = false;
#if UNITY_EDITOR
        public override void Save(BinaryWriter bw)
        {
            base.Save(bw);
            bw.Write((byte)overCondition);
            bw.Write((byte)refreshType);
            bw.Write(conditionParam);
            bw.Write(overParam);
            bw.Write(monsterList.Count);
            foreach (var _monster in monsterList)
            {
                _monster.Save(bw);
            }
        }
        public override void Export(BinaryWriter bw)
        {
            base.Export(bw);
            bw.Write((byte)overCondition);
            bw.Write((byte)refreshType);
            bw.Write(conditionParam);
            bw.Write(overParam);
            bw.Write(monsterList.Count);
            foreach (var _monster in monsterList)
            {
                _monster.Export(bw);
            }
        }
        public override void Load(BinaryReader br)
        {
            base.Load(br);
            overCondition = (Evt_RefreshMonster.E_OverCondition)br.ReadByte();
            refreshType = (Evt_RefreshMonster.E_RefreshType)br.ReadByte();
            conditionParam = br.ReadInt32();
            overParam = br.ReadInt32();
            int _count = br.ReadInt32();
            for (int i = 0; i < _count; ++i)
            {
                var _go = new GameObject();
                _go.transform.SetParent(transform);
                _go.transform.localPosition = Vector3.zero;
                _go.transform.eulerAngles = Vector3.zero;
                _go.transform.localScale = Vector3.one;
                var _monsterData = _go.AddComponent<Bhv_MonsterData>();
                monsterList.Add(_monsterData);
                _monsterData.Load(br);
            }
        }
        public override bool DrawUI(GUISkin guiSkin)
        {
            bool _result = false;
            EditorGUILayout.BeginVertical(guiSkin.box);
            EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
            EditorGUI.indentLevel += 1;
            showDetail = EditorGUILayout.Foldout(showDetail, "  ID:" + id + " | Type: " + type, true, guiSkin.toggle);
            if (GUILayout.Button("定位", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
            {
                Selection.activeGameObject = gameObject;
                if (Selection.activeGameObject)
                {
                    SceneView.lastActiveSceneView.LookAt(Selection.activeGameObject.transform.position);
                }
            }
            if (GUILayout.Button("删除", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
            {
                _result = true;
            }
            EditorGUILayout.EndHorizontal();
            if (showDetail)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
                EditorGUILayout.LabelField("刷怪方式", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(60));
                refreshType = (Evt_RefreshMonster.E_RefreshType)EditorGUILayout.EnumPopup(refreshType, guiSkin.box, GUILayout.Height(20));
                EditorGUILayout.EndHorizontal();
                EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
                if (refreshType == Evt_RefreshMonster.E_RefreshType.OneByOneTime)
                {
                    EditorGUILayout.LabelField("等待时间", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(60));
                    conditionParam = EditorGUILayout.IntField(conditionParam, guiSkin.textField, GUILayout.Height(20));
                }
                EditorGUILayout.EndHorizontal();
                EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
                EditorGUILayout.LabelField("完成方式", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(60));
                overCondition = (Evt_RefreshMonster.E_OverCondition)EditorGUILayout.EnumPopup(overCondition, guiSkin.box, GUILayout.Height(20));
                EditorGUILayout.EndHorizontal();
                EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
                if (overCondition == Evt_RefreshMonster.E_OverCondition.DeadCount)
                {
                    EditorGUILayout.LabelField("死亡数量", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(60));
                    overParam = EditorGUILayout.IntField(overParam, guiSkin.textField, GUILayout.Height(20));
                }
                else if (overCondition == Evt_RefreshMonster.E_OverCondition.Time)
                {
                    EditorGUILayout.LabelField("结束时间", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(60));
                    overParam = EditorGUILayout.IntField(overParam, guiSkin.textField, GUILayout.Height(20));
                }
                EditorGUILayout.EndHorizontal();
                EditorGUILayout.BeginVertical(guiSkin.customStyles[1]);
                EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
                showMonsterList = EditorGUILayout.Foldout(showMonsterList, "  刷怪列表", true, guiSkin.toggle);
                if (GUILayout.Button("添加", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
                {
                    var _go = new GameObject("RefreshMonster");
                    _go.transform.SetParent(transform);
                    _go.transform.localPosition = Vector3.zero;
                    _go.transform.eulerAngles = Vector3.zero;
                    _go.transform.localScale = Vector3.one;
                    var _monsterData = _go.AddComponent<Bhv_MonsterData>();
                    monsterList.Add(_monsterData);
                    showMonsterList = true;
                }
                EditorGUILayout.EndHorizontal();
                if (showMonsterList)
                {
                    for (int i = monsterList.Count - 1; i >= 0; --i)
                    {
                        EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
                        EditorGUILayout.LabelField("NPCID", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(60));
                        var _npcID = monsterList[i].npcID;
                        monsterList[i].npcID = EditorGUILayout.IntField(monsterList[i].npcID, guiSkin.textField, GUILayout.Height(20));
                        if (_npcID != monsterList[i].npcID)
                        {
                            monsterList[i].name = monsterList[i].npcID + "_RefreshNPC";
                        }
                        if (GUILayout.Button("定高", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20)))
                        {
                            Vector3 _pos = monsterList[i].transform.position;
                            _pos.y = 0;
                            RaycastHit _hit;
                            Ray _ray = new Ray(_pos + Vector3.up * 100, Vector3.down);
                            if (Physics.Raycast(_ray, out _hit, 200, 1 << LayerMask.NameToLayer("Walkable")))
                            {
                                monsterList[i].transform.position = _hit.point;
                            }
                        }
                        if (GUILayout.Button("查找", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20)))
                        {
                            Selection.activeGameObject = monsterList[i].gameObject;
                            if (Selection.activeGameObject)
                            {
                                SceneView.lastActiveSceneView.LookAt(Selection.activeGameObject.transform.position);
                            }
                        }
                        if (GUILayout.Button("删除", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20)))
                        {
                            DestroyImmediate(monsterList[i].gameObject);
                            monsterList.RemoveAt(i);
                        }
                        EditorGUILayout.EndHorizontal();
                    }
                }
                EditorGUILayout.EndVertical();
            }
            EditorGUI.indentLevel -= 1;
            EditorGUILayout.EndVertical();
            return _result;
        }
#endif
    }
}
Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 86cb95cb9f7327a45b701b48c6d717d2
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Behavior/Bhv_MapData.cs
New file
@@ -0,0 +1,140 @@
using UnityEngine;
using System.Collections.Generic;
using System.IO;
namespace H2Engine
{
    public class Bhv_MapData : MonoBehaviour
    {
        [HideInInspector]
        public int id;
        public bool showTriggerList = false;
        public bool showEventList = false;
        public bool showTransferList = false;
        [HideInInspector]
        public List<Bhv_MapTrigger> triggerList = new List<Bhv_MapTrigger>();
        [HideInInspector]
        public List<Bhv_Evt> eventList = new List<Bhv_Evt>();
        [HideInInspector]
        public List<Bhv_Trasfer> transferList = new List<Bhv_Trasfer>();
#if UNITY_EDITOR
        public const string NodeName_Root = "MapEditor";
        public const string NodeName_TriggerList = "TriggerList";
        public const string NodeName_EventList = "EventList";
        public const string NodeName_TransferList = "TransferList";
        public const string NodeName_Trigger = "Trigger_";
        public const string NodeName_Event = "Event_";
        public const string NodeName_Transfer = "Transfer_";
        public void Save(BinaryWriter bw)
        {
            bw.Write(id);
            bw.Write(triggerList.Count);
            foreach (var _trigger in triggerList)
            {
                _trigger.Save(bw);
            }
            bw.Write(eventList.Count);
            foreach (var _event in eventList)
            {
                _event.Save(bw);
            }
            bw.Write(transferList.Count);
            foreach (var _transfer in transferList)
            {
                _transfer.Save(bw);
            }
        }
        public void Export(BinaryWriter bw)
        {
            bw.Write(id);
            bw.Write(triggerList.Count);
            foreach (var _trigger in triggerList)
            {
                _trigger.Export(bw);
            }
            bw.Write(eventList.Count);
            foreach (var _event in eventList)
            {
                _event.Export(bw);
            }
            bw.Write(transferList.Count);
            foreach (var _transfer in transferList)
            {
                _transfer.Export(bw);
            }
        }
        public void Load(BinaryReader br)
        {
            id = br.ReadInt32();
            int _count = br.ReadInt32();
            GameObject _go = null;
            for (int i = 0; i < _count; ++i)
            {
                _go = new GameObject(NodeName_Trigger + i);
                _go.transform.position = Vector3.zero;
                _go.transform.eulerAngles = Vector3.zero;
                _go.transform.localScale = Vector3.one;
                var _triggerBhv = _go.AddComponent<Bhv_MapTrigger>();
                _triggerBhv.boxCollider = _go.AddComponent<BoxCollider>();
                _triggerBhv.transform.SetParent(transform.Find(NodeName_TriggerList));
                triggerList.Add(_triggerBhv);
                _triggerBhv.Load(br);
            }
            _count = br.ReadInt32();
            for (int i = 0; i < _count; ++i)
            {
                _go = new GameObject(NodeName_Event + i);
                _go.transform.position = Vector3.zero;
                _go.transform.eulerAngles = Vector3.zero;
                _go.transform.localScale = Vector3.one;
                var _type = (Evt.E_EventType)br.ReadByte();
                if (_type == Evt.E_EventType.Enemy)
                {
                    var _eventBhv = _go.AddComponent<Bhv_Evt_RefreshMonster>();
                    _eventBhv.type = _type;
                    _eventBhv.transform.SetParent(transform.Find(NodeName_EventList));
                    eventList.Add(_eventBhv);
                    _eventBhv.Load(br);
                }
            }
            _count = br.ReadInt32();
            for (int i = 0; i < _count; ++i)
            {
                _go = new GameObject(NodeName_Transfer + i);
                _go.transform.position = Vector3.zero;
                _go.transform.eulerAngles = Vector3.zero;
                _go.transform.localScale = Vector3.one;
                var _transferBhv = _go.AddComponent<Bhv_Trasfer>();
                _transferBhv.transform.SetParent(transform.Find(NodeName_TransferList));
                transferList.Add(_transferBhv);
                _transferBhv.Load(br);
            }
        }
        public void Clear()
        {
            showTriggerList = false;
            showEventList = false;
            showTriggerList = false;
            triggerList.Clear();
            eventList.Clear();
            transferList.Clear();
            for (int i = 0; i < transform.childCount; ++i)
            {
                for (int j = transform.GetChild(i).childCount - 1; j >= 0; --j)
                {
                    DestroyImmediate(transform.GetChild(i).GetChild(j).gameObject);
                }
            }
        }
#endif
    }
}
Core/MapEditor/Behavior/Bhv_MapData.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dc90d6f805d82a24a83203b93f99deba
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Behavior/Bhv_MapTrigger.cs
New file
@@ -0,0 +1,130 @@
using System.Collections.Generic;
using UnityEngine;
using System.IO;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace H2Engine
{
    public class Bhv_MapTrigger : MonoBehaviour
    {
        [HideInInspector]
        public int id;
        [HideInInspector]
        public Evt.E_EventType type = Evt.E_EventType.Enemy;
        [HideInInspector]
        public int prevID = -1;
        [HideInInspector]
        public BoxCollider boxCollider;
        private bool showDetail = false;
        private bool showEventList = false;
        [HideInInspector]
        public List<int> eventIDList = new List<int>();
#if UNITY_EDITOR
        public void Save(BinaryWriter bw)
        {
            bw.Write(id);
            bw.Write((byte)type);
            bw.Write(prevID);
            bw.Write((float)System.Math.Round(transform.position.x, 2));
            bw.Write((float)System.Math.Round(transform.position.y, 2));
            bw.Write((float)System.Math.Round(transform.position.z, 2));
            bw.Write((float)System.Math.Round(boxCollider.size.x, 2));
            bw.Write((float)System.Math.Round(boxCollider.size.z, 2));
            bw.Write((float)System.Math.Round(transform.eulerAngles.y, 2));
            bw.Write(eventIDList.Count);
            foreach (var _eventID in eventIDList)
            {
                bw.Write(_eventID);
            }
        }
        public void Export(BinaryWriter bw)
        {
            Save(bw);
        }
        public void Load(BinaryReader br)
        {
            id = br.ReadInt32();
            type = (Evt.E_EventType)br.ReadByte();
            prevID = br.ReadInt32();
            float _pX = br.ReadSingle();
            float _pY = br.ReadSingle();
            float _pZ = br.ReadSingle();
            float _x = br.ReadSingle();
            float _z = br.ReadSingle();
            float _eY = br.ReadSingle();
            int _count = br.ReadInt32();
            for (int i = 0; i < _count; ++i)
            {
                eventIDList.Add(br.ReadInt32());
            }
            transform.position = new Vector3(_pX, _pY, _pZ);
            boxCollider.size = new Vector3(_x, 1, _z);
            transform.eulerAngles = new Vector3(0, _eY, 0);
        }
        public bool DrawUI(GUISkin guiSkin)
        {
            bool _result = false;
            EditorGUILayout.BeginVertical(guiSkin.box);
            EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
            EditorGUI.indentLevel += 1;
            showDetail = EditorGUILayout.Foldout(showDetail, "  触发器ID:" + id, true, guiSkin.toggle);
            if (GUILayout.Button("查找", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
            {
                Selection.activeGameObject = gameObject;
                if (Selection.activeGameObject)
                {
                    SceneView.lastActiveSceneView.LookAt(Selection.activeGameObject.transform.position);
                }
            }
            if (GUILayout.Button("删除", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
            {
                _result = true;
            }
            EditorGUILayout.EndHorizontal();
            if (showDetail)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
                EditorGUILayout.LabelField("前置触发器ID", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(80));
                prevID = EditorGUILayout.IntField(prevID, guiSkin.textField, GUILayout.Height(20));
                EditorGUILayout.EndHorizontal();
                EditorGUILayout.BeginVertical(guiSkin.customStyles[1]);
                EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
                showEventList = EditorGUILayout.Foldout(showEventList, "  触发事件列表", true, guiSkin.toggle);
                if (GUILayout.Button("添加", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
                {
                    eventIDList.Add(0);
                    showEventList = true;
                }
                EditorGUILayout.EndHorizontal();
                if (showEventList)
                {
                    for (int i = eventIDList.Count - 1; i >= 0; --i)
                    {
                        EditorGUILayout.BeginHorizontal(guiSkin.box, GUILayout.Height(22));
                        EditorGUILayout.LabelField("事件ID", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(60));
                        eventIDList[i] = EditorGUILayout.IntField(eventIDList[i], guiSkin.textField, GUILayout.Height(22));
                        if (GUILayout.Button("删除", guiSkin.button, GUILayout.Width(60), GUILayout.Height(22)))
                        {
                            eventIDList.RemoveAt(i);
                        }
                        EditorGUILayout.EndHorizontal();
                    }
                }
                EditorGUILayout.EndVertical();
            }
            EditorGUI.indentLevel -= 1;
            EditorGUILayout.EndVertical();
            return _result;
        }
#endif
    }
}
Core/MapEditor/Behavior/Bhv_MapTrigger.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5bac32a5b5beec741993b2c88f45f4da
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Behavior/Bhv_MonsterData.cs
New file
@@ -0,0 +1,38 @@
using UnityEngine;
using System.IO;
namespace H2Engine
{
    public class Bhv_MonsterData : MonoBehaviour
    {
        [HideInInspector]
        public int npcID;
        [HideInInspector]
        public byte ai;
        public void Save(BinaryWriter bw)
        {
            bw.Write(npcID);
            bw.Write(ai);
            bw.Write((float)System.Math.Round(transform.position.x));
            bw.Write((float)System.Math.Round(transform.position.y));
            bw.Write((float)System.Math.Round(transform.position.z));
        }
        public void Load(BinaryReader br)
        {
            npcID = br.ReadInt32();
            ai = br.ReadByte();
            float _x = br.ReadSingle();
            float _y = br.ReadSingle();
            float _z = br.ReadSingle();
            transform.position = new Vector3(_x, _y, _z);
            name = npcID + "_RefreshMonster";
        }
        public void Export(BinaryWriter bw)
        {
            Save(bw);
        }
    }
}
Core/MapEditor/Behavior/Bhv_MonsterData.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 74afc638dfa0d2b42b7e4f0b2c07cfa3
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Behavior/Bhv_TransferPoint.cs
New file
@@ -0,0 +1,38 @@
using UnityEngine;
using System.IO;
namespace H2Engine
{
    public class Bhv_TransferPoint : MonoBehaviour
    {
        [HideInInspector]
        public int effectID = -1;
        [HideInInspector]
        public CapsuleCollider capsuleCollider;
        public void Save(BinaryWriter bw)
        {
            bw.Write(effectID);
            bw.Write((float)System.Math.Round(transform.position.x));
            bw.Write((float)System.Math.Round(transform.position.y));
            bw.Write((float)System.Math.Round(transform.position.z));
            bw.Write((float)System.Math.Round(capsuleCollider.radius));
        }
        public void Load(BinaryReader br)
        {
            effectID = br.ReadInt32();
            float _x = br.ReadSingle();
            float _y = br.ReadSingle();
            float _z = br.ReadSingle();
            transform.position = new Vector3(_x, _y, _z);
            float _r = br.ReadSingle();
            capsuleCollider.radius = _r;
        }
        public void Export(BinaryWriter bw)
        {
            Save(bw);
        }
    }
}
Core/MapEditor/Behavior/Bhv_TransferPoint.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0d831f11e6aad15478664877854852c1
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Behavior/Bhv_Trasfer.cs
New file
@@ -0,0 +1,159 @@
using UnityEngine;
using System.Collections.Generic;
using System.IO;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace H2Engine
{
    public class Bhv_Trasfer : MonoBehaviour
    {
        [HideInInspector]
        public int id;
        [HideInInspector]
        public MapTrasfer.E_TransferType transferType = MapTrasfer.E_TransferType.None;
        [HideInInspector]
        public int param;
        [HideInInspector]
        public List<Bhv_TransferPoint> pointList = new List<Bhv_TransferPoint>();
        private bool showDetail;
#if UNITY_EDITOR
        public void Save(BinaryWriter bw)
        {
            bw.Write((byte)transferType);
            bw.Write(param);
            bw.Write(pointList.Count);
            foreach (var _point in pointList)
            {
                _point.Save(bw);
            }
        }
        public void Export(BinaryWriter bw)
        {
            bw.Write((byte)transferType);
            bw.Write(param);
            bw.Write(pointList.Count);
            foreach (var _point in pointList)
            {
                _point.Export(bw);
            }
        }
        public void Load(BinaryReader br)
        {
            transferType = (MapTrasfer.E_TransferType)br.ReadByte();
            param = br.ReadInt32();
            int _count = br.ReadInt32();
            for (int i = 0; i < _count; ++i)
            {
                var _go = new GameObject(pointList.Count + "_TransferPoint");
                _go.transform.SetParent(transform);
                _go.transform.localPosition = Vector3.zero;
                _go.transform.eulerAngles = Vector3.zero;
                _go.transform.localScale = Vector3.one;
                var _transferPoint = _go.AddComponent<Bhv_TransferPoint>();
                _transferPoint.capsuleCollider = _go.AddComponent<CapsuleCollider>();
                pointList.Add(_transferPoint);
                _transferPoint.Load(br);
            }
        }
        public bool DrawUI(Bhv_MapData mapData, GUISkin guiSkin)
        {
            bool _result = false;
            EditorGUILayout.BeginVertical(guiSkin.box);
            EditorGUILayout.BeginHorizontal(GUILayout.Height(20));
            EditorGUI.indentLevel += 1;
            showDetail = EditorGUILayout.Foldout(showDetail, "  No." + mapData.transferList.IndexOf(this), true, guiSkin.toggle);
            if (GUILayout.Button("删除", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20)))
            {
                _result = true;
            }
            EditorGUILayout.EndHorizontal();
            if (showDetail)
            {
                EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
                EditorGUILayout.LabelField("类型", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(40));
                transferType = (MapTrasfer.E_TransferType)EditorGUILayout.EnumPopup(transferType, guiSkin.box, GUILayout.Height(20));
                EditorGUILayout.EndHorizontal();
                if (transferType == MapTrasfer.E_TransferType.Other)
                {
                    EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
                    EditorGUILayout.LabelField("MapID", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(40));
                    param = EditorGUILayout.IntField(param, guiSkin.textField, GUILayout.Height(20));
                    EditorGUILayout.EndHorizontal();
                }
                EditorGUILayout.BeginVertical(guiSkin.customStyles[1]);
                EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
                EditorGUILayout.LabelField("传送点列表", guiSkin.customStyles[0], GUILayout.Height(20));
                if (GUILayout.Button("添加", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20)))
                {
                    var _go = new GameObject(pointList.Count + "_TransferPoint");
                    _go.transform.SetParent(transform);
                    _go.transform.localPosition = Vector3.zero;
                    _go.transform.eulerAngles = Vector3.zero;
                    _go.transform.localScale = Vector3.one;
                    var _transferPoint = _go.AddComponent<Bhv_TransferPoint>();
                    _transferPoint.capsuleCollider = _go.AddComponent<CapsuleCollider>();
                    pointList.Add(_transferPoint);
                }
                EditorGUILayout.EndHorizontal();
                if (pointList.Count > 0)
                {
                    for (int i = pointList.Count - 1; i >= 0; --i)
                    {
                        if (pointList[i] == null)
                        {
                            pointList.RemoveAt(i);
                            continue;
                        }
                        EditorGUILayout.BeginHorizontal(guiSkin.box, GUILayout.Height(22));
                        EditorGUILayout.LabelField("[" + (i + 1) + "]", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(40));
                        EditorGUILayout.LabelField("特效ID", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(40));
                        pointList[i].effectID = EditorGUILayout.IntField(pointList[i].effectID, guiSkin.textField, GUILayout.Height(20));
                        if (GUILayout.Button("定高", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20)))
                        {
                            Vector3 _pos = pointList[i].transform.position;
                            _pos.y = 0;
                            RaycastHit _hit;
                            Ray _ray = new Ray(_pos + Vector3.up * 100, Vector3.down);
                            if (Physics.Raycast(_ray, out _hit, 200, 1 << LayerMask.NameToLayer("Walkable")))
                            {
                                pointList[i].transform.position = _hit.point;
                            }
                        }
                        if (GUILayout.Button("查找", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20)))
                        {
                            Selection.activeGameObject = pointList[i].gameObject;
                            if (Selection.activeGameObject)
                            {
                                SceneView.lastActiveSceneView.LookAt(Selection.activeGameObject.transform.position);
                            }
                        }
                        if (GUILayout.Button("删除", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20)))
                        {
                            DestroyImmediate(pointList[i].gameObject);
                            pointList.RemoveAt(i);
                        }
                        EditorGUILayout.EndHorizontal();
                    }
                }
                EditorGUILayout.EndVertical();
            }
            EditorGUI.indentLevel -= 1;
            EditorGUILayout.EndVertical();
            return _result;
        }
#endif
    }
}
Core/MapEditor/Behavior/Bhv_Trasfer.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 88dd76332d137b74d8602981120d28af
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Data.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e56a787a1268b094095d54b1de99d288
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Data/Event.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fe4bd498013ad644e942356fbf3ec201
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Data/Event/Evt.cs
New file
@@ -0,0 +1,22 @@
using System.IO;
namespace H2Engine
{
    [System.Serializable]
    public class Evt
    {
        public enum E_EventType
        {
            Enemy
        }
        public int id;
        public E_EventType type;
        public virtual void Load(BinaryReader br)
        {
            id = br.ReadInt32();
        }
    }
}
Core/MapEditor/Data/Event/Evt.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fab56c4da5511ec439e595f422819588
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Data/Event/Evt_RefreshMonster.cs
New file
@@ -0,0 +1,85 @@
using System.IO;
namespace H2Engine
{
    [System.Serializable]
    public class Evt_RefreshMonster : Evt
    {
        public enum E_OverCondition
        {
            None,
            DeadCount,
            Time,
        }
        public enum E_RefreshType
        {
            All,
            OneByOneTime,// 根据时间刷新
            OneByOnePrevDie,// 前一只刷出已死亡
        }
        public MonsterData[] monsters;
        public E_OverCondition overCondition = E_OverCondition.None;
        public E_RefreshType refreshType = E_RefreshType.All;
        /// <summary>
        /// 参数
        /// <para>当使用OverCondition类型为DeadCount的时候为个数</para>
        /// <para>当使用OverCondition类型为Time的时候为时间(毫秒)</para>
        /// </summary>
        public int conditionParam;
        /// <summary>
        /// 刷新参数
        /// <para>刷新类型: OneByOneTime, 作为时间(毫秒)</para>
        /// </summary>
        public int refreshParam;
        public override void Load(BinaryReader br)
        {
            base.Load(br);
            overCondition = (Evt_RefreshMonster.E_OverCondition)br.ReadByte();
            refreshType = (Evt_RefreshMonster.E_RefreshType)br.ReadByte();
            refreshParam = br.ReadInt32();
            conditionParam = br.ReadInt32();
            int _count = br.ReadInt32();
            monsters = new MonsterData[_count];
            for (int i = 0; i < _count; ++i)
            {
                monsters[i] = new MonsterData();
                monsters[i].Load(br);
            }
        }
        /*
            float delay = Time.now
            float interval
            int index
            update
                if refreshType == all
                    for index = 0; index < monsters.Length; ++index
                        doRefresh(monsters[index]);
                else if refreshType == onebyoneTime
                    if Time.now - delay > interval
                        doRefresh(monster[index]);
                        index++;
                        delay = Time.now;
                else if refreshType == onebyoneDie
                    if prevNpc.isDie
                        prevNpc = doRefresh(monster[index]);
                        index++;
            int deadCount
            float overTime = conditionParam * 0.001f;
            float timePast = Time.now
            over
                if condition == None
                    return true;
                else if condition == DeadCount
                    return deadCount > monsters.Length || deadCount > conditionParam;
                else if condition == Time
                    return Time.now - timePast >= overTime;
         */
    }
}
Core/MapEditor/Data/Event/Evt_RefreshMonster.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d5b73b47c82904a45965261e4e2ab644
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Data/Event/MonsterData.cs
New file
@@ -0,0 +1,23 @@
using UnityEngine;
using System.IO;
namespace H2Engine
{
    [System.Serializable]
    public class MonsterData
    {
        public int npcID;
        public Vector3 position;
        public int ai;
        public void Load(BinaryReader br)
        {
            npcID = br.ReadInt32();
            ai = br.ReadByte();
            float _x = br.ReadSingle();
            float _y = br.ReadSingle();
            float _z = br.ReadSingle();
            position = new Vector3(_x, _y, _z);
        }
    }
}
Core/MapEditor/Data/Event/MonsterData.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fe4b1c68c1bbb2548b31ee3fc81227e9
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Data/MapData.cs
New file
@@ -0,0 +1,75 @@
using UnityEngine;
using System.IO;
using System.Collections.Generic;
namespace H2Engine
{
    [System.Serializable]
    public class MapData
    {
        public int id;
        public MapTrigger[] triggers;
        public Dictionary<int, Evt> eventDict = new Dictionary<int, Evt>();
        public MapTrasfer[] transfers;
        public static MapData LoadFormFile(string fileName)
        {
            string _path = null;
            if (AssetSource.refdataFromEditor)
            {
                _path = ResourcesPath.ResourcesOutPath + "Refdata/MapData/" + fileName + ".gd";
            }
            else
            {
                _path = AssetVersionUtility.GetAssetFilePath(StringUtility.Contact("mapdata/", fileName, ".gd"));
            }
            MapData _mapData = null;
            if (File.Exists(_path))
            {
                using (var _fileStream = File.OpenRead(_path))
                {
                    using (var _br = new BinaryReader(_fileStream))
                    {
                        _mapData = new MapData();
                        _mapData.Load(_br);
                    }
                }
            }
            return _mapData;
        }
        public void Load(BinaryReader br)
        {
            id = br.ReadInt32();
            int _count = br.ReadInt32();
            triggers = new MapTrigger[_count];
            for (int i = 0; i < _count; ++i)
            {
                triggers[i] = new MapTrigger();
                triggers[i].Load(br);
            }
            _count = br.ReadInt32();
            for (int i = 0; i < _count; ++i)
            {
                var _type = (Evt.E_EventType)br.ReadByte();
                Evt _event = null;
                if (_type == Evt.E_EventType.Enemy)
                {
                    _event = new Evt_RefreshMonster();
                }
                if (_event != null)
                {
                    _event.Load(br);
                    eventDict[_event.id] = _event;
                }
            }
            _count = br.ReadInt32();
            transfers = new MapTrasfer[_count];
            for (int i = 0; i < _count; ++i)
            {
                transfers[i] = new MapTrasfer();
                transfers[i].Load(br);
            }
        }
    }
}
Core/MapEditor/Data/MapData.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f75edd0d82af12043ae3ad0b00caf91f
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Data/MapTrigger.cs
New file
@@ -0,0 +1,39 @@
using UnityEngine;
using System.IO;
namespace H2Engine
{
    [System.Serializable]
    public class MapTrigger
    {
        public Evt.E_EventType type;
        public int prevID;
        public int id;
        public int[] evevntIDs;
        public Vector3 position;
        public float rotationY;
        public Vector3 size;
        public void Load(BinaryReader br)
        {
            id = br.ReadInt32();
            type = (Evt.E_EventType)br.ReadByte();
            prevID = br.ReadInt32();
            float _pX = br.ReadSingle();
            float _pY = br.ReadSingle();
            float _pZ = br.ReadSingle();
            float _x = br.ReadSingle();
            float _z = br.ReadSingle();
            float _eY = br.ReadSingle();
            int _count = br.ReadInt32();
            evevntIDs = new int[_count];
            for (int i = 0; i < _count; ++i)
            {
                evevntIDs[i] = br.ReadInt32();
            }
            position = new Vector3(_pX, _pY, _pZ);
            size = new Vector3(_x, 1, _z);
            rotationY = _eY;
        }
    }
}
Core/MapEditor/Data/MapTrigger.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 73e3f521830f9854bad41fef4ad96f15
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Data/Transfer.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a69b49b0350da7846baa3c669009d8af
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Data/Transfer/MapTransferPoint.cs
New file
@@ -0,0 +1,24 @@
using UnityEngine;
using System.IO;
namespace H2Engine
{
    [System.Serializable]
    public class MapTransferPoint
    {
        public int effectID;
        public float radius;
        public Vector3 position;
        public void Load(BinaryReader br)
        {
            effectID = br.ReadInt32();
            float _x = br.ReadSingle();
            float _y = br.ReadSingle();
            float _z = br.ReadSingle();
            position = new Vector3(_x, _y, _z);
            float _r = br.ReadSingle();
            radius = _r;
        }
    }
}
Core/MapEditor/Data/Transfer/MapTransferPoint.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a08607a0e6ea4ad4997da27d036e9059
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Data/Transfer/MapTrasfer.cs
New file
@@ -0,0 +1,32 @@
using System.IO;
namespace H2Engine
{
    [System.Serializable]
    public class MapTrasfer
    {
        public int id;
        public enum E_TransferType
        {
            None,
            Current,
            Other,
        }
        public E_TransferType transferType;
        public int param;
        public MapTransferPoint[] transferPoints;
        public void Load(BinaryReader br)
        {
            transferType = (MapTrasfer.E_TransferType)br.ReadByte();
            param = br.ReadInt32();
            int _count = br.ReadInt32();
            transferPoints = new MapTransferPoint[_count];
            for (int i = 0; i < _count; ++i)
            {
                transferPoints[i] = new MapTransferPoint();
                transferPoints[i].Load(br);
            }
        }
    }
}
Core/MapEditor/Data/Transfer/MapTrasfer.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 548fffb2921aaba4b96139b1976f7ba7
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Editor.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6c3fdea6dbf8f6c44b0b1f941f63c7c0
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Editor/EditorResources.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5607bcbf23a156943a0e0162e30605c8
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Editor/EditorResources/EditorSkin.guiskin
New file
@@ -0,0 +1,1559 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInternal: {fileID: 0}
  m_GameObject: {fileID: 0}
  m_Enabled: 1
  m_EditorHideFlags: 1
  m_Script: {fileID: 12001, guid: 0000000000000000e000000000000000, type: 0}
  m_Name: EditorSkin
  m_EditorClassIdentifier:
  m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
  m_box:
    m_Name: box
    m_Normal:
      m_Background: {fileID: 11001, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 6
      m_Right: 6
      m_Top: 6
      m_Bottom: 6
    m_Margin:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Padding:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 1
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_button:
    m_Name: button
    m_Normal:
      m_Background: {fileID: 11006, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1}
    m_Hover:
      m_Background: {fileID: 11003, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_Active:
      m_Background: {fileID: 11002, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_OnNormal:
      m_Background: {fileID: 11005, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.9019608, g: 0.9019608, b: 0.9019608, a: 1}
    m_OnHover:
      m_Background: {fileID: 11004, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_OnActive:
      m_Background: {fileID: 11002, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 6
      m_Right: 6
      m_Top: 6
      m_Bottom: 4
    m_Margin:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Padding:
      m_Left: 6
      m_Right: 6
      m_Top: 3
      m_Bottom: 3
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 4
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_toggle:
    m_Name: toggle
    m_Normal:
      m_Background: {fileID: 11018, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.89112896, g: 0.89112896, b: 0.89112896, a: 1}
    m_Hover:
      m_Background: {fileID: 11014, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_Active:
      m_Background: {fileID: 11013, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 11016, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.8901961, g: 0.8901961, b: 0.8901961, a: 1}
    m_OnHover:
      m_Background: {fileID: 11015, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_OnActive:
      m_Background: {fileID: 11017, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 14
      m_Right: 0
      m_Top: 14
      m_Bottom: 0
    m_Margin:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Padding:
      m_Left: 15
      m_Right: 0
      m_Top: 3
      m_Bottom: 0
    m_Overflow:
      m_Left: -1
      m_Right: 0
      m_Top: -4
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 12
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_label:
    m_Name: label
    m_Normal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Margin:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: 3
      m_Bottom: 3
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 1
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_textField:
    m_Name: textfield
    m_Normal:
      m_Background: {fileID: 11024, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1}
    m_Hover:
      m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_OnNormal:
      m_Background: {fileID: 11025, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Margin:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Padding:
      m_Left: 3
      m_Right: 3
      m_Top: 3
      m_Bottom: 3
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 0
    m_TextClipping: 1
    m_ImagePosition: 3
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_textArea:
    m_Name: textarea
    m_Normal:
      m_Background: {fileID: 11024, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.9019608, g: 0.9019608, b: 0.9019608, a: 1}
    m_Hover:
      m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 11025, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Margin:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Padding:
      m_Left: 3
      m_Right: 3
      m_Top: 3
      m_Bottom: 3
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 1
    m_RichText: 0
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_window:
    m_Name: window
    m_Normal:
      m_Background: {fileID: 11023, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 11022, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 8
      m_Right: 8
      m_Top: 18
      m_Bottom: 8
    m_Margin:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Padding:
      m_Left: 10
      m_Right: 10
      m_Top: 20
      m_Bottom: 10
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 1
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: -18}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_horizontalSlider:
    m_Name: horizontalslider
    m_Normal:
      m_Background: {fileID: 11009, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 3
      m_Right: 3
      m_Top: 0
      m_Bottom: 0
    m_Margin:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Padding:
      m_Left: -1
      m_Right: -1
      m_Top: 0
      m_Bottom: 0
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: -2
      m_Bottom: -3
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 2
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 12
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_horizontalSliderThumb:
    m_Name: horizontalsliderthumb
    m_Normal:
      m_Background: {fileID: 11011, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 11012, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 11010, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 4
      m_Right: 4
      m_Top: 0
      m_Bottom: 0
    m_Margin:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Padding:
      m_Left: 7
      m_Right: 7
      m_Top: 0
      m_Bottom: 0
    m_Overflow:
      m_Left: -1
      m_Right: -1
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 2
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 12
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_verticalSlider:
    m_Name: verticalslider
    m_Normal:
      m_Background: {fileID: 11021, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 0
      m_Right: 0
      m_Top: 3
      m_Bottom: 3
    m_Margin:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: -1
      m_Bottom: -1
    m_Overflow:
      m_Left: -2
      m_Right: -3
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 0
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 12
    m_FixedHeight: 0
    m_StretchWidth: 0
    m_StretchHeight: 1
  m_verticalSliderThumb:
    m_Name: verticalsliderthumb
    m_Normal:
      m_Background: {fileID: 11011, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 11012, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 11010, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Margin:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: 7
      m_Bottom: 7
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: -1
      m_Bottom: -1
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 12
    m_FixedHeight: 0
    m_StretchWidth: 0
    m_StretchHeight: 1
  m_horizontalScrollbar:
    m_Name: horizontalscrollbar
    m_Normal:
      m_Background: {fileID: 11008, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 9
      m_Right: 9
      m_Top: 0
      m_Bottom: 0
    m_Margin:
      m_Left: 4
      m_Right: 4
      m_Top: 1
      m_Bottom: 4
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 2
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 15
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_horizontalScrollbarThumb:
    m_Name: horizontalscrollbarthumb
    m_Normal:
      m_Background: {fileID: 11007, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 6
      m_Right: 6
      m_Top: 6
      m_Bottom: 6
    m_Margin:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Padding:
      m_Left: 6
      m_Right: 6
      m_Top: 0
      m_Bottom: 0
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: -1
      m_Bottom: 1
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 13
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_horizontalScrollbarLeftButton:
    m_Name: horizontalscrollbarleftbutton
    m_Normal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Margin:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_horizontalScrollbarRightButton:
    m_Name: horizontalscrollbarrightbutton
    m_Normal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Margin:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_verticalScrollbar:
    m_Name: verticalscrollbar
    m_Normal:
      m_Background: {fileID: 11020, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 0
      m_Right: 0
      m_Top: 9
      m_Bottom: 9
    m_Margin:
      m_Left: 1
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: 1
      m_Bottom: 1
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 15
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_verticalScrollbarThumb:
    m_Name: verticalscrollbarthumb
    m_Normal:
      m_Background: {fileID: 11019, guid: 0000000000000000e000000000000000, type: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 6
      m_Right: 6
      m_Top: 6
      m_Bottom: 6
    m_Margin:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: 6
      m_Bottom: 6
    m_Overflow:
      m_Left: -1
      m_Right: -1
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 2
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 15
    m_FixedHeight: 0
    m_StretchWidth: 0
    m_StretchHeight: 1
  m_verticalScrollbarUpButton:
    m_Name: verticalscrollbarupbutton
    m_Normal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Margin:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_verticalScrollbarDownButton:
    m_Name: verticalscrollbardownbutton
    m_Normal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Margin:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_ScrollView:
    m_Name: scrollview
    m_Normal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Margin:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 0
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 1
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_CustomStyles:
  - m_Name: label_12
    m_Normal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Margin:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Padding:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 12
    m_FontStyle: 0
    m_Alignment: 4
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 0
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  - m_Name: box_gray
    m_Normal:
      m_Background: {fileID: 2800000, guid: 974bc19b782e5c241897a5476ecbbe36, type: 3}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 6
      m_Right: 6
      m_Top: 6
      m_Bottom: 6
    m_Margin:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Padding:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 0
    m_FontStyle: 0
    m_Alignment: 4
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 0
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  - m_Name: label_11
    m_Normal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 1, g: 1, b: 1, a: 1}
    m_Hover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Active:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Focused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnNormal:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnHover:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnActive:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_OnFocused:
      m_Background: {fileID: 0}
      m_ScaledBackgrounds: []
      m_TextColor: {r: 0, g: 0, b: 0, a: 1}
    m_Border:
      m_Left: 6
      m_Right: 6
      m_Top: 6
      m_Bottom: 6
    m_Margin:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Padding:
      m_Left: 4
      m_Right: 4
      m_Top: 4
      m_Bottom: 4
    m_Overflow:
      m_Left: 0
      m_Right: 0
      m_Top: 0
      m_Bottom: 0
    m_Font: {fileID: 0}
    m_FontSize: 11
    m_FontStyle: 0
    m_Alignment: 4
    m_WordWrap: 0
    m_RichText: 1
    m_TextClipping: 0
    m_ImagePosition: 0
    m_ContentOffset: {x: 0, y: 0}
    m_FixedWidth: 0
    m_FixedHeight: 0
    m_StretchWidth: 1
    m_StretchHeight: 0
  m_Settings:
    m_DoubleClickSelectsWord: 1
    m_TripleClickSelectsLine: 1
    m_CursorColor: {r: 1, g: 1, b: 1, a: 1}
    m_CursorFlashSpeed: -1
    m_SelectionColor: {r: 1, g: 0.38403907, b: 0, a: 0.7}
Core/MapEditor/Editor/EditorResources/EditorSkin.guiskin.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 62a8bf0ea5371314fa045af4833ad1f1
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 11400000
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Editor/EditorResources/box_white.png
Core/MapEditor/Editor/EditorResources/box_white.png.meta
New file
@@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 974bc19b782e5c241897a5476ecbbe36
TextureImporter:
  fileIDToRecycleName: {}
  externalObjects: {}
  serializedVersion: 7
  mipmaps:
    mipMapMode: 0
    enableMipMap: 1
    sRGBTexture: 1
    linearTexture: 0
    fadeOut: 0
    borderMipMap: 0
    mipMapsPreserveCoverage: 0
    alphaTestReferenceValue: 0.5
    mipMapFadeDistanceStart: 1
    mipMapFadeDistanceEnd: 3
  bumpmap:
    convertToNormalMap: 0
    externalNormalMap: 0
    heightScale: 0.25
    normalMapFilter: 0
  isReadable: 0
  streamingMipmaps: 0
  streamingMipmapsPriority: 0
  grayScaleToAlpha: 0
  generateCubemap: 6
  cubemapConvolution: 0
  seamlessCubemap: 0
  textureFormat: 1
  maxTextureSize: 2048
  textureSettings:
    serializedVersion: 2
    filterMode: -1
    aniso: -1
    mipBias: -100
    wrapU: -1
    wrapV: -1
    wrapW: -1
  nPOTScale: 1
  lightmap: 0
  compressionQuality: 50
  spriteMode: 0
  spriteExtrude: 1
  spriteMeshType: 1
  alignment: 0
  spritePivot: {x: 0.5, y: 0.5}
  spritePixelsToUnits: 100
  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
  spriteGenerateFallbackPhysicsShape: 1
  alphaUsage: 1
  alphaIsTransparency: 0
  spriteTessellationDetail: -1
  textureType: 0
  textureShape: 1
  singleChannelComponent: 0
  maxTextureSizeSet: 0
  compressionQualitySet: 0
  textureFormatSet: 0
  platformSettings:
  - serializedVersion: 2
    buildTarget: DefaultTexturePlatform
    maxTextureSize: 2048
    resizeAlgorithm: 0
    textureFormat: -1
    textureCompression: 1
    compressionQuality: 50
    crunchedCompression: 0
    allowsAlphaSplitting: 0
    overridden: 0
    androidETC2FallbackOverride: 0
  spriteSheet:
    serializedVersion: 2
    sprites: []
    outline: []
    physicsShape: []
    bones: []
    spriteID:
    vertices: []
    indices:
    edges: []
    weights: []
  spritePackingTag:
  pSDRemoveMatte: 0
  pSDShowRemoveMatteOption: 0
  userData:
  assetBundleName:
  assetBundleVariant:
Core/MapEditor/Editor/MapEditor.cs
New file
@@ -0,0 +1,300 @@
using System.IO;
using UnityEditor;
using UnityEngine;
namespace H2Engine
{
    [CustomEditor(typeof(Bhv_MapData))]
    public class MapEditor : Editor
    {
        private string LS_KEY_SAVEPATH;
        private int m_TriggerSeed;
        private int m_EventSeed;
        private int m_TransferSeed;
        private int RequestTriggerID()
        {
            return m_TriggerSeed++;
        }
        private int RequestEventID()
        {
            return m_EventSeed++;
        }
        private Evt.E_EventType eventType = Evt.E_EventType.Enemy;
        [MenuItem("程序/MapEditor | 地图编辑器")]
        static void Init()
        {
            var _mono = GameObject.FindObjectOfType<Bhv_MapData>();
            if (_mono == null)
            {
                var _root = CreateNewGO(Bhv_MapData.NodeName_Root);
                _root.AddComponent<Bhv_MapData>();
                Selection.activeGameObject = _root;
                var _child = CreateNewGO(Bhv_MapData.NodeName_TriggerList);
                _child.transform.SetParent(_root.transform);
                _child = CreateNewGO(Bhv_MapData.NodeName_EventList);
                _child.transform.SetParent(_root.transform);
                _child = CreateNewGO(Bhv_MapData.NodeName_TransferList);
                _child.transform.SetParent(_root.transform);
            }
        }
        public static GameObject CreateNewGO(string name)
        {
            var _go = new GameObject(name);
            _go.transform.position = Vector3.zero;
            _go.transform.eulerAngles = Vector3.zero;
            _go.transform.localScale = Vector3.one;
            return _go;
        }
        private GUISkin gUISkin;
        /// <summary>
        /// This function is called when the object becomes enabled and active.
        /// </summary>
        void OnEnable()
        {
            target.name = "MapEditor";
            LS_KEY_SAVEPATH = System.Environment.CurrentDirectory + "/MapEditor/Save";
        }
        public override void OnInspectorGUI()
        {
            if (gUISkin == null)
            {
                gUISkin = AssetDatabase.LoadAssetAtPath<GUISkin>("Assets/Scripts/Core/MapEditor/Editor/EditorResources/EditorSkin.guiskin");
            }
            serializedObject.Update();
            var _mapData = target as Bhv_MapData;
            GUILayout.Space(5);
            EditorGUILayout.BeginVertical(gUISkin.box);
            EditorGUILayout.BeginHorizontal(gUISkin.box, GUILayout.Height(24));
            EditorGUILayout.LabelField("数据ID", gUISkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(60));
            _mapData.id = EditorGUILayout.IntField(_mapData.id, gUISkin.textField, GUILayout.Height(22));
            if (GUILayout.Button("加载", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
            {
                Load();
            }
            if (GUILayout.Button("保存", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
            {
                Save();
            }
            if (GUILayout.Button("导出", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
            {
                Export();
            }
            EditorGUILayout.EndHorizontal();
            /// --------------------------------------------------------------------------------
            /// 触发器列表 Start
            EditorGUILayout.BeginVertical(gUISkin.box);
            EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
            EditorGUI.indentLevel += 1;
            _mapData.showTriggerList = EditorGUILayout.Foldout(_mapData.showTriggerList, "  触发器列表", true, gUISkin.toggle);
            EditorGUI.indentLevel -= 1;
            if (GUILayout.Button("添加", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
            {
                CreateTrigger();
                _mapData.showTriggerList = true;
            }
            EditorGUILayout.EndHorizontal();
            if (_mapData.showTriggerList)
            {
                for (int i = _mapData.triggerList.Count - 1; i >= 0; --i)
                {
                    var _trigger = _mapData.triggerList[i];
                    if (_trigger == null)
                    {
                        _mapData.triggerList.RemoveAt(i);
                        continue;
                    }
                    if (_trigger.DrawUI(gUISkin))
                    {
                        _mapData.triggerList.RemoveAt(i);
                        DestroyImmediate(_trigger.gameObject);
                    }
                }
            }
            EditorGUILayout.EndVertical();
            /// 触发器列表 End
            /// --------------------------------------------------------------------------------
            /// --------------------------------------------------------------------------------
            /// 事件列表 Start
            EditorGUILayout.BeginVertical(gUISkin.box);
            EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
            EditorGUI.indentLevel += 1;
            _mapData.showEventList = EditorGUILayout.Foldout(_mapData.showEventList, "  事件列表", true, gUISkin.toggle);
            EditorGUI.indentLevel -= 1;
            eventType = (Evt.E_EventType)EditorGUILayout.EnumPopup(eventType, gUISkin.box, GUILayout.Height(22), GUILayout.Width(100));
            if (GUILayout.Button("添加", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
            {
                CreateEvent(eventType);
                _mapData.showEventList = true;
            }
            EditorGUILayout.EndHorizontal();
            if (_mapData.showEventList)
            {
                for (int i = _mapData.eventList.Count - 1; i >= 0; --i)
                {
                    var _event = _mapData.eventList[i];
                    if (_event == null)
                    {
                        _mapData.eventList.RemoveAt(i);
                        continue;
                    }
                    if (_event.DrawUI(gUISkin))
                    {
                        _mapData.eventList.RemoveAt(i);
                        DestroyImmediate(_event.gameObject);
                    }
                }
            }
            EditorGUILayout.EndVertical();
            /// 事件列表 End
            /// --------------------------------------------------------------------------------
            /// --------------------------------------------------------------------------------
            /// 传送点列表 Start
            EditorGUILayout.BeginVertical(gUISkin.box);
            EditorGUILayout.BeginHorizontal(GUILayout.Height(22));
            EditorGUI.indentLevel += 1;
            _mapData.showTransferList = EditorGUILayout.Foldout(_mapData.showTransferList, "  传送组列表", true, gUISkin.toggle);
            EditorGUI.indentLevel -= 1;
            if (GUILayout.Button("添加", gUISkin.button, GUILayout.Width(60), GUILayout.Height(22)))
            {
                CreateTransferPoint();
                _mapData.showTransferList = true;
            }
            EditorGUILayout.EndHorizontal();
            if (_mapData.showTransferList)
            {
                for (int i = _mapData.transferList.Count - 1; i >= 0; --i)
                {
                    var _transfer = _mapData.transferList[i];
                    if (_transfer == null)
                    {
                        _mapData.transferList.RemoveAt(i);
                        continue;
                    }
                    if (_transfer.DrawUI(_mapData, gUISkin))
                    {
                        _mapData.transferList.RemoveAt(i);
                        DestroyImmediate(_transfer.gameObject);
                    }
                }
            }
            EditorGUILayout.EndVertical();
            /// 传送点列表 End
            /// --------------------------------------------------------------------------------
            EditorGUILayout.EndVertical();
            if (GUI.changed)
            {
                EditorUtility.SetDirty(target);
                serializedObject.ApplyModifiedProperties();
            }
        }
        private void CreateTrigger()
        {
            var _mapData = target as Bhv_MapData;
            var _trigger = CreateNewGO(Bhv_MapData.NodeName_Trigger + RequestTriggerID());
            var _triggerBhv = _trigger.AddComponent<Bhv_MapTrigger>();
            _triggerBhv.boxCollider = _trigger.AddComponent<BoxCollider>();
            _trigger.transform.SetParent(_mapData.transform.Find(Bhv_MapData.NodeName_TriggerList));
            _mapData.triggerList.Add(_triggerBhv);
        }
        private void CreateEvent(Evt.E_EventType type)
        {
            var _mapData = target as Bhv_MapData;
            if (type == Evt.E_EventType.Enemy)
            {
                var _event = CreateNewGO(Bhv_MapData.NodeName_Event + RequestEventID());
                var _eventBhv = _event.AddComponent<Bhv_Evt_RefreshMonster>();
                _eventBhv.type = type;
                _event.transform.SetParent(_mapData.transform.Find(Bhv_MapData.NodeName_EventList));
                _mapData.eventList.Add(_eventBhv);
            }
        }
        private void CreateTransferPoint()
        {
            var _mapData = target as Bhv_MapData;
            var _transfer = CreateNewGO(Bhv_MapData.NodeName_Transfer + _mapData.transferList.Count);
            var _transferBhv = _transfer.AddComponent<Bhv_Trasfer>();
            _transfer.transform.SetParent(_mapData.transform.Find(Bhv_MapData.NodeName_TransferList));
            _mapData.transferList.Add(_transferBhv);
        }
        private void Save()
        {
            var _mapData = target as Bhv_MapData;
            string _defaultPath = EditorPrefs.GetString(LS_KEY_SAVEPATH, System.Environment.CurrentDirectory);
            string _path = EditorUtility.SaveFilePanel("保存数据", _defaultPath, "map_" + _mapData.id, "ed");
            if (string.IsNullOrEmpty(_path))
            {
                return;
            }
            using (var _fileStream = File.OpenWrite(_path))
            {
                using (var _binaryWriter = new BinaryWriter(_fileStream))
                {
                    _mapData.Save(_binaryWriter);
                }
            }
        }
        private void Export()
        {
            var _mapData = target as Bhv_MapData;
            string _defaultPath = EditorPrefs.GetString(LS_KEY_SAVEPATH, System.Environment.CurrentDirectory);
            string _path = EditorUtility.SaveFilePanel("导出数据", _defaultPath, "map_" + _mapData.id, "gd");
            if (string.IsNullOrEmpty(_path))
            {
                return;
            }
            using (var _fileStream = File.OpenWrite(_path))
            {
                using (var _binaryWriter = new BinaryWriter(_fileStream))
                {
                    _mapData.Save(_binaryWriter);
                }
            }
        }
        private void Load()
        {
            var _mapData = target as Bhv_MapData;
            string _defaultPath = EditorPrefs.GetString(LS_KEY_SAVEPATH, System.Environment.CurrentDirectory);
            string _path = EditorUtility.OpenFilePanel("打开数据", _defaultPath, "ed");
            if (string.IsNullOrEmpty(_path))
            {
                return;
            }
            _mapData.Clear();
            using (var _fileStream = File.OpenRead(_path))
            {
                using (var _binaryReader = new BinaryReader(_fileStream))
                {
                    _mapData.Load(_binaryReader);
                }
            }
        }
    }
}
Core/MapEditor/Editor/MapEditor.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bf0eaba683a1e8a49bb87626ce3a7568
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ClientPack.meta
File was deleted
Fight/GameActor/GAMgr.cs
@@ -7,7 +7,7 @@
[XLua.LuaCallCSharp]
public class GAMgr : SingletonMonobehaviour<GAMgr>
{
    private List<BossSkillTip_JudgeSummon> m_BossSkillTipList = new List<BossSkillTip_JudgeSummon>();
@@ -458,7 +458,7 @@
        if (_actor != null)
        {
            _actor.Init(serverInstID, m_ClientId.Request(), npcID, group, package);
            _actor.Init(serverInstID, m_ClientId.Request(), group, package);
            BuildManagerRelation(_actor, _actorClassType);
        }
@@ -503,7 +503,7 @@
        if (_actor != null)
        {
            _actor.Init(serverInstID, m_ClientId.Request(), npcID, group, package);
            _actor.Init(serverInstID, m_ClientId.Request(), group, package);
            BuildManagerRelation(_actor, _actorClassType);
@@ -541,7 +541,7 @@
        if (_actor != null)
        {
            _actor.Init(serverInstID, m_ClientId.Request(), npcID, group, null);
            _actor.Init(serverInstID, m_ClientId.Request(), group, null);
            BuildManagerRelation(_actor, _actorClassType);
        }
@@ -571,7 +571,7 @@
        if (_actor != null)
        {
            _actor.Init(serverInstID, m_ClientId.Request(), npcID, group, null);
            _actor.Init(serverInstID, m_ClientId.Request(), group, null);
            BuildManagerRelation(_actor, _actorClassType);
        }
Fight/GameActor/GA_Guard.cs
@@ -22,8 +22,10 @@
    public static readonly int GuardAction_Run = 3;
    #endregion
    public bool IsStateActive { get; set; }//是否状态机开启
    public bool IsStateActive { get; set; }//是否状态机开启
    public bool guardPick { get; private set; }
    public float animatorSpeed { get; private set; }
@@ -32,14 +34,21 @@
    public GuardState guardState { get; set; }
    public int targetPlayerId { get; private set; }
    public int itemID { get; set; }
    public int targetPlayerId { get; private set; }
    public int itemID { get; set; }
    public int[] pickEffectIds { get; private set; }
    public bool IsHeroControl { get { return targetPlayerId == PlayerDatas.Instance.PlayerId; } }
    public bool IsHeroControl { get { return targetPlayerId == PlayerDatas.Instance.PlayerId; } }
    public bool IsPlayerDie { get; private set; }
    PlayerDeadModel deadModel { get { return ModelCenter.Instance.GetModel<PlayerDeadModel>(); } }
@@ -66,8 +75,10 @@
        get; private set;
    }
    private DungeonOpenTimeConfig dungeonConfig { get; set; }
    private DungeonOpenTimeConfig dungeonConfig { get; set; }
    private SFXController m_SFXController = null;
    public sealed override void Die() { }
@@ -101,13 +112,6 @@
            {
                Object.DestroyImmediate(pickUpBehaviour);
            }
        }
        if (m_Model)
        {
            m_Model.transform.SetParent(m_Root);
            m_Model.transform.localPosition = Vector3.zero;
            m_Model.transform.localRotation = Quaternion.identity;
        }
    }
@@ -172,25 +176,44 @@
    IEnumerator Co_StagePrepare()
    {
        yield return null;
        if (Root != null && targetPlayer != null)
        {
            var targetPosition = targetPlayer.Root.position;
            if (MathUtility.CalDistance(Root.position, targetPosition) >
                model.resetDistance * model.resetDistance)
            {
                SetPosition(targetPosition.x, targetPosition.z);
            }
            if (m_SFXController == null || !m_SFXController.gameObject.activeSelf)
            {
                m_SFXController = SFXPlayUtility.Instance.PlayBattleEffect(pickEffectIds[0], this, NpcConfig != null ? NpcConfig.ModeProportion : 1);
                if (m_SFXController != null)
                {
                    var mountPoint = Root.GetChildTransformDeeply(GAStaticDefine.MountPointBoneName);
                    m_SFXController.duration = 0;
                    m_SFXController.transform.SetParent(mountPoint);
                    m_SFXController.transform.localPosition = Vector3.zero;
                }
            }
        if (Root != null && targetPlayer != null)
        {
            var targetPosition = targetPlayer.Root.position;
            if (MathUtility.CalDistance(Root.position, targetPosition) >
                model.resetDistance * model.resetDistance)
            {
                SetPosition(targetPosition.x, targetPosition.z);
            }
            if (m_SFXController == null || !m_SFXController.gameObject.activeSelf)
            {
                m_SFXController = SFXPlayUtility.Instance.PlayBattleEffect(pickEffectIds[0], this, NpcConfig != null ? NpcConfig.ModeProportion : 1);
                if (m_SFXController != null)
                {
                    var mountPoint = Root.GetChildTransformDeeply(GAStaticDefine.MountPointBoneName);
                    m_SFXController.duration = 0;
                    m_SFXController.transform.SetParent(mountPoint);
                    m_SFXController.transform.localPosition = Vector3.zero;
                }
            }
        }
    }
@@ -240,23 +263,70 @@
        }
    }
    private void InitializeModelRes()
    protected override sealed void OnPrefabLoadFinished(bool result, UnityEngine.Object prefab)
    {
        IsStateActive = true;
        if (targetPlayer != null)
        {
            var bornpos = targetPlayer.Root.position + targetPlayer.Root.right * 0.6f - targetPlayer.Forward * 0.3f;
            bornpos.y = targetPlayer.Root.position.y + model.height;
            Pos = bornpos;
        if (!result || prefab == null)
        {
            return;
        }
        GAMgr.Instance.RemoveNeedDestroyPrefab(prefab as GameObject);
        m_Model = GameObjectPoolManager.Instance.RequestGameObject(prefab as GameObject);
        var _config = Config.Instance.Get<GuardConfig>(itemID);
        NpcConfig = Config.Instance.Get<NPCConfig>(_config.npcId);
        if (m_Model)
        {
            m_Animator = m_Model.GetComponent<Animator>();
            if (m_Animator)
            {
                RuntimeAnimatorController _controller = null;
                if (m_LoadDefaultRes)
                {
                    _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Func();
                }
                else
                {
                    string _name = NpcConfig.MODE;
                    if (_name.Contains("A_Zs"))
                    {
                        _name = "A_Zs";
                        GameObjectPoolManager.Instance.AddDontDestroyGoInstID(m_Model.GetInstanceID());
                    }
                    else if (_name.Contains("A_Fs"))
                    {
                        _name = "A_Fs";
                        GameObjectPoolManager.Instance.AddDontDestroyGoInstID(m_Model.GetInstanceID());
                    }
                    _controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, _name);
                }
                if (_controller)
                {
                    m_Animator.runtimeAnimatorController = _controller;
                }
                m_Animator.enabled = true;
                m_Animator.SetInteger(GAStaticDefine.Param_ActorInstID, (int)ClientInstID);
            }
            SetupBindNode(m_Model.transform);
            m_Model.transform.SetParent(m_Root);
            m_Model.transform.localPosition = Vector3.zero;
            m_Model.transform.localRotation = Quaternion.identity;
            RequestName();
            OnMainModelLoaded();
        }
    }
    protected override void OnMainModelLoaded()
    {
        m_Model.SetLayer(LayerUtility.Monster, true);
        var mountPoint = Root.GetChildTransformDeeply(GAStaticDefine.MountPointBoneName);
        m_SFXController = SFXPlayUtility.Instance.PlayBattleEffect(pickEffectIds[0], this, NpcConfig != null ? NpcConfig.ModeProportion : 1);
        if (m_SFXController != null)
        {
@@ -274,6 +344,23 @@
        {
            GameObjectPoolManager.Instance.AddDontDestroyGoInstID(m_Model.GetInstanceID());
        }
    }
    private void InitializeModelRes()
    {
        IsStateActive = true;
        if (targetPlayer != null)
        {
            var bornpos = targetPlayer.Root.position + targetPlayer.Root.right * 0.6f - targetPlayer.Forward * 0.3f;
            bornpos.y = targetPlayer.Root.position.y + model.height;
            Pos = bornpos;
        }
        var _config = Config.Instance.Get<GuardConfig>(itemID);
        InstanceResourcesLoader.AsyncLoadNpc(_config.npcId, OnPrefabLoadFinished);
    }
    private void SetPosition(float x, float z)
@@ -324,7 +411,8 @@
    {
        var _height = targetPlayer.Root.position.y + model.height;
        var targetPosition = targetPlayer.Root.position;
        if (MathUtility.CalDistance(Root.position, targetPosition) >
        if (MathUtility.CalDistance(Root.position, targetPosition) >
            model.resetDistance * model.resetDistance)
        {
            SetPosition(targetPosition.x, targetPosition.z);
@@ -360,7 +448,8 @@
    private bool CheckTrack()
    {
        if (MathUtility.CalDistance(Root.position, targetPlayer.Root.position) > model.traceRange * model.traceRange
        if (MathUtility.CalDistance(Root.position, targetPlayer.Root.position) > model.traceRange * model.traceRange
            && guardState != GuardState.Track)
        {
            stopDanceState = true;
@@ -390,15 +479,20 @@
    {
        if (dungeonConfig != null)
        {
            if (dungeonConfig.GuardPick == 0)
            {
            if (dungeonConfig.GuardPick == 0)
            {
                return false;
            }
        }
        if (Root == null)
        {
            return false;
        if (Root == null)
        {
            return false;
        }
        if (DropItemManager.CheckCanGuardPickUp(Root.position))
Fight/GameActor/GA_NpcClientFightNorm.cs
@@ -106,7 +106,7 @@
        }
    }
    protected override void OnAfterInit()
    protected override void OnMainModelLoaded()
    {
        if (NpcConfig.NPCID == 1002)
        {
Fight/GameActor/GA_NpcFightBoss.cs
@@ -18,9 +18,9 @@
        base.OnInit(package);
    }
    protected sealed override void OnAfterInit()
    protected sealed override void OnMainModelLoaded()
    {
        base.OnAfterInit();
        base.OnMainModelLoaded();
        GA_Hero _hero = PlayerDatas.Instance.hero;
        if (_hero != null)
Fight/GameActor/GA_NpcFightNorm.cs
@@ -12,7 +12,14 @@
    protected override void OnInit(GameNetPackBasic package)
    {
        base.OnInit(package);
        var _h0406 = package as H0406_tagNPCAppear;
        NpcConfig = Config.Instance.Get<TableConfig.NPCConfig>((int)_h0406.NPCID);
        if (NpcConfig == null)
        {
            // 报错
            return;
        }
        // 可选择对象创建碰撞区
        if (CanBeSelected())
@@ -21,7 +28,6 @@
            m_NPCInteractProcessor.npcIntergactEvent += OnClick;
        }
        H0406_tagNPCAppear _h0406 = package as H0406_tagNPCAppear;
        if (_h0406 == null)
        {
@@ -57,10 +63,13 @@
        // 战斗类型的怪物随机朝向
        Rotation = Quaternion.Euler(0, UnityEngine.Random.Range(0, 360), 0);
        base.OnInit(package);
    }
    protected override void OnAfterInit()
    protected override void OnMainModelLoaded()
    {
        base.OnMainModelLoaded();
        if (NpcConfig.IsBoss < 2
         && SystemSetting.Instance.GetSystemSettingSwitch(SystemSwitch.HideMonster))
        {
Fight/GameActor/GA_NpcFunc.cs
@@ -24,6 +24,7 @@
    protected override void OnInit(GameNetPackBasic package)
    {
        base.OnInit(package);
        m_H0406 = package as H0406_tagNPCAppear;
        if (m_H0406 == null)
@@ -58,8 +59,6 @@
        PlayerTaskDatas.Event_TaskResponse += OnTaskRefresh;
        RequestMissionSign();
        bool _needHide = (NpcConfig.Show == 0);
        PlayerTaskDatas _model = ModelCenter.Instance.GetModel<PlayerTaskDatas>();
@@ -73,6 +72,101 @@
        {
            Pos = Constants.Special_Hide_Position;
        }
    }
    protected override void OnMainModelLoaded()
    {
        if (string.IsNullOrEmpty(NpcConfig.Equips))
        {
            return;
        }
        string[] _ids = NpcConfig.Equips.Split('|');
        int _weaponId = int.Parse(_ids[0]);
        int _secondaryId = _ids.Length > 1 ? int.Parse(_ids[1]) : -1;
        int _horseId = _ids.Length > 2 ? int.Parse(_ids[2]) : -1;
        int _wingId = _ids.Length > 3 ? int.Parse(_ids[3]) : -1;
        // Debug.LogFormat("weapon: {0}, secondary: {1}, horse: {2}, wing: {3}", _weaponId, _secondaryId, _horseId, _weaponId);
        if (_weaponId > 0)
        {
            SetEquipWeapon(_weaponId);
        }
        if (_secondaryId > 0)
        {
            SetEquipSecondary(_secondaryId);
        }
        if (_wingId > 0)
        {
            SetEquipWing(_wingId);
        }
        if (_horseId > 0)
        {
            SetEquipHorse(_horseId);
        }
        RequestMissionSign();
    }
    private void SetEquipHorse(int horseID)
    {
        if (horseID > 0)
        {
            m_HorseID = horseID;
            var _horseConfig = Config.Instance.Get<HorseConfig>(horseID);
            InstanceResourcesLoader.AsyncLoadModelRes(_horseConfig.Model, OnHorseLoaded);
        }
    }
    private void SetEquipSecondary(int resID)
    {
        if (resID > 0)
        {
            m_SecondaryID = resID;
            InstanceResourcesLoader.AsyncLoadModelRes(resID, OnSecondaryLoaded);
        }
    }
    private void SetEquipWeapon(int resID)
    {
        if (resID > 0)
        {
            m_WeaponID = resID;
            InstanceResourcesLoader.AsyncLoadModelRes(resID, OnWeaponLoaded);
        }
    }
    private void SetEquipWing(int resID)
    {
        if (resID > 0)
        {
            m_WingID = resID;
            InstanceResourcesLoader.AsyncLoadModelRes(resID, OnWingLoaded);
        }
    }
    private void OnHorseLoaded(bool result, UnityEngine.Object prefab)
    {
        if (!result || !prefab)
        {
            return;
        }
        var _horseConfig = Config.Instance.Get<HorseConfig>(m_HorseID);
        var _modelResConfig = Config.Instance.Get<ModelResConfig>(_horseConfig.Model);
        m_HorseModel = GameObjectPoolManager.Instance.RequestGameObject(prefab as GameObject);
        var _animator = m_HorseModel.GetComponent<Animator>();
        if (_animator)
        {
            _animator.runtimeAnimatorController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
                                                                                             _modelResConfig.ResourcesName);
            _animator.enabled = true;
        }
        if (m_HorseModel)
        {
@@ -80,8 +174,6 @@
            m_HorseModel.transform.localPosition = Vector3.zero;
            m_HorseModel.transform.localRotation = Quaternion.identity;
            var _horseConfig = Config.Instance.Get<HorseConfig>(m_HorseID);
            var _modelResConfig = Config.Instance.Get<ModelResConfig>(_horseConfig.Model);
            var _horseBindNode = m_HorseModel.transform.GetChildTransformDeeply(_modelResConfig.BindPoint);
            if (_horseBindNode)
@@ -89,7 +181,7 @@
                m_Model.transform.SetParent(_horseBindNode);
                m_Model.transform.localPosition = Vector3.zero;
                m_Model.transform.localEulerAngles = new Vector3(90, 0, 0);
                var _animator = m_Model.GetComponent<Animator>();
                _animator = m_Model.GetComponent<Animator>();
                _animator.SetInteger(GAStaticDefine.Param_Action, GAStaticDefine.Act_HorseIdle);
                switch (_horseConfig.ActionType)
                {
@@ -111,83 +203,64 @@
                }
            }
        }
        else if (m_Model)
        {
            m_Model.transform.SetParent(m_Root);
            m_Model.transform.localPosition = Vector3.zero;
            m_Model.transform.localRotation = Quaternion.identity;
        }
    }
    public override void InitPerformance(uint clientInstID, int npcID)
    private void OnWingLoaded(bool result, UnityEngine.Object prefab)
    {
        base.InitPerformance(clientInstID, npcID);
        if (string.IsNullOrEmpty(NpcConfig.Equips))
        if (!result || !prefab)
        {
            return;
        }
        string[] _ids = NpcConfig.Equips.Split('|');
        int _weaponId = int.Parse(_ids[0]);
        int _secondaryId = _ids.Length > 1 ? int.Parse(_ids[1]) : -1;
        int _horseId = _ids.Length > 2 ? int.Parse(_ids[2]) : -1;
        int _wingId = _ids.Length > 3 ? int.Parse(_ids[3]) : -1;
        // Debug.LogFormat("weapon: {0}, secondary: {1}, horse: {2}, wing: {3}", _weaponId, _secondaryId, _horseId, _weaponId);
        int _job = NpcConfig.MODE.Contains("A_Zs") ? 1 : 2;
        if (_weaponId > 0)
        m_WingModel = GameObjectPoolManager.Instance.RequestGameObject(prefab as GameObject);
        var _animator = m_WingModel.GetComponent<Animator>();
        if (_animator)
        {
            SetEquip(_weaponId, GAStaticDefine.WeaponBindBoneName, ref m_WeaponModel, ref m_WeaponID);
        }
        if (_secondaryId > 0)
        {
            SetEquip(_secondaryId, GAStaticDefine.SecondaryBindBoneName[_job - 1], ref m_SecondaryModel, ref m_SecondaryID);
        }
        if (_wingId > 0)
        {
            SetEquip(_wingId, GAStaticDefine.WingBindBoneName, ref m_WingModel, ref m_WingID);
        }
        if (_horseId > 0)
        {
            var _horseConfig = Config.Instance.Get<HorseConfig>(_horseId);
            var _modelResConfig = Config.Instance.Get<ModelResConfig>(_horseConfig.Model);
            var _prefab = InstanceResourcesLoader.LoadModelRes(_modelResConfig.ID);
            m_HorseModel = GameObjectPoolManager.Instance.RequestGameObject(_prefab);
            var _animator = m_HorseModel.GetComponent<Animator>();
            if (_animator)
            {
                _animator.runtimeAnimatorController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
                                                                                                 _modelResConfig.ResourcesName);
            }
            _animator.enabled = true;
            m_HorseID = _horseId;
        }
        Transform _bindNode = m_Model.transform.GetChildTransformDeeply(GAStaticDefine.WingBindBoneName);
        m_WingModel.transform.SetParent(_bindNode);
        m_WingModel.transform.localPosition = Vector3.zero;
        m_WingModel.transform.localRotation = Quaternion.identity;
    }
    private void SetEquip(int resID, string bindNodeName, ref GameObject model, ref int id)
    private void OnSecondaryLoaded(bool result, UnityEngine.Object prefab)
    {
        if (resID > 0)
        if (!result || !prefab)
        {
            GameObject _prefab = InstanceResourcesLoader.LoadModelRes(resID);
            model = GameObjectPoolManager.Instance.RequestGameObject(_prefab);
            var _animator = model.GetComponent<Animator>();
            if (_animator)
            {
                _animator.enabled = true;
            }
            Transform _weaponNode = m_Model.transform.GetChildTransformDeeply(bindNodeName);
            model.transform.SetParent(_weaponNode);
            model.transform.localPosition = Vector3.zero;
            model.transform.localRotation = Quaternion.identity;
            id = resID;
            return;
        }
        m_SecondaryModel = GameObjectPoolManager.Instance.RequestGameObject(prefab as GameObject);
        var _animator = m_SecondaryModel.GetComponent<Animator>();
        if (_animator)
        {
            _animator.enabled = true;
        }
        int _job = NpcConfig.MODE.Contains("A_Zs") ? 1 : 2;
        Transform _bindNode = m_Model.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[_job - 1]);
        m_SecondaryModel.transform.SetParent(_bindNode);
        m_SecondaryModel.transform.localPosition = Vector3.zero;
        m_SecondaryModel.transform.localRotation = Quaternion.identity;
    }
    private void OnWeaponLoaded(bool result, UnityEngine.Object prefab)
    {
        if (!result || !prefab)
        {
            return;
        }
        m_WeaponModel = GameObjectPoolManager.Instance.RequestGameObject(prefab as GameObject);
        var _animator = m_WeaponModel.GetComponent<Animator>();
        if (_animator)
        {
            _animator.enabled = true;
        }
        Transform _bindNode = m_Model.transform.GetChildTransformDeeply(GAStaticDefine.WeaponBindBoneName);
        m_WeaponModel.transform.SetParent(_bindNode);
        m_WeaponModel.transform.localPosition = Vector3.zero;
        m_WeaponModel.transform.localRotation = Quaternion.identity;
    }
    protected override void OnUnit()
Fight/GameActor/GA_NpcSummonFight.cs
@@ -29,8 +29,10 @@
        }
    }
    protected override void OnAfterInit()
    protected override void OnMainModelLoaded()
    {
        base.OnMainModelLoaded();
        uint _parentSID = ActorInfo.ownerSID;
        if (_parentSID != PlayerDatas.Instance.PlayerId)
        {
Fight/GameActor/GA_Pet.cs
@@ -31,7 +31,7 @@
        }
    }
    protected sealed override void OnAfterInit()
    protected sealed override void OnMainModelLoaded()
    {
        uint _parentSID = ServerInstID / 10;
        if (_parentSID != PlayerDatas.Instance.PlayerId)
Fight/GameActor/GActor.cs
@@ -14,8 +14,8 @@
    public Transform MP_Stun { get; protected set; }
    public Transform MP_Weapon { get; protected set; }
    public uint ClientInstID { get; private set; }
    public uint ServerInstID { get; private set; }
    public uint ClientInstID { get; protected set; }
    public uint ServerInstID { get; protected set; }
    protected Transform m_Root = null;
    public Transform Root { get { return m_Root; } }
@@ -93,7 +93,7 @@
    public GameObjType ActorType { get; protected set; }
    public E_ActorGroup Group { get; private set; }
    public E_ActorGroup Group { get; protected set; }
    public GActorInfo ActorInfo { get; protected set; }
    private E_ActorState m_State;
Fight/GameActor/GActorNpcFight.cs
@@ -10,7 +10,7 @@
    protected DialogueBubble m_DialogAppear;
    protected DialogueBubble m_DialogTiming;
    protected float m_LastTalkTime;
    public NPCConfig NpcConfig { get; private set; }
    public NPCConfig NpcConfig { get; protected set; }
    private SFXController m_AppearEffect;
    private bool m_LoadDefaultRes = false;
@@ -50,11 +50,29 @@
        }
    }
    public void Init(uint serverInstID, uint clientInstID, uint npcID, E_ActorGroup group, GameNetPackBasic package)
    protected override void OnInit(GameNetPackBasic package)
    {
        base.OnInit(package);
        m_LoadDefaultRes = false;
        NpcConfig = Config.Instance.Get<NPCConfig>((int)npcID);
        var _package = package as H0406_tagNPCAppear;
        if (_package != null)
        {
            NpcConfig = Config.Instance.Get<NPCConfig>((int)_package.NPCID);
        }
        else
        {
            var _package2 = package as H0408_tagPlayerSummonNPCAppear;
            if (_package2 != null)
            {
                NpcConfig = Config.Instance.Get<NPCConfig>((int)_package2.NPCID);
            }
            else
            {
                return;
            }
        }
        if (NpcConfig == null)
        {
@@ -63,143 +81,12 @@
        }
        ActorType = GameObjType.gotNPC;
        // 初始化表现层
        GameObject _prefab = InstanceResourcesLoader.LoadNpcPrefab(NpcConfig.NPCID);
        if (_prefab == null)
        {
            if (this is GA_Pet)
            {
                _prefab = InstanceResourcesLoader.LoadDefaultPet();
            }
            else
            {
                _prefab = InstanceResourcesLoader.LoadDefaultFightNPC();
            }
            if (_prefab)
            {
                m_LoadDefaultRes = true;
            }
        }
        if (_prefab)
        {
            if (PreFightMission.Instance.IsFinished())
            {
                GAMgr.Instance.AddNeedDestroyPrefab(_prefab);
            }
            if (m_LoadDefaultRes)
            {
                if (this is GA_Pet)
                {
                    m_Model = GameObjectPoolManager.Instance.RequestDefaultPet();
                }
                else
                {
                    m_Model = GameObjectPoolManager.Instance.RequestDefaultFightNpc();
                }
            }
            else
            {
                m_Model = GameObjectPoolManager.Instance.RequestNpcGameObject(NpcConfig.NPCID);
            }
            if (m_Model)
            {
                SkinnedMeshRenderer _renderer = m_Model.GetComponentInChildren<SkinnedMeshRenderer>();
                if (_renderer)
                {
                    _renderer.gameObject.layer = LayerUtility.Monster;
                    m_Material = _renderer.material;
                }
                m_Animator = m_Model.GetComponent<Animator>();
                if (!m_Animator)
                {
                    if (m_Model.transform.childCount > 0)
                    {
                        m_Animator = m_Model.transform.GetChild(0).GetComponent<Animator>();
                    }
                }
                if (m_Animator)
                {
                    RuntimeAnimatorController _controller = null;
                    if (m_LoadDefaultRes)
                    {
                        if (this is GA_Pet)
                        {
                            _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Pet();
                        }
                        else
                        {
                            _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Fight();
                        }
                    }
                    else
                    {
                        _controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, NpcConfig.MODE);
                    }
                    if (_controller)
                    {
                        m_Animator.runtimeAnimatorController = _controller;
                    }
                    m_Animator.enabled = true;
                    if (m_Animator.parameterCount > 0)
                    {
                        m_Animator.SetInteger(GAStaticDefine.Param_ActorInstID, (int)clientInstID);
                    }
                    IdleImmediate();
                }
                SetupBindNode(m_Model.transform);
            }
        }
        // 执行父类的初始化
        Init(serverInstID, clientInstID, group, package);
        if (m_Model)
        {
            m_Model.transform.SetParent(m_Root.transform);
            m_Model.transform.localPosition = Vector3.zero;
            m_Model.transform.localRotation = Quaternion.identity;
            bool _playEffect = true;
            uint _parentSID = ActorInfo.ownerSID;
            if (_parentSID != PlayerDatas.Instance.PlayerId)
            {
                GA_Player _player = GAMgr.Instance.GetBySID(_parentSID) as GA_Player;
                if (_player != null)
                {
                    _playEffect = _player.ShowOrHide;
                }
            }
            if (_playEffect)
            {
                if (NpcConfig.NPCEffect != 0)
                {
                    m_AppearEffect = SFXPlayUtility.Instance.PlayBattleEffect(NpcConfig.NPCEffect, this);
                    EffectConfig _effectConfig = Config.Instance.Get<EffectConfig>(NpcConfig.NPCEffect);
                    if (_effectConfig != null)
                    {
                        SoundPlayer.Instance.PlayAudio(m_AudioSource, _effectConfig.audio);
                    }
                }
            }
        }
        Root.gameObject.layer = LayerUtility.Monster;
        if (NpcConfig.ModeProportion != 1)
        {
            Root.localScale = Vector3.one * NpcConfig.ModeProportion;
        }
        if (CanBeSelected())
        {
@@ -209,34 +96,87 @@
            _collider.height = NpcConfig.ModleHeight;
        }
        // 影子不依赖于表现层
        RequestShadow();
        if (NpcConfig.ModeProportion != 1)
        {
            Root.localScale = Vector3.one * NpcConfig.ModeProportion;
        }
        InstanceResourcesLoader.AsyncLoadNpc(NpcConfig.NPCID, OnPrefabLoadFinished);
    }
        RequestDialogueBubble();
        GAStaticDefine.NPCLocation _npcLocation;
        if (GAStaticDefine.TryGetMapNPCLocation(NpcConfig.NPCID, out _npcLocation))
    private void OnPrefabLoadFinished(bool result, UnityEngine.Object prefab)
    {
        if (!result || prefab == null)
        {
            if (_npcLocation.face != 0)
            if (!m_LoadDefaultRes)
            {
                Rotation = MathUtility.GetClientRotationFromAngle(_npcLocation.face);
                InstanceResourcesLoader.AsyncLoadDefaultFuncNpc(OnPrefabLoadFinished);
                if (this is GA_Pet)
                {
                    InstanceResourcesLoader.AsyncLoadDefaultPet(OnPrefabLoadFinished);
                }
                else
                {
                    InstanceResourcesLoader.AsyncLoadDefaultFightNpc(OnPrefabLoadFinished);
                }
                m_LoadDefaultRes = true;
            }
            else
            {
                Rotation = Quaternion.Euler(0, Random.Range(0, 360), 0);
                m_LoadDefaultRes = false;
                Debug.LogErrorFormat("加载Npc模型资源出错: {0}", NpcConfig.NPCID);
            }
            return;
        }
        GAMgr.Instance.AddNeedDestroyPrefab(prefab as GameObject);
        if (m_LoadDefaultRes)
        {
            if (this is GA_Pet)
            {
                m_Model = GameObjectPoolManager.Instance.RequestDefaultPet();
            }
            else
            {
                m_Model = GameObjectPoolManager.Instance.RequestDefaultFightNpc();
            }
        }
        else
        {
            Rotation = Quaternion.Euler(0, Random.Range(0, 360), 0);
            m_Model = GameObjectPoolManager.Instance.RequestGameObject(prefab as GameObject);
        }
        OnAfterInit();
        if (!m_Model)
        {
            return;
        }
        OnMainModelLoaded();
        bool _playEffect = true;
        uint _parentSID = ActorInfo.ownerSID;
        if (_parentSID != PlayerDatas.Instance.PlayerId)
        {
            GA_Player _player = GAMgr.Instance.GetBySID(_parentSID) as GA_Player;
            if (_player != null)
            {
                _playEffect = _player.ShowOrHide;
            }
        }
        if (_playEffect)
        {
            if (NpcConfig.NPCEffect != 0)
            {
                m_AppearEffect = SFXPlayUtility.Instance.PlayBattleEffect(NpcConfig.NPCEffect, this);
                EffectConfig _effectConfig = Config.Instance.Get<EffectConfig>(NpcConfig.NPCEffect);
                if (_effectConfig != null)
                {
                    SoundPlayer.Instance.PlayAudio(m_AudioSource, _effectConfig.audio);
                }
            }
        }
    }
    protected override void OnUnit()
@@ -555,7 +495,64 @@
    public abstract void OnUnSelect();
    public abstract void OnClick();
    protected virtual void OnAfterInit() { }
    protected virtual void OnMainModelLoaded()
    {
        SkinnedMeshRenderer _renderer = m_Model.GetComponentInChildren<SkinnedMeshRenderer>();
        if (_renderer)
        {
            _renderer.gameObject.layer = LayerUtility.Monster;
            m_Material = _renderer.material;
        }
        m_Animator = m_Model.GetComponent<Animator>();
        if (!m_Animator)
        {
            if (m_Model.transform.childCount > 0)
            {
                m_Animator = m_Model.transform.GetChild(0).GetComponent<Animator>();
            }
        }
        if (m_Animator)
        {
            RuntimeAnimatorController _controller = null;
            if (m_LoadDefaultRes)
            {
                if (this is GA_Pet)
                {
                    _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Pet();
                }
                else
                {
                    _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Fight();
                }
            }
            else
            {
                _controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, NpcConfig.MODE);
            }
            if (_controller)
            {
                m_Animator.runtimeAnimatorController = _controller;
            }
            m_Animator.enabled = true;
            if (m_Animator.parameterCount > 0)
            {
                m_Animator.SetInteger(GAStaticDefine.Param_ActorInstID, (int)ClientInstID);
            }
            IdleImmediate();
        }
        SetupBindNode(m_Model.transform);
        m_Model.transform.SetParent(m_Root.transform);
        m_Model.transform.localPosition = Vector3.zero;
        m_Model.transform.localRotation = Quaternion.identity;
    }
    /// <summary>
    /// 显示或者隐藏表现层
Fight/GameActor/GActorNpcNoFight.cs
@@ -7,7 +7,7 @@
    protected Animator m_Animator;
    private UnityEngine.AI.NavMeshObstacle m_Dig;
    private SFXController m_Shadow;
    //protected AudioSource m_AudioSource = null;
    public NPCConfig NpcConfig { get; protected set; }
    public SFXController m_AppearEffect;
    protected bool m_LoadDefaultRes = false;
@@ -18,18 +18,24 @@
        {
            return m_Animator.GetInteger(GAStaticDefine.Param_Action);
        }
        set
        {
            m_Animator.SetInteger(GAStaticDefine.Param_Action, value);
        }
    }
    public void Init(uint serverInstID, uint clientInstID, uint npcID, E_ActorGroup group, GameNetPackBasic package)
    protected override void OnInit(GameNetPackBasic package)
    {
        m_LoadDefaultRes = false;
        NpcConfig = Config.Instance.Get<NPCConfig>((int)npcID);
        var _package = package as H0406_tagNPCAppear;
        if (_package == null)
        {
            Debug.LogError("非战斗单位封包传入错误: " + package.GetType());
            return;
        }
        NpcConfig = Config.Instance.Get<NPCConfig>((int)_package.NPCID);
        if (NpcConfig == null)
        {
@@ -37,27 +43,7 @@
            return;
        }
        //        if (!m_AudioSource)
        //        {
        //            // 创建音源
        //            GameObject _audioSourceNode = Object.Instantiate(Resources.Load<GameObject>("Prefabs/AudioSource3D")) as GameObject;
        //#if UNITY_EDITOR
        //            _audioSourceNode.name = "AudioSource";
        //#endif
        //            _audioSourceNode.transform.SetParent(m_Root);
        //            _audioSourceNode.transform.localPosition = new Vector3(0, 0.5f, 0);
        //            m_AudioSource = _audioSourceNode.GetComponent<AudioSource>();
        //        }
        ActorType = GameObjType.gotNPC;
        // 初始化表现层
        InitPerformance(clientInstID, (int)npcID);
        // 执行父类的初始化
        Init(serverInstID, clientInstID, group, package);
        Root.gameObject.layer = LayerUtility.Monster;
        if (NpcConfig.ModeProportion != 1)
@@ -74,7 +60,6 @@
        }
        RequestShadow();
        RequestName();
        // 这里针对指定的NPC特殊矫正位置
        if (GeneralDefine.NpcPosOffset.ContainsKey(NpcConfig.NPCID))
@@ -91,12 +76,10 @@
        if (NpcConfig.NPCEffect != 0)
        {
            m_AppearEffect = SFXPlayUtility.Instance.PlayBattleEffect(NpcConfig.NPCEffect, this);
            //EffectConfig _effectConfig = Config.Instance.Get<EffectConfig>(NpcConfig.NPCEffect);
            //if (_effectConfig != null)
            //{
            //    SoundPlayer.Instance.PlayAudio(m_AudioSource, _effectConfig.audio);
            //}
        }
        // 开始异步加载表现层
        InstanceResourcesLoader.AsyncLoadNpc(NpcConfig.NPCID, OnPrefabLoadFinished);
    }
    protected override void OnUnit()
@@ -107,8 +90,11 @@
        }
        else
        {
            GameObject _prefab = InstanceResourcesLoader.LoadNpc(NpcConfig.NPCID);
            GameObjectPoolManager.Instance.ReleaseGameObject(_prefab, m_Model);
            if (NpcConfig != null)
            {
                GameObject _prefab = InstanceResourcesLoader.LoadNpc(NpcConfig.NPCID);
                GameObjectPoolManager.Instance.ReleaseGameObject(_prefab, m_Model);
            }
        }
        if (m_AppearEffect)
@@ -145,76 +131,95 @@
    {
    }
    public virtual void InitPerformance(uint clientInstID, int npcID)
    protected virtual void OnPrefabLoadFinished(bool result, UnityEngine.Object prefab)
    {
        GameObject _prefab = InstanceResourcesLoader.LoadNpcPrefab(npcID);
        if (_prefab == null)
        if (!result || prefab == null)
        {
            _prefab = InstanceResourcesLoader.LoadDefaultFuncNPC();
            if (_prefab)
            if (!m_LoadDefaultRes)
            {
                InstanceResourcesLoader.AsyncLoadDefaultFuncNpc(OnPrefabLoadFinished);
                m_LoadDefaultRes = true;
            }
        }
        if (_prefab != null)
        {
            if (PreFightMission.Instance.IsFinished())
            {
                GAMgr.Instance.AddNeedDestroyPrefab(_prefab);
            }
            if (this is GA_Guard || NpcConfig.MODE.Contains("A_Zs") || NpcConfig.MODE.Contains("A_Fs"))
            {
                GAMgr.Instance.RemoveNeedDestroyPrefab(_prefab);
            }
            if (m_LoadDefaultRes)
            {
                m_Model = GameObjectPoolManager.Instance.RequestDefaultFuncNpc();
            }
            else
            {
                m_Model = GameObjectPoolManager.Instance.RequestNpcGameObject(npcID);
                m_LoadDefaultRes = false;
                Debug.LogErrorFormat("加载Npc模型资源出错: {0}", NpcConfig.NPCID);
            }
            if (m_Model)
            {
                m_Animator = m_Model.GetComponent<Animator>();
                if (m_Animator)
                {
                    RuntimeAnimatorController _controller = null;
                    if (m_LoadDefaultRes)
                    {
                        _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Func();
                    }
                    else
                    {
                        string _name = NpcConfig.MODE;
                        if (_name.Contains("A_Zs"))
                        {
                            _name = "A_Zs";
                            GameObjectPoolManager.Instance.AddDontDestroyGoInstID(m_Model.GetInstanceID());
                        }
                        else if (_name.Contains("A_Fs"))
                        {
                            _name = "A_Fs";
                            GameObjectPoolManager.Instance.AddDontDestroyGoInstID(m_Model.GetInstanceID());
                        }
                        _controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, _name);
                    }
                    if (_controller)
                    {
                        m_Animator.runtimeAnimatorController = _controller;
                    }
                    m_Animator.enabled = true;
                    m_Animator.SetInteger(GAStaticDefine.Param_ActorInstID, (int)clientInstID);
                }
                SetupBindNode(m_Model.transform);
            }
            return;
        }
        if (PreFightMission.Instance.IsFinished())
        {
            GAMgr.Instance.AddNeedDestroyPrefab(prefab as GameObject);
        }
        if (this is GA_Guard || NpcConfig.MODE.Contains("A_Zs") || NpcConfig.MODE.Contains("A_Fs"))
        {
            GAMgr.Instance.RemoveNeedDestroyPrefab(prefab as GameObject);
        }
        if (m_LoadDefaultRes)
        {
            m_Model = GameObjectPoolManager.Instance.RequestDefaultFuncNpc();
        }
        else
        {
            m_Model = GameObjectPoolManager.Instance.RequestGameObject(prefab as GameObject);
        }
        if (m_Model)
        {
            m_Animator = m_Model.GetComponent<Animator>();
            if (m_Animator)
            {
                RuntimeAnimatorController _controller = null;
                if (m_LoadDefaultRes)
                {
                    _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Func();
                }
                else
                {
                    string _name = NpcConfig.MODE;
                    if (_name.Contains("A_Zs"))
                    {
                        _name = "A_Zs";
                        GameObjectPoolManager.Instance.AddDontDestroyGoInstID(m_Model.GetInstanceID());
                    }
                    else if (_name.Contains("A_Fs"))
                    {
                        _name = "A_Fs";
                        GameObjectPoolManager.Instance.AddDontDestroyGoInstID(m_Model.GetInstanceID());
                    }
                    _controller = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, _name);
                }
                if (_controller)
                {
                    m_Animator.runtimeAnimatorController = _controller;
                }
                m_Animator.enabled = true;
                m_Animator.SetInteger(GAStaticDefine.Param_ActorInstID, (int)ClientInstID);
            }
            SetupBindNode(m_Model.transform);
            m_Model.transform.SetParent(m_Root);
            m_Model.transform.localPosition = Vector3.zero;
            m_Model.transform.localRotation = Quaternion.identity;
            RequestName();
            OnMainModelLoaded();
        }
    }
    protected virtual void OnMainModelLoaded() { }
    public virtual void InitPerformance(uint clientInstID, int npcID)
    {
        GameObject _prefab = InstanceResourcesLoader.LoadNpcPrefab(npcID);
        InstanceResourcesLoader.AsyncLoadNpc(npcID, OnPrefabLoadFinished);
    }
    public sealed override void SetAnimatorSpeed(float speed)
Fight/Stage/Dungeon/FrontEndDungeon.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 26d1f2a39b41ff94189c36bf8259f9a3
folderAsset: yes
timeCreated: 1541424855
licenseType: Free
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs
New file
@@ -0,0 +1,13 @@
public class FrontEndDungeon : Singleton<FrontEndDungeon>
{
    public void Build(H2Engine.MapData mapData)
    {
    }
    public void CreateTrasfer(H2Engine.MapTrasfer transfer)
    {
    }
}
Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: daf42844aeeb3ce48a661b3e1cdf146b
timeCreated: 1541424855
licenseType: Free
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Fight/Stage/Dungeon/FrontEndDungeon/MapTransferSystem.cs
New file
@@ -0,0 +1,4 @@
public class MapTransferSystem
{
}
Fight/Stage/Dungeon/FrontEndDungeon/MapTransferSystem.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 5e82b2edb21ac044c9cc21aa0d31038b
timeCreated: 1541424855
licenseType: Free
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Fight/Stage/StageManager.cs
@@ -348,6 +348,12 @@
            mapOk.MapID = PlayerDatas.Instance.baseData.MapID;
            mapOk.Type = 0;
            GameNetSystem.Instance.SendInfo(mapOk);
            var _mapData = H2Engine.MapData.LoadFormFile("map_" + _stageId);
            if (_mapData != null)
            {
            }
        }
        else
        {
System/BlastFurnace/DanDrugRecycleTip.cs
@@ -19,7 +19,7 @@
        [Header("回收丹药格子数")]
        [SerializeField] int sumGridCnt = 45;
        List<StoreConfig> shoplist;
        List<StoreModel.StoreData> shoplist;
        int SingleLineCnt = 2;
        StoreModel _storeModel;
        StoreModel m_storeModel
@@ -78,14 +78,14 @@
        {
            if (shoplist != null && shoplist.Count > 0)
            {
                if (shoplist[0].RefreshType == 0)
                if (shoplist[0].storeConfig.RefreshType == 0)
                {
                    _resetRefreshTimeText.gameObject.SetActive(false);
                }
                else
                {
                    _resetRefreshTimeText.gameObject.SetActive(true);
                    _resetRefreshTimeText.text = m_storeModel.GetStoreRefreshTimeByType(shoplist[0].RefreshType);
                    _resetRefreshTimeText.text = m_storeModel.GetStoreRefreshTimeByType(shoplist[0].storeConfig.RefreshType);
                }
            }
            else
@@ -117,7 +117,7 @@
        private void CreateShopCell()
        {
            shopCtrl.Refresh();
            shoplist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
            shoplist = m_storeModel.TryGetStoreDatas((int)m_storeModel.storeFuncType);
            if (shoplist.Count > 0)
            {
                int i = 0;
@@ -148,7 +148,7 @@
                if (shoplist.Count >= cellCount)
                {
                    shopCell.gameObject.SetActive(true);
                    shopCell.SetModel(shoplist[cellCount - 1]);
                    shopCell.SetModel(shoplist[cellCount - 1].storeConfig);
                }
                else
                {
System/BlastFurnace/DanDrugShopCell.cs
@@ -21,7 +21,7 @@
        ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
        public void SetModel(StoreConfig storeConfig)
        {
            ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(m_storeModel.ReplaceItemIdByJob(storeConfig.ID, storeConfig.ItemID));
            ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(m_storeModel.GetReplaceId(storeConfig.ID));
            if (itemConfig == null) return;
            ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, false, 0, storeConfig.IsBind);
System/DailyQuest/DailyQuestModel.cs
@@ -796,6 +796,7 @@
                case DailyQuestType.FairyFeast:
                case DailyQuestType.FairyLeague:
                case DailyQuestType.FairyGrabBoss:
                case DailyQuestType.AncientBattleGround:
                    return DailyQuestState.Normal;
                case DailyQuestType.GuardSky:
                    if (!fairyModel.completeGuardSky)
System/HappyXB/HappyXBModel.cs
@@ -954,7 +954,7 @@
            XBStoreRedPoint();
        }
        private List<StoreConfig> storelist = null;
        private List<StoreModel.StoreData> storelist = null;
        public void XBStoreRedPoint()
        {
            if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.HappyFindTreasure)) return;
@@ -962,13 +962,13 @@
            ulong moneyNum = UIHelper.GetMoneyCnt(25);
            for(int i = 11; i < 14; i++)
            {
                storelist = StoreConfig.GetTypeStoreModel(i);
                storelist = m_storeModel.TryGetStoreDatas(i);
                if(storelist.Count > 0)
                {
                    List<StoreConfig> orderlist = new List<StoreConfig>();
                    List<StoreModel.StoreData> orderlist = new List<StoreModel.StoreData>();
                    orderlist.AddRange(storelist);
                    orderlist.Sort(CompareByMoney);
                    if(moneyNum >= (ulong)orderlist[0].MoneyNumber)
                    if(moneyNum >= (ulong)orderlist[0].storeConfig.MoneyNumber)
                    {
                        xbStoreRed.state = RedPointState.Simple;
                        return;
@@ -978,10 +978,10 @@
            xbStoreRed.state = RedPointState.None;
        }
        public int CompareByMoney(StoreConfig start, StoreConfig end)
        public int CompareByMoney(StoreModel.StoreData start, StoreModel.StoreData end)
        {
            int money1 = start.MoneyNumber;
            int money2 = end.MoneyNumber;
            int money1 = start.storeConfig.MoneyNumber;
            int money2 = end.storeConfig.MoneyNumber;
            if (money1.CompareTo(money2) != 0) return money1.CompareTo(money2);
            int index1 = storelist.IndexOf(start);
            int index2 = storelist.IndexOf(end);
System/HappyXB/XBShopCell.cs
@@ -21,7 +21,7 @@
        ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
        public void SetModel(StoreConfig storeConfig)
        {
            ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(m_storeModel.ReplaceItemIdByJob(storeConfig.ID, storeConfig.ItemID));
            ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(m_storeModel.GetReplaceId(storeConfig.ID));
            if (itemConfig == null) return;
            ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, false, 0, storeConfig.IsBind);
System/HappyXB/XBStoreWin.cs
@@ -22,7 +22,7 @@
        PackModelInterface modelInterface { get { return ModelCenter.Instance.GetModel<PackModelInterface>(); } }
        List<StoreConfig> shoplist;
        List<StoreModel.StoreData> shoplist;
        int SingleLineCnt = 2;
        protected override void BindController()
@@ -110,7 +110,7 @@
        private void CreateShopCell()
        {
            shopCtrl.Refresh();
            shoplist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
            shoplist = m_storeModel.TryGetStoreDatas((int)m_storeModel.storeFuncType);
            if (shoplist.Count > 0)
            {
                int i = 0;
@@ -141,7 +141,7 @@
                if(shoplist.Count >= cellCount)
                {
                    shopCell.gameObject.SetActive(true);
                    shopCell.SetModel(shoplist[cellCount-1]);
                    shopCell.SetModel(shoplist[cellCount-1].storeConfig);
                }
                else
                {
System/KnapSack/FBHelpPointExchageModel.cs
@@ -128,7 +128,9 @@
            for(int i = 0; i < helpPointShoplist.Count; i++)
            {
                var shopId = helpPointShoplist[i];
                if (!CheckShopIsCanBuy(shopId))
                StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(shopId);
                int remainNum = 0;
                if (storeModel.TryGetIsSellOut(storeConfig,out remainNum))
                {
                    RemoveHelpPointShop(shopId);
                }
@@ -180,28 +182,6 @@
                    break;
            }
            return true;
        }
        public bool CheckShopIsCanBuy(int shopId)
        {
            StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(shopId);
            if (storeConfig == null) return false;
            int canBuyCnt = 0;
            int addBuyCnt = 0;
            bool isLimitBuy = BuyItemPopModel.Instance.CheckIsLimitBuyCnt(storeConfig, out canBuyCnt, out addBuyCnt);
            BuyShopItemLimit shopItemLimit = storeModel.GetBuyShopLimit((uint)storeConfig.ID);
            int remainNum = canBuyCnt;
            if (shopItemLimit != null)
            {
                remainNum -= shopItemLimit.BuyCnt;
            }
            List<StoreConfig> list = StoreConfig.GetSellShoplist();
            if (remainNum > 0 && list.Contains(storeConfig))
            {
                return true;
            }
            return false;
        }
    }
}
System/MainInterfacePanel/HighSettingTip.cs
@@ -427,13 +427,15 @@
        private void RefreshStoreEffect()
        {
            storeDesBtn.gameObject.SetActive(false);
            int limitLv = int.Parse(Config.Instance.Get<FuncConfigConfig>("MallPush").Numerical1);
            if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)
                || PlayerDatas.Instance.baseData.LV < limitLv)
                || PlayerDatas.Instance.baseData.LV < storeModel.storeTrailerLv
                || !storeModel.IsNewDay(storeModel.StoreEffectRecord_Key))
                return;
            List<StoreConfig> shoplist = ModelCenter.Instance.GetModel<StoreModel>().shoplist;
            if (shoplist.Count > 0 && !m_StoreEffect.IsPlaying)
            var storeDatas = storeModel.TryGetStoreDatas((int)StoreFunc.WeekStore);
            if (storeDatas != null
                && storeDatas.Count > 0
                && !m_StoreEffect.IsPlaying)
            {
                if (isNeedTip)
                {
@@ -447,7 +449,7 @@
                }
                m_StoreEffect.Play();
            }
            else if (shoplist.Count <= 0 && m_StoreEffect.IsPlaying)
            else
            {
                m_StoreEffect.StopImediatly();
            }
System/Store/BagStoreWin.cs
@@ -85,12 +85,13 @@
                SuccessConfig successConfig = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
                if (successConfig.Type == 96)
                {
                    p_shopItemlist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
                    p_shopItemlist = m_storeModel.TryGetStoreDatas((int)m_storeModel.storeFuncType);
                    for (int i = 0; i < p_shopItemlist.Count; i++)
                    {
                        if (p_shopItemlist[i].ItemID == m_storeModel.jumpToItemId)
                        var storeData = p_shopItemlist[i];
                        if (storeData.storeConfig.ItemID == m_storeModel.jumpToItemId)
                        {
                            shopId = p_shopItemlist[i].ID;
                            shopId = storeData.shopId;
                            int index = i / 2;
                            _shopCtrl.JumpIndex(index);
                            _shopCtrl.m_Scorller.RefreshActiveCellViews();
@@ -127,7 +128,7 @@
                if (p_shopItemlist.Count >= cellCount)
                {
                    StoreConfig shopInfo = p_shopItemlist[cellCount - 1];
                    StoreConfig shopInfo = p_shopItemlist[cellCount - 1].storeConfig;
                    cell.transform.GetChild(childCode).gameObject.SetActive(true);
                    if (shopInfo.SalesStatus.Trim() != "")
                    {
@@ -140,7 +141,7 @@
                        shopItemCell.stateImage.gameObject.SetActive(false);
                    }
                    ItemConfig chinModel = Config.Instance.Get<ItemConfig>(m_storeModel.ReplaceItemIdByJob(shopInfo.ID, shopInfo.ItemID));
                    ItemConfig chinModel = Config.Instance.Get<ItemConfig>(m_storeModel.GetReplaceId(shopInfo.ID));
                    if (chinModel != null)
                    {
                        ItemCellModel cellModel = new ItemCellModel(chinModel.ID, true, 0, shopInfo.IsBind);
System/Store/RuneStoreWin.cs
@@ -1,170 +1,170 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Monday, September 18, 2017
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TableConfig;
using System.Text;
using Snxxz.UI;
namespace Snxxz.UI {
    public class RuneStoreWin : StoreUIBasic
    {
        #region 成员变量
        private ScrollerController _runeCtrl;
        private FuncConfigConfig _tagFuncModel;
        private ItemConfig _tagChinModel;
        private RuneConfig _tagRuneModel;
        private Text _runeChipText;
        #endregion
        RuneModel m_RuneModel;
        RuneModel runemodel {
            get {
                return m_RuneModel ?? (m_RuneModel = ModelCenter.Instance.GetModel<RuneModel>());
            }
        }
        StoreModel _storeModel;
        StoreModel m_storeModel
        {
            get { return _storeModel ?? (_storeModel = ModelCenter.Instance.GetModel<StoreModel>()); }
        }
        PackModelInterface _modelInterface;
        PackModelInterface modelInterface
        {
            get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); }
        }
        #region Built-in
        protected override void BindController()
        {
            _runeCtrl = transform.Find("RuneCellCtrl").GetComponent<ScrollerController>();
            _runeChipText = transform.Find("RuneBottom/BindChipsCountBG/CountText").GetComponent<Text>();
            _runeCtrl.OnRefreshCell += RefreshShopCell;
        }
        protected override void AddListeners()
        {
        }
        protected override void OnPreOpen()
        {
            m_storeModel.RefreshBuyShopLimitEvent += InitModel;
            model.OnRefreshRuneChip += OnFrenshMoneyInfo;
            _tagFuncModel = Config.Instance.Get<FuncConfigConfig>("RuneShop");
            m_storeModel.storeFuncType = StoreFunc.RuneStore;
            InitModel();
            OnFrenshMoneyInfo();
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
        }
        protected override void OnAfterClose()
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Monday, September 18, 2017
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TableConfig;
using System.Text;
using Snxxz.UI;
namespace Snxxz.UI {
    public class RuneStoreWin : StoreUIBasic
    {
        #region 成员变量
        private ScrollerController _runeCtrl;
        private FuncConfigConfig _tagFuncModel;
        private ItemConfig _tagChinModel;
        private RuneConfig _tagRuneModel;
        private Text _runeChipText;
        #endregion
        RuneModel m_RuneModel;
        RuneModel runemodel {
            get {
                return m_RuneModel ?? (m_RuneModel = ModelCenter.Instance.GetModel<RuneModel>());
            }
        }
        StoreModel _storeModel;
        StoreModel m_storeModel
        {
            m_storeModel.RefreshBuyShopLimitEvent -= InitModel;
            runemodel.OnRefreshRuneChip -= OnFrenshMoneyInfo;
        }
        #endregion
        RuneModel m_Model;
        RuneModel model {
            get {
                return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<RuneModel>());
            }
        }
        public void InitModel()
        {
            CreateShopItemCell(_runeCtrl,2);
        }
        protected override void CreateShopItemCell(ScrollerController shopCtrl, int row)
        {
            base.CreateShopItemCell(shopCtrl, row);
        }
        private void RefreshShopCell(ScrollerDataType type, CellView cell)
        {
            int childCode = 0;
            for (childCode = 0; childCode < cell.transform.childCount; childCode++)
            {
                int cellCount = (cell.transform.childCount) * cell.index + (childCode + 1);
                RuneCell runeCell = cell.transform.GetChild(childCode).GetComponent<RuneCell>();
                if (runeCell == null)
                {
                    runeCell = cell.transform.GetChild(childCode).gameObject.AddComponent<RuneCell>();
                }
                if (p_shopItemlist.Count >= cellCount)
                {
                    StoreConfig shopInfo = p_shopItemlist[cellCount - 1];
                    cell.transform.GetChild(childCode).gameObject.SetActive(true);
                    ItemConfig chinModel = Config.Instance.Get<ItemConfig>(shopInfo.ItemID);
                    if (chinModel != null)
                    {
                        ItemCellModel cellModel = new ItemCellModel(chinModel.ID,false, 0, shopInfo.IsBind);
                        runeCell.itemCell.Init(cellModel);
                        string runeStr = model.GetRuneAttrStr(shopInfo.ItemID, 1);
                        runeCell.itemNameText.text = runeStr;
                        runeCell.converNumText.text = shopInfo.MoneyNumber.ToString();
                        RuneTowerFloorConfig runeTowerModel = m_storeModel.SetRuneSource(shopInfo.ItemID);
                        if(runeTowerModel != null)
                        {
                            runeCell.SourceText.gameObject.SetActive(true);
                            var tower = Config.Instance.Get<RuneTowerConfig>(runeTowerModel.TowerId);
                            runeCell.SourceText.text = StringUtility.Contact(tower.TowerName, runeTowerModel.FloorName);
                        }
                        else
                        {
                            runeCell.SourceText.gameObject.SetActive(false);
                        }
                        //m_storeModel.SetVipLimit(shopInfo);
                    }
                    runeCell.RuneCellBtn.RemoveAllListeners();
                    runeCell.RuneCellBtn.AddListener(() => { m_storeModel.OnClickShopCell(shopInfo); });
                    runeCell.converBtn.RemoveAllListeners();
                    runeCell.converBtn.AddListener(() => { m_storeModel.SendBuyShopItem(shopInfo, 1); });
                }
                else
                {
                    cell.transform.GetChild(childCode).gameObject.SetActive(false);
                }
            }
        }
        public void OnFrenshMoneyInfo()
        {
            if (PlayerDatas.Instance.baseData != null)
            {
                _runeChipText.text = modelInterface.OnChangeCoinsUnit((uint)runemodel.RuneChip);
            }
            else
            {
                _runeChipText.text = "0";
            }
        }
    }
}
            get { return _storeModel ?? (_storeModel = ModelCenter.Instance.GetModel<StoreModel>()); }
        }
        PackModelInterface _modelInterface;
        PackModelInterface modelInterface
        {
            get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); }
        }
        #region Built-in
        protected override void BindController()
        {
            _runeCtrl = transform.Find("RuneCellCtrl").GetComponent<ScrollerController>();
            _runeChipText = transform.Find("RuneBottom/BindChipsCountBG/CountText").GetComponent<Text>();
            _runeCtrl.OnRefreshCell += RefreshShopCell;
        }
        protected override void AddListeners()
        {
        }
        protected override void OnPreOpen()
        {
            m_storeModel.RefreshBuyShopLimitEvent += InitModel;
            model.OnRefreshRuneChip += OnFrenshMoneyInfo;
            _tagFuncModel = Config.Instance.Get<FuncConfigConfig>("RuneShop");
            m_storeModel.storeFuncType = StoreFunc.RuneStore;
            InitModel();
            OnFrenshMoneyInfo();
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
        }
        protected override void OnAfterClose()
        {
            m_storeModel.RefreshBuyShopLimitEvent -= InitModel;
            runemodel.OnRefreshRuneChip -= OnFrenshMoneyInfo;
        }
        #endregion
        RuneModel m_Model;
        RuneModel model {
            get {
                return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<RuneModel>());
            }
        }
        public void InitModel()
        {
            CreateShopItemCell(_runeCtrl,2);
        }
        protected override void CreateShopItemCell(ScrollerController shopCtrl, int row)
        {
            base.CreateShopItemCell(shopCtrl, row);
        }
        private void RefreshShopCell(ScrollerDataType type, CellView cell)
        {
            int childCode = 0;
            for (childCode = 0; childCode < cell.transform.childCount; childCode++)
            {
                int cellCount = (cell.transform.childCount) * cell.index + (childCode + 1);
                RuneCell runeCell = cell.transform.GetChild(childCode).GetComponent<RuneCell>();
                if (runeCell == null)
                {
                    runeCell = cell.transform.GetChild(childCode).gameObject.AddComponent<RuneCell>();
                }
                if (p_shopItemlist.Count >= cellCount)
                {
                    StoreConfig shopInfo = p_shopItemlist[cellCount - 1].storeConfig;
                    cell.transform.GetChild(childCode).gameObject.SetActive(true);
                    ItemConfig chinModel = Config.Instance.Get<ItemConfig>(shopInfo.ItemID);
                    if (chinModel != null)
                    {
                        ItemCellModel cellModel = new ItemCellModel(chinModel.ID,false, 0, shopInfo.IsBind);
                        runeCell.itemCell.Init(cellModel);
                        string runeStr = model.GetRuneAttrStr(shopInfo.ItemID, 1);
                        runeCell.itemNameText.text = runeStr;
                        runeCell.converNumText.text = shopInfo.MoneyNumber.ToString();
                        RuneTowerFloorConfig runeTowerModel = m_storeModel.SetRuneSource(shopInfo.ItemID);
                        if(runeTowerModel != null)
                        {
                            runeCell.SourceText.gameObject.SetActive(true);
                            var tower = Config.Instance.Get<RuneTowerConfig>(runeTowerModel.TowerId);
                            runeCell.SourceText.text = StringUtility.Contact(tower.TowerName, runeTowerModel.FloorName);
                        }
                        else
                        {
                            runeCell.SourceText.gameObject.SetActive(false);
                        }
                        //m_storeModel.SetVipLimit(shopInfo);
                    }
                    runeCell.RuneCellBtn.RemoveAllListeners();
                    runeCell.RuneCellBtn.AddListener(() => { m_storeModel.OnClickShopCell(shopInfo); });
                    runeCell.converBtn.RemoveAllListeners();
                    runeCell.converBtn.AddListener(() => { m_storeModel.SendBuyShopItem(shopInfo, 1); });
                }
                else
                {
                    cell.transform.GetChild(childCode).gameObject.SetActive(false);
                }
            }
        }
        public void OnFrenshMoneyInfo()
        {
            if (PlayerDatas.Instance.baseData != null)
            {
                _runeChipText.text = modelInterface.OnChangeCoinsUnit((uint)runemodel.RuneChip);
            }
            else
            {
                _runeChipText.text = "0";
            }
        }
    }
}
System/Store/StoreModel.cs
@@ -35,15 +35,31 @@
    public string UNIONSTORESAVE_KEY { get; private set; }
    public string MUSTBUYSAVE_KEY { get; private set; }
    public string StoreEffectRecord_Key { get; private set; }
    public List<StoreConfig> shoplist;
    public Dictionary<int,Dictionary<int,int>> JobReplaceIdDict = new Dictionary<int, Dictionary<int, int>>();
    public Dictionary<int, string> resetTimeDict { get; private set; }
    public Dictionary<int, int> showCoinsUIDict { get; private set; }
    public int[] StoreRedIdlist { get; private set;}
    public int storeTrailerLv { get; private set; }
    bool isLogin = true;
    RuneModel runeModel { get { return ModelCenter.Instance.GetModel<RuneModel>(); } }
    ItemTipsModel _itemTipsModel;
    ItemTipsModel itemTipsModel
    {
        get
        {
            return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
        }
    }
    public override void Init()
    {
        PlayerPrefs.DeleteAll();
        ParseFuncConfig();
        ParseStoreConfig();
        SetShopRedpoint();
        FuncConfigConfig buyItemHinit = Config.Instance.Get<FuncConfigConfig>("BuyItemHinit");
        normalBuyCoinsTypes = ConfigParse.GetMultipleStr<int>(buyItemHinit.Numerical1);
        FuncConfigConfig restTimeConfig = Config.Instance.Get<FuncConfigConfig>("RefreshText");
@@ -52,6 +68,7 @@
        showCoinsUIDict = ConfigParse.GetDic<int, int>(mallCurrency.Numerical1);
        FuncConfigConfig mallPush = Config.Instance.Get<FuncConfigConfig>("MallPush");
        StoreRedIdlist = ConfigParse.GetMultipleStr<int>(mallPush.Numerical2);
        storeTrailerLv = int.Parse(mallPush.Numerical1);
        MainInterfaceWin.IsCopyOfThePanel += OnMoveTopPart;
    }
@@ -96,17 +113,19 @@
        WindowCenter.Instance.windowAfterOpenEvent += windowAfterOpen;
        WindowCenter.Instance.windowAfterCloseEvent += windowAfterClose;
        NewBieCenter.Instance.guideBeginEvent += GuidBegin;
        UpdateShowStore();
        SetIsMustBuyDay();
        shoplist = null;
        CheckWeekStoreIsShopBuy(out shoplist);
        ControllerRedPoint();
        SetShopRedpoint();
        UpdateFreeShopRedpoint();
        UpdateCanBuyRedpoint();
        SetJobReplaceIDDict();
        UpdateMustBuyRedpoint();
        UpdatePetAndMountPutAwayRedpoint();
        isLogin = false;
    }
    public override void UnInit()
    {
        MainInterfaceWin.IsCopyOfThePanel -= OnMoveTopPart;
    }
    #region 解析本地数据
@@ -165,25 +184,59 @@
        }
    }
    public Dictionary<int,List<StoreConfig>> storeTypeDict { get; private set; }
    public Dictionary<int,List<StoreData>> storeTypeDict { get; private set; }
    public Dictionary<int, List<StoreData>> theOnlyShopDict { get; private set; } //key 物品id
    public Dictionary<string, List<StoreData>> limitValueShopDict { get; private set; } //key 商品类型和限制条件
    private void ParseStoreConfig()
    {
        storeTypeDict = new Dictionary<int, List<StoreConfig>>();
        storeTypeDict = new Dictionary<int, List<StoreData>>();
        theOnlyShopDict = new Dictionary<int, List<StoreData>>();
        limitValueShopDict = new Dictionary<string, List<StoreData>>();
        List<StoreConfig> storeConfigs = Config.Instance.GetAllValues<StoreConfig>();
        for(int i = 0; i < storeConfigs.Count; i++)
        {
            var config = storeConfigs[i];
            if(config.ShopType != 0)
            {
                if(!storeTypeDict.ContainsKey(config.ShopType))
                StoreData storeData = new StoreData();
                storeData.shopId = config.ID;
                storeData.storeConfig = config;
                storeData.jobReplaceDict = AnalysisJobReplace(config);
                if (!storeTypeDict.ContainsKey(config.ShopType))
                {
                    List<StoreConfig> configs = new List<StoreConfig>();
                    configs.Add(config);
                    storeTypeDict.Add(config.ShopType,configs);
                    List<StoreData> storeDatas = new List<StoreData>();
                    storeDatas.Add(storeData);
                    storeTypeDict.Add(config.ShopType, storeDatas);
                }
                else
                {
                    storeTypeDict[config.ShopType].Add(config);
                    storeTypeDict[config.ShopType].Add(storeData);
                }
                if (config.TheOnlyShop == 1)
                {
                    if (!theOnlyShopDict.ContainsKey(config.ItemID))
                    {
                        List<StoreData> storeDatas = new List<StoreData>();
                        storeDatas.Add(storeData);
                        theOnlyShopDict.Add(config.ItemID, storeDatas);
                    }
                    else
                    {
                        theOnlyShopDict[config.ItemID].Add(storeData);
                    }
                }
                string key = StringUtility.Contact(config.ShopType,config.LimitValue);
                if(!limitValueShopDict.ContainsKey(key))
                {
                    List<StoreData> storeDatas = new List<StoreData>();
                    storeDatas.Add(storeData);
                    limitValueShopDict.Add(key,storeDatas);
                }
                else
                {
                    limitValueShopDict[key].Add(storeData);
                }
            }
        }
@@ -195,17 +248,187 @@
        }
    }
    public int CompareByShopSort(StoreConfig start, StoreConfig end)
    private Dictionary<int,List<int>> AnalysisJobReplace(StoreConfig storeConfig)
    {
        int sort1 = start.ShopSort;
        int sort2 = end.ShopSort;
        if (storeConfig == null || string.IsNullOrEmpty(storeConfig.JobItem)) return null;
        Dictionary<int,List<int>> replaceDict = new Dictionary<int, List<int>>();
        JsonData jsonData = JsonMapper.ToObject(storeConfig.JobItem);
        if (jsonData.IsArray)
        {
            for (int i = 0; i < jsonData.Count; i++)
            {
                List<int> idlist = new List<int>();
                replaceDict.Add(i, idlist);
                if (jsonData[i].IsArray)
                {
                    for (int j = 0; j < jsonData[i].Count; j++)
                    {
                        int itemId = int.Parse(jsonData[i][j].ToString());
                        idlist.Add(itemId);
                    }
                }
            }
        }
        return replaceDict;
    }
    public int CompareByShopSort(StoreData start, StoreData end)
    {
        int sort1 = start.storeConfig.ShopSort;
        int sort2 = end.storeConfig.ShopSort;
        if (sort1.CompareTo(sort2) != 0) return sort1.CompareTo(sort2);
        return 0;
    }
    public class StoreData
    {
        public int shopId;
        public StoreConfig storeConfig;
        public Dictionary<int,List<int>> jobReplaceDict;
    }
    #endregion
    #region 获取数据
    private Dictionary<int, List<StoreData>> showStoreTypeDict = new Dictionary<int, List<StoreData>>();
    public void UpdateShowStore()
    {
        showStoreTypeDict.Clear();
        int playeLv = PlayerDatas.Instance.baseData.LV;
        foreach (var type in storeTypeDict.Keys)
        {
            var storeDatas = storeTypeDict[type];
            List<StoreData> showStoreDatas = new List<StoreData>();
            if (!showStoreTypeDict.ContainsKey(type))
            {
                for (int i = 0; i < storeDatas.Count; i++)
                {
                    var storeData = storeDatas[i];
                    bool isReachLv = playeLv >= storeData.storeConfig.LV ? true : false;
                    bool isReachSpec = true;
                    switch (storeData.storeConfig.ShopType)
                    {
                        case 12:
                            isReachSpec = TryGetUnlockRune(storeData.storeConfig.ItemID);
                            break;
                    }
                    bool isReach = isReachSpec && isReachLv;
                    if (isReach)
                    {
                        int remainNum = 0;
                        bool isSellOut = TryGetIsSellOut(storeData.storeConfig, out remainNum);
                        if (storeData.storeConfig.IsHideSellOut != 1)
                        {
                            showStoreDatas.Add(storeData);
                        }
                        else
                        {
                            if (storeData.storeConfig.TheOnlyShop == 1)
                            {
                                if(!CheckTheOnlyShopSellOut(storeData.shopId))
                                {
                                    showStoreDatas.Add(storeData);
                                }
                            }
                            else
                            {
                                if (!isSellOut)
                                {
                                    showStoreDatas.Add(storeData);
                                }
                            }
                        }
                    }
                }
                showStoreTypeDict.Add(type, showStoreDatas);
            }
        }
    }
    /// <summary>
    /// 检测唯一商品是否已售罄
    /// </summary>
    /// <param name="shopIndex"></param>
    /// <param name="isTheOnlyShop"></param>
    /// <returns></returns>
    public bool CheckTheOnlyShopSellOut(int shopIndex)
    {
        StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(shopIndex);
        if (storeConfig == null || storeConfig.TheOnlyShop != 1) return false;
        if (theOnlyShopDict.ContainsKey(storeConfig.ItemID))
        {
            List<StoreData> datas = theOnlyShopDict[storeConfig.ItemID];
            for (int i = 0; i < datas.Count; i++)
            {
                var data = datas[i];
                int remainNum = 0;
                if (TryGetIsSellOut(data.storeConfig, out remainNum))
                {
                    return true;
                }
            }
        }
        return false;
    }
    public List<StoreData> TryGetStoreDatas(int type)
    {
        List<StoreData> datas = null;
        showStoreTypeDict.TryGetValue(type,out datas);
        return datas;
    }
    public StoreData GetStoreData(int shopId)
    {
        StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(shopId);
        if (storeConfig == null) return null;
        List<StoreData> storeDatas = null;
        storeTypeDict.TryGetValue(storeConfig.ShopType, out storeDatas);
        if (storeDatas != null)
        {
            for(int i = 0; i < storeDatas.Count; i++)
            {
                var storeData = storeDatas[i];
                if(storeData.shopId == shopId)
                {
                    return storeData;
                }
            }
        }
        return null;
    }
    public int GetReplaceId(int shopId)
    {
        var storeData = GetStoreData(shopId);
        if (storeData == null) return 0;
        StoreConfig config = Config.Instance.Get<StoreConfig>(shopId);
        int job = PlayerDatas.Instance.baseData.Job;
        var replaceDict = storeData.jobReplaceDict;
        if(replaceDict != null)
        {
            foreach (var index in replaceDict.Keys)
            {
                var idlist = replaceDict[index];
                if (idlist.Contains(config.ItemID))
                {
                    int replaceIndex = job - 1;
                    return idlist[replaceIndex];
                }
            }
        }
        return config.ItemID;
    }
    public bool TryGetRedTypeByShopId(int shopId, out int type)
    {
        type = 0;
@@ -236,30 +459,6 @@
        return false;
    }
    private Dictionary<int, List<StoreConfig>> showStoreTypeDict = new Dictionary<int, List<StoreConfig>>();
    public void UpdateShowStore()
    {
        showStoreTypeDict.Clear();
        foreach(var type in storeTypeDict.Keys)
        {
            var configs = storeTypeDict[type];
            List<StoreConfig> showConfigs = new List<StoreConfig>();
            if(!showStoreTypeDict.ContainsKey(type))
            {
                for (int i = 0; i < configs.Count; i++)
                {
                    var config = configs[i];
                    int remainNum = 0;
                    bool isSellOut = TryGetIsSellOut(config, out remainNum);
                    if(isSellOut && config.TheOnlyShop == 1)
                    {
                    }
                }
            }
        }
    }
    public bool TryGetIsSellOut(StoreConfig storeConfig, out int remainCnt)
    {
        int canBuyCnt = 0;
@@ -361,6 +560,30 @@
        return isVipBuy;
    }
    public bool TryGetUnlockRune(int runeId)
    {
        Dictionary<int, List<int>> unlockRunelist = runeModel.GetAllUnlockRuneIdlist();
        if (unlockRunelist != null)
        {
            foreach (var tower in unlockRunelist.Keys)
            {
                if (unlockRunelist[tower].Contains(runeId))
                {
                    return true;
                }
            }
        }
        return false;
    }
    public List<StoreData> TryGetStoreDatasByLimit(int type,int limitValue)
    {
        string key = StringUtility.Contact(type,limitValue);
        List<StoreData> datas = null;
        limitValueShopDict.TryGetValue(key,out datas);
        return datas;
    }
    #endregion
    public string GetStoreRefreshTimeByType(int type)
@@ -372,14 +595,6 @@
            case 7:
                int willRefreshTime = GetWillRefreshTime();
                return Language.Get(resetTimeDict[type],UIHelper.AppendStringColor(TextColType.Green, TimeUtility.SecondsToHMS(willRefreshTime),true));
                //if(willRefreshTime == 0)
                //{
                //    return Language.Get("StoreWin201");
                //}
                //else
                //{
                //    return Language.Get(resetTimeDict[type],willRefreshTime);
                //}
            default:
                return Language.Get(resetTimeDict[type]);
        }
@@ -406,6 +621,7 @@
        switch(type)
        {
            case PlayerDataRefresh.LV:
                UpdateShowStore();
                UpdateFreeShopRedpoint();
                UpdateCanBuyRedpoint();
                UpdateMustBuyRedpoint();
@@ -420,84 +636,6 @@
                break;
        }
    }
    public override void UnInit()
    {
        MainInterfaceWin.IsCopyOfThePanel -= OnMoveTopPart;
    }
    ItemTipsModel _itemTipsModel;
    ItemTipsModel itemTipsModel
    {
        get
        {
            return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
        }
    }
    #region 职业替换商品逻辑处理
    public void SetJobReplaceIDDict()
    {
        JobReplaceIdDict.Clear();
        List<StoreConfig> storeConfigs = Config.Instance.GetAllValues<StoreConfig>();
        for(int i = 0; i < storeConfigs.Count; i++)
        {
            Dictionary<int, int> replaceItemDict = new Dictionary<int, int>();
            JobReplaceIdDict.Add(storeConfigs[i].ID,replaceItemDict);
            AnalysisJobReplace(storeConfigs[i]);
            List<ShopItemInfo> shopItems = GetShopItemlistByIndex(storeConfigs[i]);
            for(int j = 0; j < shopItems.Count; j++)
            {
                foreach (var index in jobReplaceDic.Keys)
                {
                    if (jobReplaceDic[index].Contains(shopItems[j].itemId))
                    {
                        int replaceIndex = PlayerDatas.Instance.baseData.Job - 1;
                        int replaceId = jobReplaceDic[index][replaceIndex];
                        replaceItemDict.Add(shopItems[j].itemId,replaceId);
                        break;
                    }
                }
            }
        }
    }
    Dictionary<int, List<int>> jobReplaceDic = new Dictionary<int, List<int>>();
    private void AnalysisJobReplace(StoreConfig storeConfig)
    {
        jobReplaceDic.Clear();
        JsonData jsonData = JsonMapper.ToObject(storeConfig.JobItem);
        if (jsonData.IsArray)
        {
            for (int i = 0; i < jsonData.Count; i++)
            {
                List<int> idlist = new List<int>();
                jobReplaceDic.Add(i, idlist);
                if (jsonData[i].IsArray)
                {
                    for (int j = 0; j < jsonData[i].Count; j++)
                    {
                        int itemId = int.Parse(jsonData[i][j].ToString());
                        idlist.Add(itemId);
                    }
                }
            }
        }
    }
    public int ReplaceItemIdByJob(int storeId,int itemId)
    {
       if(JobReplaceIdDict.ContainsKey(storeId))
        {
            if(JobReplaceIdDict[storeId].ContainsKey(itemId))
            {
                return JobReplaceIdDict[storeId][itemId];
            }
        }
        return itemId;
    }
    #endregion
    private void RefreshFamilyLv()
    {
@@ -569,6 +707,7 @@
    
        if(!isLogin)
        {
            UpdateShowStore();
            UpdateFreeShopRedpoint();
            UpdateCanBuyRedpoint();
            UpdateMustBuyRedpoint();
@@ -627,16 +766,16 @@
    public bool TryGetShopItemInfo(StoreFunc _type, int _id, out List<ShopItemInfo> _shopItems)
    {
        _shopItems = null;
        var _list = StoreConfig.GetTypeStoreModel((int)_type, true);
        var _list = TryGetStoreDatas((int)_type);
        var _index = _list.FindIndex((x) =>
        {
            return x.ID == _id;
            return x.shopId == _id;
        });
        if (_index == -1)
        {
            return false;
        }
        _shopItems = GetShopItemlistByIndex(_list[_index]);
        _shopItems = GetShopItemlistByIndex(_list[_index].storeConfig);
        return _shopItems != null;
    }
@@ -673,8 +812,8 @@
    public void OnClickShopCell(StoreConfig shopInfo)
    {
        BuyItemPopModel.Instance.SetModel(shopInfo.ID);
        //SetOpenBuyType(chinModel);
        ItemAttrData attrData = new ItemAttrData(ReplaceItemIdByJob(shopInfo.ID,shopInfo.ItemID),true, (ulong)shopInfo.ItemCnt,-1,shopInfo.IsBind,true,PackType.rptDeleted
        int itemId = GetReplaceId(shopInfo.ID);
        ItemAttrData attrData = new ItemAttrData(itemId,true, (ulong)shopInfo.ItemCnt,-1,shopInfo.IsBind,true,PackType.rptDeleted
            ,"",null,ItemTipChildType.Buy);
        itemTipsModel.SetItemTipsModel(attrData,false);
        attrData.SetTipsFuncBtn(ItemWinBtnType.buy,(ItemWinBtnType type ,string id) => { OnClickBuyBtn(ItemWinBtnType.buy, shopInfo.ID); });
@@ -692,7 +831,7 @@
        StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(shopId);
        int curVipIndex = -1;
        int nextVipIndex = -1;
        bool isVipBuy = BuyItemPopModel.Instance.CheckIsVipBuy(storeConfig, out curVipIndex, out nextVipIndex);
        bool isVipBuy = TryGetVipBuy(storeConfig, out curVipIndex, out nextVipIndex);
        if (shopItemLimit != null)
        {
            int remainNum = 0;
@@ -773,7 +912,7 @@
        StoreConfig tagStore = Config.Instance.Get<StoreConfig>((int)result.ItemIndex);
        if (tagStore != null)
        {
            ItemConfig chinModel = Config.Instance.Get<ItemConfig>(ReplaceItemIdByJob(tagStore.ID, tagStore.ItemID));
            ItemConfig chinModel = Config.Instance.Get<ItemConfig>(GetReplaceId(tagStore.ID));
            if (!normalBuyCoinsTypes.Contains(tagStore.MoneyType))
            {
                if (tagStore.RemindSuccess == 0)
@@ -806,7 +945,7 @@
    /// <returns></returns>
    public bool IsCanBuyItem(int limitTower)
    {
        int playerTower = (int)ModelCenter.Instance.GetModel<RuneModel>().RuneTowerOpenLV;
        int playerTower = (int)runeModel.RuneTowerOpenLV;
        int offset = playerTower - limitTower;
        if (offset >= 0)
            return true;
@@ -831,34 +970,75 @@
    {
        jumpToItemId = itemId;
    }
   #region 仙盟商店逻辑处理
    public event Action StoreFuncOpenAct;
    private void FuncStateChange(int funcId)
    {
        if (funcId != (int)FuncOpenEnum.Store) return;
        if (StoreFuncOpenAct != null)
        {
            StoreFuncOpenAct();
        }
        UpdateFreeShopRedpoint();
        UpdateCanBuyRedpoint();
        UpdateMustBuyRedpoint();
        UpdatePetAndMountPutAwayRedpoint();
    }
    public bool IsNewDay(string recordKey)
    {
        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)) return false;
        if (PlayerPrefs.HasKey(recordKey))
        {
            int day = LocalSave.GetInt(recordKey);
            if(day != TimeUtility.ServerNow.Day)
            {
                LocalSave.SetInt(recordKey, TimeUtility.ServerNow.Day);
                return true;
            }
            else
            {
                return false;
            }
        }
        else
        {
            LocalSave.SetInt(recordKey, TimeUtility.ServerNow.Day);
            return true;
        }
    }
    #region 商城红点
    #region 仙盟红点逻辑处理
    private bool CheckIsBuyNewItem(int fairyLv)
    {
        if(fairyLv > GetSaveFairyLV())
        if (fairyLv > GetSaveFairyLV())
        {
            if (StoreConfig.GetCanBuyShopModel((int)StoreFunc.ToolStore, fairyLv).Count > 0
              || StoreConfig.GetCanBuyShopModel((int)StoreFunc.MountStoneStore, fairyLv).Count > 0
               || StoreConfig.GetCanBuyShopModel((int)StoreFunc.MountSkillBookStore, fairyLv).Count > 0)
            var toolStoreDatas = TryGetStoreDatasByLimit((int)StoreFunc.ToolStore, fairyLv);
            var mountStoreDatas = TryGetStoreDatasByLimit((int)StoreFunc.MountStoneStore, fairyLv);
            var skillBookStoreData = TryGetStoreDatasByLimit((int)StoreFunc.MountSkillBookStore, fairyLv);
            if ((toolStoreDatas != null && toolStoreDatas.Count > 0)
                || (mountStoreDatas != null && mountStoreDatas.Count > 0)
                || (skillBookStoreData != null && skillBookStoreData.Count > 0))
            {
                return true;
            }
        }
        return false;
    }
    private bool CheckIsNewMonth()
    {
        GetSaveDateTime();
        if(datelist.Count > 0)
        if (datelist.Count > 0)
        {
            if(TimeUtility.ServerNow.Month == datelist[0])
            if (TimeUtility.ServerNow.Month == datelist[0])
            {
                if(TimeUtility.ServerNow.Day >= 1
                if (TimeUtility.ServerNow.Day >= 1
                    && TimeUtility.ServerNow.Hour >= 5
                    && datelist[1] <= 1 && datelist[2] < 5)
                {
@@ -867,7 +1047,7 @@
            }
            else
            {
                if(TimeUtility.ServerNow.Day >= 1
                if (TimeUtility.ServerNow.Day >= 1
                    && TimeUtility.ServerNow.Hour >= 5)
                {
                    return true;
@@ -895,7 +1075,7 @@
    {
        int[] unionArray = LocalSave.GetIntArray(UNIONSTORESAVE_KEY);
        int fairyLv = 0;
        if(unionArray != null)
        if (unionArray != null)
        {
            return unionArray[0];
        }
@@ -904,22 +1084,22 @@
    //1仙盟等级 2 月份 3 号 4 几点
    public void SetStoreLocalSave(LocalSaveStoreType saveStoreType,params int[] infos)
    public void SetStoreLocalSave(LocalSaveStoreType saveStoreType, params int[] infos)
    {
        string key = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, saveStoreType);
        LocalSave.SetIntArray(key,infos);
        LocalSave.SetIntArray(key, infos);
    }
    public void ControllerRedPoint(bool isLook = false)
    {
        MainRedDot.Instance.fairyStoreRedPoint.state = RedPointState.None;
        if(!ModelCenter.Instance.GetModel<FairyModel>().fairyStoreOpen)
        if (!ModelCenter.Instance.GetModel<FairyModel>().fairyStoreOpen)
        {
            return;
        }
        int familyLv = PlayerDatas.Instance.fairyData.fairy.FamilyLV;
        if(!isLook)
        if (!isLook)
        {
            if (CheckIsBuyNewItem(familyLv))
            {
@@ -940,126 +1120,6 @@
    #endregion
    #endregion
    public event Action StoreFuncOpenAct;
    private void FuncStateChange(int funcId)
    {
        if (funcId != (int)FuncOpenEnum.Store) return;
        shoplist = null;
        CheckWeekStoreIsShopBuy(out shoplist);
        if(shoplist.Count > 0)
        {
            if (StoreFuncOpenAct != null)
            {
                StoreFuncOpenAct();
            }
        }
        SetShopRedpoint();
        UpdateFreeShopRedpoint();
        UpdateCanBuyRedpoint();
        UpdateMustBuyRedpoint();
        UpdatePetAndMountPutAwayRedpoint();
    }
    public bool CheckWeekStoreIsShopBuy(out List<StoreConfig> buylist)
    {
        buylist = new List<StoreConfig>();
        if (!IsNewDay(StoreEffectRecord_Key)) return false;
        List<StoreConfig> shoplist = StoreConfig.GetTypeStoreModel((int)StoreFunc.WeekStore);
        for(int i = 0; i < shoplist.Count; i++)
        {
            int canBuyCnt = 0;
            int addBuyCnt = 0;
            bool isLimitBuy = BuyItemPopModel.Instance.CheckIsLimitBuyCnt(shoplist[i], out canBuyCnt, out addBuyCnt);
            BuyShopItemLimit shopItemLimit = GetBuyShopLimit((uint)shoplist[i].ID);
            if (isLimitBuy)
            {
                int remainNum = canBuyCnt;
                if (shopItemLimit != null)
                {
                    remainNum = canBuyCnt - shopItemLimit.BuyCnt;
                }
                if (remainNum > 0)
                {
                    buylist.Add(shoplist[i]);
                }
            }
            else
            {
                buylist.Add(shoplist[i]);
            }
        }
        if(buylist.Count > 0)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
    private bool IsNewDay(string recordKey)
    {
        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)) return false;
        if (PlayerPrefs.HasKey(recordKey))
        {
            int day = LocalSave.GetInt(recordKey);
            if(day != TimeUtility.ServerNow.Day)
            {
                LocalSave.SetInt(recordKey, TimeUtility.ServerNow.Day);
                return true;
            }
            else
            {
                return false;
            }
        }
        else
        {
            LocalSave.SetInt(recordKey, TimeUtility.ServerNow.Day);
            return true;
        }
    }
    /// <summary>
    /// 检测唯一商品是否已售罄
    /// </summary>
    /// <param name="shopIndex"></param>
    /// <param name="isTheOnlyShop"></param>
    /// <returns></returns>
    public bool CheckTheOnlyShopSellOut(int shopIndex,out bool isTheOnlyShop)
    {
        StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(shopIndex);
        isTheOnlyShop = false;
        if (storeConfig == null) return false;
        if(storeConfig.TheOnlyShop == 1)
        {
            if(StoreConfig.GetTheOnlyShopDict().ContainsKey(storeConfig.ItemID))
            {
                List<StoreConfig> storelist = StoreConfig.GetTheOnlyShopDict()[storeConfig.ItemID];
                for(int i = 0; i < storelist.Count; i++)
                {
                    BuyShopItemLimit shoplimit = GetBuyShopLimit((uint)storelist[i].ID);
                    if(shoplimit != null && shoplimit.BuyCnt >= storelist[i].PurchaseNumber[0])
                    {
                        return true;
                    }
                }
            }
        }
        return false;
    }
    #region 商城红点
    public const int StoreFunc_RedKey = 22;
    public const int StoreFunc1_RedKey = 2201;
    public const int StoreFunc2_RedKey = 2202;
@@ -1076,9 +1136,7 @@
    public void SetShopRedpoint()
    {
        shopRedDict.Clear();
        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)) return;
        List<StoreConfig> storelist = StoreConfig.GetAllShoplist();
        List<StoreConfig> storelist = Config.Instance.GetAllValues<StoreConfig>();
        for(int i = 0; i < storelist.Count; i++)
        {
            StoreConfig storeConfig = storelist[i];
@@ -1089,25 +1147,29 @@
                case 1:
                    redKey = StoreFunc1_RedKey*10000 + storeConfig.ID;
                    redpoint = new Redpoint(StoreFunc1_RedKey,redKey);
                    shopRedDict.Add(storeConfig.ID, redpoint);
                    break;
                case 2:
                    redKey = StoreFunc2_RedKey * 10000 + storeConfig.ID;
                    redpoint = new Redpoint(StoreFunc2_RedKey, redKey);
                    shopRedDict.Add(storeConfig.ID,redpoint);
                    break;
                case 3:
                    redKey = StoreFunc3_RedKey * 10000 + storeConfig.ID;
                    redpoint = new Redpoint(StoreFunc3_RedKey, redKey);
                    shopRedDict.Add(storeConfig.ID, redpoint);
                    break;
                case 4:
                    redKey = StoreFunc4_RedKey * 10000 + storeConfig.ID;
                    redpoint = new Redpoint(StoreFunc4_RedKey, redKey);
                    shopRedDict.Add(storeConfig.ID, redpoint);
                    break;
                case 5:
                    redKey = StoreFunc5_RedKey * 10000 + storeConfig.ID;
                    redpoint = new Redpoint(StoreFunc5_RedKey, redKey);
                    shopRedDict.Add(storeConfig.ID, redpoint);
                    break;
            }
            shopRedDict.Add(storeConfig.ID,redpoint);
        }
    }
@@ -1115,20 +1177,26 @@
    {
        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)) return;
        foreach (var key in shopRedDict.Keys)
        foreach (var key in showStoreTypeDict.Keys)
        {
            StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(key);
            if (storeConfig.MoneyNumber == 0)
            var storeDatas = showStoreTypeDict[key];
            for(int i = 0; i < storeDatas.Count; i++)
            {
                if (CheckShopIsCanBuy(storeConfig))
                var storeConfig = storeDatas[i].storeConfig;
                if (storeConfig.MoneyNumber == 0)
                {
                    shopRedDict[storeConfig.ID].state = RedPointState.Simple;
                }
                else
                {
                    shopRedDict[storeConfig.ID].state = RedPointState.None;
                    int remainNum = 0;
                    if (!TryGetIsSellOut(storeConfig, out remainNum))
                    {
                        shopRedDict[storeConfig.ID].state = RedPointState.Simple;
                    }
                    else
                    {
                        shopRedDict[storeConfig.ID].state = RedPointState.None;
                    }
                }
            }
        }
    }
    public event Action<int> UpdateHelpPointExchangeEvent;
@@ -1136,22 +1204,31 @@
    {
        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)) return;
        foreach (var key in shopRedDict.Keys)
        foreach (var key in showStoreTypeDict.Keys)
        {
            StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(key);
            if (StoreRedIdlist.Contains(storeConfig.ID))
            var storeDatas = showStoreTypeDict[key];
            for (int i = 0; i < storeDatas.Count; i++)
            {
                if (CheckShopIsCanBuy(storeConfig))
                var storeConfig = storeDatas[i].storeConfig;
                if (StoreRedIdlist.Contains(storeConfig.ID))
                {
                    if (UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= (ulong)storeConfig.MoneyNumber)
                    int remainNum = 0;
                    if (!TryGetIsSellOut(storeConfig, out remainNum))
                    {
                        shopRedDict[storeConfig.ID].state = RedPointState.Simple;
                        if(storeConfig.ShopType == (int)StoreFunc.IntegralStore)
                        if (UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= (ulong)storeConfig.MoneyNumber)
                        {
                            if(UpdateHelpPointExchangeEvent != null)
                            shopRedDict[storeConfig.ID].state = RedPointState.Simple;
                            if (storeConfig.ShopType == (int)StoreFunc.IntegralStore)
                            {
                                UpdateHelpPointExchangeEvent(key);
                                if (UpdateHelpPointExchangeEvent != null)
                                {
                                    UpdateHelpPointExchangeEvent(key);
                                }
                            }
                        }
                        else
                        {
                            shopRedDict[storeConfig.ID].state = RedPointState.None;
                        }
                    }
                    else
@@ -1159,11 +1236,8 @@
                        shopRedDict[storeConfig.ID].state = RedPointState.None;
                    }
                }
                else
                {
                    shopRedDict[storeConfig.ID].state = RedPointState.None;
                }
            }
        }
    }
@@ -1171,20 +1245,25 @@
    {
        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)) return;
        foreach (var key in shopRedDict.Keys)
        foreach (var key in showStoreTypeDict.Keys)
        {
            StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(key);
            if(mustIdlist.Contains(storeConfig.ItemID))
            var storeDatas = showStoreTypeDict[key];
            for (int i = 0; i < storeDatas.Count; i++)
            {
                if (CheckIsMustBuy(storeConfig))
                var storeConfig = storeDatas[i].storeConfig;
                if (mustIdlist.Contains(storeConfig.ItemID))
                {
                    shopRedDict[storeConfig.ID].state = RedPointState.Simple;
                }
                else
                {
                    shopRedDict[storeConfig.ID].state = RedPointState.None;
                    if (CheckIsMustBuy(storeConfig))
                    {
                        shopRedDict[storeConfig.ID].state = RedPointState.Simple;
                    }
                    else
                    {
                        shopRedDict[storeConfig.ID].state = RedPointState.None;
                    }
                }
            }
        }
    }
@@ -1230,42 +1309,8 @@
    public List<int> mustIdlist = new List<int>() { 4741};
    public bool CheckIsMustBuy(StoreConfig config)
    {
        if(CheckShopIsCanBuy(config) && IsMustBuyDay)
        {
            return true;
        }
        return false;
    }
    public bool CheckScoreStoreIsCanBuy(StoreConfig storeConfig)
    {
        List<StoreConfig> list = StoreConfig.GetSellShoplist();
        if(StoreRedIdlist.Contains(storeConfig.ID))
        {
            if (CheckShopIsCanBuy(storeConfig))
            {
                if(UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= (ulong)storeConfig.MoneyNumber)
                {
                    return true;
                }
            }
        }
        return false;
    }
    public bool CheckShopIsCanBuy(StoreConfig storeConfig)
    {
        int canBuyCnt = 0;
        int addBuyCnt = 0;
        bool isLimitBuy = BuyItemPopModel.Instance.CheckIsLimitBuyCnt(storeConfig, out canBuyCnt, out addBuyCnt);
        BuyShopItemLimit shopItemLimit = GetBuyShopLimit((uint)storeConfig.ID);
        int remainNum = canBuyCnt;
        if (shopItemLimit != null)
        {
            remainNum -= shopItemLimit.BuyCnt;
        }
        List<StoreConfig> list = StoreConfig.GetSellShoplist();
        if (remainNum > 0 && list.Contains(storeConfig))
        int remainNum = 0;
        if(!TryGetIsSellOut(config,out remainNum) && IsMustBuyDay)
        {
            return true;
        }
@@ -1279,34 +1324,36 @@
    {
        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)) return;
        List<StoreConfig> storelist = StoreConfig.GetAllShoplist();
        List<StoreData> storelist = TryGetStoreDatas((int)StoreFunc.BindStore);
        if (storelist == null) return;
        for(int i = 0; i < storelist.Count; i++)
        {
            if (storelist[i].ShopType != (int)StoreFunc.BindStore) continue;
            ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(storelist[i].ItemID);
            string key = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID,"ShopId",storelist[i].ID);
            var storeData = storelist[i];
            ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(storeData.storeConfig.ItemID);
            string key = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID,"ShopId",storeData.shopId);
            int remainNum = 0;
            switch(itemConfig.Type)
            {
                case 26:
                case 41:
                    if(CheckShopIsCanBuy(storelist[i]))
                    if(!TryGetIsSellOut(storeData.storeConfig,out remainNum))
                    {
                        if (!PlayerPrefs.HasKey(key))
                        {
                            shopRedDict[storelist[i].ID].state = RedPointState.Simple;
                            shopRedDict[storeData.shopId].state = RedPointState.Simple;
                            LocalSave.SetBool(key,true);
                            SetPetAndMountPushData(storelist[i].ID);
                            SetPetAndMountPushData(storeData.shopId);
                        }
                        else
                        {
                            if(LocalSave.GetBool(key))
                            {
                                shopRedDict[storelist[i].ID].state = RedPointState.Simple;
                                shopRedDict[storeData.shopId].state = RedPointState.Simple;
                            }
                            else
                            {
                                shopRedDict[storelist[i].ID].state = RedPointState.None;
                                shopRedDict[storeData.shopId].state = RedPointState.None;
                            }
                            
                        }
@@ -1314,7 +1361,7 @@
                    else
                    {
                        //PlayerPrefs.DeleteKey(key);
                        shopRedDict[storelist[i].ID].state = RedPointState.None;
                        shopRedDict[storeData.shopId].state = RedPointState.None;
                    }
                    break;
            }
System/Store/StoreUIBasic.cs
@@ -16,7 +16,7 @@
    {
        protected RuneConfig p_tagRuneModel;
        protected List<StoreConfig> p_shopItemlist;
        protected List<StoreModel.StoreData> p_shopItemlist;
        StoreModel _storeModel;
        StoreModel m_storeModel
@@ -53,7 +53,7 @@
         virtual protected void CreateShopItemCell(ScrollerController shopCtrl,int row)
        {
            shopCtrl.Refresh();
            p_shopItemlist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
            p_shopItemlist = m_storeModel.TryGetStoreDatas((int)m_storeModel.storeFuncType);
            if (p_shopItemlist.Count > 0)
            {
                int i = 0;
System/Store/StoreWin.cs
@@ -69,7 +69,7 @@
            get { return _storeModel ?? (_storeModel = ModelCenter.Instance.GetModel<StoreModel>()); }
        }
        private List<StoreConfig> _tagStoreModellist;
        private List<StoreModel.StoreData> _tagStoreModellist;
        private FuncConfigConfig _tagFuncModel1;
        private FuncConfigConfig _tagFuncModel2;
        private int shopId = 0;
@@ -148,7 +148,6 @@
        {
            m_storeModel.ClearAllPetAndMountRedpoint(StoreFunc.WeekStore);
            m_storeModel.storeFuncType = StoreFunc.WeekStore;
            m_storeModel.shoplist.Clear();
            m_storeModel.RefreshBuyShopLimitEvent -= OnCreate;
            GlobalTimeEvent.Instance.secondEvent -= RefreshResetTime;
            m_storeModel.RefreshTCBPlayerDataEvent -= OnRefreshPlayerInfo;
@@ -171,15 +170,15 @@
                SuccessConfig successConfig = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
                if(successConfig.Type == 97)
                {
                    _tagStoreModellist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
                    List<StoreConfig> orderlist = new List<StoreConfig>();
                    _tagStoreModellist = m_storeModel.TryGetStoreDatas((int)m_storeModel.storeFuncType);
                    List<StoreModel.StoreData> orderlist = new List<StoreModel.StoreData>();
                    orderlist.AddRange(_tagStoreModellist);
                    orderlist.Sort(CompareByMoney);
                    for (int i = 0; i < _tagStoreModellist.Count; i++)
                    {
                        if (_tagStoreModellist[i].ID == orderlist[0].ID)
                        if (_tagStoreModellist[i].shopId == orderlist[0].shopId)
                        {
                            shopId = _tagStoreModellist[i].ID;
                            shopId = _tagStoreModellist[i].shopId;
                            int index = i / 2;
                            _shopCtrl.JumpIndex(index);
                            _shopCtrl.m_Scorller.RefreshActiveCellViews();
@@ -193,10 +192,10 @@
            {
                if(m_storeModel.jumpShopId != 0)
                {
                    _tagStoreModellist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
                    _tagStoreModellist = m_storeModel.TryGetStoreDatas((int)m_storeModel.storeFuncType);
                    for (int i = 0; i < _tagStoreModellist.Count; i++)
                    {
                        if (_tagStoreModellist[i].ID == m_storeModel.jumpShopId)
                        if (_tagStoreModellist[i].shopId == m_storeModel.jumpShopId)
                        {
                            int index = i / 2 ;
                            _shopCtrl.JumpIndex(index > 2 ? index - 1 : index);
@@ -213,28 +212,28 @@
        {
            if(_tagStoreModellist == null || _tagStoreModellist.Count < 1)
            {
                _tagStoreModellist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
                _tagStoreModellist = m_storeModel.TryGetStoreDatas((int)m_storeModel.storeFuncType);
            }
            if(_tagStoreModellist.Count > 0)
            {
                if (_tagStoreModellist[0].RefreshType == 0)
                if (_tagStoreModellist[0].storeConfig.RefreshType == 0)
                {
                    _resetRefreshTimeText.gameObject.SetActive(false);
                }
                else
                {
                    _resetRefreshTimeText.gameObject.SetActive(true);
                    _resetRefreshTimeText.text = m_storeModel.GetStoreRefreshTimeByType(_tagStoreModellist[0].RefreshType);
                    _resetRefreshTimeText.text = m_storeModel.GetStoreRefreshTimeByType(_tagStoreModellist[0].storeConfig.RefreshType);
                }
            }
        }
        public int CompareByMoney(StoreConfig start,StoreConfig end)
        public int CompareByMoney(StoreModel.StoreData start, StoreModel.StoreData end)
        {
            int money1 = start.MoneyNumber;
            int money2 = end.MoneyNumber;
            int money1 = start.storeConfig.MoneyNumber;
            int money2 = end.storeConfig.MoneyNumber;
            if (money1.CompareTo(money2) != 0) return money1.CompareTo(money2);
            int index1 = _tagStoreModellist.IndexOf(start);
            int index2 = _tagStoreModellist.IndexOf(end);
@@ -247,14 +246,14 @@
            if (_tagStoreModellist.Count < 1)
                return;
            if(m_storeModel.showCoinsUIDict != null && m_storeModel.showCoinsUIDict.ContainsKey(_tagStoreModellist[0].ShopType))
            if(m_storeModel.showCoinsUIDict != null && m_storeModel.showCoinsUIDict.ContainsKey(_tagStoreModellist[0].storeConfig.ShopType))
            {
                if(m_storeModel.showCoinsUIDict[_tagStoreModellist[0].ShopType] == 1)
                if(m_storeModel.showCoinsUIDict[_tagStoreModellist[0].storeConfig.ShopType] == 1)
                {
                    _followStoreBottom.gameObject.SetActive(true);
                    _integralBottom.gameObject.SetActive(false);
                }
                else if(m_storeModel.showCoinsUIDict[_tagStoreModellist[0].ShopType] == 2)
                else if(m_storeModel.showCoinsUIDict[_tagStoreModellist[0].storeConfig.ShopType] == 2)
                {
                    _followStoreBottom.gameObject.SetActive(false);
                    _integralBottom.gameObject.SetActive(true);
@@ -273,7 +272,7 @@
        private void OnCreate()
        {
            shopId = 0;
            _tagStoreModellist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
            _tagStoreModellist = m_storeModel.TryGetStoreDatas((int)m_storeModel.storeFuncType);
            _shopCtrl.Refresh();
            if (_tagStoreModellist.Count > 0)
            {
@@ -322,7 +321,7 @@
                if (_tagStoreModellist.Count >= cellCount)
                {
                    StoreConfig shopInfo = _tagStoreModellist[cellCount - 1];
                    StoreConfig shopInfo = _tagStoreModellist[cellCount - 1].storeConfig;
                    if(m_storeModel.shopRedDict.ContainsKey(shopInfo.ID))
                    {
                        shopItemCell.redpoint.redpointId = m_storeModel.shopRedDict[shopInfo.ID].id;
@@ -339,7 +338,7 @@
                        shopItemCell.stateImage.gameObject.SetActive(false);
                    }
                    ItemConfig chinModel = Config.Instance.Get<ItemConfig>(m_storeModel.ReplaceItemIdByJob(shopInfo.ID,shopInfo.ItemID));
                    ItemConfig chinModel = Config.Instance.Get<ItemConfig>(m_storeModel.GetReplaceId(shopInfo.ID));
                    if(chinModel != null)
                    {
                        ItemCellModel cellModel = new ItemCellModel(chinModel.ID,true,0,shopInfo.IsBind,"",PackType.rptDeleted,true);
@@ -435,7 +434,6 @@
        private void OnClickIntegralStore()
        {
            m_storeModel.ClearAllPetAndMountRedpoint(StoreFunc.IntegralStore);
            m_storeModel.shoplist.Clear();
            m_storeModel.storeFuncType = StoreFunc.IntegralStore;
            OnCreate();
            RefreshResetTime();
@@ -445,7 +443,6 @@
        private void OnClickBindStore()
        {
            m_storeModel.ClearAllPetAndMountRedpoint(StoreFunc.BindStore);
            m_storeModel.shoplist.Clear();
            m_storeModel.storeFuncType = StoreFunc.BindStore;
            OnCreate();
            RefreshResetTime();
@@ -455,7 +452,6 @@
        private void OnClickStrengthStore()
        {
            m_storeModel.ClearAllPetAndMountRedpoint(StoreFunc.GrowStrongerStore);
            m_storeModel.shoplist.Clear();
            m_storeModel.storeFuncType = StoreFunc.GrowStrongerStore;
            OnCreate();
            RefreshResetTime();
@@ -465,7 +461,6 @@
        private void OnClickCommonStore()
        {
            m_storeModel.ClearAllPetAndMountRedpoint(StoreFunc.CommonStore);
            m_storeModel.shoplist.Clear();
            m_storeModel.storeFuncType = StoreFunc.CommonStore;
            OnCreate();
            RefreshResetTime();
System/Store/UnionStoreWin.cs
@@ -113,15 +113,15 @@
                SuccessConfig successConfig = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
                if (successConfig.Type == 97)
                {
                    p_shopItemlist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
                    List<StoreConfig> orderlist = new List<StoreConfig>();
                    p_shopItemlist = m_storeModel.TryGetStoreDatas((int)m_storeModel.storeFuncType);
                    List<StoreModel.StoreData> orderlist = new List<StoreModel.StoreData>();
                    orderlist.AddRange(p_shopItemlist);
                    orderlist.Sort(CompareByMoney);
                    for (int i = 0; i < p_shopItemlist.Count; i++)
                    {
                        if (p_shopItemlist[i].ID == orderlist[0].ID)
                        if (p_shopItemlist[i].shopId == orderlist[0].shopId)
                        {
                            shopId = p_shopItemlist[i].ID;
                            shopId = p_shopItemlist[i].shopId;
                            int index = i / 2;
                            _shopCtrl.JumpIndex(index);
                            _shopCtrl.m_Scorller.RefreshActiveCellViews();
@@ -133,10 +133,10 @@
            }
        }
        public int CompareByMoney(StoreConfig start, StoreConfig end)
        public int CompareByMoney(StoreModel.StoreData start, StoreModel.StoreData end)
        {
            int money1 = start.MoneyNumber;
            int money2 = end.MoneyNumber;
            int money1 = start.storeConfig.MoneyNumber;
            int money2 = end.storeConfig.MoneyNumber;
            if (money1.CompareTo(money2) != 0) return money1.CompareTo(money2);
            int index1 = p_shopItemlist.IndexOf(start);
            int index2 = p_shopItemlist.IndexOf(end);
@@ -180,7 +180,7 @@
                if (p_shopItemlist.Count >= cellCount)
                {
                    StoreConfig shopInfo = p_shopItemlist[cellCount - 1];
                    StoreConfig shopInfo = p_shopItemlist[cellCount - 1].storeConfig;
                    cell.transform.GetChild(childCode).gameObject.SetActive(true);
                    if (shopInfo.SalesStatus.Trim() != "")
                    {
@@ -191,7 +191,7 @@
                    {
                        shopItemCell.stateImage.gameObject.SetActive(false);
                    }
                    ItemConfig chinModel = Config.Instance.Get<ItemConfig>(m_storeModel.ReplaceItemIdByJob(shopInfo.ID, shopInfo.ItemID));
                    ItemConfig chinModel = Config.Instance.Get<ItemConfig>(m_storeModel.GetReplaceId(shopInfo.ID));
                    if (chinModel != null)
                    {
                        ItemCellModel cellModel = new ItemCellModel(chinModel.ID,false, 0, shopInfo.IsBind);