| Core/NetworkPackage/DTCFile/ServerPack/HC0_CrossRealm/DTCC001_tagGCCrossRealmPKMatchOK.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/NetworkPackage/ServerPack/HC0_CrossRealm/HC001_tagGCCrossRealmPKMatchOK.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/GameActor/GA_Player.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/BossShow/BossShowModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/CrossServerOneVsOne/FightingPKWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Login/CrossServerLogin.cs | ●●●●● 补丁 | 查看 | 原始文档 | 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/BossShow/BossShowModel.cs
@@ -91,7 +91,7 @@ var _hero = PlayerDatas.Instance.hero; if (_hero != null && !_hero.ActorInfo.serverDie) { _hero.Behaviour.StopHandupAI(); _hero.Behaviour.StopHandupAI(true); } TimeMgr.Instance.Register(TimeMgr.SyntonyType.BossShow, (float)actorShowModel.length / 1000); 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/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) {