| | |
| | | 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; // 最大护盾
|
| | | }
|
| | |
|
| | | }
|