瀏覽代碼

Merge remote-tracking branch 'remotes/origin/guodong' into zhaoyang

# Conflicts:
#	GameClient/Assets/Game/CSShare
zhaoyang 3 年之前
父節點
當前提交
736a8cdbdd

+ 1 - 1
GameClient/Assets/Game/CSShare

@@ -1 +1 @@
-Subproject commit e9649a6d2bfb3122da88490cb99cdabac4c301a4
+Subproject commit 32b9cf7ac9d5693e5041c23de15ca73b424f62eb

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -28,6 +28,9 @@ namespace GFGGame
         public const string GET_MAINTAIN_SUIT_BONUS = "GET_MAINTAIN_SUIT_BONUS";
         public const string MAKE_NEW_SUIT = "MAKE_NEW_SUIT";
 
+        //剧情战斗快速完成,展示奖励
+        public const string STORY_FIGHT_QUICKLY_SUCCESS = "STORY_FIGHT_QUICKLY_SUCCESS";
+
 
 
     }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -80,7 +80,7 @@ namespace GFGGame
             //SkillDataManager.Instance.InitServerData(result.roleSkillList);
             //SkillDataManager.Instance.SetDicPassivitySkillCfg();
             GetSuitItemController.enable = true;
-            //RoleDataHandler.StartUpdate();
+            RoleDataHandler.StartUpdate();
 
             GFGUIPackage.AddPackage(ResPathUtil.GetUIPackagePath("CommonGame"));
             GFGUIPackage.AddPackage(ResPathUtil.GetUIPackagePath("Main"));

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Data/Cache/StoryBonusDataCache.cs

@@ -44,6 +44,17 @@ namespace GFGGame
             return bonusList;
         }
 
+        public static List<ItemData> GetBaseBonusList(int levelID)
+        {
+            StoryBonusData bonusData = GetBonusData(levelID);
+            if (bonusData.bonusBase != null)
+            {
+                return bonusData.bonusBase;
+            }
+
+            return null;
+        }
+
         public static List<ItemData> GetChapterBonusList(int chapterID, int index)
         {
             StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(chapterID);

+ 11 - 9
GameClient/Assets/Game/HotUpdate/Data/Handler/RoleDataHandler.cs

@@ -1,5 +1,6 @@
 using ET;
 using FairyGUI;
+using static UnityEngine.UI.CanvasScaler;
 
 namespace GFGGame
 {
@@ -10,8 +11,10 @@ namespace GFGGame
         private static int _heartbeatCDEnd = 0;
         public static void StartUpdate()
         {
-            _heartbeatCDEnd = ServerDataManager.currentTimeSecs + INTERVAL_HEARTBEAT;
+            int currentTimeSecs = (int)(Game.TimeInfo.ServerNow() / 1000);
+            _heartbeatCDEnd = currentTimeSecs + INTERVAL_HEARTBEAT;
             StopUpdate();
+            //每秒检测
             Timers.inst.Add(1, 0, OnUpdate);
         }
 
@@ -22,27 +25,26 @@ namespace GFGGame
 
         private static void OnUpdate(object param)
         {
-            if(!RoleDataManager.powerTimeLock &&!RoleDataManager.CheckPowerFull())
+            int currentTimeSecs = (int)(Game.TimeInfo.ServerNow() / 1000);
+            if (!RoleDataManager.powerTimeServerLock &&!RoleDataManager.CheckPowerFull())
             {
                 int powerTime = GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerTime);
-                int passTime = ServerDataManager.currentTimeSecs - powerTime;
+                int passTime = currentTimeSecs - powerTime;
                 if(passTime >= GameConst.INTERVAL_TIME_SECONDS_POWER)
                 {
-                    RoleDataManager.powerTimeLock = true;
+                    RoleDataManager.powerTimeServerLock = true;
                     NumericHelper.RequestAddAttributePoint(GameGlobal.zoneScene, NumericType.Power).Coroutine();
                 }
             }
-            int currentTimeSecs = ServerDataManager.currentTimeSecs;
             if(currentTimeSecs >= _heartbeatCDEnd) 
             {
                 //GameProxy.ReqUpdateTime();
                 _heartbeatCDEnd = currentTimeSecs + INTERVAL_HEARTBEAT;
             }
-            int day = ServerDataManager.CurrentDay;
-            int recommendDay = GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount);
-            if(recommendDay >= 0 && recommendDay != day) 
+            int dailyResetSecs = GameGlobal.myNumericComponent.GetAsInt(NumericType.DailyResetSecs);
+            if (TimeHelper.ServerNowSecs >= dailyResetSecs)
             {
-                StoryDataManager.ResetDailyData();
+                RoleSproxy.ResetDailyData().Coroutine();
             }
         }
 

