public int fromBytes(byte[] data, int offset, int count) { int pos = offset; int mycount = 0; while (mycount < count) { int fieldnumber = -1; int wt = -1; ProtoUtil.GetTag(data, ref pos, ref fieldnumber, ref wt, ref mycount); switch (fieldnumber) { case 1: this.roleID = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 2: this.mapCode = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 3: this.action = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 4: this.toX = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 5: this.toY = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 6: this.extAction = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 7: this.fromX = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 8: this.fromY = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 9: this.startMoveTicks = ProtoUtil.LongMemberFromBytes(data, wt, ref pos, ref mycount); break; case 10: this.pathString = ProtoUtil.StringMemberFromBytes(data, wt, ref pos, ref mycount); break; default: throw new ArgumentException("error!!!"); } } return(pos); }
public int fromBytes(byte[] data, int offset, int count) { int pos = offset; int mycount = 0; for (; mycount < count;) { int fieldnumber = -1; int wt = -1; ProtoUtil.GetTag(data, ref pos, ref fieldnumber, ref wt, ref mycount); switch (fieldnumber) { case 1: this.RoleID = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 2: this.MapCode = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 3: this.StartMoveTicks = ProtoUtil.LongMemberFromBytes(data, wt, ref pos, ref mycount); break; case 4: this.CurrentX = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 5: this.CurrentY = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 6: this.CurrentDirection = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 7: this.Action = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 8: this.ToX = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 9: this.ToY = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 10: this.MoveCost = ProtoUtil.DoubleMemberFromBytes(data, wt, ref pos, ref mycount); break; case 11: this.ExtAction = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 12: this.PathString = ProtoUtil.StringMemberFromBytes(data, wt, ref pos, ref mycount); break; case 13: this.CurrentPathIndex = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; default: { throw new ArgumentException("error!!!"); } } } return(pos); }
public String attackedList;//HX_SERVER 被攻击列表 public int fromBytes(byte[] data, int offset, int count) { int pos = offset; int mycount = 0; for (; mycount < count;) { int fieldnumber = -1; int wt = -1; ProtoUtil.GetTag(data, ref pos, ref fieldnumber, ref wt, ref mycount); switch (fieldnumber) { case 1: this.roleID = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 2: this.roleX = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 3: this.roleY = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 4: this.enemy = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 5: this.enemyX = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 6: this.enemyY = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 7: this.realEnemyX = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 8: this.realEnemyY = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 9: this.magicCode = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 10: this.clientTicks = ProtoUtil.LongMemberFromBytes(data, wt, ref pos, ref mycount); break; case 11: this.attackedList = ProtoUtil.StringMemberFromBytes(data, wt, ref pos, ref mycount); break; //default: // { // throw new ArgumentException("error!!!"); // } } } return(pos); }
public int fromBytes(byte[] data, int offset, int count) { int pos = offset; int mycount = 0; while (mycount < count) { int fieldnumber = -1; int wt = -1; ProtoUtil.GetTag(data, ref pos, ref fieldnumber, ref wt, ref mycount); switch (fieldnumber) { case 1: this.ownerRoleID = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 2: this.ownerRoleName = ProtoUtil.StringMemberFromBytes(data, wt, ref pos, ref mycount); break; case 3: this.autoID = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 4: this.goodsPackID = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 5: this.mapCode = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 6: this.toX = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 7: this.toY = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 8: this.goodsID = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 9: this.goodsNum = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 10: this.productTicks = ProtoUtil.LongMemberFromBytes(data, wt, ref pos, ref mycount); break; case 11: this.teamID = (long)ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 12: this.teamRoleIDs = ProtoUtil.StringMemberFromBytes(data, wt, ref pos, ref mycount); break; case 13: this.lucky = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 14: this.excellenceInfo = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 15: this.appendPropLev = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; case 16: this.forge_Level = ProtoUtil.IntMemberFromBytes(data, wt, ref pos, ref mycount); break; default: throw new ArgumentException("error!!!"); } } return(pos); }