From e2ed839481ae34d48ae1e35e4dd56689e7646f4d Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期六, 25 八月 2018 15:09:29 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/Treasure/TreasureSoulModel.cs          |    1 
 System/HappyXB/HappyXBModel.cs                |    3 
 System/Skill/SkillPassWin.cs                  |    5 +
 System/Realm/RealmUpWin.cs                    |    2 
 System/Treasure/TreasureSoulBehaviour.cs      |    3 -
 System/WindowJump/WindowJumpMgr.cs            |    6 -
 System/FindPrecious/PersonalBossModel.cs      |   30 ++++++++-
 System/MainInterfacePanel/MainRedDot.cs       |    4 +
 System/SystemSetting/SystemSetting.cs         |   26 ++++----
 System/FindPrecious/BossHomeWin.cs            |    4 
 System/FindPrecious/BossIntroduceBehaviour.cs |    2 
 System/DailyQuest/DailyQuestWin.cs            |   82 +++++++++++---------------
 12 files changed, 90 insertions(+), 78 deletions(-)

diff --git a/System/DailyQuest/DailyQuestWin.cs b/System/DailyQuest/DailyQuestWin.cs
index b122700..31cba6c 100644
--- a/System/DailyQuest/DailyQuestWin.cs
+++ b/System/DailyQuest/DailyQuestWin.cs
@@ -525,54 +525,42 @@
             }
             else
             {
-                var unlockShowTreasure = 0;
-                if (treasureModel.TryGetUnlockShowTreasure(out unlockShowTreasure))
-                {
-                    treasureModel.treasureGotoId = gotoTreasureId;
-                    var config = Config.Instance.Get<TreasureConfig>(unlockShowTreasure);
-                    treasureModel.currentCategory = (TreasureCategory)config.Category;
-                    WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.TreasureFunc1);
-                }
-                else
-                {
-                    var config = Config.Instance.Get<TreasureConfig>(gotoTreasureId);
-                    treasureModel.selectedTreasure = gotoTreasureId;
-                    treasureModel.currentCategory = (TreasureCategory)config.Category;
+                var config = Config.Instance.Get<TreasureConfig>(gotoTreasureId);
+                treasureModel.selectedTreasure = gotoTreasureId;
+                treasureModel.currentCategory = (TreasureCategory)config.Category;
 
-                    switch (gotoTreasureId)
-                    {
-                        case 101:
-                            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DhszTs);
-                            break;
-                        case 102:
-                            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.HyqTs);
-                            break;
-                        case 103:
-                            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.GyzTs);
-                            break;
-                        case 104:
-                            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.LqhTs);
-                            break;
-                        case 105:
-                            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.PlyTs);
-                            break;
-                        case 106:
-                            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.XhqTs);
-                            break;
-                        case 107:
-                            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DhzTs);
-                            break;
-                        case 108:
-                            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.ZjhlTs);
-                            break;
-                        case 109:
-                            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.YldTs);
-                            break;
-                        case 110:
-                            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StfTs);
-                            break;
-                    }
-
+                switch (gotoTreasureId)
+                {
+                    case 101:
+                        WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DhszTs);
+                        break;
+                    case 102:
+                        WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.HyqTs);
+                        break;
+                    case 103:
+                        WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.GyzTs);
+                        break;
+                    case 104:
+                        WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.LqhTs);
+                        break;
+                    case 105:
+                        WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.PlyTs);
+                        break;
+                    case 106:
+                        WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.XhqTs);
+                        break;
+                    case 107:
+                        WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DhzTs);
+                        break;
+                    case 108:
+                        WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.ZjhlTs);
+                        break;
+                    case 109:
+                        WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.YldTs);
+                        break;
+                    case 110:
+                        WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StfTs);
+                        break;
                 }
             }
         }
diff --git a/System/FindPrecious/BossHomeWin.cs b/System/FindPrecious/BossHomeWin.cs
index a727889..b759d47 100644
--- a/System/FindPrecious/BossHomeWin.cs
+++ b/System/FindPrecious/BossHomeWin.cs
@@ -103,7 +103,7 @@
                         m_BossIntroduce.gameObject.SetActive(false);
                         m_ContainerMonster.gameObject.SetActive(true);
                         m_BossIntroduce.Dispose();
