public static byte[] ServerList_Ack(byte serverId, int[] loads) { PacketLittleEndianWriter plew = new PacketLittleEndianWriter(); plew.write((byte)SendOperationCode.Login.SERVERLIST_ACK); for (int i = 0; i < 13; i++) { plew.write(0xFF); } plew.writeInt(1); // 伺服器數量 plew.writeShort(serverId); // 伺服器順序 plew.writeInt((byte)loads.Length); // 頻道數量 int id = 0; for (byte i = 1; i <= 18; i++) { plew.writeShort((short)(id + 1)); plew.writeShort((short)(id + 1)); plew.writeGhostAsciiString("127.0.0.1"); plew.writeInt(14101 + id); plew.writeInt(1); // 玩家數量 plew.writeInt(400); // 頻道人數上限 plew.writeInt(12); // 標章類型 plew.writeInt(0); plew.write((byte) (loads[i - 1] != 0 ? 1 : 2)); plew.writeInt(14199); id++; } return plew.getPacket(); }
/* * -2 = 未知的錯誤 * -1 = 角色刪除失敗 * 1 = 角色刪除成功 * 2 = 角色刪除成功 * 3 = 角色刪除成功 * 4 = 角色刪除成功 * else = 創建1小時後才能刪除 */ public static byte[] Delete_MyChar_Ack(int num) { PacketLittleEndianWriter plew = new PacketLittleEndianWriter(); plew.writeShort((short)SendOperationCode.Chars.DELETE_MYCHAR_ACK); plew.writeInt(0); // length + CRC plew.writeInt(0); plew.writeInt(num); return plew.getPacket(); }
/* * -2 = 無法創立新角色,請先購買角色擴充道具,最多可同時創立4個角色。 * -1 = 使用中的名字 * 0 = 現在無法創立角色,請稍後 * 1 = 創建成功 * 2 = 創建成功 * 3 = 創建成功 * 4 = 創建成功 * else = 未知的錯誤 */ public static byte[] Create_MyChar_Ack(int pos) { PacketLittleEndianWriter plew = new PacketLittleEndianWriter(); plew.writeShort((short)SendOperationCode.Chars.CREATE_MYCHAR_ACK); plew.writeInt(0); // length + CRC plew.writeInt(0); plew.writeInt(pos); return plew.getPacket(); }
/* * 0 = 使用中的名字 * 1 = 此名稱可以使用 * 2 = 無法創立新角色,請先購買角色擴充道具,最多可同時創立4個角色。 * else = 未知的錯誤 */ public static byte[] Check_SameName_Ack(int state) { PacketLittleEndianWriter plew = new PacketLittleEndianWriter(); plew.writeShort((short)SendOperationCode.Chars.CHECK_SAMENAME_ACK); plew.writeInt(0); // length + CRC plew.writeInt(0); plew.writeInt(state); return plew.getPacket(); }
/* state * 07 - 因使用Bug進行遊戲,帳號已凍結 * 08 - 因不正當賺取金錢,帳號已凍結 * 09 - 因口出穢言,帳號已凍結 * 10 - 因洗頻,帳號已凍結 * 11 - 帳號暫時被凍結 * 12 - 帳號已凍結 * 13 - 帳號錯誤,請重新輸入 * 14 - 您所輸入的密碼錯誤 * 29 - 因偵測到不當的遊戲進行方式,1小時內將無法進行遊戲 */ /* NetCafe * 會員於特約網咖連線 */ public static byte[] Login_Ack(byte state, bool NetCafe) { PacketLittleEndianWriter plew = new PacketLittleEndianWriter(); plew.write((byte) SendOperationCode.Login.LOGIN_ACK); plew.write(state); plew.writeBoolean(NetCafe); plew.writeShort(0); return plew.getPacket(); }
/* state * 28 = 此為有年齡限制的頻道,請使用其他頻道 * 04 = 此ID已連線,請稍後再試 * else = 網路狀態錯誤 */ public static byte[] Game_Ack(GhostClient c, int state) { PacketLittleEndianWriter plew = new PacketLittleEndianWriter(); plew.write((byte)SendOperationCode.Login.GAME_ACK); plew.write((byte)state); plew.writeGhostAsciiString("192.168.1.101"); plew.writeInt(14101 + c.CharSID); plew.writeInt(14199); return plew.getPacket(); }
public static byte[] MyChar_Info_Ack(GhostClient gc, List<Character> chars) { PacketLittleEndianWriter plew = new PacketLittleEndianWriter(); plew.writeShort((short)SendOperationCode.Chars.MYCHAR_INFO_ACK); plew.writeInt(0); // length + CRC plew.writeInt(0); plew.writeInt(chars.Count); // Characters.Count for (int i = 0; i < 4; i++) { getCharactersData(plew, (i < chars.Count) ? chars[i] : null); } return plew.getPacket(); }