public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.Put(obj_idx); bin.appendMargin(8 - 4); return(bin.GetData()); }
public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.appendMargin(sizeof(byte) + sizeof(byte)); return(bin.GetData()); }
public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.Put(hero_id); bin.appendMargin((byte)(MaxSize - sizeof(UInt64))); return(bin.GetData()); }
public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.Put((int)hero_list_type); bin.appendMargin((byte)(MaxSize - sizeof(twp.app.hero.HERO_LIST_TYPE))); return(bin.GetData()); }
public twp.app.hero.COST_TYPE cost_type; //消耗资源类型 4 byte // public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.Put(hero_id); bin.Put((int)cost_type); bin.appendMargin((byte)(MaxSize - sizeof(UInt64) - sizeof(twp.app.hero.COST_TYPE))); return(bin.GetData()); }
public UInt16 build_id; //2byte public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.Put((byte)main_type); bin.Put(build_id); bin.appendMargin((byte)(MaxSize - sizeof(twp.app.build.BuildsType) - sizeof(UInt16))); return(bin.GetData()); }
public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.Put(target_idx); bin.appendMargin(UNION_MAX_LEN - sizeof(UInt32)); return(bin.GetData()); }
public byte pos_y; //1byte 列 public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.Put((byte)main_type); bin.Put((byte)sub_type); bin.Put(pos_x); bin.Put(pos_y); bin.appendMargin((byte)(MaxSize - sizeof(twp.app.build.BuildsType) - sizeof(twp.app.build.SubType) - sizeof(byte) - sizeof(byte))); return(bin.GetData()); }
public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.Put((byte)type); bin.Put(sub_type); bin.Put(obj_idx); bin.Put(row); bin.Put(col); bin.appendMargin(18 - 11); return(bin.GetData()); }
public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.Put(unit_idx.ToBin()); bin.Put(row); bin.Put(col); bin.Put((byte)flag); bin.appendMargin(18 - 12); return(bin.GetData()); }
public CombatChangeAttackDest change_dest; // 单位改变攻击目标 public byte[] ToBin(twp.app.scene.CombatOperationType type) { NetSocket.ByteArray bin = new NetSocket.ByteArray(); switch (type) { case twp.app.scene.CombatOperationType.COMBAT_BASIC_OPERATION_TYPE_UNIT_BORN: { bin.Put(unit_born.ToBin()); break; } case twp.app.scene.CombatOperationType.COMBAT_BASIC_OPERATION_TYPE_UNIT_MOVE: { bin.Put(unit_move.ToBin()); break; } case twp.app.scene.CombatOperationType.COMBAT_BASIC_OPERATION_TYPE_UNIT_CHAGNE_DEST: { //TDMacro.Assert(false, "COMBAT_BASIC_OPERATION_TYPE_APPLY_COMBAT UnHandle......"); bin.Put(change_dest.ToBin()); break; } case twp.app.scene.CombatOperationType.COMBAT_BASIC_OPERATION_TYPE_OVER: { bin.appendMargin(18); break; } default: { //TDMacro.Assert(false, "Not Process CombatOperationType"); break; } } return(bin.GetData()); }
public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.Put (hero_id); bin.appendMargin((byte)(MaxSize - sizeof(UInt64))); return bin.GetData(); }
public byte[] ToBin () { NetSocket.ByteArray bin = new NetSocket.ByteArray (); bin.Put ((int)hero_list_type); bin.appendMargin ((byte)(MaxSize - sizeof(twp.app.hero.HERO_LIST_TYPE))); return bin.GetData (); }
public byte[] ToBin () { NetSocket.ByteArray bin = new NetSocket.ByteArray (); bin.Put (hero_id); bin.Put ((byte)main_type); bin.Put (build_idx); bin.appendMargin ((byte)(MaxSize - sizeof(UInt64) - sizeof(twp.app.build.BuildsType) - sizeof(UInt16))); return bin.GetData (); }
public twp.app.hero.COST_TYPE cost_type; //消耗资源类型 // public byte[] ToBin () { NetSocket.ByteArray bin = new NetSocket.ByteArray (); bin.Put (hero_id); bin.Put (skill_id); bin.Put ((int)cost_type); bin.appendMargin ((byte)(MaxSize - sizeof(UInt64) - sizeof(UInt32) - sizeof(twp.app.hero.COST_TYPE))); return bin.GetData (); }
public byte pos_y; //1byte 列 public byte[] ToBin () { NetSocket.ByteArray bin = new NetSocket.ByteArray (); bin.Put ((byte)main_type); bin.Put ((byte)sub_type); bin.Put (pos_x); bin.Put (pos_y); bin.appendMargin ((byte)(MaxSize - sizeof(twp.app.build.BuildsType) - sizeof(twp.app.build.SubType) - sizeof(byte) - sizeof(byte))); return bin.GetData (); }
public CombatChangeAttackDest change_dest; // 单位改变攻击目标 public byte[] ToBin (twp.app.scene.CombatOperationType type) { NetSocket.ByteArray bin = new NetSocket.ByteArray (); switch(type) { case twp.app.scene.CombatOperationType.COMBAT_BASIC_OPERATION_TYPE_UNIT_BORN: { bin.Put(unit_born.ToBin()); break; } case twp.app.scene.CombatOperationType.COMBAT_BASIC_OPERATION_TYPE_UNIT_MOVE: { bin.Put(unit_move.ToBin()); break; } case twp.app.scene.CombatOperationType.COMBAT_BASIC_OPERATION_TYPE_UNIT_CHAGNE_DEST: { //TDMacro.Assert(false, "COMBAT_BASIC_OPERATION_TYPE_APPLY_COMBAT UnHandle......"); bin.Put(change_dest.ToBin()); break; } case twp.app.scene.CombatOperationType.COMBAT_BASIC_OPERATION_TYPE_OVER: { bin.appendMargin(18); break; } default: { //TDMacro.Assert(false, "Not Process CombatOperationType"); break; } } return bin.GetData (); }
public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray (); bin.Put((byte)type); bin.Put(sub_type); bin.Put(obj_idx); bin.Put(row); bin.Put(col); bin.appendMargin(18-11); return bin.GetData(); }
public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray(); bin.Put(obj_idx); bin.appendMargin(8-4); return bin.GetData(); }
public byte[] ToBin () { NetSocket.ByteArray bin = new NetSocket.ByteArray (); bin.appendMargin(sizeof(byte) + sizeof(byte)); return bin.GetData(); }
public byte[] ToBin() { NetSocket.ByteArray bin = new NetSocket.ByteArray (); bin.Put(target_idx); bin.appendMargin(UNION_MAX_LEN - sizeof(UInt32)); return bin.GetData(); }
public byte[] ToBin () { NetSocket.ByteArray bin = new NetSocket.ByteArray (); bin.Put (unit_idx.ToBin()); bin.Put (row); bin.Put (col); bin.Put((byte)flag); bin.appendMargin(18-12); return bin.GetData (); }