少年修仙传客户端代码仓库
client_linchunjie
2019-01-08 08659f0a079d05a83d0827fd57a6bdb525c67217
Merge branch 'master' into FashionDress
15个文件已修改
269 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA126_tagMCPrepareChangeMap.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA127_tagMCStartChangeMap.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/StageManager.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Compose/New/ComposeEquipWin.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/CrossServerLogin.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleItemCell.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OperationFlashRushToBuy.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/PlayerDead/PlayerDeadModel.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/PlayerDead/ReliveWin.cs 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DModelExhibition.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/StageLoadTimeOutCatcher.cs 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs
@@ -19,9 +19,9 @@
        public string attr { get ; private set; } 
        public string icon { get ; private set; } 
        public string skillName { get ; private set; } 
        public Vector3 effectPosition { get ; private set; }
        public Vector3 effectAngles { get ; private set; }
        public Vector3 effectScale { get ; private set; }
        public Vector3[] effectPosition;
        public Vector3[] effectAngles;
        public Vector3[] effectScale;
        public override string getKey()
        {
@@ -47,11 +47,26 @@
            
                skillName = rawContents[7].Trim();
            
                effectPosition=rawContents[8].Vector3Parse();
                string[] effectPositionStringArray = rawContents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                effectPosition = new Vector3[effectPositionStringArray.Length];
                for (int i=0;i<effectPositionStringArray.Length;i++)
                {
                    effectPosition[i]=effectPositionStringArray[i].Vector3Parse();
                }
            
                effectAngles=rawContents[9].Vector3Parse();
                string[] effectAnglesStringArray = rawContents[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                effectAngles = new Vector3[effectAnglesStringArray.Length];
                for (int i=0;i<effectAnglesStringArray.Length;i++)
                {
                    effectAngles[i]=effectAnglesStringArray[i].Vector3Parse();
                }
            
                effectScale=rawContents[10].Vector3Parse();
                string[] effectScaleStringArray = rawContents[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                effectScale = new Vector3[effectScaleStringArray.Length];
                for (int i=0;i<effectScaleStringArray.Length;i++)
                {
                    effectScale[i]=effectScaleStringArray[i].Vector3Parse();
                }
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: c7a22e75f9a0eed49aed26e8171f8172
timeCreated: 1546827021
timeCreated: 1546866443
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
@@ -20,8 +20,7 @@
        base.Done(vNetPack);
        H0102_tagCDBPlayer vNetData = vNetPack as H0102_tagCDBPlayer;
        StageLoadTimeOutCatcher.got0102Time = DateTime.Now;
        StageLoadTimeOutCatcher.ReportChangeMapRecord(vNetPack.socketType, "0102", DateTime.Now);
        DEBUG_0102 = true;
        DTC0403_tagPlayerLoginLoadOK.finishedLogin = false;
@@ -242,6 +241,8 @@
        StatusMgr.Instance.ReleaseActor(PlayerDatas.Instance.PlayerId);
        GAMgr.Instance.UnInit();
        DEBUG_STEP = 9;
        StageLoadTimeOutCatcher.RecordProtocol(vNetPack.socketType, "0102", DateTime.Now);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs
@@ -24,8 +24,7 @@
            return;
        }
        StageLoadTimeOutCatcher.got0109Time = DateTime.Now;
        StageLoadTimeOutCatcher.ReportChangeMapRecord(vNetData.socketType, "0109", DateTime.Now);
        StageLoadTimeOutCatcher.RecordProtocol(vNetData.socketType, "0109", DateTime.Now);
        //修改技能快捷设置发包顺序
        PlayerDatas.Instance.skill.CheckQuickSet();
@@ -43,8 +42,7 @@
                    GameNetSystem.Instance.SendInfo(mapOk);
                    DTCA127_tagMCStartChangeMap.isChangeLine = false;
                    StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
                    StageLoadTimeOutCatcher.ReportChangeMapRecord(GameNetSystem.SocketType.Main, "0107", DateTime.Now);
                    StageLoadTimeOutCatcher.RecordProtocol(GameNetSystem.SocketType.Main, "0107", DateTime.Now);
                }
                break;
            case GameNetSystem.SocketType.CrossSever:
@@ -55,8 +53,7 @@
                    mapOk.Type = 0;
                    GameNetSystem.Instance.SendToCrossServer(mapOk);
                    StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
                    StageLoadTimeOutCatcher.ReportChangeMapRecord(GameNetSystem.SocketType.CrossSever, "0107", DateTime.Now);
                    StageLoadTimeOutCatcher.RecordProtocol(GameNetSystem.SocketType.CrossSever, "0107", DateTime.Now);
                }
                break;
            default:
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA126_tagMCPrepareChangeMap.cs
@@ -21,8 +21,7 @@
            return;
        }
        StageLoadTimeOutCatcher.gotA126Time = DateTime.Now;
        StageLoadTimeOutCatcher.ReportChangeMapRecord(package.socketType, "A126", DateTime.Now);
        StageLoadTimeOutCatcher.RecordProtocol(package.socketType, "A126", DateTime.Now);
