130 子 【战斗】战斗系统 / 【战斗】战斗系统-客户端 战斗协议
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 10 回合制战斗 #tagCMTurnFight |
| | | |
| | | public class CB410_tagCMTurnFight : GameNetPackBasic { |
| | | public uint MapID; // 自定义地图ID,可用于绑定战斗地图场景功能(如主线关卡、主线boss、爬塔、竞技场等) |
| | | public uint FuncLineID; // MapID对应的扩展值,如具体某个关卡等 |
| | | public byte TagType; // 目标类型,0-NPC阵容,1-玩家 |
| | | public uint TagID; // 目标类型对应的ID,如阵容ID或玩家ID |
| | | public byte ValueCount; |
| | | public uint[] ValueList; // 附加值列表,可选,具体含义由MapID决定 |
| | | |
| | | public CB410_tagCMTurnFight () { |
| | | combineCmd = (ushort)0x03FE; |
| | | _cmd = (ushort)0xB410; |
| | | } |
| | | |
| | | public override void WriteToBytes () { |
| | | WriteBytes (MapID, NetDataType.DWORD); |
| | | WriteBytes (FuncLineID, NetDataType.DWORD); |
| | | WriteBytes (TagType, NetDataType.BYTE); |
| | | WriteBytes (TagID, NetDataType.DWORD); |
| | | WriteBytes (ValueCount, NetDataType.BYTE); |
| | | WriteBytes (ValueList, NetDataType.DWORD, ValueCount); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 12 战斗阵容保存 #tagCSHeroLineupSave |
| | | |
| | | public class CB412_tagCSHeroLineupSave : GameNetPackBasic { |
| | | public byte LineupID; //阵容ID:1-主阵容;其他待扩展,如某个防守阵容 |
| | | public byte ShapeType; //本阵容阵型,0为默认阵型,可扩展不同的阵型 |
| | | public byte PosCnt; |
| | | public tagCSHeroLineupPos[] HeroPosList; // 保存的阵容,只发送最终的阵容武将位置即可 |
| | | |
| | | public CB412_tagCSHeroLineupSave () { |
| | | combineCmd = (ushort)0x03FE; |
| | | _cmd = (ushort)0xB412; |
| | | } |
| | | |
| | | public override void WriteToBytes () { |
| | | WriteBytes (LineupID, NetDataType.BYTE); |
| | | WriteBytes (ShapeType, NetDataType.BYTE); |
| | | WriteBytes (PosCnt, NetDataType.BYTE); |
| | | for (int i = 0; i < PosCnt; i ++) { |
| | | WriteBytes (HeroPosList[i].ItemIndex, NetDataType.WORD); |
| | | WriteBytes (HeroPosList[i].PosNum, NetDataType.BYTE); |
| | | } |
| | | } |
| | | |
| | | public struct tagCSHeroLineupPos { |
| | | public ushort ItemIndex; //武将物品所在武将背包位置索引 |
| | | public byte PosNum; //1~n上阵位置编号 |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 13 主线战斗请求 #tagCSMainFightReq |
| | | |
| | | public class CB413_tagCSMainFightReq : GameNetPackBasic { |
| | | public byte ReqType; // 0-停止战斗回城;1-设置消耗倍值;2-挑战关卡小怪;3-挑战关卡boss;4-继续战斗; |
| | | public uint ReqValue; // 请求值,ReqType为1时发送消耗倍值 |
| | | |
| | | public CB413_tagCSMainFightReq () { |
| | | combineCmd = (ushort)0x03FE; |
| | | _cmd = (ushort)0xB413; |
| | | } |
| | | |
| | | public override void WriteToBytes () { |
| | | WriteBytes (ReqType, NetDataType.BYTE); |
| | | WriteBytes (ReqValue, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 14 查看战报 #tagCSTurnFightReportView |
| | | |
| | | public class CB414_tagCSTurnFightReportView : GameNetPackBasic { |
| | | public string GUID; //战报guid |
| | | |
| | | public CB414_tagCSTurnFightReportView () { |
| | | combineCmd = (ushort)0x03FE; |
| | | _cmd = (ushort)0xB414; |
| | | } |
| | | |
| | | public override void WriteToBytes () { |
| | | WriteBytes (GUID, NetDataType.Chars, 40); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | //04 07 NPC消失#tagNPCDisappear |
| | | |
| | | public class DTC0407_tagNPCDisappear : DtcBasic { |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | base.Done(vNetPack); |
| | | H0407_tagNPCDisappear vNetData = vNetPack as H0407_tagNPCDisappear; |
| | | } |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | //04 23 对象状态刷新通知(只显示)#tagObjPropertyRefreshView |
| | | |
| | | public class DTC0423_tagObjPropertyRefreshView : DtcBasic { |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | base.Done(vNetPack); |
| | | H0423_tagObjPropertyRefreshView vNetData = vNetPack as H0423_tagObjPropertyRefreshView; |
| | | } |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | //06 02 普通攻击#tagObjBaseAttack |
| | | |
| | | public class DTC0602_tagObjBaseAttack : DtcBasic { |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | base.Done(vNetPack); |
| | | H0602_tagObjBaseAttack vNetData = vNetPack as H0602_tagObjBaseAttack; |
| | | } |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | //06 04 技能攻击使用成功#tagUseSkillAttack |
| | | |
| | | public class DTC0604_tagUseSkillAttack : DtcBasic { |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | base.Done(vNetPack); |
| | | H0604_tagUseSkillAttack vNetData = vNetPack as H0604_tagUseSkillAttack; |
| | | } |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 20 回合制战斗状态 #tagMCTurnFightState |
| | | |
| | | public class DTCB420_tagMCTurnFightState : DtcBasic { |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | base.Done(vNetPack); |
| | | HB420_tagMCTurnFightState vNetData = vNetPack as HB420_tagMCTurnFightState; |
| | | } |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 21 回合战斗对象开始行动 #tagMCTurnFightObjAction |
| | | |
| | | public class DTCB421_tagMCTurnFightObjAction : DtcBasic { |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | base.Done(vNetPack); |
| | | HB421_tagMCTurnFightObjAction vNetData = vNetPack as HB421_tagMCTurnFightObjAction; |
| | | } |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 22 回合战斗对象死亡 #tagMCTurnFightObjDead |
| | | |
| | | public class DTCB422_tagMCTurnFightObjDead : DtcBasic { |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | base.Done(vNetPack); |
| | | HB422_tagMCTurnFightObjDead vNetData = vNetPack as HB422_tagMCTurnFightObjDead; |
| | | } |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 23 回合战斗对象复活 #tagMCTurnFightObjReborn |
| | | |
| | | public class DTCB423_tagMCTurnFightObjReborn : DtcBasic { |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | base.Done(vNetPack); |
| | | HB423_tagMCTurnFightObjReborn vNetData = vNetPack as HB423_tagMCTurnFightObjReborn; |
| | | } |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 24 回合战斗初始化 #tagSCTurnFightInit |
| | | |
| | | public class DTCB424_tagSCTurnFightInit : DtcBasic { |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | base.Done(vNetPack); |
| | | HB424_tagSCTurnFightInit vNetData = vNetPack as HB424_tagSCTurnFightInit; |
| | | } |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 25 回合战斗战报片段标记 #tagSCTurnFightReportSign |
| | | |
| | | public class DTCB425_tagSCTurnFightReportSign : DtcBasic { |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | base.Done(vNetPack); |
| | | HB425_tagSCTurnFightReportSign vNetData = vNetPack as HB425_tagSCTurnFightReportSign; |
| | | } |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 30 查看战报结果 #tagSCTurnFightReportRet |
| | | |
| | | public class DTCB430_tagSCTurnFightReport : DtcBasic { |
| | | public override void Done(GameNetPackBasic vNetPack) { |
| | | base.Done(vNetPack); |
| | | HB430_tagSCTurnFightReport vNetData = vNetPack as HB430_tagSCTurnFightReport; |
| | | } |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | //04 07 NPC消失#tagNPCDisappear |
| | | |
| | | public class H0407_tagNPCDisappear : GameNetPackBasic { |
| | | public ushort Count; |
| | | public uint[] NPCID; //size = Count |
| | | |
| | | public H0407_tagNPCDisappear () { |
| | | _cmd = (ushort)0x0407; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out Count, vBytes, NetDataType.WORD); |
| | | TransBytes (out NPCID, vBytes, NetDataType.DWORD, Count); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | //04 23 对象状态刷新通知(只显示)#tagObjPropertyRefreshView |
| | | |
| | | public class H0423_tagObjPropertyRefreshView : GameNetPackBasic { |
| | | public uint ObjID; //对象ID |
| | | public byte ObjType; //对象类型 |
| | | public uint SkillID; //技能ID |
| | | public uint DiffValue; //值 |
| | | public uint DiffValueEx; //超亿值 |
| | | public byte AttackType; //攻击类型 |
| | | public uint SrcObjID; //飘血来源 |
| | | public byte SrcObjType; |
| | | public uint HP; //剩余血量 |
| | | public uint HPEx; //剩余血量 亿 |
| | | |
| | | public H0423_tagObjPropertyRefreshView () { |
| | | _cmd = (ushort)0x0423; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out ObjID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out ObjType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out SkillID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out DiffValue, vBytes, NetDataType.DWORD); |
| | | TransBytes (out DiffValueEx, vBytes, NetDataType.DWORD); |
| | | TransBytes (out AttackType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out SrcObjID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out SrcObjType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out HP, vBytes, NetDataType.DWORD); |
| | | TransBytes (out HPEx, vBytes, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | //06 02 普通攻击#tagObjBaseAttack |
| | | |
| | | public class H0602_tagObjBaseAttack : GameNetPackBasic { |
| | | public uint AttackerID; |
| | | public byte AttackerObjType; |
| | | public byte BattleType; //攻击类型 物理/魔法 |
| | | public uint ObjID; //对象ID |
| | | public byte ObjType; //对象类型 |
| | | public byte AttackType; //普攻, 闪躲, 致命 类型 |
| | | public uint Value; |
| | | public uint ValueEx; |
| | | public uint RemainHP; //对方剩余的血 |
| | | public uint RemainHPEx; //对方剩余的血, 超亿支持 |
| | | |
| | | public H0602_tagObjBaseAttack () { |
| | | _cmd = (ushort)0x0602; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out AttackerID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out AttackerObjType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out BattleType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out ObjID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out ObjType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out AttackType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out Value, vBytes, NetDataType.DWORD); |
| | | TransBytes (out ValueEx, vBytes, NetDataType.DWORD); |
| | | TransBytes (out RemainHP, vBytes, NetDataType.DWORD); |
| | | TransBytes (out RemainHPEx, vBytes, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | //06 04 技能攻击使用成功#tagUseSkillAttack |
| | | |
| | | public class H0604_tagUseSkillAttack : GameNetPackBasic { |
| | | public uint ObjID; |
| | | public byte ObjType; |
| | | public byte BattleType; //物理/魔法 |
| | | public ushort SkillID; |
| | | public uint AttackID; //主攻击目标 |
| | | public byte AttackObjType; //主攻击目标 |
| | | public ushort HurtCount; //伤害数目 |
| | | public tagSkillHurtObj[] HurtList; //size = HurtCount |
| | | |
| | | public H0604_tagUseSkillAttack () { |
| | | _cmd = (ushort)0x0604; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out ObjID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out ObjType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out BattleType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out SkillID, vBytes, NetDataType.WORD); |
| | | TransBytes (out AttackID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out AttackObjType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out HurtCount, vBytes, NetDataType.WORD); |
| | | HurtList = new tagSkillHurtObj[HurtCount]; |
| | | for (int i = 0; i < HurtCount; i ++) { |
| | | HurtList[i] = new tagSkillHurtObj(); |
| | | TransBytes (out HurtList[i].ObjType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out HurtList[i].ObjID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out HurtList[i].AttackType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out HurtList[i].HurtHP, vBytes, NetDataType.DWORD); |
| | | TransBytes (out HurtList[i].HurtHPEx, vBytes, NetDataType.DWORD); |
| | | TransBytes (out HurtList[i].CurHP, vBytes, NetDataType.DWORD); |
| | | TransBytes (out HurtList[i].CurHPEx, vBytes, NetDataType.DWORD); |
| | | } |
| | | } |
| | | |
| | | public struct tagSkillHurtObj { |
| | | public byte ObjType; |
| | | public uint ObjID; |
| | | public byte AttackType; //爆击, miss |
| | | public uint HurtHP; |
| | | public uint HurtHPEx; |
| | | public uint CurHP; |
| | | public uint CurHPEx; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 20 回合制战斗状态 #tagMCTurnFightState |
| | | |
| | | public class HB420_tagMCTurnFightState : GameNetPackBasic { |
| | | public uint MapID; // 自定义地图ID,可用于绑定战斗地图场景功能(如主线关卡、主线boss、爬塔、竞技场等) |
| | | public uint FuncLineID; // MapID对应的扩展值,如具体某个关卡等 |
| | | public byte State; // 0-起始状态标记;1-准备完毕;2-战斗中;3-战斗结束;4-结算奖励;5-结束状态标记 |
| | | public byte TurnNum; // 当前轮次 |
| | | public ushort Len; |
| | | public string Msg; //size = Len |
| | | |
| | | public HB420_tagMCTurnFightState () { |
| | | _cmd = (ushort)0xB420; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out MapID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out FuncLineID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out State, vBytes, NetDataType.BYTE); |
| | | TransBytes (out TurnNum, vBytes, NetDataType.BYTE); |
| | | TransBytes (out Len, vBytes, NetDataType.WORD); |
| | | TransBytes (out Msg, vBytes, NetDataType.Chars, Len); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 21 回合战斗对象开始行动 #tagMCTurnFightObjAction |
| | | |
| | | public class HB421_tagMCTurnFightObjAction : GameNetPackBasic { |
| | | public byte TurnNum; // 当前轮次 |
| | | public uint ObjID; |
| | | |
| | | public HB421_tagMCTurnFightObjAction () { |
| | | _cmd = (ushort)0xB421; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out TurnNum, vBytes, NetDataType.BYTE); |
| | | TransBytes (out ObjID, vBytes, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 22 回合战斗对象死亡 #tagMCTurnFightObjDead |
| | | |
| | | public class HB422_tagMCTurnFightObjDead : GameNetPackBasic { |
| | | public uint ObjID; |
| | | |
| | | public HB422_tagMCTurnFightObjDead () { |
| | | _cmd = (ushort)0xB422; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out ObjID, vBytes, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 23 回合战斗对象复活 #tagMCTurnFightObjReborn |
| | | |
| | | public class HB423_tagMCTurnFightObjReborn : GameNetPackBasic { |
| | | public uint ObjID; |
| | | public uint HP; // 复活后血量,求余亿部分 |
| | | public uint HPEx; // 复活后血量,整除亿部分 |
| | | public byte RebornType; // 复活方式:1-灵宠技能复活;2-待扩展 |
| | | public uint RebornValue1; // 复活方式对应值1,由复活方式决定其值意义 |
| | | public uint RebornValue2; // 复活方式对应值2 |
| | | |
| | | public HB423_tagMCTurnFightObjReborn () { |
| | | _cmd = (ushort)0xB423; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out ObjID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out HP, vBytes, NetDataType.DWORD); |
| | | TransBytes (out HPEx, vBytes, NetDataType.DWORD); |
| | | TransBytes (out RebornType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out RebornValue1, vBytes, NetDataType.DWORD); |
| | | TransBytes (out RebornValue2, vBytes, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 24 回合战斗初始化 #tagSCTurnFightInit |
| | | |
| | | public class HB424_tagSCTurnFightInit : GameNetPackBasic { |
| | | public uint MapID; // 自定义地图ID,可用于绑定战斗地图场景功能(如主线关卡、主线boss、爬塔、竞技场等) |
| | | public uint FuncLineID; // MapID对应的扩展值,如具体某个关卡等 |
| | | public byte TurnMax; // 最大轮次 |
| | | public ushort Len; |
| | | public string Msg; // 本场战斗扩展信息,一般为json格式,具体内容由MapID决定 |
| | | public byte FactionCnt; |
| | | public tagSCTurnFightFaction[] FactionList; // 阵营列表,通常固定只有两个阵营 |
| | | |
| | | public HB424_tagSCTurnFightInit () { |
| | | _cmd = (ushort)0xB424; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out MapID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out FuncLineID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out TurnMax, vBytes, NetDataType.BYTE); |
| | | TransBytes (out Len, vBytes, NetDataType.WORD); |
| | | TransBytes (out Msg, vBytes, NetDataType.Chars, Len); |
| | | TransBytes (out FactionCnt, vBytes, NetDataType.BYTE); |
| | | FactionList = new tagSCTurnFightFaction[FactionCnt]; |
| | | for (int i = 0; i < FactionCnt; i ++) { |
| | | FactionList[i] = new tagSCTurnFightFaction(); |
| | | TransBytes (out FactionList[i].Faction, vBytes, NetDataType.BYTE); |
| | | TransBytes (out FactionList[i].LineupCnt, vBytes, NetDataType.BYTE); |
| | | FactionList[i].LineupList = new tagSCTurnFightLineup[FactionList[i].LineupCnt]; |
| | | for (int j = 0; j < FactionList[i].LineupCnt; j ++) { |
| | | FactionList[i].LineupList[j] = new tagSCTurnFightLineup(); |
| | | TransBytes (out FactionList[i].LineupList[j].Num, vBytes, NetDataType.BYTE); |
| | | TransBytes (out FactionList[i].LineupList[j].OwnerID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out FactionList[i].LineupList[j].ShapeType, vBytes, NetDataType.BYTE); |
| | | TransBytes (out FactionList[i].LineupList[j].ObjCnt, vBytes, NetDataType.BYTE); |
| | | FactionList[i].LineupList[j].ObjList = new tagSCTurnFightObj[FactionList[i].LineupList[j].ObjCnt]; |
| | | for (int k = 0; k < FactionList[i].LineupList[j].ObjCnt; k ++) { |
| | | FactionList[i].LineupList[j].ObjList[k] = new tagSCTurnFightObj(); |
| | | TransBytes (out FactionList[i].LineupList[j].ObjList[k].ObjID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out FactionList[i].LineupList[j].ObjList[k].NPCID, vBytes, NetDataType.DWORD); |
| | | TransBytes (out FactionList[i].LineupList[j].ObjList[k].HP, vBytes, NetDataType.DWORD); |
| | | TransBytes (out FactionList[i].LineupList[j].ObjList[k].HPEx, vBytes, NetDataType.DWORD); |
| | | TransBytes (out FactionList[i].LineupList[j].ObjList[k].MaxHP, vBytes, NetDataType.DWORD); |
| | | TransBytes (out FactionList[i].LineupList[j].ObjList[k].MaxHPEx, vBytes, NetDataType.DWORD); |
| | | TransBytes (out FactionList[i].LineupList[j].ObjList[k].LV, vBytes, NetDataType.WORD); |
| | | TransBytes (out FactionList[i].LineupList[j].ObjList[k].PosNum, vBytes, NetDataType.BYTE); |
| | | TransBytes (out FactionList[i].LineupList[j].ObjList[k].AngreXP, vBytes, NetDataType.WORD); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public struct tagSCTurnFightFaction { |
| | | public byte Faction; //阵营编号,1或2,1为发起方的阵营编号 |
| | | public byte LineupCnt; |
| | | public tagSCTurnFightLineup[] LineupList; // 本阵营所有阵容列表,为支持多V多扩展用,通常情况下每个阵营只有一个阵容 |
| | | } |
| | | |
| | | public struct tagSCTurnFightObj { |
| | | public uint ObjID; // 实例唯一ID |
| | | public uint NPCID; // 绑定的NPCID,不同的实例ID对应的NPCID可能一样 |
| | | public uint HP; // 当前血量,求余20亿部分 |
| | | public uint HPEx; // 当前血量,整除20亿部分 |
| | | public uint MaxHP; // 最大血量,求余20亿部分 |
| | | public uint MaxHPEx; // 最大血量,整除20亿部分 |
| | | public ushort LV; // 等级 |
| | | public byte PosNum; // 在本阵容中的站位,从1开始,非主战斗武将为0,如红颜 |
| | | public ushort AngreXP; // 当前怒气值 |
| | | } |
| | | |
| | | public struct tagSCTurnFightLineup { |
| | | public byte Num; // 该阵容在本阵营的编号,不同阵营的阵容编号可能相同,都是从1开始,一般1V1时每个阵营为1个阵容,多V多时则每个阵营为多个阵容 |
| | | public uint OwnerID; // 阵容所属的玩家ID,可能为0,0代表非玩家阵容 |
| | | public byte ShapeType; // 本阵容阵型,0为默认阵型,可扩展不同的阵型,如boss特殊战斗阵型,或者其他不同站位的阵型 |
| | | public byte ObjCnt; |
| | | public tagSCTurnFightObj[] ObjList; // 本阵容战斗单位列表 |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 25 回合战斗战报片段标记 #tagSCTurnFightReportSign |
| | | |
| | | public class HB425_tagSCTurnFightReportSign : GameNetPackBasic { |
| | | public byte Sign; // 0-战报片段开始;1-战报片段结束; |
| | | |
| | | public HB425_tagSCTurnFightReportSign () { |
| | | _cmd = (ushort)0xB425; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out Sign, vBytes, NetDataType.BYTE); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B4 30 查看战报结果 #tagSCTurnFightReportRet |
| | | |
| | | public class HB430_tagSCTurnFightReport : GameNetPackBasic { |
| | | public string GUID; //该战报guid |
| | | public uint Len; |
| | | public string Report; //完整战报 |
| | | |
| | | public HB430_tagSCTurnFightReport () { |
| | | _cmd = (ushort)0xB430; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out GUID, vBytes, NetDataType.Chars, 40); |
| | | TransBytes (out Len, vBytes, NetDataType.DWORD); |
| | | TransBytes (out Report, vBytes, NetDataType.Chars, Len); |
| | | } |
| | | |
| | | } |