+ 4 - 24
GameClient/Assets/Game/HotUpdate/Data/RoleDataManager.cs

@@ -8,7 +8,7 @@ namespace GFGGame
 {
     public class RoleDataManager
     {
-        public static bool powerTimeLock;
+        public static bool powerTimeServerLock;
         public static long roleId;
         public static string roleName;
         public static int rechargeTotal;
@@ -21,10 +21,6 @@ namespace GFGGame
             {
                 return GameGlobal.myNumericComponent.GetAsInt(NumericType.Power);
             }
-            set
-            {
-                
-            }
         }
 
         public static int gold
@@ -33,10 +29,6 @@ namespace GFGGame
             {
                 return GameGlobal.myNumericComponent.GetAsInt(NumericType.Gold);
             }
-            set
-            {
-                
-            }
         }
         private static int _exp = 0;
         public static int exp
@@ -45,24 +37,16 @@ namespace GFGGame
             {
                 return GameGlobal.myNumericComponent.GetAsInt(NumericType.Exp);
             }
-            set
-            {
-                
-            }
         }
-        private static int _lvl = 1;
+
         public static int lvl
         {
             get
             {
                 return GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl);
             }
-            set
-            {
-                
-            }
         }
-        private static int _diaP = 0;
+
         public static int diaP
         {
             get
@@ -74,17 +58,13 @@ namespace GFGGame
                 
             }
         }
-        private static int _diaR = 0;
+        
         public static int diaR
         {
             get
             {
                 return GameGlobal.myNumericComponent.GetAsInt(NumericType.DiamondR);
             }
-            set
-            {
-                
-            }
         }
         private static string _lastRandomName = null;
 

+ 0 - 49
GameClient/Assets/Game/HotUpdate/Data/ServerDataManager.cs

@@ -1,49 +0,0 @@
-using System;
-
-namespace GFGGame
-{
-    public class ServerDataManager
-    {
-        private const long TIME_ORIGINAL = 621355968000000000;
-        private static long _dTime;
-
-
-        public static void SetServerTime(long serverTime)
-        {
-            _dTime = serverTime - CurrentlocalTime;
-        }
-
-        public static long currentTimeMillis
-        {
-            get
-            {
-                return CurrentlocalTime + _dTime;
-            }
-        }
-
-        public static int currentTimeSecs
-        {
-            get
-            {
-                return (int)currentTimeMillis/1000;
-            }
-        }
-
-        public static long CurrentlocalTime
-        {
-            get
-            {
-                return (DateTime.Now.Ticks - TIME_ORIGINAL)/10000;
-            }
-            
-        }
-
-        public static int CurrentDay {
-            get
-            {
-                DateTime dateTime = new DateTime(currentTimeMillis*10000 + TIME_ORIGINAL);
-                return dateTime.Day;
-            }
-        }
-    }
-}

+ 3 - 12
GameClient/Assets/Game/HotUpdate/Data/StoryDataManager.cs

@@ -20,7 +20,6 @@ namespace GFGGame
         public static int _passLevel = 0;
         private static int _passChapterJY = 10000;
         private static int _passLevelJY = 0;
-        public static int recommendDay = -1;
 
         //关卡最高分数记录
         private static Dictionary<int, int> _highestScoreDic = new Dictionary<int, int>();