#if UNITY_EDITOR
        string _content = string.Format("DTCA126_tagMCPrepareChangeMap => 准备切换地图");
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA127_tagMCStartChangeMap.cs
@@ -49,8 +49,7 @@
        DEBUG_A127 = true;
        var package = vNetPack as HA127_tagMCStartChangeMap;
        StageLoadTimeOutCatcher.gotA127Time = DateTime.Now;
        StageLoadTimeOutCatcher.ReportChangeMapRecord(package.socketType, "A127", DateTime.Now);
        StageLoadTimeOutCatcher.RecordProtocol(package.socketType, "A127", DateTime.Now);
        DEBUG_STEP = 0;
Fight/Stage/StageManager.cs
@@ -348,8 +348,7 @@
        {
            if (!isClientChangeMap)
            {
                StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
                StageLoadTimeOutCatcher.ReportChangeMapRecord(this.socketType, "0107", DateTime.Now);
                StageLoadTimeOutCatcher.RecordProtocol(this.socketType, "0107", DateTime.Now);
                var mapOk = new C0107_tagCInitMapOK();
                mapOk.MapID = PlayerDatas.Instance.baseData.MapID;
System/Compose/New/ComposeEquipWin.cs
@@ -628,6 +628,7 @@
            List<ItemModel> unSelectItems = unfixedSelectItemDict.Values.ToList();
            unSelectItems.Sort(CompareByOverdueTime);
            for (int i = 0; i < unfixedDisplays.Length; i++)
            {
                var unfixedDisplay = unfixedDisplays[i];
@@ -638,7 +639,7 @@
                    {
                        for(int j = 0; j < unSelectItems.Count; j++)
                        {
                            ItemModel _model = unSelectItems[i];
                            ItemModel _model = unSelectItems[j];
                            if (!unfixeAddDict.ContainsKey(_model.itemInfo.ItemPlace))
                            {
                                selectModel.AddHaveUnfixedSelectItem(_model.itemInfo.ItemPlace);
@@ -707,7 +708,14 @@
            switch((RoleEquipType)itemConfig.EquipPlace)
            {
                case RoleEquipType.retSpiritAnimal:
                    WindowCenter.Instance.Open<GuardComposeConfirmWin>();
                    if (!composeWinModel.IsEnoughUnfixedMat(compoundModel))
                    {
                        MessageWin.Inst.ShowFixedTip(Language.Get("Compose101"));
                    }
                    else
                    {
                        WindowCenter.Instance.Open<GuardComposeConfirmWin>();
                    }
                    break;
                default:
                    SetFixedItemIndexDic();
System/Login/CrossServerLogin.cs
@@ -167,11 +167,11 @@
            try
            {
                StopLoginOverTimeProcess();
                loginOverTimeClock = Clock.Create(DateTime.Now + new TimeSpan(10* TimeSpan.TicksPerSecond), () =>
                {
                    busy = false;
                    ReAccountLogin();
                });
                loginOverTimeClock = Clock.Create(DateTime.Now + new TimeSpan(10 * TimeSpan.TicksPerSecond), () =>
                 {
                     busy = false;
                     ReAccountLogin();
                 });
                GameNetSystem.Instance.BeginConnectCrossServer(ipBuf, gamePortBuf, OnGameServerConnected);
                NetLinkWin.Show();
            }
@@ -245,7 +245,14 @@
        {
            StopLoginOverTimeProcess();
            busy = false;
            ExceptionCatcher.ReportException("登录跨服出现异常", StringUtility.Contact("角色:", PlayerDatas.Instance.baseData.PlayerName));
            ExceptionCatcher.ReportException("登录跨服出现异常",
                StringUtility.Contact(
                    "角色:", PlayerDatas.Instance.baseData.PlayerName, ";",
                    "本机网络:", Application.internetReachability, ";",
                    "Socket链接状态:", GameNetSystem.Instance.crossServerSocketConnected, ";",
                    "0102记录:", StageLoadTimeOutCatcher.got0102Time.ToString())
                );
            var sendInfo = new CC003_tagCGForceQuitCrossState();
            GameNetSystem.Instance.SendInfo(sendInfo);
            GameNetSystem.Instance.crossServerConnected_Loigc = false;
System/OpenServerActivity/FlashSaleItemCell.cs
@@ -18,7 +18,7 @@
        [SerializeField] Text btnStateText;
        [SerializeField] Text cdText;
        [SerializeField] Text fullServerRemainNum;
        [SerializeField] Text personalRemainNum;
        public const int RefreshFullServerBuyType = 8;
        FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
@@ -187,9 +187,12 @@
        private void UpdateSaleItemSellState()
        {
            int fullSeverRemain = 0;
            int sellState = GetSellSate(out fullSeverRemain);
            int personalRemain = 0;
            int sellState = GetSellSate(out fullSeverRemain,out personalRemain);
            string fullSeverRemainStr = fullSeverRemain > 0 ? fullSeverRemain.ToString() : UIHelper.AppendStringColor(TextColType.Red, fullSeverRemain.ToString());
            string personalRemainStr = personalRemain > 0 ? personalRemain.ToString() : UIHelper.AppendStringColor(TextColType.Red, personalRemain.ToString());
            fullServerRemainNum.text = fullSeverRemainStr;
            personalRemainNum.text = personalRemainStr;
            switch (sellState)
            {
                case 0:
@@ -210,34 +213,37 @@
        }
        /// <summary>
        /// 0 秒杀 1 已买到 2 已抢光
        /// 0 秒杀 1个人购买次数已用光  2 全服已抢光
        /// </summary>
        /// <returns></returns>
        private int GetSellSate(out int fullRemainNum)
        private int GetSellSate(out int fullRemainNum,out int personalRemainNum)
        {
            fullRemainNum = 0;
            personalRemainNum = 0;
            var buyInfo = storeModel.GetBuyShopLimit((uint)saleItem.shopId);
            var buyCount = 0;
            if (buyState != -1)
            {
                personalRemainNum = saleItem.limitNum;
                fullRemainNum = saleItem.fullServerLimitNum - rushToBuyModel.GetFullServerBuyCntById(saleItem.shopId);
                if (buyInfo != null)
                {
                    buyCount = buyInfo.BuyCnt;
                    personalRemainNum -= buyInfo.BuyCnt;
                }
                if (buyCount >= saleItem.limitNum)
                if (personalRemainNum <= 0)
                {
                    personalRemainNum = 0;
                    return 1;
                }
                if (fullRemainNum <= 0)
                {
                    fullRemainNum = 0;
                    return 2;
                }
            }
            else
            {
                personalRemainNum = saleItem.limitNum;
                fullRemainNum = saleItem.fullServerLimitNum;
            }
            return 0;
System/OpenServerActivity/OperationFlashRushToBuy.cs
@@ -174,7 +174,7 @@
            public int shopId;
            public int shopGuid;
            public int limitNum;//个人限购数量
            public int fullServerLimitNum; //个人限购数量
            public int fullServerLimitNum; //全服限购数量
            public int moneyType;
            public int moneyNumber;
            public int moneyOriginal;
System/PlayerDead/PlayerDeadModel.cs
@@ -240,12 +240,6 @@
                            }
                        }
                        break;
                    case 31220:
                        if (!WindowCenter.Instance.IsOpen<RebornWin>())
                        {
                            WindowCenter.Instance.Open<RebornWin>();
                        }
                        break;
                    default:
                        if (!WindowCenter.Instance.IsOpen<ReliveWin>())
                        {
System/PlayerDead/ReliveWin.cs
@@ -16,6 +16,7 @@
        [SerializeField] Text dieDesText;
        [SerializeField] Text buffText;
        [SerializeField] Button inplaceRebornBtn;
        PlayerDeadModel _deadModel;
        PlayerDeadModel DeadModel
@@ -24,6 +25,7 @@
        }
        public const int ElderBattleMapID = 31160; //上古战场地图Id
        public const int UnionleagueMapID = 31220; //仙盟联赛地图
        int questTimes = 0;
        #region Built-in
        protected override void BindController()
@@ -32,7 +34,7 @@
        protected override void AddListeners()
        {
            inplaceRebornBtn.onClick.AddListener(OnClickInplaceRebornBtn);
        }
        protected override void OnPreOpen()
@@ -45,37 +47,16 @@
            MapConfig mapConfig = Config.Instance.Get<MapConfig>(curMapId);
            dieDesText.gameObject.SetActive(false);
            buffText.gameObject.SetActive(curMapId == ElderBattleMapID);
            if (curMapId == ElderBattleMapID)
            inplaceRebornBtn.gameObject.SetActive(curMapId == UnionleagueMapID);
            switch(curMapId)
            {
                List<int> buffIds = new List<int>();
                StatusMgr.Instance.GetBuffIds(PlayerDatas.Instance.PlayerId, ref buffIds);
                var skillConfigs = SkillConfig.GetSkillActConfigs(0,0,DeadModel.deadBuffId);
                string skillName = string.Empty;
                int buffLv = 0;
                bool isMaxBuff = false;
                if(buffIds.Count > 0)
                {
                    for(int i = 0; i < buffIds.Count; i++)
                    {
                        int buffId = buffIds[i];
                        SkillConfig skillConfig = Config.Instance.Get<SkillConfig>(buffId);
                        if(skillConfig.SkillTypeID == DeadModel.deadBuffId)
                        {
                            buffLv = skillConfig.SkillLV + 1;
                            isMaxBuff = buffLv > DeadModel.maxDeadBuffLV ? true : false;
                            break;
                        }
                    }
                }
                if(skillConfigs != null && skillConfigs.Count > 0)
                {
                    SkillConfig skillConfig = skillConfigs[0];
                    skillName = skillConfig.SkillName;
                }
                buffText.text = Language.Get("AncientBattlefield_Text_2",skillName);
                buffText.gameObject.SetActive(!isMaxBuff);
                case ElderBattleMapID:
                    SetBuffDes();
                    break;
                case UnionleagueMapID:
                    break;
            }
            for (int i = 0; i < DeadModel.dungeonKillArray.Length; i++)
            {
                if(DeadModel.dungeonKillArray[i] == curMapId)
@@ -101,6 +82,38 @@
        {
        }
        #endregion
        private void SetBuffDes()
        {
            List<int> buffIds = new List<int>();
            StatusMgr.Instance.GetBuffIds(PlayerDatas.Instance.PlayerId, ref buffIds);
            var skillConfigs = SkillConfig.GetSkillActConfigs(0, 0, DeadModel.deadBuffId);
            string skillName = string.Empty;
            int buffLv = 0;
            bool isMaxBuff = false;
            if (buffIds.Count > 0)
            {
                for (int i = 0; i < buffIds.Count; i++)
                {
                    int buffId = buffIds[i];
                    SkillConfig skillConfig = Config.Instance.Get<SkillConfig>(buffId);
                    if (skillConfig.SkillTypeID == DeadModel.deadBuffId)
                    {
                        buffLv = skillConfig.SkillLV + 1;
                        isMaxBuff = buffLv > DeadModel.maxDeadBuffLV ? true : false;
                        break;
                    }
                }
            }
            if (skillConfigs != null && skillConfigs.Count > 0)
            {
                SkillConfig skillConfig = skillConfigs[0];
                skillName = skillConfig.SkillName;
            }
            buffText.text = Language.Get("AncientBattlefield_Text_2", skillName);
            buffText.gameObject.SetActive(!isMaxBuff);
        }
        public void RefreshTime(int time)
        {
@@ -129,6 +142,12 @@
                }
            }
        }
        private void OnClickInplaceRebornBtn()
        {
            DeadModel.InpacleReborn();
        }
        private void CloseWin()
        {
            Close();
UI/Common/UI3DModelExhibition.cs
@@ -633,9 +633,13 @@
            if (godWeaponEffect != null)
            {
                godWeaponEffect.transform.localPosition = config.effectPosition;
                godWeaponEffect.transform.localEulerAngles = config.effectAngles;
                godWeaponEffect.transform.localScale = config.effectScale;
                var index = Mathf.Max(0, job - 1);
                godWeaponEffect.transform.localPosition = index < config.effectPosition.Length ?
                    config.effectPosition[index] : Vector3.zero;
                godWeaponEffect.transform.localEulerAngles = index < config.effectAngles.Length ?
                    config.effectAngles[index] : Vector3.zero;
                godWeaponEffect.transform.localScale = index < config.effectScale.Length ?
                    config.effectScale[index] : Vector3.one;
            }
            if (_rawImage != null)
Utility/StageLoadTimeOutCatcher.cs
@@ -8,11 +8,11 @@
    const int timeOut = 20;//秒
    public static DateTime got0102Time = DateTime.MinValue;
    public static DateTime gotA126Time = DateTime.MinValue;
    public static DateTime gotA127Time = DateTime.MinValue;
    public static DateTime got0109Time = DateTime.MinValue;
    public static DateTime send0107Time = DateTime.MinValue;
    public static ProtocolRecorder got0102Time;
    public static ProtocolRecorder gotA126Time;
    public static ProtocolRecorder gotA127Time;
    public static ProtocolRecorder got0109Time;
    public static ProtocolRecorder send0107Time;
    public static StageLoadTimeOutCatcher Begin(int stageId)
    {
@@ -48,24 +48,45 @@
            var description = StringUtility.Contact(
                                        "开始时间:", startTime.ToString("HH:mm:ss"), ";",
                                        "超时时间:", DateTime.Now.ToString("HH:mm:ss"),
                                        "0102时间:", got0102Time.ToString("HH:mm:ss"), ";",
                                        "A126时间:", gotA126Time.ToString("HH:mm:ss"), ";",
                                        "A127时间:", gotA127Time.ToString("HH:mm:ss"), ";",
                                        "0109时间:", got0109Time.ToString("HH:mm:ss"), ";",
                                        "0107时间:", send0107Time.ToString("HH:mm:ss"));
                                        "0102记录:", got0102Time.ToString(), ";",
                                        "A126记录:", gotA126Time.ToString(), ";",
                                        "A127记录:", gotA127Time.ToString(), ";",
                                        "0109记录:", got0109Time.ToString(), ";",
                                        "0107记录:", send0107Time.ToString());
            ExceptionCatcher.ReportException(title, description);
            Stop();
        }
    }
    public static void ReportChangeMapRecord(GameNetSystem.SocketType socketType, string protocol, DateTime time)
    public static void RecordProtocol(GameNetSystem.SocketType socketType, string number, DateTime time)
    {
        var recorder = new ProtocolRecorder(number, time, socketType);
        switch (number)
        {
            case "0102":
                got0102Time = recorder;
                break;
            case "A126":
                gotA126Time = recorder;
                break;
            case "A127":
                gotA127Time = recorder;
                break;
            case "0109":
                got0109Time = recorder;
                break;
            case "0107":
                send0107Time = recorder;
                break;
            default:
                break;
        }
        try
        {
            var title = StringUtility.Contact("地图加载记录-->协议编号:", protocol);
            var description = StringUtility.Contact("服务器:", socketType, ";",
                "协议编号:", protocol, ";", "时间:", time.ToString("HH:mm:ss"), "玩家:", PlayerDatas.Instance.baseData.PlayerName);
            var title = StringUtility.Contact("地图加载记录-->封包编号:", number);
            var description = StringUtility.Contact(recorder.ToString(), "玩家:", PlayerDatas.Instance.baseData.PlayerName);
            ExceptionCatcher.ReportException(title, description);
        }
@@ -73,7 +94,25 @@
        {
        }
    }
    public struct ProtocolRecorder
    {
        public string number;
        public DateTime time;
        public GameNetSystem.SocketType socketType;
        public ProtocolRecorder(string number, DateTime time, GameNetSystem.SocketType socketType)
        {
            this.number = number;
            this.time = time;
            this.socketType = socketType;
        }
        public override string ToString()
        {
            return StringUtility.Contact("封包:", number, ";", "时间:", time.ToString("HH:mm:ss"), ";", "服务器:", socketType);
        }
    }
}