-                        UI3DModelExhibition.Instance.BeginShowNPC(model.selectedBoss, Vector3.zero, m_MonsterPortrait);
+                        UI3DModelExhibition.Instance.BeginShowNPC(model.selectedBoss, npcConfig.UIModeLOffset, npcConfig.UIModelRotation, m_MonsterPortrait);
                         m_MonsterLevel.text = Language.Get("Z1024", npcConfig.NPCLV);
                         break;
                     case 2:
@@ -192,8 +192,8 @@
                     m_BossIntroduce.gameObject.SetActive(false);
                     m_ContainerMonster.gameObject.SetActive(true);
                     m_BossIntroduce.Dispose();
-                    UI3DModelExhibition.Instance.BeginShowNPC(_bossId, Vector3.zero, m_MonsterPortrait);
                     var npcConfig = Config.Instance.Get<NPCConfig>(_bossId);
+                    UI3DModelExhibition.Instance.BeginShowNPC(_bossId, npcConfig.UIModeLOffset, npcConfig.UIModelRotation, m_MonsterPortrait);
                     m_MonsterLevel.text = Language.Get("Z1024", npcConfig.NPCLV);
                     break;
                 case 2:
diff --git a/System/FindPrecious/BossIntroduceBehaviour.cs b/System/FindPrecious/BossIntroduceBehaviour.cs
index 4e5ecf4..a2b67a4 100644
--- a/System/FindPrecious/BossIntroduceBehaviour.cs
+++ b/System/FindPrecious/BossIntroduceBehaviour.cs
@@ -88,7 +88,7 @@
             var config = Config.Instance.Get<NPCConfig>(bossId);
             m_BossName.text = config.charName;
             m_BossLevel.text = Language.Get("Z1024", config.NPCLV);
-            UI3DModelExhibition.Instance.BeginShowNPC(bossId, Vector3.zero, m_BossPortrait);
+            UI3DModelExhibition.Instance.BeginShowNPC(bossId, config.UIModeLOffset, config.UIModelRotation, m_BossPortrait);
             m_BossAbility.Display(bossId);
         }
 
diff --git a/System/FindPrecious/PersonalBossModel.cs b/System/FindPrecious/PersonalBossModel.cs
index 4abb36a..3011288 100644
--- a/System/FindPrecious/PersonalBossModel.cs
+++ b/System/FindPrecious/PersonalBossModel.cs
@@ -43,13 +43,17 @@
         public override void Init()
         {
             ParseConfig();
-            UpdateRedpoint();
-            playerPack.RefreshItemCountAct += RefreshItemCnt;
+            playerPack.RefreshItemCountAct += RefreshItemCount;
+            PlayerDatas.Instance.PlayerDataRefreshEvent += OnPlayerDataChange;
+            dungeonModel.dungeonRecordChangeEvent += OnDungeonRecordChange;
+
         }
 
         public override void UnInit()
         {
-            playerPack.RefreshItemCountAct -= RefreshItemCnt;
+            playerPack.RefreshItemCountAct -= RefreshItemCount;
+            PlayerDatas.Instance.PlayerDataRefreshEvent -= OnPlayerDataChange;
+            dungeonModel.dungeonRecordChangeEvent -= OnDungeonRecordChange;
         }
 
         public void RequestSetDungeonAction()
@@ -90,7 +94,16 @@
             return sortedBossIds[0];
         }
 
-        private void RefreshItemCnt(PackType type, int index, int id)
+
+        private void OnPlayerDataChange(PlayerDataRefresh _type, int _value)
+        {
+            if (_type == PlayerDataRefresh.VIPLv)
+            {
+                UpdateRedpoint();
+            }
+        }
+
+        private void RefreshItemCount(PackType type, int index, int id)
         {
             if (type == PackType.rptItem && id == dungeonTicket)
             {
@@ -98,6 +111,15 @@
             }
         }
 
