Browse Source

修改功法装配

lzx 13 hours ago
parent
commit
5490ae243f

+ 1 - 1
Assets/Res/CombatScenes/CombatRoot.prefab

@@ -335,7 +335,7 @@ AudioListener:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8735217549368148119}
-  m_Enabled: 1
+  m_Enabled: 0
 --- !u!114 &231374772603165284
 MonoBehaviour:
   m_ObjectHideFlags: 0

+ 3 - 0
Assets/Scripts/GameLogic/Player/AccountFileInfo.cs

@@ -138,6 +138,9 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
 
         public long ExitTime;
         public bool boxFree;
+
+        public bool isTiggerPlot;
+
     }
 
 

+ 30 - 1
Assets/Scripts/GameUI/GameApplction.cs

@@ -171,11 +171,40 @@ public class GameApplction : IGameStart
             .TaoismSkillId);
         if (startCombatInfo.CombatType != CombatType.TestCombat)
         {
-            await MainPanel.OpenPanel();
+            // if (AccountFileInfo.Instance.playerData.isTiggerPlot)
+            {
+                await MainPanel.OpenPanel();
+            }
         }
 
 
         gameStartUIPanel.ShowMassge("loadFinish");
         gameStartUIPanel.SetSlider(1f);
+
+        // XinShouYinDao();
+    }
+
+    public async void XinShouYinDao()
+    {
+        if (!AccountFileInfo.Instance.playerData.isTiggerPlot)
+        {
+            CTask cTask = CTask.Create();
+            CombatDrive.Instance.LoadLevelBattleCombat(1002, false,
+                delegate(bool isWin)
+                {
+                    LogTool.Log("战斗完成" + isWin);
+                    cTask.SetResult();
+                });
+
+            await cTask;
+
+            AccountFileInfo.EventList eventList1 = EventSystemManager.Instance.AddEvent(1);
+            await EventSystemManager.Instance.TriggerEvent(eventList1);
+            AccountFileInfo.Instance.playerData.isTiggerPlot = true;
+
+            AccountFileInfo.Instance.SavePlayerData();
+
+            // await MainPanel.OpenPanel();
+        }
     }
 }

+ 33 - 6
Assets/Scripts/GameUI/UI/CombatPanel/SkillSelectPanel.cs

@@ -329,6 +329,9 @@ namespace Fort23.Mono
                 isAlter = true;
                 UpdateSkillWidget();
                 CloseSelect();
+                BaoChun();
+                showSkillInfo.Sort(Sort);
+                Content.Init(this, showSkillInfo.Count);
             });
 
             Sv.onValueChanged.AddListener((s) =>
@@ -395,11 +398,11 @@ namespace Fort23.Mono
 
         List<List<int>> indexList = new List<List<int>>()
         {
-            new List<int>() { 0, 1, 9 },//金
-            new List<int>() { 4, 5, 3 },//木
-            new List<int>() { 2, 3, 1 },//水
-            new List<int>() { 6, 7, 5 },//火
-            new List<int>() { 8, 9, 7 },//土
+            new List<int>() { 0, 1, 9 }, //金
+            new List<int>() { 4, 5, 3 }, //木
+            new List<int>() { 2, 3, 1 }, //水
+            new List<int>() { 6, 7, 5 }, //火
+            new List<int>() { 8, 9, 7 }, //土
         };
 
         private void Sort(int type1, int type2)
@@ -473,9 +476,26 @@ namespace Fort23.Mono
             }
 
             CloseSelect();
+            showSkillInfo.Sort(Sort);
             Content.Init(this, showSkillInfo.Count);
         }
 
+        private int Sort(SkillInfo type1, SkillInfo type2)
+        {
+            if (allUseSkill.Contains(type1) && !allUseSkill.Contains(type2))
+            {
+                return -1;
+            }
+
+
+            if (!allUseSkill.Contains(type1) && allUseSkill.Contains(type2))
+            {
+                return 1;
+            }
+
+            return 0;
+        }
+
 
         public override async CTask Open()
         {
@@ -588,6 +608,9 @@ namespace Fort23.Mono
                 allUseSkill[skillKongWidget.index] = selectSkillConfig;
                 CloseSelect();
                 BaoChun();
+                
+                showSkillInfo.Sort(Sort);
+                Content.Init(this, showSkillInfo.Count);
             }
             //替换功法
             else if (skillKongWidget.SkillInfo != null && dianjiSkillKongWidget == null && selectSkillConfig != null)
@@ -653,6 +676,8 @@ namespace Fort23.Mono
                 skillKongWidget.SetSKill(selectSkillConfig);
                 CloseSelect();
                 BaoChun();
+                showSkillInfo.Sort(Sort);
+                Content.Init(this, showSkillInfo.Count);
             }
             else
             {
@@ -777,6 +802,8 @@ namespace Fort23.Mono
                         BaoChun();
                         ChangeFuZhuYingXiang();
                         UpdateSkillWidget();
+                        showSkillInfo.Sort(Sort);
+                        Content.Init(this, showSkillInfo.Count);
                     }
                     else
                     {
@@ -804,7 +831,7 @@ namespace Fort23.Mono
                 {
                     if (allKongSkill[i].SkillInfo != null)
                     {
-                        if(selectSkillConfig.skillConfig.SkillType == allKongSkill[i].SkillInfo.skillConfig.SkillType)
+                        if (selectSkillConfig.skillConfig.SkillType == allKongSkill[i].SkillInfo.skillConfig.SkillType)
                             allKongSkill[i].SelectState(true);
                     }
                 }

+ 1 - 1
Assets/Scripts/GameUI/UI/DivineSence/DivineSenceItemPanel.cs

@@ -154,7 +154,7 @@ namespace Fort23.Mono
 
         public static async CTask OpenPanel(ItemInfo selectItemInit, List<int> selectType, Action<int> itemId, Action cancelCallBack)
         {
-            await UIManager.Instance.LoadAndOpenPanel<DivineSenceItemPanel>(null, UILayer.Top, uiData: new object[] { selectItemInit, selectType,itemId, cancelCallBack });
+            await UIManager.Instance.LoadAndOpenPanel<DivineSenceItemPanel>(null, UILayer.Top, uiData: new object[] { selectItemInit, selectType,itemId, cancelCallBack },isShowBG:true);
         }
 
         public override void Close()

BIN
Excel2Json/Excel/EventConfig.xlsx


BIN
Excel2Json/Excel/Maps.xlsx