Packet structure request (QueueTicket)

Salty Mike

hella salty
VIP
Неукротимое пламя
Сообщения
349
Розыгрыши
0
Решения
4
Репутация
163
Реакции
135
Баллы
1 438
Хроники
  1. Salvation
Исходники
Присутствуют
Сборка
Mobius
Can someone share the structure of the following packets, please? Any version would do, but the newer it is - the better.

EX_QUEUE_TICKET(0xFE, 0x1AD),
EX_QUEUE_TICKET_LOGIN(0xFE, 0x1B3),
 
Решение
Вообщем.
У нас есть "KeyPacket", который величается как "VERSION_CHECK":
Java:
        ServerPackets.VERSION_CHECK.writeId(this);
        writeByte(_result); // 0 - wrong protocol, 1 - protocol ok
        for (int i = 0; i < 8; i++)
        {
            writeByte(_key[i]); // key
        }
        writeInt(Config.PACKET_ENCRYPTION); // use blowfish encryption
        writeInt(Config.SERVER_ID); // server id
        writeByte(0);    // merged server
        writeInt(0); // obfuscation key
        writeByte(0);    // essence 0x04, classic 0x01
        writeByte(1);    // arena 0x01 = not used, send Queue info and after nothing
        writeByte(0);    // 1 == no play button
Если клиенту отправить writeByte(1); // arena 0x01 = not...
EX_QUEUE_TICKET
  • byte
  • int
EX_QUEUE_TICKET_LOGIN
  • byte
При входе на сервер, высылается сначало EX_QUEUE_TICKET_LOGIN, с 1 в байте. Потом уже EX_QUEUE_TICKET с 1 в байте и 0 в инт.
 
EX_QUEUE_TICKET
  • byte
  • int
EX_QUEUE_TICKET_LOGIN
  • byte
При входе на сервер, высылается сначало EX_QUEUE_TICKET_LOGIN, с 1 в байте. Потом уже EX_QUEUE_TICKET с 1 в байте и 0 в инт.

Thank you!

What about REQUEST_EX_QUEUE_TICKET and REQUEST_EX_QUEUE_TICKET_LOGIN?

I tried to set it up but it did not quite work. :D
Could you provide an example, please?
 
Вообщем.
У нас есть "KeyPacket", который величается как "VERSION_CHECK":
Java:
        ServerPackets.VERSION_CHECK.writeId(this);
        writeByte(_result); // 0 - wrong protocol, 1 - protocol ok
        for (int i = 0; i < 8; i++)
        {
            writeByte(_key[i]); // key
        }
        writeInt(Config.PACKET_ENCRYPTION); // use blowfish encryption
        writeInt(Config.SERVER_ID); // server id
        writeByte(0);    // merged server
        writeInt(0); // obfuscation key
        writeByte(0);    // essence 0x04, classic 0x01
        writeByte(1);    // arena 0x01 = not used, send Queue info and after nothing
        writeByte(0);    // 1 == no play button
Если клиенту отправить writeByte(1); // arena 0x01 = not used, send Queue info and after nothing
У нас клиент будет отправлять пакет на сервер - RequestQueueTicketLogin.
Струтура его следующая:
Java:
        _unk01 = packet.readInt();
        _unk02 = packet.readInt();
        _unk03 = packet.readLong();   // Group MAC ?
        _unk04 = packet.readInt();     // n ID
        _unk05 = packet.readInt();
        _unk06 = packet.readInt();
        _unk07 = packet.readInt();     // check out value
        _unk08 = packet.readInt();
И на него клиент должен получить ответ EX_QUEUE_TICKET с одной из следующей информации:
Java:
/**
 * @author Index
 */
public class ExQueueTicket extends ServerPacket
{
    // 00 - Server Overfulled = Сервер Переполнен
    // 01 - Packet AuthLogin - Отправляется AuthLogin
    // 02 - Server Over Fulled, your position in Queue = Сервер переполнен. Ваша позиция в очереди
    // 03 - Packet AuthLogin - Отправляется AuthLogin
    // 04 - [Shown and closed, still on Server Select] While connected to server has some errors. [Показывается и закрывается, остается на выборе сервера] Во время подключения к серверу произошла ошибка.
    // 05 - While connected to server has some errors. Во время подключения к серверу произошла ошибка.
    // 06 - [Shown and closed, still on Server Select] While connected to server has some errors. [Показывается и закрывается, остается на выборе сервера] Во время подключения к серверу произошла ошибка.
    // 07 - [Shown and closed, still on Server Select] While connected to server has some errors. [Показывается и закрывается, остается на выборе сервера] Во время подключения к серверу произошла ошибка.
    // 08 - [Shown and closed, still on Server Select] While connected to server has some errors. [Показывается и закрывается, остается на выборе сервера] Во время подключения к серверу произошла ошибка.
    // 09 - While connected to server has some errors. Во время подключения к серверу произошла ошибка.
    // 10 - [Shown and closed, still on Server Select] While connected to server has some errors. [Показывается и закрывается, остается на выборе сервера] Во время подключения к серверу произошла ошибка.
    // 11 - While connected to server has some errors. Во время подключения к серверу произошла ошибка.
    private final int _messageId;
    private final int _queuePosition;

    public ExQueueTicket(int messageId, int queuePosition)
    {
        _messageId = messageId;
        _queuePosition = queuePosition;
    }

    @Override
    public void write()
    {
        ServerPackets.EX_QUEUE_TICKET.writeId(this);
        writeByte(_messageId);   // Message
        writeShort(_queuePosition);  // Queue Position
    }
}

Если отравить message id = 2, то в клиент можно продолжать отправлять пакет EX_QUEUE_TICKET или с message id 2, если есть место в очереди (к примеру для актуализации места в очереди), или message id = 1, если очередь подошла - тогда клиент отправит пакет AUTH_LOGIN и будет проведена обычная процедура входа.
 
Решение
Назад
Сверху Снизу