+        private void OnDungeonRecordChange(int _id)
+        {
+            if (_id == PERSONALBOSS_MAPID)
+            {
+                UpdateRedpoint();
+            }
+        }
+
+
         public void UpdateRedpoint()
         {
             if (!FuncOpen.Instance.IsFuncOpen(76))
diff --git a/System/HappyXB/HappyXBModel.cs b/System/HappyXB/HappyXBModel.cs
index 32ffccd..cce948c 100644
--- a/System/HappyXB/HappyXBModel.cs
+++ b/System/HappyXB/HappyXBModel.cs
@@ -64,6 +64,7 @@
 
         public void OnBeforePlayerDataInitialize()
         {
+            m_storeModel.RefreshTCBPlayerDataEvent -= RefreshStoreScore;
             isXBCoolTime = false;
             XBNotifyParms.Clear();
             xbTypeInfoDict.Clear();
@@ -76,7 +77,6 @@
         {
             HAPPYXBITEMKEY = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "HappyXBItemTime");
             XBWarehouseRedPoint();
-            m_storeModel.RefreshTCBPlayerDataEvent -= RefreshStoreScore;
             m_storeModel.RefreshTCBPlayerDataEvent += RefreshStoreScore;
             playerPack.RefreshItemCountAct -= RefreshXBTool;
             playerPack.RefreshItemCountAct += RefreshXBTool;
@@ -869,6 +869,7 @@
         private void RefreshStoreScore(PlayerDataRefresh type)
         {
             if (type != PlayerDataRefresh.CDBPlayerRefresh_TreasureScore) return;
+
             XBStoreRedPoint();
         }
 
diff --git a/System/MainInterfacePanel/MainRedDot.cs b/System/MainInterfacePanel/MainRedDot.cs
index 3d3cda4..ba530f6 100644
--- a/System/MainInterfacePanel/MainRedDot.cs
+++ b/System/MainInterfacePanel/MainRedDot.cs
@@ -24,6 +24,10 @@
         private Redpoint realmRedpoint = new Redpoint(114);
         private Redpoint redPointVipDot = new Redpoint(RedPoint_VipDot);
 
+        #region 瑙掕壊绾㈢偣
+        public Redpoint roleRedpoint = new Redpoint(RedPoint_key, 101);
+        #endregion
+
         #region 閭欢绾㈢偣
         public const int RedPoint_MainMailKey = 24;
         public const int RedPoint_MailFuncKey = 2401;
diff --git a/System/Realm/RealmUpWin.cs b/System/Realm/RealmUpWin.cs
index b731595..f8f2815 100644
--- a/System/Realm/RealmUpWin.cs
+++ b/System/Realm/RealmUpWin.cs
@@ -121,7 +121,7 @@
 
         protected override void OnPreClose()
         {
-            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
+            PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
             WindowCenter.Instance.windowAfterCloseEvent -= WindowAfterCloseEvent;
             StopBoss();
             UI3DModelExhibition.Instance.StopShowPlayer();
diff --git a/System/Skill/SkillPassWin.cs b/System/Skill/SkillPassWin.cs
index b107f90..cc3ad72 100644
--- a/System/Skill/SkillPassWin.cs
+++ b/System/Skill/SkillPassWin.cs
@@ -421,7 +421,8 @@
                                     taskName = taskInfoConfig == null ? string.Empty : taskInfoConfig.show_writing;
                                 }
                             }
-                            equipPassSkills[i].skillData.m_SkillNameTxt.text = Language.Get("PassSkillHoleLimitTask", taskName);
+                            equipPassSkills[i].skillData.m_SkillNameTxt.text =
+                                UIHelper.ReplaceNewLine(Language.Get(StringUtility.Contact("PassSkillHoleLimitTask_", limit.OpenSkillSlots)));
                             continue;
                         }
                     }
@@ -533,7 +534,7 @@
                                 taskName = taskInfoConfig == null ? string.Empty : taskInfoConfig.show_writing;
                             }
                         }
-                        SysNotifyMgr.Instance.ShowTip("PassEquipLimitTask", taskName);
+                        SysNotifyMgr.Instance.ShowTip(StringUtility.Contact("PassSkillHoleLimitTask_", limit.OpenSkillSlots));
                         m_GetWayBtn.gameObject.SetActive(false);
                     }
                 }
