CharacterSelectionInfoPacket (Salvation 140)

Статус
В этой теме нельзя размещать новые ответы.

masone

Заблокирован
Заблокирован
Сообщения
284
Розыгрыши
0
Решения
1
Репутация
255
Реакции
338
Баллы
1 483
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
Хроники
  1. Salvation
Исходники
Присутствуют
Сборка
оверы
Всем привет, при апе пакетов возник вопрос по этому пакету

1632157614467.png

Java:
    @Override
    protected final void writeData(final PacketBody packet, final GameClient client) {
        final int size = (_characterPackages != null) ? _characterPackages.length : 0;
 
        packet.writeD(size);
        packet.writeD(SalvationConfig.MAX_CHARACTERS_NUMBER_PER_ACCOUNT); // Максимальное количество персонажей на сервере
        packet.writeC(size >= SalvationConfig.MAX_CHARACTERS_NUMBER_PER_ACCOUNT ? 0x01 : 0x00); // 0x00 - Разрешить, 0x01 - запретить. Разрешает или запрещает создание игроков

        packet.writeC(0x00);
        packet.writeD(0x02); // 0x01 - Выводит окно, что нужно купить игру, что создавать более 2х чаров. 0х02 - обычное лобби.
        packet.writeC(0x00); // 0x01 - Предлогает купить ПА.
        packet.writeC(0x00); // 140 protocol

        long lastAccess = -1L;
        if (lastUsed == -1) {
            for (int i = 0; i < size; i++)
                if (lastAccess < _characterPackages[i].getLastAccess()) {
                    lastAccess = _characterPackages[i].getLastAccess();
                    lastUsed = i;
                }
        }

        for (int i = 0; i < size; i++) {
            CharSelectInfoPackage charInfoPackage = _characterPackages[i];

            packet.writeS(charInfoPackage.getName());
            packet.writeD(charInfoPackage.getCharId()); // ?
            packet.writeS(_loginName);
            packet.writeD(_sessionId);
            packet.writeD(charInfoPackage.getClanId());
            packet.writeD(0x00); // ??

            packet.writeD(charInfoPackage.getSex());
            packet.writeD(charInfoPackage.getRace());
            if (charInfoPackage.getClassId() == charInfoPackage.getBaseClassId()) {
                packet.writeD(charInfoPackage.getClassId());
            } else {
                packet.writeD(charInfoPackage.getBaseClassId());
            }

            packet.writeD(0x01);

            packet.writeD(charInfoPackage.getX());
            packet.writeD(charInfoPackage.getY());
            packet.writeD(charInfoPackage.getZ());

            packet.writeF(charInfoPackage.getCurrentHp());
            packet.writeF(charInfoPackage.getCurrentMp());
            
            packet.writeQ(charInfoPackage.getSp());

            packet.writeQ(charInfoPackage.getExp());
            int lvl = charInfoPackage.getLevel();
            packet.writeF(ExperienceParser.getInstance().getExpPercent(lvl, charInfoPackage.getExp()));
            packet.writeD(charInfoPackage.getLevel());

            packet.writeD(charInfoPackage.getKarma());
            packet.writeD(charInfoPackage.getPk());
            packet.writeD(charInfoPackage.getPvP());

            packet.writeD(0x00);
            packet.writeD(0x00);
            packet.writeD(0x00);
            packet.writeD(0x00);
            packet.writeD(0x00);
            packet.writeD(0x00);
            packet.writeD(0x00);
            
            packet.writeD(0x00); // unk Ertheia
            packet.writeD(0x00); // unk Ertheia
            
            for (int PAPERDOLL_ID : Inventory.PAPERDOLL_ORDER)
                packet.writeD(charInfoPackage.getPaperdollItemId(PAPERDOLL_ID));


            packet.writeD(0x00); // Salvation
            packet.writeD(0x00); // Salvation
            packet.writeD(0x00); // Salvation
            packet.writeD(0x00); // Salvation
            packet.writeD(0x00); // Salvation

            for (int slot : getPaperdollOrderVisualId()) {
                packet.writeD(charInfoPackage.getPaperdollItemVisualId(slot));
            }

            packet.writeH(0x00); // PaperdollEnchantEffect PAPERDOLL_CHEST
            packet.writeH(0x00); // PaperdollEnchantEffect PAPERDOLL_LEGS
            packet.writeH(0x00); // PaperdollEnchantEffect PAPERDOLL_HEAD
            packet.writeH(0x00); // PaperdollEnchantEffect PAPERDOLL_GLOVES
            packet.writeH(0x00); // PaperdollEnchantEffect PAPERDOLL_FEET
            
            packet.writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_HAIR) > 0 ? charInfoPackage.getSex() : charInfoPackage.getHairStyle());
            packet.writeD(charInfoPackage.getHairColor());
            packet.writeD(charInfoPackage.getFace());

            packet.writeF(charInfoPackage.getMaxHp()); // hp max
            packet.writeF(charInfoPackage.getMaxMp()); // mp max

            packet.writeD(charInfoPackage.getAccessLevel() > -100 ? charInfoPackage.getDeleteTimer() : -1);
            packet.writeD(charInfoPackage.getClassId());
            packet.writeD(i == lastUsed ? 1 : 0);

            packet.writeC(Math.min(charInfoPackage.getPaperdollEnchantEffect(Inventory.PAPERDOLL_RHAND), 127));
            packet.writeD(charInfoPackage.getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND));
            packet.writeD(charInfoPackage.getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND));

            // packet.writeD(charInfoPackage.getTransformId()); // Used to display Transformations
            packet.writeD(0x00); // Currently on retail when you are on character select you don't see your transformation.

            packet.writeD(0x00); // Pet NpcId
            packet.writeD(0x00); // Pet level
            packet.writeD(0x00); // Pet Food
            packet.writeD(0x00); // Pet Food Level
            packet.writeF(0x00); // Current pet HP
            packet.writeF(0x00); // Current pet MP
            
            packet.writeD(0);
            packet.writeD(0);
            packet.writeD(0x00); // Use Vitality Potions Left
            packet.writeD(charInfoPackage.getAccessLevel() == -100 ? 0x00 : 0x01);

            packet.writeC(charInfoPackage.isNoble() ? 0x01 : 0x00); // Chaos Festival Winner
            packet.writeC(Hero.getInstance().isHero(charInfoPackage.getObjectId()) ? 0x01 : 0x00); // Hero glow
            packet.writeC(0x00); // show hair accessory if enabled
        }
    }
