From 0d7482d5a0e8bf082abfb4b5bfbfee03597cdc3a Mon Sep 17 00:00:00 2001
From: lwb <q3213421wrwqr>
Date: 星期四, 25 二月 2021 15:43:08 +0800
Subject: [PATCH] 9527 去掉xlua

---
 System/Skill/SkillModel.cs |   46 ++++++++++++++--------------------------------
 1 files changed, 14 insertions(+), 32 deletions(-)

diff --git a/System/Skill/SkillModel.cs b/System/Skill/SkillModel.cs
index b6cfd29..5563097 100644
--- a/System/Skill/SkillModel.cs
+++ b/System/Skill/SkillModel.cs
@@ -8,20 +8,14 @@
 
 namespace Snxxz.UI
 {
-    [XLua.LuaCallCSharp]
-	public class SkillModel : Model, IBeforePlayerDataInitialize,IPlayerLoginOk
+
+    public class SkillModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
     {
         public override void Init()
         {
             ParseConfig();
             FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
             TaskModel.Event_TaskInformation += TaskInformationUpdate;
-
-            ISkillMatch skillMatch = LuaUtility.Global.Get<ISkillMatch>("SkillMatchModel");
-            if (skillMatch != null)
-            {
-                skillMatch.onSkillMatchPageUpdate += OnSkillMatchPageUpdate;
-            }
         }
 
         public override void UnInit()
@@ -57,11 +51,9 @@
         public int minTaskHole { get; private set; }
         public int maxTaskHole { get; private set; }
 
-        public bool skillMatchRedpointable
-        {
+        public bool skillMatchRedpointable {
             get { return LocalSave.GetBool("SkillMatchRedpointable_" + PlayerDatas.Instance.baseData.PlayerID); }
-            set
-            {
+            set {
                 LocalSave.SetBool("SkillMatchRedpointable_" + PlayerDatas.Instance.baseData.PlayerID, value);
                 UpdateSkillMatchRedpoint();
             }
@@ -215,7 +207,7 @@
                 if (xpSkillsDic.ContainsKey(job))
                 {
                     return xpSkillsDic[job] == config.SkillTypeID;
-                } 
+                }
             }
             return false;
         }
@@ -305,10 +297,8 @@
         public int skillDragId = 0;
         public float onDragDelay = 0.1f;
         private Skill m_XpSkill;
-        public Skill xpSkill
-        {
-            get
-            {
+        public Skill xpSkill {
+            get {
                 return m_XpSkill ?? (m_XpSkill = PlayerDatas.Instance.hero.SkillMgr.Get(GetXpSkillID()));
             }
         }
@@ -408,7 +398,7 @@
                     SoundPlayer.Instance.PlayUIAudio(28);
                     SendEquipPassSkill(presentSltPage, _hole, _skillId);
                 }
-                
+
             }
         }
 
@@ -418,8 +408,7 @@
 
         public const string TASKHOLEKEY = "OpenSkillSlots";
 
-        public int UnlockPassHole
-        {
+        public int UnlockPassHole {
             get { return LocalSave.GetInt(StringUtility.Contact(TASKHOLEKEY, "_", PlayerDatas.Instance.baseData.PlayerID)); }
             set { LocalSave.SetInt(StringUtility.Contact(TASKHOLEKEY, "_", PlayerDatas.Instance.baseData.PlayerID), value); }
         }
@@ -468,10 +457,8 @@
         }
 
         RolePromoteModel m_PromoteModel;
-        RolePromoteModel promoteModel
-        {
-            get
-            {
+        RolePromoteModel promoteModel {
+            get {
                 return m_PromoteModel ?? (m_PromoteModel = ModelCenter.Instance.GetModel<RolePromoteModel>());
             }
         }
@@ -820,7 +807,8 @@
         }
 
         public event Action onSkillMatchPageUpdate;
-        private void OnSkillMatchPageUpdate()
+
+        public void OnSkillMatchPageUpdate()
         {
             if (onSkillMatchPageUpdate != null)
             {
@@ -830,12 +818,7 @@
 
         public List<int> GetSkillMatchs()
         {
-            ISkillMatch skillMatch = LuaUtility.Global.Get<ISkillMatch>("SkillMatchModel");
-            if (skillMatch != null)
-            {
-                return skillMatch.GetSkills();
-            }
-            return null;
+            return ILRuntimeUtility.Instance.ModelInvoke<List<int>>("SkillMatchModel", "GetSkills");
         }
     }
 
@@ -895,7 +878,6 @@
         }
     }
 
-    [XLua.CSharpCallLua]
     public interface ISkillMatch
     {
         List<int> GetSkills();

--
Gitblit v1.8.0