@@ -90,14 +89,6 @@ namespace GFGGame
             }
         }
 
-        public static void ResetDailyData()
-        {
-            //_recommendCount = GameConst.MAX_COUNT_RECOMMEND;
-            int day = ServerDataManager.CurrentDay;
-            //recommendDay = day;
-            //GameProxy.ReqUpdateRecommendCount(_recommendCount);
-        }
-
         //获取宝箱奖励状态
         public static int GetChapterBonusStatus(int chapterID, int index)
         {
@@ -304,9 +295,9 @@ namespace GFGGame
             //        tempPassLevel = 0;
             //        fistPassLastLvl = true;
             //    }
-            //SetPassData(tempPassChapter, tempPassLevel);
-            //GameProxy.ReqUpdateStoryProgress(_passChapter, _passLevel, _passChapterJY, _passLevelJY);
-            //currentBonusList = StoryBonusDataCache.GetBonusList(currentLevelID, true, true);
+            //    SetPassData(tempPassChapter, tempPassLevel);
+            //    GameProxy.ReqUpdateStoryProgress(_passChapter, _passLevel, _passChapterJY, _passLevelJY);
+            //    currentBonusList = StoryBonusDataCache.GetBonusList(currentLevelID, true, true);
             //}
             //else
             //{

+ 6 - 6
GameClient/Assets/Game/HotUpdate/Net/Proxy/GameProxy.cs

@@ -176,7 +176,7 @@ namespace GFGGame
             {
                 if (result != null && result.roleInfo != null)
                 {
-                    ServerDataManager.SetServerTime(result.roleInfo.serverTime);
+                    //ServerDataManager.SetServerTime(result.roleInfo.serverTime);
                     AntiAddictionController.CheckOnlineTime(result.roleInfo.onlineTimeSecs, result.roleInfo.onlineDurationSecs, result.roleInfo.onlineDurationSecsDay);
                     RoleDataManager.rechargeTotalMon = result.roleInfo.rechargeTotalMon;
                 }
@@ -185,12 +185,12 @@ namespace GFGGame
 
         public static void ReqUpdateRecommendCount(int recommendCount)
         {
-            int day = StoryDataManager.recommendDay;
-            Dictionary<string, object> data = JsonUtil.createJsonDic("id", RoleDataManager.roleId, "recommendCount", recommendCount, "recommendDay", day);
-            Post(GameProtoId.UPDATE_RECOMMEND_COUNT, "roleInfo", data, (GameResult result) =>
-            {
+            //int day = StoryDataManager.recommendDay;
+            //Dictionary<string, object> data = JsonUtil.createJsonDic("id", RoleDataManager.roleId, "recommendCount", recommendCount, "recommendDay", day);
+            //Post(GameProtoId.UPDATE_RECOMMEND_COUNT, "roleInfo", data, (GameResult result) =>
+            //{
 
-            });
+            //});
         }
 
         public static void ReqUpdateRecharge(int money)

+ 24 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/RoleSproxy.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using ET;
+
+namespace GFGGame
+{
+    public static class RoleSproxy
+    {
+        public static async ETTask ResetDailyData()
+        {
+            M2C_ResetDailyData response = null;
+            response = (M2C_ResetDailyData)await MessageHelper.SendToServer(new C2M_ResetDailyData());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    
+                }
+            }
+        }
+    }
+}

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/ServerDataManager.cs.meta → GameClient/Assets/Game/HotUpdate/ServerProxy/RoleSproxy.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 84728b8b83bdbb8449835c1731f7bca0
+guid: fdecfed829472cc4786338b3f3449600
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 50 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/StorySProxy.cs

@@ -38,8 +38,13 @@ namespace GFGGame
                 {
                     List<ItemData> bonusList = StoryBonusDataCache.GetBonusList(response.LevelCfgId, true, true);
                     BonusController.TryShowBonusList(bonusList);
+                    FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(GameGlobal.myNumericComponent.GetAsInt(NumericType.Chapter) + 1, GameGlobal.myNumericComponent.GetAsInt(NumericType.ChapterLvl));//首次通过要检查是否有功能开启
+                    StoryController.OnFinishStoryLevel(levelCfgId, true);
+                    return;
                 }
             }
