Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
BATTLE_END Error Player SLOT
#1
[Point Blank] BATTLE_END Error Player SLOT
i have error BATTLE END FINAL SLOT Player end someone know what locate for fix this BUG ?
when finish battle SLOT bug player
see image

[Изображение: iHeBp8p.jpg]
SLOT BATTLE FINAL ERROR Someone can help me fix this error?
Ответ
#2
Show me the source code of PROTOCOL_BATTLE_ENDBATTLE_ACK packet.
Ответ
#3
Код:
ublic class SM_BATTLE_END extends ServerPacket {

    protected final Logger log = LoggerFactory.getLogger(getClass());
    
    private final Player player;
    private final Room room;

    public SM_BATTLE_END(Player player, Room room) {
        super(0xD08);
        this.player = player;
        this.room = room;
    }


    
    @Override
    public void writeImpl() {

        //TODO переделать
        LevelUpInfo levelUpInfo = LevelUpDaoService.getInstance().getLevelInfoForRank((byte) (player.getRank() + 1));
        RoomSlot slotByPlayer = room.getRoomSlotByPlayer(player);
        
        player.setExp(player.getExp() + slotByPlayer.getAllExp());
        player.setGp(player.getGp() + slotByPlayer.getAllGp());

        if (player.getRank() <= 52) {
            if (levelUpInfo.getAllExp() < player.getExp()) {
                player.setRank((short) (player.getRank() + 1));
                player.setGp(player.getGp() + levelUpInfo.getRewardGp());
            }
        }

        if (room.getBlueKills() > room.getRedKills())
        {
        
        }
        else if (room.getBlueKills() < room.getRedKills())
        {

        
        
        writeH(383); // что Ñ�то???
        writeH(266); // что Ñ�то???

        // Опыт
        for (int i = 0; i < 16; i++) {
            RoomSlot slot = room.getRoomSlot(i);
            writeH(slot.getAllExp());
        }
        // Очки
        for (int i = 0; i < 16; i++) {
            RoomSlot slot = room.getRoomSlot(i);
            writeH(slot.getAllGp());
        }
        //Очки за ботов
        for (int i = 0; i < 16; i++) {
            if (room.getSpecial() == 6) {
                RoomSlot slot = room.getRoomSlot(i);
                int score = slot.getBotScore();
                writeH(score);
            } else writeH(0);
        }

        writeB(new byte[]{
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
                0x00, 0x00,//
                // и тут ХЗ
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
                0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
                0x00, 0x00, 0x00, 0x00
                //
        });

        writeS(player.getName(), Player.MAX_NAME_SIZE); // ИмÑ� перÑ�а
        writeD(player.getExp()); // опыт
        writeD(player.getRank()); // ранк (0-54)
        writeD(player.getRank()); // Пока не понÑ�тно за чего отвечают пуÑ�тые байты...
        writeD(player.getGp()); // ГП
        writeD(con.getAccount().getMoney()); // Ð-ублики

        writeD(0); // ClanID
        writeD(0); // ClanNameColor
        writeD(0); // Unk
        writeD(0); // Unk
        
        writeH(player.getPcCafe());
        writeC(player.getColor()); // 0-9 Color name

        if (player.getClan() == null) {
            writeS("", 16);
            writeC(0);
            writeH(0);
            writeC(255);
            writeC(255);
            writeC(255);
            writeC(255);
            writeH(0);
        } else {
            writeS(player.getClan().getName(), 16);
            writeC(0); // unk - Видимо разделитель
            writeH(player.getClan().getRank());
            writeC(player.getClan().getLogo1());
            writeC(player.getClan().getLogo2());
            writeC(player.getClan().getLogo3());
            writeC(player.getClan().getLogo4());
            writeH(player.getClan().getColor());
        }

    
        writeD(0);
        writeD(0);
        writeD(0);

        writeD(player.getStats().getFights());
        writeD(player.getStats().getWins());
        writeD(player.getStats().getLosts());
        writeD(0); // unk
        writeD(player.getStats().getKills());
        writeD(player.getStats().getHeadSort());
        writeD(player.getStats().getDeaths());
        writeD(0); // unk
        writeD(player.getStats().getKills());
        writeD(player.getStats().getEscapes());
        writeD(player.getStats().getFights());
        writeD(player.getStats().getWins());
        writeD(player.getStats().getLosts());
        writeD(0); // unk
        writeD(player.getStats().getKills());
        writeD(player.getStats().getHeadSort());
        writeD(player.getStats().getDeaths());
        writeD(0); // unk
        writeD(player.getStats().getKills());
        writeD(player.getStats().getEscapes());

        writeB(new byte[53]);
    }
    
    
    
    
    
}
Ответ
#4
Instead of writeH(383) there must be:

[SRC="csharp"]WriteH(room.PlayersSlotsMask); // |= 1 << slot.Id
[/SRC]
Ответ
#5
Thankyou
Ответ
#6
You'r welcome. Smile
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  UDP3 POSITION ERROR Comandante9901 13 5,254 10-10-2018, 09:20 AM
Последний пост: ChunkyHunt
  help me please UDP3 Event Position Error bmzproject 14 3,890 05-24-2018, 05:31 AM
Последний пост: PISTOLA
  Help me UDP3 Before send packet to player bmzproject 0 1,161 05-14-2018, 02:26 PM
Последний пост: bmzproject
  Help me please UDP3 error bc.log P2P_SUB_HEAD_USER bmzproject 0 1,355 03-25-2018, 06:04 PM
Последний пост: bmzproject
  help udp 3 error barte 1 1,544 02-03-2018, 06:35 PM
Последний пост: blowstom
  [Error PXSD] В чем проблема? немогу понять. Codex1to 0 1,801 12-17-2017, 07:49 PM
Последний пост: Codex1to
  UDP3 Help me Host & Player not look bmzproject 12 4,001 12-16-2017, 01:57 PM
Последний пост: bmzproject
  Shop Tag error Yusqa 2 1,488 11-24-2017, 05:22 PM
Последний пост: Yusqa
  i have this error clients connection TomCodder 2 1,717 08-07-2017, 06:43 PM
Последний пост: TomCodder
  error in java TomCodder 6 2,308 07-06-2017, 09:07 AM
Последний пост: TomCodder

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)