public byte[] toBytes() { int total = 0; total += ProtoUtil.GetIntSize(this.attackerRoleID, true, 1, true, 0); total += ProtoUtil.GetIntSize(this.injuredRoleID, true, 2, true, 0); total += ProtoUtil.GetIntSize(this.burst, true, 3, true, 0); total += ProtoUtil.GetIntSize(this.injure, true, 4, true, 0); total += ProtoUtil.GetLongSize(this.injuredRoleLife, true, 5, true, 0L); total += ProtoUtil.GetIntSize(this.attackerLevel, true, 6, true, 0); total += ProtoUtil.GetIntSize(this.injuredRoleMaxLifeV, true, 7, true, 0); total += ProtoUtil.GetIntSize(this.injuredRoleMagic, true, 8, true, 0); total += ProtoUtil.GetIntSize(this.injuredRoleMaxMagicV, true, 9, true, 0); total += ProtoUtil.GetIntSize(this.hitToGridX, true, 10, true, 0); total += ProtoUtil.GetIntSize(this.hitToGridY, true, 11, true, 0); total += ProtoUtil.GetIntSize(this.MerlinInjuer, true, 12, true, 0); total += ProtoUtil.GetIntSize(this.MerlinType, true, 13, true, 0); total += ProtoUtil.GetIntSize(this.stopCaiJi, true, 14, true, 0); total += ProtoUtil.GetIntSize(this.armorV_p1, true, 15, true, 0); byte[] data = new byte[total]; int offset = 0; ProtoUtil.IntMemberToBytes(data, 1, ref offset, this.attackerRoleID, true, 0); ProtoUtil.IntMemberToBytes(data, 2, ref offset, this.injuredRoleID, true, 0); ProtoUtil.IntMemberToBytes(data, 3, ref offset, this.burst, true, 0); ProtoUtil.IntMemberToBytes(data, 4, ref offset, this.injure, true, 0); ProtoUtil.LongMemberToBytes(data, 5, ref offset, this.injuredRoleLife, true, 0L); ProtoUtil.IntMemberToBytes(data, 6, ref offset, this.attackerLevel, true, 0); ProtoUtil.IntMemberToBytes(data, 7, ref offset, this.injuredRoleMaxLifeV, true, 0); ProtoUtil.IntMemberToBytes(data, 8, ref offset, this.injuredRoleMagic, true, 0); ProtoUtil.IntMemberToBytes(data, 9, ref offset, this.injuredRoleMaxMagicV, true, 0); ProtoUtil.IntMemberToBytes(data, 10, ref offset, this.hitToGridX, true, 0); ProtoUtil.IntMemberToBytes(data, 11, ref offset, this.hitToGridY, true, 0); ProtoUtil.IntMemberToBytes(data, 12, ref offset, this.MerlinInjuer, true, 0); ProtoUtil.IntMemberToBytes(data, 13, ref offset, this.MerlinType, true, 0); ProtoUtil.IntMemberToBytes(data, 14, ref offset, this.stopCaiJi, true, 0); ProtoUtil.IntMemberToBytes(data, 15, ref offset, this.armorV_p1, true, 0); return(data); }
public byte[] toBytes() { int total = 0; if (this.arrIconState != null && this.arrIconState.Length > 0) { for (int i = 0; i < this.arrIconState.Length; i++) { total += ProtoUtil.GetIntSize((int)this.arrIconState[i], true, 1, true, 0); } } byte[] data = new byte[total]; int offset = 0; if (this.arrIconState != null && this.arrIconState.Length > 0) { for (int i = 0; i < this.arrIconState.Length; i++) { ProtoUtil.IntMemberToBytes(data, 1, ref offset, (int)this.arrIconState[i], true, 0); } } return(data); }
public byte[] toBytes() { int total = 0; total += ProtoUtil.GetIntSize(this.roleID, true, 1, true, 0); total += ProtoUtil.GetIntSize(this.lifeV, true, 2, true, 0); total += ProtoUtil.GetIntSize(this.magicV, true, 3, true, 0); total += ProtoUtil.GetIntSize(this.currentLifeV, true, 4, true, 0); total += ProtoUtil.GetIntSize(this.currentMagicV, true, 5, true, 0); total += ProtoUtil.GetLongSize(this.ArmorV, true, 6, true, 0L); total += ProtoUtil.GetLongSize(this.currentArmorV, true, 7, true, 0L); byte[] data = new byte[total]; int offset = 0; ProtoUtil.IntMemberToBytes(data, 1, ref offset, this.roleID, true, 0); ProtoUtil.IntMemberToBytes(data, 2, ref offset, this.lifeV, true, 0); ProtoUtil.IntMemberToBytes(data, 3, ref offset, this.magicV, true, 0); ProtoUtil.IntMemberToBytes(data, 4, ref offset, this.currentLifeV, true, 0); ProtoUtil.IntMemberToBytes(data, 5, ref offset, this.currentMagicV, true, 0); ProtoUtil.LongMemberToBytes(data, 6, ref offset, this.ArmorV, true, 0L); ProtoUtil.LongMemberToBytes(data, 7, ref offset, this.currentArmorV, true, 0L); return(data); }
public byte[] toBytes() { int total = 0; total += ProtoUtil.GetIntSize(this.RoleID, true, 1, true, 0); total += ProtoUtil.GetIntSize(this.TeleportID, true, 2, true, 0); total += ProtoUtil.GetIntSize(this.NewMapCode, true, 3, true, 0); total += ProtoUtil.GetIntSize(this.ToNewMapX, true, 4, true, 0); total += ProtoUtil.GetIntSize(this.ToNewMapY, true, 5, true, 0); total += ProtoUtil.GetIntSize(this.ToNewDiection, true, 6, true, 0); total += ProtoUtil.GetIntSize(this.State, true, 7, true, 0); byte[] data = new byte[total]; int offset = 0; ProtoUtil.IntMemberToBytes(data, 1, ref offset, this.RoleID, true, 0); ProtoUtil.IntMemberToBytes(data, 2, ref offset, this.TeleportID, true, 0); ProtoUtil.IntMemberToBytes(data, 3, ref offset, this.NewMapCode, true, 0); ProtoUtil.IntMemberToBytes(data, 4, ref offset, this.ToNewMapX, true, 0); ProtoUtil.IntMemberToBytes(data, 5, ref offset, this.ToNewMapY, true, 0); ProtoUtil.IntMemberToBytes(data, 6, ref offset, this.ToNewDiection, true, 0); ProtoUtil.IntMemberToBytes(data, 7, ref offset, this.State, true, 0); return(data); }
public byte[] toBytes() { int total = 0; total += ProtoUtil.GetIntSize(this.roleID, true, 1, true, 0); total += ProtoUtil.GetIntSize(this.x, true, 2, true, 0); total += ProtoUtil.GetIntSize(this.y, true, 3, true, 0); total += ProtoUtil.GetIntSize(this.direction, true, 4, true, 0); total += ProtoUtil.GetDoubleSize(this.lifeV, true, 5, true, 0.0); total += ProtoUtil.GetDoubleSize(this.magicV, true, 6, true, 0.0); total += ProtoUtil.GetIntSize(this.force, true, 7, true, 0); byte[] data = new byte[total]; int offset = 0; ProtoUtil.IntMemberToBytes(data, 1, ref offset, this.roleID, true, 0); ProtoUtil.IntMemberToBytes(data, 2, ref offset, this.x, true, 0); ProtoUtil.IntMemberToBytes(data, 3, ref offset, this.y, true, 0); ProtoUtil.IntMemberToBytes(data, 4, ref offset, this.direction, true, 0); ProtoUtil.DoubleMemberToBytes(data, 5, ref offset, this.lifeV, true, 0.0); ProtoUtil.DoubleMemberToBytes(data, 6, ref offset, this.magicV, true, 0.0); ProtoUtil.IntMemberToBytes(data, 7, ref offset, this.force, true, 0); return(data); }
public byte[] toBytes() { int total = 0; total += ProtoUtil.GetIntSize(RoleID, true, 1); total += ProtoUtil.GetIntSize(MapCode, true, 2); total += ProtoUtil.GetLongSize(StartMoveTicks, true, 3); total += ProtoUtil.GetIntSize(CurrentX, true, 4); total += ProtoUtil.GetIntSize(CurrentY, true, 5); total += ProtoUtil.GetIntSize(CurrentDirection, true, 6); total += ProtoUtil.GetIntSize(Action, true, 7); total += ProtoUtil.GetIntSize(ToX, true, 8); total += ProtoUtil.GetIntSize(ToY, true, 9); total += ProtoUtil.GetDoubleSize(MoveCost, true, 10); total += ProtoUtil.GetIntSize(ExtAction, true, 11); total += ProtoUtil.GetStringSize(PathString, true, 12); total += ProtoUtil.GetIntSize(CurrentPathIndex, true, 13); byte[] data = new byte[total]; int offset = 0; ProtoUtil.IntMemberToBytes(data, 1, ref offset, RoleID); ProtoUtil.IntMemberToBytes(data, 2, ref offset, MapCode); ProtoUtil.LongMemberToBytes(data, 3, ref offset, StartMoveTicks); ProtoUtil.IntMemberToBytes(data, 4, ref offset, CurrentX); ProtoUtil.IntMemberToBytes(data, 5, ref offset, CurrentY); ProtoUtil.IntMemberToBytes(data, 6, ref offset, CurrentDirection); ProtoUtil.IntMemberToBytes(data, 7, ref offset, Action); ProtoUtil.IntMemberToBytes(data, 8, ref offset, ToX); ProtoUtil.IntMemberToBytes(data, 9, ref offset, ToY); ProtoUtil.DoubleMemberToBytes(data, 10, ref offset, MoveCost); ProtoUtil.IntMemberToBytes(data, 11, ref offset, ExtAction); ProtoUtil.StringMemberToBytes(data, 12, ref offset, PathString); ProtoUtil.IntMemberToBytes(data, 13, ref offset, CurrentPathIndex); return(data); }