+            //异常返回到关卡列表界面
+            ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapter, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW));
         }
 
         //完成剧情战斗关卡
@@ -93,8 +98,8 @@ namespace GFGGame
             ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapter, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW));
         }
 
-        //完成剧情战斗关卡失败,更新最高分
-        public static async ETTask FinishStoryFightLevelFail(int levelCfgId, int score)
+        //剧情战斗关卡失败,更新最高分
+        public static async ETTask StoryFightLevelFail(int levelCfgId, int score)
         {
             M2C_FinishStoryFightLevelFail response = null;
             response = (M2C_FinishStoryFightLevelFail)await MessageHelper.SendToServer(new C2M_FinishStoryFightLevelFail()
@@ -110,5 +115,48 @@ namespace GFGGame
                 }
             }
         }
+
+        //快速完成关卡战斗
+        public static async ETTask FinishStoryFightQuickly(int levelCfgId, int times)
+        {
+            M2C_FinishStoryFightQuickly response = null;
+            response = (M2C_FinishStoryFightQuickly)await MessageHelper.SendToServer(new C2M_FinishStoryFightQuickly()
+            {
+                LevelCfgId = levelCfgId,
+                times = times
+            });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    List<List<ItemData>> bonusLists = new List<List<ItemData>>();
+                    List<ItemData> allList = new List<ItemData>();
+                    foreach(var proto in response.RandomBonusList)
+                    {
+                        var itemData = ItemUtil.createItemData(proto.ConfigId, proto.Count);
+                        allList.Add(itemData);
+                    }
+                    var index = 0;
+                    for(int i = 0; i < response.BonusLengths.Count; ++i)
+                    {
+                        var len = response.BonusLengths[i];
+
+                        var baseBonusList = StoryBonusDataCache.GetBaseBonusList(response.LevelCfgId);
+                        List<ItemData> bonusList = new List<ItemData>();
+                        if (baseBonusList != null)
+                        {
+                            bonusList.AddRange(baseBonusList);
+                        }
+                        if (len > 0)
+                        {
+                            bonusList.AddRange(allList.GetRange(index, len));
+                        }
+                        bonusLists.Add(bonusList);
+                        index += len;
+                    }
+                    EventAgent.DispatchEvent(ConstMessage.STORY_FIGHT_QUICKLY_SUCCESS, bonusLists);
+                }
+            }
+        }
     }
 }

+ 5 - 7
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachOfItemView.cs

@@ -77,9 +77,8 @@ namespace GFGGame
             if (functionId == ConstFunctionId.JU_QING_GUAN_QIA)
             {
                 string value = infos[1];
-                string[] values = value.Split('_');
-                int chapterInt = int.Parse(values[0]);
-                int levelInt = int.Parse(values[1]);
+                var levelCfgId = int.Parse(value);
+                CalculateHelper.GetStoryChapterLevel(levelCfgId, out int chapterInt, out int levelInt);
                 string chapter = NumberUtil.GetChiniseNumberText(chapterInt);
                 string level = NumberUtil.GetChiniseNumberText(levelInt);
                 listItem.target.text = string.Format(gameFunctionCfg.name, chapter, level);
@@ -106,16 +105,15 @@ namespace GFGGame
                     break;
                 case ConstFunctionId.JU_QING_GUAN_QIA:
                     string value = infos[1];
-                    string[] values = value.Split('_');
-                    int chapterInt = int.Parse(values[0]);
-                    int levelInt = int.Parse(values[1]);
+                    var levelCfgId = int.Parse(value);
+                    CalculateHelper.GetStoryChapterLevel(levelCfgId, out int chapterInt, out int levelInt);
                     if ((string)_fromeViewDatas[0] == ViewName.DRESS_UP_FIGHT_VIEW)
                     {
                         //从战斗换装必需品来源跳转到剧情界面,在剧情界面点返回后直接返回章节界面,无需返回换装界面
                         _fromeViewDatas = null;
                     }
                     ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, chapterInt, _fromeViewDatas, true);
