少年修仙传客户端代码仓库
0312 修复升星跳转背包BUG,装备分解红点只会在点击背包按钮时才有优先跳转,其他情况不跳转;
去除登录时域名的异步解析,产生的问题弹框现象1. 网络超时 2.版本资源异常
4个文件已修改
52 ■■■■ 已修改文件
Core/NetworkPackage/Socket/ClientSocket.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipStar/EquipStarSuccessWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/New/KnapSackWin.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TopRightTip.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/Socket/ClientSocket.cs
@@ -42,12 +42,47 @@
            ip = _ip;
            port = _port;
            onConnected = _onConnected;
            Dns.BeginGetHostAddresses(_ip, OnGetHostAddresses, null);
            //目前测试到异步两个问题
            // 1. BeginGetHostAddresses 不明情况下会很久才回调,导致触发超时
            // 2. 超时的情况下多次尝试登录后,会触发多次OnGetHostAddresses,导致登录异常
            //Dns.BeginGetHostAddresses(_ip, OnGetHostAddresses, null);
            IPAddress ipAddress;
            #if UNITY_IPHONE
            IPHostEntry ipAddresses = Dns.GetHostEntry(_ip);
            ipAddress = ipAddresses.AddressList[0];
            #else
            IPAddress[] ipAddresses = Dns.GetHostAddresses(_ip);
            ipAddress = ipAddresses[0];
            #endif
            if (ipAddress.AddressFamily == AddressFamily.InterNetworkV6)
            {
                DebugEx.Log("当前使用的网络: IPV6");
                m_Socket = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp);
            }
            else
            {
                DebugEx.Log("当前使用的网络: IPV4");
                m_Socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            }
            var ipEndPoint = new IPEndPoint(ipAddress, port);
            if (ipEndPoint == null)
            {
                Debug.Log("IpEndPoint is null");
            }
            m_Socket.BeginConnect(ipEndPoint, new AsyncCallback(ConnectCallBack), null);
        }
        catch (Exception e)
        {
            DebugEx.LogError(e.Message);
        }
    }
    private void OnGetHostAddresses(IAsyncResult _result)
@@ -130,6 +165,7 @@
    /// </summary>
    public void CloseConnect()
    {
        Debug.Log("==== CloseConnect");
        try
        {
            isStopTreading = true;
System/EquipStar/EquipStarSuccessWin.cs
@@ -71,7 +71,7 @@
            {
                if (isOk)
                {
                    equipModel.selectedLevel.value = model.equipPosition.x;
                    equipModel.SelectSet(model.equipPosition.x);
                    equipModel.selectedStarLevel.value = ActiveSuit;
                    equipModel.isOpenSuiteAttrRect = true;
                    WindowCenter.Instance.Close<EquipFrameWin>();
System/KnapSack/New/KnapSackWin.cs
@@ -27,6 +27,7 @@
    {
        PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        public static KnapsackFuncTitle titleType = KnapsackFuncTitle.bag;
        public static bool jumpByRedpoint = false;  //打开时受红点影响跳转
        protected Image m_LeftTop;
        protected override void AddListeners()
        {
@@ -41,14 +42,14 @@
        protected override void OnActived()
        {
            this.transform.SetAsLastSibling();
            if (!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0
                && playerPack.lookLineIndex == -1)
            if (playerPack.lookLineIndex == -1 && jumpByRedpoint)
            {
                if (playerPack.redpointEquipDecom.state == RedPointState.Simple)
                {
                    functionOrder = 3;
                }
            }
            jumpByRedpoint = false;
            base.OnActived();
System/MainInterfacePanel/TopRightTip.cs
@@ -93,6 +93,7 @@
        private void OpenBackpack()
        {
            KnapSackWin.jumpByRedpoint = true;
            WindowCenter.Instance.Open<KnapSackWin>();
            WindowCenter.Instance.Close<MainInterfaceWin>();
        }
@@ -138,9 +139,9 @@
                {
                    heroPrePosition = heroPos;
                   
                    var _eular = PlayerDatas.Instance.hero.Root.eulerAngles;
                    var _mapHeroEular = m_MapHero.transform.eulerAngles;
                    _mapHeroEular.z = -_eular.y;
                    var _eular = PlayerDatas.Instance.hero.Root.eulerAngles;
                    var _mapHeroEular = m_MapHero.transform.eulerAngles;
                    _mapHeroEular.z = -_eular.y;
                    m_MapHero.transform.eulerAngles = _mapHeroEular;
                }
            }