Received on: 20:01:40.748

Created character count: 3
Max character count: 7
0: 0
play mode: 0
Korea: Yes (2)
giftMessageForInactiveAccounts: No (0)
~~~~ Loop start ~~~~
Character name: ㄀㌀㌀㌀㄀
Character ID: 0
Account name: 琀攀猀琀㌀㌀
Account ID: 1151213312
Pledge ID: N/A (91)
Builder level: 0
Sex: Female (256)
Race: 1024
Visible class: 13568
Server: 256
Location X: 21329920
Location Y: 38135808
Location Z: -878080
Current HP: 2.7459190640523994E157
Current MP: 1.4411518807585792E17
SP: 64
XP: 0
Progress to next level (%): 0.0
Level: 256
Reputation: 0
PK Count: 0
PvP Count: 0
0: 0
0: 0
0: 0
0: 0
0: 0
0: 0
0: 0
Unk: 0
Unk: 0
Underwear: None (0)
Earring (bottom/left): None (0)
Earring (top/right): None (0)
Necklace: None (0)
Ring (bottom/left): None (0)
Ring (top/right): None (0)
Headgear: None (0)
Weapon: 606720
Shield [Sigil]: None (0)
Gloves: None (0)
Upper Body: 293376
Lower Body: 293632
Boots: None (0)
Cloak: None (0)
Weapon / Two Handed: None (0)
Hair Accessory (top): None (0)
Hair Accessory (bottom): None (0)
Right Bracelet: None (0)
Left Bracelet: None (0)
Talisman (1): None (0)
Talisman (2): None (0)
Talisman (3): None (0)
Talisman (4): None (0)
Talisman (5): None (0)
Talisman (6): None (0)
Belt: None (0)
Brooch: None (0)
Jewel (1): None (0)
Jewel (2): None (0)
Jewel (3): None (0)
Jewel (4): None (0)
Jewel (5): 10523904
Jewel (6): Great Spear (16)
Visible Weapon: None (0)
Visible Shield [Sigil]: 10523648
Visible Gloves: 10523408
Visible Upper Body: Great Spear (16)
Visible Lower Body: 10523904
Visible Boots: Great Spear (16)
Visible Weapon / Two Handed: None (0)
Visible Hair Accessory (top): None (0)
Visible Hair Accessory (bottom): 16777216
Upper Body enchant level: 0
Lower Body enchant level: 512
Headgear enchant level: 0
Gloves enchant level: 512
Boots enchant level: 0
Hair Style: A (0)
Hair Color: A (1621098496)
Face: 64
Maximum HP: 1.363672412307E-312
Maximum MP: 6.7035E-320
Time to deletion: N/A (0)
Class: Human Fighter (0)
Selected: No (0)
Weapon enchant level: 0
Weapon augmentation effect (1): None (0)
Weapon augmentation effect (2): None (0)
Transformation: None (0)
Pet: None (0)
Pet level: 0
Pet Food: 0
Pet Food Level: 0
Current pet HP: 0.0
Current pet MP: 0.0
Vitality: Level 1 (256)
Vitality Percent: 0
Remaining vitality item uses: 6553715
Available: 7536742
Noblesse: Yes (102)
Hero: No (0)
Show Hair Accessory: Yes (102)
~~ Loop element delimiter ~~
Character name:
Character ID: 0
Account name: 琀攀猀琀㌀㌀
Account ID: 1151213312
Pledge ID: N/A (91)
Builder level: 0
Sex: Male (0)
Race: Human (0)
Visible class: Human Fighter (0)
Server: 256
Location X: -18262528
Location Y: 66117631
Location Z: -794624
Current HP: 1.0474849945268247E152
Current MP: 5.6294995342132E14
SP: 64
XP: 0
Progress to next level (%): 0.0
Level: 256
Reputation: 0
PK Count: 0
PvP Count: 0
0: 0
0: 0
0: 0
0: 0
0: 0
0: 0
0: 0
Unk: 0
Unk: 0
Underwear: None (0)
Earring (bottom/left): None (0)
Earring (top/right): None (0)
Necklace: None (0)
Ring (bottom/left): None (0)
Ring (top/right): None (0)
Headgear: None (0)
Weapon: 606464
Shield [Sigil]: None (0)
Gloves: None (0)
Upper Body: 293376
Lower Body: 293632
Boots: None (0)
Cloak: None (0)
Weapon / Two Handed: None (0)
Hair Accessory (top): None (0)
Hair Accessory (bottom): None (0)
Right Bracelet: None (0)
Left Bracelet: None (0)
Talisman (1): None (0)
Talisman (2): None (0)
Talisman (3): None (0)
Talisman (4): None (0)
Talisman (5): None (0)
Talisman (6): None (0)
Belt: None (0)
Brooch: None (0)
Jewel (1): None (0)
Jewel (2): None (0)
Jewel (3): None (0)
Jewel (4): None (0)
Jewel (5): 10517760
Jewel (6): Great Spear (16)
Visible Weapon: None (0)
Visible Shield [Sigil]: 10517504
Visible Gloves: 10517264
Visible Upper Body: Great Spear (16)
Visible Lower Body: 10517760
Visible Boots: Great Spear (16)
Visible Weapon / Two Handed: None (0)
Visible Hair Accessory (top): None (0)
Visible Hair Accessory (bottom): 16777216
Upper Body enchant level: 0
Lower Body enchant level: 768
Headgear enchant level: 0
Gloves enchant level: 256
Boots enchant level: 0
Hair Style: A (0)
Hair Color: A (1602224128)
Face: 64
Maximum HP: 1.363630967077E-312
Maximum MP: 0.0
Time to deletion: N/A (0)
Class: Human Fighter (0)
Selected: No (0)
Weapon enchant level: 0
Weapon augmentation effect (1): None (0)
Weapon augmentation effect (2): None (0)
Transformation: None (0)
Pet: None (0)
Pet level: 0
Pet Food: 0
Pet Food Level: 0
Current pet HP: 0.0
Current pet MP: 0.0
Vitality: Level 1 (256)
Vitality Percent: 0
Remaining vitality item uses: 7864442
Available: 6488163
Noblesse: Yes (122)
Hero: No (0)
Show Hair Accessory: Yes (99)
~~ Loop element delimiter ~~
Character name: 砀稀
Character ID: 0
Account name: 琀攀猀琀㌀㌀
Account ID: 1151213312
Pledge ID: N/A (91)
Builder level: 0
Sex: Male (0)
Race: Human (0)
Visible class: Human Fighter (0)
Server: 256
Location X: -18262528
Location Y: 66117631
Location Z: -794624
Current HP: 1.0474849945268247E152
Current MP: 5.6294995342132E14
SP: 64
XP: 0
Progress to next level (%): 0.0
Level: 256
Reputation: 0
PK Count: 0
PvP Count: 0
0: 0
0: 0
0: 0
0: 0
0: 0
0: 0
0: 0
Unk: 0
Unk: 0
Underwear: None (0)
Earring (bottom/left): None (0)
Earring (top/right): None (0)
Necklace: None (0)
Ring (bottom/left): None (0)
Ring (top/right): None (0)
Headgear: None (0)
Weapon: 606464
Shield [Sigil]: None (0)
Gloves: None (0)
Upper Body: 293376
Lower Body: 293632
Boots: None (0)
Cloak: None (0)
Weapon / Two Handed: None (0)
Hair Accessory (top): None (0)
Hair Accessory (bottom): None (0)
Right Bracelet: None (0)
Left Bracelet: None (0)
Talisman (1): None (0)
Talisman (2): None (0)
Talisman (3): None (0)
Talisman (4): None (0)
Talisman (5): None (0)
Talisman (6): None (0)
Belt: None (0)
Brooch: None (0)
Jewel (1): None (0)
Jewel (2): None (0)
Jewel (3): None (0)
Jewel (4): None (0)
Jewel (5): 10602496
Jewel (6): Great Spear (16)
Visible Weapon: None (0)
Visible Shield [Sigil]: 10602240
Visible Gloves: 10602000
Visible Upper Body: Great Spear (16)
Visible Lower Body: 10602496
Visible Boots: Great Spear (16)
Visible Weapon / Two Handed: None (0)
Visible Hair Accessory (top): None (0)
Visible Hair Accessory (bottom): 33554432
Upper Body enchant level: 0
Lower Body enchant level: 512
Headgear enchant level: 0
Gloves enchant level: 512
Boots enchant level: 0
Hair Style: A (0)
Hair Color: A (1602224128)
Face: 64
Maximum HP: 1.363630967077E-312
Maximum MP: 5.43230922487E-312
Time to deletion: N/A (0)
Class: Human Fighter (0)
Selected: No (0)
Weapon enchant level: 0
Weapon augmentation effect (1): None (0)
Weapon augmentation effect (2): None (0)
Transformation: None (0)
Pet: None (0)
Pet level: 0
Pet Food: 0
Pet Food Level: 0
Current pet HP: 0.0
Current pet MP: 0.0
Vitality: Level 1 (256)
Vitality Percent: 0

EXPECTED MORE DATA
(according to packet definition)
 
Видно в дампе, что ломается в начале 1632158141016.png после gift должны быть еще данные перед циклом персонажей
 
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
можно закрывать
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху Снизу