-                    StoryController.ShowLevelView(chapterInt, levelInt);
+                    StoryController.ShowLevelView(levelCfgId);
                     break;
                 case ConstFunctionId.FU_ZHUANG_HE_CHENG:
 

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterView.cs

@@ -193,7 +193,8 @@ namespace GFGGame
 
             UI_CompStoryLevelItem levelItem = UI_CompStoryLevelItem.Proxy(context.sender as GObject);
             int level = int.Parse(levelItem.target.name.Replace("g", ""));
-            StoryController.ShowLevelView(_chapterID, level);
+            var levelCfgId = CalculateHelper.GetStoryLevelId(_chapterID, level);
+            StoryController.ShowLevelView(levelCfgId);
         }
 
         private void UpdateBonusBoxName(UI_CompBonusBox bonusBox, string name)

+ 22 - 25
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryController.cs

@@ -1,20 +1,21 @@
 using ET;
+using log4net.Core;
 using System.Collections.Generic;
 
 namespace GFGGame
 {
     public class StoryController
     {
-        public static void ShowLevelView(int chapterID, int level)
-        {
-            int levelID = chapterID*GameConst.STORY_LEVEL_KEY_NUM + level;
+        public static void ShowLevelView(int levelCfgId)
+{
+            CalculateHelper.GetStoryChapterLevel(levelCfgId, out int chapterID, out int level);
             StoryDataManager.currentChapter = chapterID;
-            StoryDataManager.currentLevelCfgId = levelID;
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelID);
+            StoryDataManager.currentLevelCfgId = levelCfgId;
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
             StoryDataManager.currentLevel = level;
             if (levelCfg.fightID.Length > 0)
             {
-                ViewManager.Show(ViewName.STORY_LEVEL_INFO_VIEW, levelID);
+                ViewManager.Show(ViewName.STORY_LEVEL_INFO_VIEW, levelCfgId);
             }
             else if (levelCfg.storyStartID.Length > 0)
             {
@@ -55,38 +56,34 @@ namespace GFGGame
                 //失败仅判断并更新最高分
                 if(score > StoryDataManager.GetScoreHighest(StoryDataManager.currentCardId))
                 {
-                    StorySProxy.FinishStoryFightLevelFail(StoryDataManager.currentLevelCfgId, score).Coroutine();
+                    StorySProxy.StoryFightLevelFail(StoryDataManager.currentLevelCfgId, score).Coroutine();
                 }
             }
         }
 
-        private static void OnCompleteChapterStoryDialog(bool isSkip, object param)
+        public static void OnFinishStoryLevel(int levelCfgId, bool firstPass)
         {
+            //判断是否是首次打通最后一关
+            int nextLevelID = levelCfgId + 1;
+            StoryLevelCfg nextLevelCfg = StoryLevelCfgArray.Instance.GetCfg(nextLevelID);
+            var fistPassLastLvl = (nextLevelCfg == null) && firstPass;
 
-            //List<ItemData> bonusList = null;
-            bool _fistPassLastLvl = false;
-            bool _curLvfirstPass = false;
-            if (!StoryDataManager.CheckCurrentLevelPass())
-            {
-                //bonusList = StoryDataManager.PassCurrentLevel(out _fistPassLastLvl, out _curLvfirstPass);
-                StorySProxy.FinishStoryDialogLevel(StoryDataManager.currentLevelCfgId).Coroutine();
-            }
-            if (_fistPassLastLvl)
+            if (fistPassLastLvl)
             {
-                ViewManager.Show(ViewName.STORY_CHAPTER_LIST_VIEW, null, null, true);
+                ViewManager.Show(ViewName.STORY_CHAPTER_LIST_VIEW);
             }
             else
             {
-                ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapter, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
+                ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapter, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW));
             }
-            if (_curLvfirstPass)
+        }
+
+        private static void OnCompleteChapterStoryDialog(bool isSkip, object param)
+        {
+            if (!StoryDataManager.CheckCurrentLevelPass())
             {
-                FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(GameGlobal.myNumericComponent.GetAsInt(NumericType.Chapter) + 1, GameGlobal.myNumericComponent.GetAsInt(NumericType.ChapterLvl));//首次通过要检查是否有功能开启
+                StorySProxy.FinishStoryDialogLevel(StoryDataManager.currentLevelCfgId).Coroutine();
             }
-            //if (bonusList != null && bonusList.Count > 0)
-            //{
-            //    ViewManager.Show(ViewName.GET_BONUS_VIEW, bonusList);
-            //}
         }
 
 

