Ôîðóì àäìèíèñòðàòîðîâ èãðîâûõ ñåðâåðîâ

Ôîðóì àäìèíèñòðàòîðîâ èãðîâûõ ñåðâåðîâ (https://forum.zone-game.info/TT.php)
-   Point Blank (Piercing Blow) (https://forum.zone-game.info/forumdisplay.php?f=204)
-   -   BATTLE_END Error Player SLOT (https://forum.zone-game.info/showthread.php?t=39906)

Exile03 16.01.2016 03:08

BATTLE_END Error Player SLOT
 
[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

http://i.imgur.com/iHeBp8p.jpg
SLOT BATTLE FINAL ERROR Someone can help me fix this error?

PROGRAMMATOR 16.01.2016 12:50

Re: [Point Balank] BATTLE_END Error Player SLOT
 
Show me the source code of PROTOCOL_BATTLE_ENDBATTLE_ACK packet.

Exile03 16.01.2016 18:52

Re: BATTLE_END Error Player SLOT
 
Êîä:

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); // &#209;‡&#209;‚&#208;&#190; &#209;�&#209;‚&#208;&#190;???
                writeH(266); // &#209;‡&#209;‚&#208;&#190; &#209;�&#209;‚&#208;&#190;???

                // &#208;ž&#208;&#191;&#209;‹&#209;‚
                for (int i = 0; i < 16; i++) {
                        RoomSlot slot = room.getRoomSlot(i);
                        writeH(slot.getAllExp());
                }
                // &#208;ž&#209;‡&#208;&#186;&#208;&#184;
                for (int i = 0; i < 16; i++) {
                        RoomSlot slot = room.getRoomSlot(i);
                        writeH(slot.getAllGp());
                }
                //&#208;ž&#209;‡&#208;&#186;&#208;&#184; &#208;·&#208;° &#208;±&#208;&#190;&#209;‚&#208;&#190;&#208;&#178;
                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,//
                                // &#208;&#184; &#209;‚&#209;ƒ&#209;‚ &#208;&#165;&#208;—
                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00,//
                                0x00, 0x00, 0x00, 0x00
                                //
                });

                writeS(player.getName(), Player.MAX_NAME_SIZE); // &#208;˜&#208;&#188;&#209;� &#208;&#191;&#208;µ&#209;ˆ&#209;�&#208;°
                writeD(player.getExp()); // &#208;&#190;&#208;&#191;&#209;‹&#209;‚
                writeD(player.getRank()); // &#209;ˆ&#208;°&#208;&#189;&#208;&#186; (0-54)
                writeD(player.getRank()); // &#208;Ÿ&#208;&#190;&#208;&#186;&#208;° &#208;&#189;&#208;µ &#208;&#191;&#208;&#190;&#208;&#189;&#209;�&#209;‚&#208;&#189;&#208;&#190; &#208;·&#208;° &#209;‡&#208;µ&#208;&#179;&#208;&#190; &#208;&#190;&#209;‚&#208;&#178;&#208;µ&#209;‡&#208;°&#209;Ž&#209;‚ &#208;&#191;&#209;ƒ&#209;�&#209;‚&#209;‹&#208;µ &#208;±&#208;°&#208;&#185;&#209;‚&#209;‹...
                writeD(player.getGp()); // &#208;“&#208;Ÿ
                writeD(con.getAccount().getMoney()); // &#208;-&#209;ƒ&#208;±&#208;»&#208;&#184;&#208;&#186;&#208;&#184;

                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 - &#208;’&#208;&#184;&#208;&#180;&#208;&#184;&#208;&#188;&#208;&#190; &#209;ˆ&#208;°&#208;·&#208;&#180;&#208;µ&#208;»&#208;&#184;&#209;‚&#208;µ&#208;»&#209;Œ
                        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]);
        }
       
       
       
       
       
}


PROGRAMMATOR 16.01.2016 20:54

Re: BATTLE_END Error Player SLOT
 
Instead of writeH(383) there must be:

WriteH(room.PlayersSlotsMask); // |= 1 << slot.Id
 
Code: C#

Exile03 16.01.2016 21:41

Re: BATTLE_END Error Player SLOT
 
Thankyou

PROGRAMMATOR 16.01.2016 22:23

Re: BATTLE_END Error Player SLOT
 
You'r welcome. :)


Òåêóùåå âðåìÿ: 03:14. ×àñîâîé ïîÿñ GMT +3.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Ïåðåâîä: zCarot