public override byte[] toBinary() { writer = new st.net.NetBase.ByteWriter(); ushort lenply_list = (ushort)ply_list.Count; writer.write_short(lenply_list); for (int i_ply_list = 0; i_ply_list < lenply_list; i_ply_list++) { st.net.NetBase.scene_ply listData = ply_list[i_ply_list]; listData.toBinary(writer); } ushort lenentourage_list = (ushort)entourage_list.Count; writer.write_short(lenentourage_list); for (int i_entourage_list = 0; i_entourage_list < lenentourage_list; i_entourage_list++) { st.net.NetBase.scene_entourage listData = entourage_list[i_entourage_list]; listData.toBinary(writer); } return(writer.data); }
public override byte[] toBinary() { writer = new st.net.NetBase.ByteWriter(); ushort lenply_list = (ushort)ply_list.Count; writer.write_short(lenply_list); for (int i_ply_list = 0; i_ply_list < lenply_list; i_ply_list++) { st.net.NetBase.scene_ply listData = ply_list[i_ply_list]; listData.toBinary(writer); } ushort lenmonster_list = (ushort)monster_list.Count; writer.write_short(lenmonster_list); for (int i_monster_list = 0; i_monster_list < lenmonster_list; i_monster_list++) { st.net.NetBase.scene_monster listData = monster_list[i_monster_list]; listData.toBinary(writer); } ushort lenitem_list = (ushort)item_list.Count; writer.write_short(lenitem_list); for (int i_item_list = 0; i_item_list < lenitem_list; i_item_list++) { st.net.NetBase.scene_item listData = item_list[i_item_list]; listData.toBinary(writer); } ushort lenentourage_list = (ushort)entourage_list.Count; writer.write_short(lenentourage_list); for (int i_entourage_list = 0; i_entourage_list < lenentourage_list; i_entourage_list++) { st.net.NetBase.scene_entourage listData = entourage_list[i_entourage_list]; listData.toBinary(writer); } ushort lenusr_equip_list = (ushort)usr_equip_list.Count; writer.write_short(lenusr_equip_list); for (int i_usr_equip_list = 0; i_usr_equip_list < lenusr_equip_list; i_usr_equip_list++) { st.net.NetBase.usr_equip_list listData = usr_equip_list[i_usr_equip_list]; listData.toBinary(writer); } ushort lendrop_item_list = (ushort)drop_item_list.Count; writer.write_short(lendrop_item_list); for (int i_drop_item_list = 0; i_drop_item_list < lendrop_item_list; i_drop_item_list++) { st.net.NetBase.drop_des listData = drop_item_list[i_drop_item_list]; listData.toBinary(writer); } ushort lenmodel_list = (ushort)model_list.Count; writer.write_short(lenmodel_list); for (int i_model_list = 0; i_model_list < lenmodel_list; i_model_list++) { st.net.NetBase.scene_model listData = model_list[i_model_list]; listData.toBinary(writer); } return(writer.data); }