少年修仙传客户端代码仓库
client_linchunjie
2018-12-28 95f448e2735882bd9013096e10e17ef8a1f487f2
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
7个文件已修改
168 ■■■■■ 已修改文件
Core/NetworkPackage/DTCFile/ServerPack/HC0_CrossRealm/DTCC001_tagGCCrossRealmPKMatchOK.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HC0_CrossRealm/HC001_tagGCCrossRealmPKMatchOK.cs 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Player.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/CrossServerOneVsOne/FightingPKWin.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/CrossServerOneVsOne/RankCellCtrl.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/CrossServerLogin.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/LoginWin.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HC0_CrossRealm/DTCC001_tagGCCrossRealmPKMatchOK.cs
@@ -23,5 +23,4 @@
    }
}
}
Core/NetworkPackage/ServerPack/HC0_CrossRealm/HC001_tagGCCrossRealmPKMatchOK.cs
@@ -1,50 +1,47 @@
using UnityEngine;
using System.Collections;
// C0 01 跨服PK匹配成功 #tagGCCrossRealmPKMatchOK
public class HC001_tagGCCrossRealmPKMatchOK : GameNetPackBasic
{
    public ushort RoomID;    // 房间ID
    public byte NameLen;
    public string PlayerName;    // 跨服名字
    public byte Number;    // 位置编号;1-左,2-右
    public byte MatchPlayerCount;
    public tagGCCrossRealmPKMatchPlayer[] MatchPlayer = null;    // 匹配到的玩家
    public HC001_tagGCCrossRealmPKMatchOK()
    {
        _cmd = (ushort)0xC001;
    }
    public override void ReadFromBytes(byte[] vBytes)
    {
        TransBytes(out RoomID, vBytes, NetDataType.WORD);
        TransBytes(out NameLen, vBytes, NetDataType.BYTE);
        TransBytes(out PlayerName, vBytes, NetDataType.Chars, NameLen);
        TransBytes(out Number, vBytes, NetDataType.BYTE);
        TransBytes(out MatchPlayerCount, vBytes, NetDataType.BYTE);
        MatchPlayer = new tagGCCrossRealmPKMatchPlayer[MatchPlayerCount];
        for (int i = 0; i < MatchPlayerCount; i++)
        {
            MatchPlayer[i] = new tagGCCrossRealmPKMatchPlayer();
            TransBytes(out MatchPlayer[i].PlayerID, vBytes, NetDataType.DWORD);
            TransBytes(out MatchPlayer[i].NameLen, vBytes, NetDataType.BYTE);
            TransBytes(out MatchPlayer[i].PlayerName, vBytes, NetDataType.Chars, MatchPlayer[i].NameLen);
            TransBytes(out MatchPlayer[i].Job, vBytes, NetDataType.BYTE);
            TransBytes(out MatchPlayer[i].LV, vBytes, NetDataType.WORD);
            TransBytes(out MatchPlayer[i].MaxHP, vBytes, NetDataType.DWORD);
        }
    }
    public struct tagGCCrossRealmPKMatchPlayer
    {
        public uint PlayerID;
        public byte NameLen;
        public string PlayerName;        // 跨服名字
        public byte Job;
        public ushort LV;
        public uint MaxHP;        // 默认满血
    }
}
// C0 01 跨服PK匹配成功 #tagGCCrossRealmPKMatchOK
public class HC001_tagGCCrossRealmPKMatchOK : GameNetPackBasic {
    public ushort RoomID;    // 房间ID
    public byte NameLen;
    public string PlayerName;    // 跨服名字
    public byte Number;    // 位置编号;1-左,2-右
    public byte MatchPlayerCount;
    public  tagGCCrossRealmPKMatchPlayer[] MatchPlayer;    // 匹配到的玩家
    public HC001_tagGCCrossRealmPKMatchOK () {
        _cmd = (ushort)0xC001;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out RoomID, vBytes, NetDataType.WORD);
        TransBytes (out NameLen, vBytes, NetDataType.BYTE);
        TransBytes (out PlayerName, vBytes, NetDataType.Chars, NameLen);
        TransBytes (out Number, vBytes, NetDataType.BYTE);
        TransBytes (out MatchPlayerCount, vBytes, NetDataType.BYTE);
        MatchPlayer = new tagGCCrossRealmPKMatchPlayer[MatchPlayerCount];
        for (int i = 0; i < MatchPlayerCount; i ++) {
            MatchPlayer[i] = new tagGCCrossRealmPKMatchPlayer();
            TransBytes (out MatchPlayer[i].PlayerID, vBytes, NetDataType.DWORD);
            TransBytes (out MatchPlayer[i].NameLen, vBytes, NetDataType.BYTE);
            TransBytes (out MatchPlayer[i].PlayerName, vBytes, NetDataType.Chars, MatchPlayer[i].NameLen);
            TransBytes (out MatchPlayer[i].Job, vBytes, NetDataType.BYTE);
            TransBytes (out MatchPlayer[i].LV, vBytes, NetDataType.WORD);
            TransBytes (out MatchPlayer[i].MaxHP, vBytes, NetDataType.DWORD);
            TransBytes (out MatchPlayer[i].MaxProDef, vBytes, NetDataType.DWORD);
        }
    }
    public struct tagGCCrossRealmPKMatchPlayer {
        public uint PlayerID;
        public byte NameLen;
        public string PlayerName;        // 跨服名字
        public byte Job;
        public ushort LV;
        public uint MaxHP;        // 默认满血
        public uint MaxProDef;        // 最大护盾
    }
}
Fight/GameActor/GA_Player.cs
@@ -523,7 +523,7 @@
    {
        // Debug.LogFormat("{0} 血量改变: {1}", ServerInstID, value);
        GA_Hero _hero = PlayerDatas.Instance.hero;
        if (_hero != null && _hero.SelectTarget == this)
        if (_hero != null && (_hero.SelectTarget == this || GameNetSystem.Instance.crossServerSocketConnected))
        {
            if (s_OnRefreshLife != null)
            {
System/CrossServerOneVsOne/FightingPKWin.cs
@@ -239,6 +239,17 @@
        private void ShieldUpdate(int playerID, int shieldNow)
        {
            if (playerID == CrossServerLogin.Instance.oneVsOnePlayerData.opponentPlayerId)
            {
                if (positionType == 1)
                {
                    m_RoleInformation2.SetShieldNumber(CrossServerLogin.Instance.oneVsOnePlayerData.MaxProDef, shieldNow);
                }
                else
                {
                    m_RoleInformation1.SetShieldNumber(CrossServerLogin.Instance.oneVsOnePlayerData.MaxProDef, shieldNow);
                }
            }
            DebugEx.LogError("输出玩家的ID" + playerID+"输出当前护盾值"+ shieldNow);
        }
        private void OnHeroHandupAIStopPassive()
@@ -542,7 +553,7 @@
                string OpponentName = UIHelper.ServerStringTrim(CrossServerLogin.Instance.oneVsOnePlayerData.opponentName);
                m_RoleInformation2.SetHeroLvAndName((int)CrossServerLogin.Instance.oneVsOnePlayerData.opponentLevel, OpponentName);
                m_RoleInformation2.SetHeroHP(CrossServerLogin.Instance.oneVsOnePlayerData.opponentMaxHp, CrossServerLogin.Instance.oneVsOnePlayerData.opponentMaxHp);
                m_RoleInformation2.SetShieldNumber(1, 1);
                m_RoleInformation2.SetShieldNumber(100, 100);
            }
            else//右
            {
@@ -559,7 +570,7 @@
                string OpponentName = UIHelper.ServerStringTrim(CrossServerLogin.Instance.oneVsOnePlayerData.opponentName);
                m_RoleInformation1.SetHeroLvAndName((int)CrossServerLogin.Instance.oneVsOnePlayerData.opponentLevel, OpponentName);
                m_RoleInformation1.SetHeroHP(CrossServerLogin.Instance.oneVsOnePlayerData.opponentMaxHp, CrossServerLogin.Instance.oneVsOnePlayerData.opponentMaxHp);
                m_RoleInformation1.SetShieldNumber(1, 1);
                m_RoleInformation1.SetShieldNumber(100, 100);
            }
        }
System/CrossServerOneVsOne/RankCellCtrl.cs
@@ -97,7 +97,6 @@
                m_JobTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
               // m_RankWhatTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
                m_SegmentTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
                m_SegmentTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
                m_RankButton.RemoveAllListeners();
            }
        }