diff --git a/System/SystemSetting/SystemSetting.cs b/System/SystemSetting/SystemSetting.cs
index 6aed415..bf704ad 100644
--- a/System/SystemSetting/SystemSetting.cs
+++ b/System/SystemSetting/SystemSetting.cs
@@ -66,7 +66,7 @@
 
     public GameFrame GetGameFrame()
     {
-        return (GameFrame)LocalSave.GetInt(GAMEFRAME_KEY, (int)GameFrame.HalfFrame);
+        return (GameFrame)LocalSave.GetInt(GAMEFRAME_KEY, (int)GameFrame.FullFrame);
     }
 
     public void SetSystemSettingSwitch(SystemSwitch type, bool _value)
@@ -191,18 +191,18 @@
             {
                 var defaultQuality = GameQuality.High;
 
-                if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 3.5f * 1024)
-                {
-                    defaultQuality = GameQuality.High;
-                }
-                else if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 2.5f * 1024)
-                {
-                    defaultQuality = GameQuality.Medium; ;
-                }
-                else if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024)
-                {
-                    defaultQuality = GameQuality.Low;
-                }
+//                 if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 3.5f * 1024)
+//                 {
+//                     defaultQuality = GameQuality.High;
+//                 }
+//                 else if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 2.5f * 1024)
+//                 {
+//                     defaultQuality = GameQuality.Medium; ;
+//                 }
+//                 else if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024)
+//                 {
+//                     defaultQuality = GameQuality.Low;
+//                 }
 
                 return (GameQuality)LocalSave.GetInt(QUALITY_LEVEL_KEY, (int)defaultQuality);
             }
diff --git a/System/Treasure/TreasureSoulBehaviour.cs b/System/Treasure/TreasureSoulBehaviour.cs
index 5e4bfa6..9d60fb5 100644
--- a/System/Treasure/TreasureSoulBehaviour.cs
+++ b/System/Treasure/TreasureSoulBehaviour.cs
@@ -11,7 +11,6 @@
     {
         [SerializeField] Text m_SoulName;
         [SerializeField] Text m_SoulState;
-        [SerializeField] Image m_Lock;
         [SerializeField] Image m_SelectImg;
         [SerializeField] Button m_SelectBtn;
         [SerializeField] RedpointBehaviour m_Redpoint;
@@ -85,7 +84,6 @@
             {
                 if (special.active)
                 {
-                    m_Lock.gameObject.SetActive(false);
                     m_SoulState.text = Language.Get("TreasureSoul_Awoke");
                 }
                 else
@@ -100,7 +98,6 @@
                             unlock = achievement.completed;
                         }
                     }
-                    m_Lock.gameObject.SetActive(!unlock);
                     if (unlock)
                     {
                         m_SoulState.text = Language.Get("TreasureSoul_Awaking");
diff --git a/System/Treasure/TreasureSoulModel.cs b/System/Treasure/TreasureSoulModel.cs
index 75e758b..92f7671 100644
--- a/System/Treasure/TreasureSoulModel.cs
+++ b/System/Treasure/TreasureSoulModel.cs
@@ -266,6 +266,7 @@
                     {
                         treasureSoulEvent((int)_data.PriID);
                     }
+                    UpdateAchievementRedpoint((int)_data.PriID);
                     continue;
                 }
 
diff --git a/System/WindowJump/WindowJumpMgr.cs b/System/WindowJump/WindowJumpMgr.cs
index addcb90..d407ca0 100644
--- a/System/WindowJump/WindowJumpMgr.cs
+++ b/System/WindowJump/WindowJumpMgr.cs
@@ -216,10 +216,8 @@
                 var soulId = 0;
                 if (int.TryParse(_tagWinSearchModel.SelectActive, out soulId))
                 {
-                    var treasureModel = ModelCenter.Instance.GetModel<TreasureModel>();
-                    Treasure treasure;
-                    treasureModel.TryGetTreasure(soulId, out treasure);
-                    if (treasure == null || treasure.state != TreasureState.Collected)
+                    var soulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>();
+                    if (!soulModel.IsOpenTreasureSoul(soulId))
                     {
                         return;
                     }

--
Gitblit v1.8.0