↑ ↓

Help me Aion 5.8 Не заходит на сервер.

Тема в разделе "Помощь", создана пользователем yecgaaj, 28 ноя 2022.

Статус темы:
Закрыта.
  1. TopicStarter Overlay
    Offline

    yecgaaj Рядовой

    43
    5
    41
    Кредиты:
    $386,88
    Репутация:
    1
    Сами сборки на Please login or register to view links
    Суть проблемы в том что; не могу зайти на сервер со сборки aion-svn-Unique (Не уверен что это точное название) Зависает на выборе сервера (Но version.dll стоит)
    На остальных сборках нет проблем, (Aion-Ger-5.8-master, Aion-Dream-master, Aion_5.8_EMU Ronson26) захожу спокойно могу играть, бегать, тестировать.
    Клиенты так же в наличие Aion RUS 5.8 Спасибо Please login or register to view links,
    Not Aion 5.8 типо евро клиент . + еще один гибрид евро с рус переводом.
    Копаюсь в исходниках и пока не могу понять как решить эту проблему,
    Но заметил разницу в пакетах, а именно цифру.
    Просто поменять с 215 на 213 толку 0. Может кто подсказать где ковырять.?

    aion-svn-Unique (src\com\aionemu\gameserver\network\aion\serverpackets)
    SM_VERSION_CHECK
    protected void writeImpl(AionConnection con) {
    // aion 3.0 = 194
    // aion 3.5 = 196
    // aion 4.0 = 201
    // aion 4.5 = 203
    // aion 4.7 = 204
    // aion 4.7.0.7 = 205
    // aion 4.7.5.x = 206
    // aion 5.1.x.x = 212
    if (version < 215) {
    // Send wrong client version
    writeC(0x02);
    return;
    }
    if (version == 215) {
    log.info("Authentication with Client Version 5.8");
    }
    else if (version < 215) {
    log.info("Authentication with Client Version lower than 5.8");
    }

    Aion-Ger-5.8-master (src\com\aionemu\gameserver\network\aion\serverpackets)
    SM_VERSION_CHECK
    protected void writeImpl(AionConnection con) {
    // aion 3.0 = 194
    // aion 3.5 = 196
    // aion 4.0 = 201
    // aion 4.5 = 203
    // aion 4.7 = 204
    // aion 4.7.0.7 = 205
    // aion 4.7.5.x = 206
    // aion 5.1.x.x = 212
    if (version < 213) {
    // Send wrong client version
    writeC(0x02);
    return;
    }
    if (version == 213) {
    log.info("Authentication with Client Version 5.8");
    }
    else if (version < 213) {
    log.info("Authentication with Client Version lower than 5.8");
    }

    Aion-Dream-master (src\com\aionemu\gameserver\network\aion\serverpackets)
    SM_VERSION_CHECK
    protected void writeImpl(AionConnection con) {
    // aion 3.0 = 194
    // aion 3.5 = 196
    // aion 4.0 = 201
    // aion 4.5 = 203
    // aion 4.7 = 204
    // aion 4.7.0.7 = 205
    // aion 4.7.5.x = 206
    // aion 5.1.x.x = 212
    if (version < 213) {
    // Send wrong client version
    writeC(0x02);
    return;
    }
    if (version == 213) {
    log.info("Authentication with Client Version 5.8");
    }
    else if (version < 213) {
    log.info("Authentication with Client Version lower than 5.8");
    }

    Aion_5.8_EMU Ronson26 (decompiled-AL-Game\com\aionemu\gameserver\network\aion\serverpackets)
    SM_VERSION_CHECK
    protected void writeImpl(final AionConnection con) {
    if (this.version < 213) {
    this.writeC(2);
    return;
    }
    if (this.version == 213) {
    SM_VERSION_CHECK.log.info("Authentication with Client Version 5.8");
    }
    else if (this.version < 213) {
    SM_VERSION_CHECK.log.info("Authentication with Client Version lower than 5.8");
    }

    Хотелось бы зайти и посмотреть, что я наше в недрах ragezo...
    Если нужен другой клиент я не против скачать , мне бы понять какой надо, может сборка на другую версию раз значение выше.
     
  2. Offline

    klubheads Сержант Команда форума Модератор

    2.011
    356
    189
    Кредиты:
    $2.139,45
    Репутация:
    54
    Этот If просто проверка(на попытку входа с другой версии клиента), его вообще можно убрать если что ;)
    Бери робсона билд, там более доработано нежели в других
     
  3. TopicStarter Overlay
    Offline

    yecgaaj Рядовой

    43
    5
    41
    Кредиты:
    $386,88
    Репутация:
    1
    Да он молодец многое сделал, но он забросил Aion и ушел в Tera . Даже тему на форуме закрыли. А в его сборке есть некоторые нюансы которые хотелось бы поправить. Но без исходника это очень тяжко . А тот decomplied которые я смог сделать кривой как моя жизнь, и править его очень долго и моих знание на это не хватит. Мне бы помогло если бы кто-нибудь сказал в каком месте ковырять , что бы зайти с 5.8 клиента.
     
  4. Offline

    klubheads Сержант Команда форума Модератор

    2.011
    356
    189
    Кредиты:
    $2.139,45
    Репутация:
    54
    Его сборка просто слегка доделанный сервер ENCOM, если постараться, то можно найти исходники там же где ты и эту сборку нашел.
    Тера так же в шаре оф сборка, прикольно но не интересно, готовое есть готовое.

    так вроде выше дал подсказку, убери вообще эту if (если думаешь что дело в ней).

    вообще весь этот код попробуй убрать

    if (version < 215) {
    // Send wrong client version
    writeC(0x02);
    return;
    }
    if (version == 215) {
    log.info("Authentication with Client Version 5.8");
    }
    else if (version < 215) {
    log.info("Authentication with Client Version lower than 5.8");
    }

    если так не зайдет(убрав проверку), то writeC(0x02); пробуй воткнуть.

    но я думаю там не в этом проблема.
     
    Последнее редактирование: 29 ноя 2022
  5. Offline

    V_Nick Ефрейтор

    168
    35
    59
    Кредиты:
    $700,26
    Репутация:
    8
    Сори за оффтоп, но подскажи плиз, какой из серверов 5,8, тех что у тебя запустились, показался тебе наименее забагованным?
     
  6. Offline

    V_Nick Ефрейтор

    168
    35
    59
    Кредиты:
    $700,26
    Репутация:
    8
    Ты же писал что со сборкой Робсона26 с клиента норм заходит. Так на каком сервере в итоге у тебя не заходит с клиента 5,8?
     
    Последние данные очков репутации:
    yecgaaj: 1 Очко 30 ноя 2022
  7. Offline

    klubheads Сержант Команда форума Модератор

    2.011
    356
    189
    Кредиты:
    $2.139,45
    Репутация:
    54
    Так у него исходов нет от него, в этом суть наверно.
     
  8. TopicStarter Overlay
    Offline

    yecgaaj Рядовой

    43
    5
    41
    Кредиты:
    $386,88
    Репутация:
    1
    Из тех что есть в шаре сборка Робсона26 самая доработанная,
    но в ней так же есть не доработки как и в любой другой сборке.
     
  9. TopicStarter Overlay
    Offline

    yecgaaj Рядовой

    43
    5
    41
    Кредиты:
    $386,88
    Репутация:
    1
    Хотел бы зайти на это чудо Please login or register to view links (Название архива aion-svn-Unique). По описанию на regzon... это 5.8 , а по пакету SM_VERSION_CHECK проверки это не 5.8. Вот мне интересно как это можно переделать, исправить или клиент другой.
    А что касаемо сборки Робсона26 , ну без исходов мало-чего можно исправить , только дату править.
     
  10. Offline

    klubheads Сержант Команда форума Модератор

    2.011
    356
    189
    Кредиты:
    $2.139,45
    Репутация:
    54
    Так может там 5.1? Содержимое Crypt.java скинь сюда.
     
  11. TopicStarter Overlay
    Offline

    yecgaaj Рядовой

    43
    5
    41
    Кредиты:
    $386,88
    Репутация:
    1
    Crypt
    /**
    * This file is part of aion-emu <aion-emu.com>.
    *
    * aion-emu is free software: you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation, either version 3 of the License, or
    * (at your option) any later version.
    *
    * aion-emu is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU General Public License for more details.
    *
    * You should have received a copy of the GNU General Public License
    * along with aion-emu. If not, see <Please login or register to view links>.
    */
    package com.aionemu.gameserver.network;

    import com.aionemu.commons.utils.Rnd;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;

    import java.nio.ByteBuffer;

    /**
    * Crypt will encrypt server packet and decrypt client packet.
    *
    * @author hack99
    * @author kao
    * @author -Nemesiss-
    */
    public class Crypt {

    private final static Logger log = LoggerFactory.getLogger(Crypt.class);

    /**
    * Second byte of server packet must be equal to this
    */
    public final static byte staticServerPacketCode = 0x54; //Aion 6.2

    /**
    * Crypt is enabled after first server packet was send.
    */
    private boolean isEnabled;

    private EncryptionKeyPair packetKey = null;

    /**
    * Enable crypt key - generate random key that will be used to encrypt second server packet [first one is unencrypted]
    * and decrypt client packets. This method is called from SM_KEY server packet, that packet sends key to aion client.
    *
    * @return "false key" that should by used by aion client to encrypt/decrypt packets.
    */
    public final int enableKey() {
    if (packetKey != null)
    throw new KeyAlreadySetException();

    /** rnd key - this will be used to encrypt/decrypt packet */
    int key = Rnd.nextInt();

    packetKey = new EncryptionKeyPair(key);

    log.debug("new encrypt key: " + packetKey);

    /** false key that will be sent to aion client in SM_KEY packet */
    return (key ^ 0xCD92E4D7) + 0x3FF2CCD7; // 6.x
    }

    /**
    * Decrypt client packet from this ByteBuffer.
    *
    * @param buf
    * @return true if decryption was successful.
    */
    public final boolean decrypt(ByteBuffer buf) {
    if (!isEnabled) {
    log.debug("if encryption wasn't enabled, then maybe it's client reconnection, so skip packet");
    return true;
    }

    return packetKey.decrypt(buf);
    }

    /**
    * Encrypt server packet from this ByteBuffer.
    *
    * @param buf
    */
    public final void encrypt(ByteBuffer buf) {
    if (!isEnabled) {
    /** first packet is not encrypted */
    isEnabled = true;
    log.debug("packet is not encrypted... send in SM_KEY");
    return;
    }

    packetKey.encrypt(buf);
    }

    /**
    * Server packet opcodec obfuscation.
    *
    * @param op
    * @return obfuscated opcodec
    */
    public static final int encodeOpcodec(int op) {
    return (op + 0xD7) ^ 0xD7; // 6.x
    }
    }
     
  12. Offline

    klubheads Сержант Команда форума Модератор

    2.011
    356
    189
    Кредиты:
    $2.139,45
    Репутация:
    54
    Ну тогда всё понятно, это не 5.8 у тебя, а 6+
     
    Последние данные очков репутации:
    yecgaaj: 1 Очко (Спасибо )) 30 ноя 2022
  13. TopicStarter Overlay
    Offline

    yecgaaj Рядовой

    43
    5
    41
    Кредиты:
    $386,88
    Репутация:
    1
    В общем спасибо всем кто поучаствовал в данной теме, у меня получилось. Я смог зайти. Поменял значения в Crypt.java и SM_VERSION_CHECK , собрал и зашёл с клиента 5.8
    Сборка на моем диске Please login or register to view links
    Crypt.java
    Было
    /**
    * This file is part of aion-emu <aion-emu.com>.
    *
    * aion-emu is free software: you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation, either version 3 of the License, or
    * (at your option) any later version.
    *
    * aion-emu is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU General Public License for more details.
    *
    * You should have received a copy of the GNU General Public License
    * along with aion-emu. If not, see <Please login or register to view links>.
    */
    package com.aionemu.gameserver.network;

    import com.aionemu.commons.utils.Rnd;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;

    import java.nio.ByteBuffer;

    /**
    * Crypt will encrypt server packet and decrypt client packet.
    *
    * @author hack99
    * @author kao
    * @author -Nemesiss-
    */
    public class Crypt {

    private final static Logger log = LoggerFactory.getLogger(Crypt.class);

    /**
    * Second byte of server packet must be equal to this
    */
    public final static byte staticServerPacketCode = 0x54; //Aion 6.2

    /**
    * Crypt is enabled after first server packet was send.
    */
    private boolean isEnabled;

    private EncryptionKeyPair packetKey = null;

    /**
    * Enable crypt key - generate random key that will be used to encrypt second server packet [first one is unencrypted]
    * and decrypt client packets. This method is called from SM_KEY server packet, that packet sends key to aion client.
    *
    * @return "false key" that should by used by aion client to encrypt/decrypt packets.
    */
    public final int enableKey() {
    if (packetKey != null)
    throw new KeyAlreadySetException();

    /** rnd key - this will be used to encrypt/decrypt packet */
    int key = Rnd.nextInt();

    packetKey = new EncryptionKeyPair(key);

    log.debug("new encrypt key: " + packetKey);

    /** false key that will be sent to aion client in SM_KEY packet */
    return (key ^ 0xCD92E4D7) + 0x3FF2CCD7; // 6.x
    }

    /**
    * Decrypt client packet from this ByteBuffer.
    *
    * @param buf
    * @return true if decryption was successful.
    */
    public final boolean decrypt(ByteBuffer buf) {
    if (!isEnabled) {
    log.debug("if encryption wasn't enabled, then maybe it's client reconnection, so skip packet");
    return true;
    }

    return packetKey.decrypt(buf);
    }

    /**
    * Encrypt server packet from this ByteBuffer.
    *
    * @param buf
    */
    public final void encrypt(ByteBuffer buf) {
    if (!isEnabled) {
    /** first packet is not encrypted */
    isEnabled = true;
    log.debug("packet is not encrypted... send in SM_KEY");
    return;
    }

    packetKey.encrypt(buf);
    }

    /**
    * Server packet opcodec obfuscation.
    *
    * @param op
    * @return obfuscated opcodec
    */
    public static final int encodeOpcodec(int op) {
    return (op + 0xD7) ^ 0xD7; // 6.x
    }
    }
    Стало
    /**
    * This file is part of aion-emu <aion-emu.com>.
    *
    * aion-emu is free software: you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation, either version 3 of the License, or
    * (at your option) any later version.
    *
    * aion-emu is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU General Public License for more details.
    *
    * You should have received a copy of the GNU General Public License
    * along with aion-emu. If not, see <Please login or register to view links>.
    */
    package com.aionemu.gameserver.network;

    import com.aionemu.commons.utils.Rnd;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;

    import java.nio.ByteBuffer;

    /**
    * Crypt will encrypt server packet and decrypt client packet.
    *
    * @author hack99
    * @author kao
    * @author -Nemesiss-
    */
    public class Crypt {

    private final static Logger log = LoggerFactory.getLogger(Crypt.class);

    /**
    * Second byte of server packet must be equal to this
    */
    public final static byte staticServerPacketCode = 0x56; // 4.9 => 0x56 || 4.7 | 4.6 | 4.5 => 0x44 | 4.3 => 0x46

    /**
    * Crypt is enabled after first server packet was send.
    */
    private boolean isEnabled;

    private EncryptionKeyPair packetKey = null;

    /**
    * Enable crypt key - generate random key that will be used to encrypt second server packet [first one is unencrypted]
    * and decrypt client packets. This method is called from SM_KEY server packet, that packet sends key to aion client.
    *
    * @return "false key" that should by used by aion client to encrypt/decrypt packets.
    */
    public final int enableKey() {
    if (packetKey != null)
    throw new KeyAlreadySetException();

    /** rnd key - this will be used to encrypt/decrypt packet */
    int key = Rnd.nextInt();

    packetKey = new EncryptionKeyPair(key);

    log.debug("new encrypt key: " + packetKey);

    /** false key that will be sent to aion client in SM_KEY packet */
    return (key ^ 0xCD92E4D5) + 0x3FF2CCD7; // 5.3 EU
    }

    /**
    * Decrypt client packet from this ByteBuffer.
    *
    * @param buf
    * @return true if decryption was successful.
    */
    public final boolean decrypt(ByteBuffer buf) {
    if (!isEnabled) {
    log.debug("if encryption wasn't enabled, then maybe it's client reconnection, so skip packet");
    return true;
    }

    return packetKey.decrypt(buf);
    }

    /**
    * Encrypt server packet from this ByteBuffer.
    *
    * @param buf
    */
    public final void encrypt(ByteBuffer buf) {
    if (!isEnabled) {
    /** first packet is not encrypted */
    isEnabled = true;
    log.debug("packet is not encrypted... send in SM_KEY");
    return;
    }

    packetKey.encrypt(buf);
    }

    /**
    * Server packet opcodec obfuscation.
    *
    * @param op
    * @return obfuscated opcodec
    */
    public static final int encodeOpcodec(int op) {
    return (op + 0xD5) ^ 0xD5; // 5.3 EU
    }
    }

    SM_VERSION_CHECK
    Было
    /*
    * =====================================================================================*
    * This file is part of Aion-Unique (Aion-Unique Home Software Development) *
    * Aion-Unique Development is a closed Aion Project that use Old Aion Project Base *
    * Like Aion-Lightning, Aion-Engine, Aion-Core, Aion-Extreme, Aion-NextGen, ArchSoft, *
    * Aion-Ger, U3J, Encom And other Aion project, All Credit Content *
    * That they make is belong to them/Copyright is belong to them. And All new Content *
    * that Aion-Unique make the copyright is belong to Aion-Unique *
    * You may have agreement with Aion-Unique Development, before use this Engine/Source *
    * You have agree with all of Term of Services agreement with Aion-Unique Development *
    * =====================================================================================*
    */
    package com.aionemu.gameserver.network.aion.serverpackets;

    import java.util.Calendar;

    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;

    import com.aionemu.commons.network.IPRange;
    import com.aionemu.gameserver.configs.main.GSConfig;
    import com.aionemu.gameserver.configs.main.MembershipConfig;
    import com.aionemu.gameserver.configs.network.IPConfig;
    import com.aionemu.gameserver.configs.network.NetworkConfig;
    import com.aionemu.gameserver.network.NetworkController;
    import com.aionemu.gameserver.network.aion.AionConnection;
    import com.aionemu.gameserver.network.aion.AionServerPacket;
    import com.aionemu.gameserver.services.ChatService;

    /**
    * @author -Nemesiss- CC fix
    * @modified by Novo, cura
    * @author GiGatR00n, NewLives
    */

    public class SM_VERSION_CHECK extends AionServerPacket {

    private static final Logger log = LoggerFactory.getLogger(SM_VERSION_CHECK.class);
    /**
    * Aion Client version
    */
    private int version;
    /**
    * Number of characters can be created
    */
    private int characterLimitCount;
    /**
    * Related to the character creation mode
    */
    private final int characterFactionsMode;
    private final int characterCreateMode;

    /**
    * @param chatService
    */
    public SM_VERSION_CHECK(int version) {
    this.version = version;

    if (MembershipConfig.CHARACTER_ADDITIONAL_ENABLE != 10 && MembershipConfig.CHARACTER_ADDITIONAL_COUNT > GSConfig.CHARACTER_LIMIT_COUNT) {
    characterLimitCount = MembershipConfig.CHARACTER_ADDITIONAL_COUNT;
    }
    else {
    characterLimitCount = GSConfig.CHARACTER_LIMIT_COUNT;
    }
    characterLimitCount *= NetworkController.getInstance().getServerCount();

    if (GSConfig.CHARACTER_CREATION_MODE < 0 || GSConfig.CHARACTER_CREATION_MODE > 2) {
    characterFactionsMode = 0;
    }
    else {
    characterFactionsMode = GSConfig.CHARACTER_CREATION_MODE;
    }

    if (GSConfig.CHARACTER_FACTION_LIMITATION_MODE < 0 || GSConfig.CHARACTER_FACTION_LIMITATION_MODE > 3) {
    characterCreateMode = 0;
    }
    else {
    characterCreateMode = GSConfig.CHARACTER_FACTION_LIMITATION_MODE * 0x04;
    }
    }

    /**
    * {@inheritDoc}
    */
    @Override
    protected void writeImpl(AionConnection con) {
    // aion 3.0 = 194
    // aion 3.5 = 196
    // aion 4.0 = 201
    // aion 4.5 = 203
    // aion 4.7 = 204
    // aion 4.7.0.7 = 205
    // aion 4.7.5.x = 206
    // aion 5.1.x.x = 212
    if (version < 215) {
    // Send wrong client version
    writeC(0x02);
    return;
    }
    if (version == 215) {
    log.info("Authentication with Client Version 5.8");
    }
    else if (version < 215) {
    log.info("Authentication with Client Version lower than 5.8");
    }
    writeC(0x00);
    writeC(NetworkConfig.GAMESERVER_ID);
    writeD(180205);// start year month day
    writeD(171201);// start year month day
    writeD(0x00);// spacing
    writeD(180205);// year month day
    writeD((int) (Calendar.getInstance().getTimeInMillis() / 1000)); // Start Server Time in Seconds Unit (Need to Implements in Config Files)
    writeC(0x00);// unk
    writeC(GSConfig.SERVER_COUNTRY_CODE);// country code;
    int serverMode = (characterLimitCount * 0x10) | characterFactionsMode;
    writeC(serverMode | characterCreateMode);
    writeD((int) (Calendar.getInstance().getTimeInMillis() / 1000));
    writeD(-3600);// 5.8 (-3600 = +1 Std, 0 = -1Std)
    writeD(40014200);
    writeD(0);
    writeD(68536);
    writeB(new byte[20]);
    for (int i = 0; i < 11; i++) {
    writeD(1000);
    }
    writeH(25600);
    writeH(0);
    writeC(0);
    writeD(1000);
    writeH(1);
    writeC(0);
    // for... chat servers?
    {

    // if the correct ip is not sent it will not work
    byte[] addr = IPConfig.getDefaultAddress();
    for (IPRange range : IPConfig.getRanges()) {
    if (range.isInRange(con.getIP())) {
    addr = range.getAddress();
    break;
    }
    }
    writeB(addr);
    writeH(ChatService.getPort());
    }
    }
    }
    Стало
    /*
    * =====================================================================================*
    * This file is part of Aion-Unique (Aion-Unique Home Software Development) *
    * Aion-Unique Development is a closed Aion Project that use Old Aion Project Base *
    * Like Aion-Lightning, Aion-Engine, Aion-Core, Aion-Extreme, Aion-NextGen, ArchSoft, *
    * Aion-Ger, U3J, Encom And other Aion project, All Credit Content *
    * That they make is belong to them/Copyright is belong to them. And All new Content *
    * that Aion-Unique make the copyright is belong to Aion-Unique *
    * You may have agreement with Aion-Unique Development, before use this Engine/Source *
    * You have agree with all of Term of Services agreement with Aion-Unique Development *
    * =====================================================================================*
    */
    package com.aionemu.gameserver.network.aion.serverpackets;

    import java.util.Calendar;

    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;

    import com.aionemu.commons.network.IPRange;
    import com.aionemu.gameserver.configs.main.GSConfig;
    import com.aionemu.gameserver.configs.main.MembershipConfig;
    import com.aionemu.gameserver.configs.network.IPConfig;
    import com.aionemu.gameserver.configs.network.NetworkConfig;
    import com.aionemu.gameserver.network.NetworkController;
    import com.aionemu.gameserver.network.aion.AionConnection;
    import com.aionemu.gameserver.network.aion.AionServerPacket;
    import com.aionemu.gameserver.services.ChatService;

    /**
    * @author -Nemesiss- CC fix
    * @modified by Novo, cura
    * @author GiGatR00n, NewLives
    */

    public class SM_VERSION_CHECK extends AionServerPacket {

    private static final Logger log = LoggerFactory.getLogger(SM_VERSION_CHECK.class);
    /**
    * Aion Client version
    */
    private int version;
    /**
    * Number of characters can be created
    */
    private int characterLimitCount;
    /**
    * Related to the character creation mode
    */
    private final int characterFactionsMode;
    private final int characterCreateMode;

    /**
    * @param chatService
    */
    public SM_VERSION_CHECK(int version) {
    this.version = version;

    if (MembershipConfig.CHARACTER_ADDITIONAL_ENABLE != 10 && MembershipConfig.CHARACTER_ADDITIONAL_COUNT > GSConfig.CHARACTER_LIMIT_COUNT) {
    characterLimitCount = MembershipConfig.CHARACTER_ADDITIONAL_COUNT;
    }
    else {
    characterLimitCount = GSConfig.CHARACTER_LIMIT_COUNT;
    }
    characterLimitCount *= NetworkController.getInstance().getServerCount();

    if (GSConfig.CHARACTER_CREATION_MODE < 0 || GSConfig.CHARACTER_CREATION_MODE > 2) {
    characterFactionsMode = 0;
    }
    else {
    characterFactionsMode = GSConfig.CHARACTER_CREATION_MODE;
    }

    if (GSConfig.CHARACTER_FACTION_LIMITATION_MODE < 0 || GSConfig.CHARACTER_FACTION_LIMITATION_MODE > 3) {
    characterCreateMode = 0;
    }
    else {
    characterCreateMode = GSConfig.CHARACTER_FACTION_LIMITATION_MODE * 0x04;
    }
    }

    /**
    * {@inheritDoc}
    */
    @Override
    protected void writeImpl(AionConnection con) {
    // aion 3.0 = 194
    // aion 3.5 = 196
    // aion 4.0 = 201
    // aion 4.5 = 203
    // aion 4.7 = 204
    // aion 4.7.0.7 = 205
    // aion 4.7.5.x = 206
    // aion 5.1.x.x = 212
    if (version < 213) {
    // Send wrong client version
    writeC(0x02);
    return;
    }
    if (version == 213) {
    log.info("Authentication with Client Version 5.8");
    }
    else if (version < 213) {
    log.info("Authentication with Client Version lower than 5.8");
    }
    writeC(0x00);
    writeC(NetworkConfig.GAMESERVER_ID);
    writeD(180205);// start year month day
    writeD(171201);// start year month day
    writeD(0x00);// spacing
    writeD(180205);// year month day
    writeD((int) (Calendar.getInstance().getTimeInMillis() / 1000)); // Start Server Time in Seconds Unit (Need to Implements in Config Files)
    writeC(0x00);// unk
    writeC(GSConfig.SERVER_COUNTRY_CODE);// country code;
    int serverMode = (characterLimitCount * 0x10) | characterFactionsMode;
    writeC(serverMode | characterCreateMode);
    writeD((int) (Calendar.getInstance().getTimeInMillis() / 1000));
    writeD(-3600);// 5.8 (-3600 = +1 Std, 0 = -1Std)
    writeD(40014200);
    writeD(0);
    writeD(68536);
    writeB(new byte[20]);
    for (int i = 0; i < 11; i++) {
    writeD(1000);
    }
    writeH(25600);
    writeH(0);
    writeC(0);
    writeD(1000);
    writeH(1);
    writeC(0);
    // for... chat servers?
    {

    // if the correct ip is not sent it will not work
    byte[] addr = IPConfig.getDefaultAddress();
    for (IPRange range : IPConfig.getRanges()) {
    if (range.isInRange(con.getIP())) {
    addr = range.getAddress();
    break;
    }
    }
    writeB(addr);
    writeH(ChatService.getPort());
    }
    }
    }

    Надо было мне тщательнее смотреть исходники и то как устроено все.
    [​IMG]
     
    Последние данные очков репутации:
    V_Nick: 1 Очко (За найденное решение по запуску Aion Unique) 1 дек 2022
    V_Nick и klubheads нравится это.
Статус темы:
Закрыта.