@@ -106,22 +105,23 @@
        {
            var config = Config.Instance.Get<CrossServerArenaConfig>(Danlv);
            m_SegmentTxt.text = config.Name;
            if (Danlv >= 24)
            {
                m_SegmentTxt.color = new Color32(255, 3, 3, 255);
            }
            else if (Danlv < 24 && Danlv > 15)
            {
                m_SegmentTxt.color = new Color32(255, 103, 1, 255);
            }
            else if (Danlv < 15 && Danlv > 10)
            {
                m_SegmentTxt.color = new Color32(218, 72, 213, 255);
            }
            else
            {
                m_SegmentTxt.color = new Color32(104, 104, 104, 255);
            }
            m_SegmentTxt.color= UIHelper.GetDanLVColor(Danlv, false);
            //if (Danlv >= 24)
            //{
            //    m_SegmentTxt.color = new Color32(255, 3, 3, 255);
            //}
            //else if (Danlv < 24 && Danlv > 15)
            //{
            //    m_SegmentTxt.color = new Color32(255, 103, 1, 255);
            //}
            //else if (Danlv < 15 && Danlv > 10)
            //{
            //    m_SegmentTxt.color = new Color32(218, 72, 213, 255);
            //}
            //else
            //{
            //    m_SegmentTxt.color = new Color32(104, 104, 104, 255);
            //}
        }
    }