+ 16 - 8
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightQuicklyView.cs

@@ -53,6 +53,7 @@ namespace GFGGame
             _power = levelCfg.power;
             StartFight(count);
             EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateBtnFightTimes);
+            EventAgent.AddEventListener(ConstMessage.STORY_FIGHT_QUICKLY_SUCCESS, StartShowBonus);
         }
 
         protected override void OnHide()
@@ -60,6 +61,7 @@ namespace GFGGame
             base.OnHide();
             Timers.inst.Remove(ShowBonusItem);
             EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateBtnFightTimes);
+            EventAgent.RemoveEventListener(ConstMessage.STORY_FIGHT_QUICKLY_SUCCESS, StartShowBonus);
         }
 
         private void StartFight(int count)
@@ -75,14 +77,20 @@ namespace GFGGame
             _ui.m_btnFightTimes.visible = false;
             _ui.m_txtPowerDesc.visible = false;
             _ui.m_list.RemoveChildren();
-            _totalBonusList = new List<List<ItemData>>();
-            for (int i = 1; i <= count; i++)
-            {
-                bool fistPassLastLvl = false;
-                bool curLvfirstPass = false;
-                List<ItemData> bonusList = StoryDataManager.PassCurrentLevel(out fistPassLastLvl, out curLvfirstPass);
-                _totalBonusList.Add(bonusList);
-            }
+            //_totalBonusList = new List<List<ItemData>>();
+            //for (int i = 1; i <= count; i++)
+            //{
+            //    bool fistPassLastLvl = false;
+            //    bool curLvfirstPass = false;
+            //    List<ItemData> bonusList = StoryDataManager.PassCurrentLevel(out fistPassLastLvl, out curLvfirstPass);
+            //    _totalBonusList.Add(bonusList);
+            //}
+            StorySProxy.FinishStoryFightQuickly(_levelID, count).Coroutine();
+        }
+
+        private void StartShowBonus(EventContext eventContext)
+        {
+            _totalBonusList = (List<List<ItemData>>)eventContext.data;
             _index = 0;
             ShowBonusItem();
             Timers.inst.Add(0.3f, 0, ShowBonusItem);

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -467,7 +467,7 @@ namespace GFGGame
         private void Skip(object param = null)
         {
             EventAgent.RemoveEventListener(ConstMessage.CARD_SKILL, UpdateCircleResult);
-            ViewManager.Show(ViewName.STORY_FIGHT_RESULT_VIEW);
+            StoryController.CheckStoryFightResult().Coroutine();
         }
         private void Reset()
         {

+ 7 - 24
GameClient/Assets/Game/HotUpdate/Views/MainStory/StroyFightResultView.cs

@@ -21,11 +21,8 @@ namespace GFGGame
         private UI_StoryFightResultUI _ui;
         private GameObject _sceneObject;
         private GameObject _scenePrefab;
-        private List<ItemData> _currentBonusList;
-
-        private bool result = false;
-        private bool _fistPassLastLvl = false;
 
+        private StoryFightResultData _resultData;
 
         public override void Dispose()
         {
@@ -69,11 +66,6 @@ namespace GFGGame
             {
                 _sceneObject = GameObject.Instantiate(_scenePrefab);
             }
-            _currentBonusList = resultData.BonusList;
-            //判断是否是首次打通最后一关
-            int nextLevelID = StoryDataManager.currentLevelCfgId + 1;
-            StoryLevelCfg nextLevelCfg = StoryLevelCfgArray.Instance.GetCfg(nextLevelID);
-            _fistPassLastLvl = (nextLevelCfg == null) && resultData.FirstPass;
 
             SceneController.UpdateRole(EquipDataCache.cacher.equipDatas, _sceneObject);
             _ui.m_selfScore.m_txtScore.text = "" + resultData.Score;
@@ -82,12 +74,11 @@ namespace GFGGame
             _ui.m_expBar.m_pbExp.max = roleLevelCfg.exp;
             _ui.m_expBar.m_pbExp.value = GameGlobal.myNumericComponent.GetAsInt(NumericType.Exp);
 
-            result = resultData.Result;
             StoryUtil.UpdateStar(resultData.Star, _ui.m_selfScore.m_flower.target);
             _ui.m_selfScore.m_bg.url = "ui://Main/zd_jsjm_jszi_" + resultData.Star;
             TextFormat tf = _ui.m_selfScore.m_txtScore.textFormat;
             UpdateToCheckGuide(null);
-            if (!result)
+            if (!_resultData.Result)
             {
                 tf.font = "ui://Main/Font3";
                 _ui.m_expBar.m_txtLvlAdded.text = "0";
@@ -118,22 +109,14 @@ namespace GFGGame
                 GameObject.Destroy(_sceneObject);
                 _sceneObject = null;
             }
-            _currentBonusList = null;
         }
 
         private void OnClickBtnClose()
         {
             this.Hide();
-            if (_fistPassLastLvl)
-            {
-                ViewManager.Show(ViewName.STORY_CHAPTER_LIST_VIEW);
-            }
-            else
-            {
-                ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapter, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW));
-            }
+            StoryController.OnFinishStoryLevel(StoryDataManager.currentLevelCfgId, _resultData.FirstPass);
             //尝试显示奖励
-            BonusController.TryShowBonusList(_currentBonusList);
+            BonusController.TryShowBonusList(_resultData.BonusList);
             StoryDataManager.currentCardId = -1;
         }
 