System/Login/CrossServerLogin.cs
@@ -54,6 +54,7 @@
                opponentMaxHp = (int)matchOK.MatchPlayer[0].MaxHP,
                opponentLevel = (int)matchOK.MatchPlayer[0].LV,
                opponentPlayerId = (int)matchOK.MatchPlayer[0].PlayerID,
                MaxProDef = (int)matchOK.MatchPlayer[0].MaxProDef,
            };
            Clock.Create(DateTime.Now + new TimeSpan(5 * TimeSpan.TicksPerSecond), () =>
@@ -250,6 +251,8 @@
        public int opponentJob;
        public int opponentLevel;
        public int opponentMaxHp;
        public int MaxProDef;// 最大护盾
        public CrossServerOneVsOne SetWaitForLoginCrossServer(bool waitForLoginCrossServer)
        {
System/Login/LoginWin.cs
@@ -9,7 +9,7 @@
using UnityEngine;
using UnityEngine.UI;
using TableConfig;
using System.Linq;
using LitJson;
namespace Snxxz.UI
{
@@ -67,7 +67,23 @@
            m_Notice.gameObject.SetActive(GameNotice.HasNotice());
            m_AlphaTween.SetStartState();
            m_SwitchAccount.gameObject.SetActive(VersionConfig.Get().versionAuthority == VersionAuthority.Release && !VersionConfig.Get().isBanShu);
            if (Config.Instance.ContainKey<FuncSwitchConfig>(2))
            {
                var switchAccountJson = JsonMapper.ToObject(Config.Instance.Get<FuncSwitchConfig>(2).AppIdSwitch);
                if (switchAccountJson.Keys.Contains(VersionConfig.Get().appId) && switchAccountJson[VersionConfig.Get().appId].ToString() == "0")
                {
                    m_SwitchAccount.gameObject.SetActive(false);
                }
                else
                {
                    m_SwitchAccount.gameObject.SetActive(true);
                }
            }
            else
            {
                m_SwitchAccount.gameObject.SetActive(true);
            }
            if (m_UserHelp)
            {