@@ -152,9 +135,9 @@ namespace GFGGame
         protected override void UpdateToCheckGuide(object param)
         {
             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
-            if (!result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_FAILED, 1, "不要气馁呀,可以通过再次挑战已通关的关卡、摘星、绣坊等途径获取更多的物资来提升自己的战斗力哦!", false, 0, true, false, (int)(this.viewCom.height - 150));
-            if (result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_SINGLE_WIN, 1, "这条连衣裙可真好看!点击空白区域继续", false, 0, true, false, (int)(this.viewCom.height - 150));
-            if (result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_TARGET_WIN, 1, "你太厉害了,初次对战就获得了这么好的战绩,继续加油吧", false, 0, true, false, (int)(this.viewCom.height - 350));
+            if (!_resultData.Result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_FAILED, 1, "不要气馁呀,可以通过再次挑战已通关的关卡、摘星、绣坊等途径获取更多的物资来提升自己的战斗力哦!", false, 0, true, false, (int)(this.viewCom.height - 150));
+            if (_resultData.Result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_SINGLE_WIN, 1, "这条连衣裙可真好看!点击空白区域继续", false, 0, true, false, (int)(this.viewCom.height - 150));
+            if (_resultData.Result) GuideController.TryGuide(null, ConstGuideId.FIRST_FIGHT_TARGET_WIN, 1, "你太厉害了,初次对战就获得了这么好的战绩,继续加油吧", false, 0, true, false, (int)(this.viewCom.height - 350));
         }
 
         protected override void TryCompleteGuide()

+ 2 - 0
GameClient/Assets/Game/Launcher/GameLauncher.cs

@@ -24,6 +24,8 @@ public class GameLauncher : MonoBehaviour
         Log.ILog = new UnityLogger();
 
         Options.Instance = new Options();
+
+        TimeInfo.Instance.TimeZone = 8;
     }
 
     // Start is called before the first frame update