Форум администраторов игровых серверов

Форум администраторов игровых серверов (https://forum.zone-game.info/TT.php)
-   Point Blank (Piercing Blow) (https://forum.zone-game.info/forumdisplay.php?f=204)
-   -   [Point Blank] Help me UDP3 i'm get value Opcode3 (https://forum.zone-game.info/showthread.php?t=42963)

bmzproject 21.02.2018 15:03

Help me UDP3 i'm get value Opcode3
 
Help me UDP3 i'm get value Opcode3 X,Y,Z,camX,camZ,Area
case 3:
            {
            	log.info("Packet Replication Opcode 3 Slot :" + slotID);
                if (room != null)
                {
                	onlyDecrypt(originalbuffer, this.length);
                    sub_opcode = originalbuffer.readByte();
                    slot = originalbuffer.readShort();
                    sub_length = originalbuffer.readShort();
                    EventType = 0;
                    if (sub_opcode != 2)
                    {
                        EventType = originalbuffer.readInt();
                    }
                    log.info("============================================================================================");
                    log.info("| Sub-Opcode: " + sub_opcode + " | Slot: " + slot + "| Length: " + sub_length + " | EventType: " + EventType + " |");
                    log.info("============================================================================================");
                    if ((EventType & 0x04) > 0)
                    {
                    	this.x = originalbuffer.readShort();
                        this.y = originalbuffer.readShort();
                        this.z = originalbuffer.readShort();
                        this.camX = originalbuffer.readShort();
                        this.camZ = originalbuffer.readShort();
                        this.Area = originalbuffer.readShort();
                        log.info("====================================================");
                        log.info("X : " + x);     
                        log.info("Y : " + y);  
                        log.info("Z : " + z);  
                        log.info("camX : " + camX);  
                        log.info("camZ : " + camZ);  
                        log.info("Area : " + Area);                        
                        log.info("====================================================");
                        remainvalue += 0x04;
                    }
                    log.info("| Sub-Opcode: " + sub_opcode + " | Slot: " + slot + "| length: " + sub_length + " | EventType: " + EventType + " |");
                    ByteBuf _buf = Unpooled.buffer(0, this.length).order(ByteOrder.LITTLE_ENDIAN);
                    _buf.writeByte(4); // OPCODE
                    _buf.writeByte(-1); // SLOT
                    _buf.writeFloat(this.time); // TIME
                    _buf.writeByte(1); // SESSION
                    _buf.writeShort(this.length); // LENGTH
                    _buf.writeShort(0); // EVENT 1
                    _buf.writeShort(0); // EVENT 2
                    _buf.writeBytes(InternalPacket.copy());
                    for (Player p : this.room.getPlayers().values())
                    {                   	
                        log.info(NetworkUtil.printData("Buffer OutPut 3", _buf));
                        ctx.writeAndFlush(new DatagramPacket(_buf.copy(), p.net));
                        log.warn("Opcode3 Relay Packet send to > " + p.slotID);
                        log.info("====================================================");
                        log.info("Opcode 3 >>>");
                        log.info("Room.GetPlayer : " + room.getPlayers().values().toString());
                        log.info("PlayerID : " + p.playerID);
                        log.info("PlayerSession : " + p.session);
                        log.info("PlayerSlotID : " + p.slotID);
                        log.info("PlayerNet : " + p.net);
                        log.info("PlayerIP : " + p.playerIP);
                        log.info("PlayerRoom : " + p.room);
                        log.info("====================================================");
                    }
                }
                break;
        }
Code: Java
Received value
[12:58:30|INFO |nioEventLoopGroup-2-1    |ru.pb.battle.network.client.BattleClientConnection] X : 19908
[12:58:30|INFO |nioEventLoopGroup-2-1    |ru.pb.battle.network.client.BattleClientConnection] Y : 18071
[12:58:30|INFO |nioEventLoopGroup-2-1    |ru.pb.battle.network.client.BattleClientConnection] Z : -14562
[12:58:30|INFO |nioEventLoopGroup-2-1    |ru.pb.battle.network.client.BattleClientConnection] camX : 22820
[12:58:30|INFO |nioEventLoopGroup-2-1    |ru.pb.battle.network.client.BattleClientConnection] camZ : -17989
[12:58:30|INFO |nioEventLoopGroup-2-1    |ru.pb.battle.network.client.BattleClientConnection] Area : 9
Code: XML
I want to know what to (X, Y, Z, camX, camZ, Area) How to send to the client?
Now UDP3 I can not work. Can not see the movement.

Добавлено через 2 минуты
I would like to know how to send (X, Y, Z, camX, camZ, Area) received from Opcode3 to client, please help me.

PROGRAMMATOR 21.02.2018 22:29

Re: Help me UDP3 i'm get value Opcode3
 
I don't know how to explain more clear. The packet with id 4 and 255 slot is sent to all the players.
Using Wireshark at official server you can compare incoming and outcoming packets.

bmzproject 23.02.2018 07:07

Re: Help me UDP3 i'm get value Opcode3
 
Цитата:

Сообщение от PROGRAMMATOR (Сообщение 430317)
I don't know how to explain more clear. The packet with id 4 and 255 slot is sent to all the players.
Using Wireshark at official server you can compare incoming and outcoming packets.

https://uppic.cc/d/Mu9
I don't understand how to look. Please introduce me.

PROGRAMMATOR 23.02.2018 16:49

Re: Help me UDP3 i'm get value Opcode3
 
Client:

Цитата:

03 03 D1 22 A2 42 04 31 00 01 00 46 00 // Header

00 // SubHead
03 00 // SubSlot
1B 00 // Length
07 00 00 00 // Events (Action, State, PosRotation)
00 08 11 00 // Action
F0 1F // State
C1 4C FC 4B 9F CD 52 D5 29 C6 09 00 // PosRotation

E3 01 00 00 00 3B 5D 00 00 // Footer
Server:

Цитата:

04 FF 8A B7 61 43 04 28 00 00 00 00 00 // Header

00
03 00
1B 00
07 00 00 00
00 08 11 00
F0 1F
C1 4C FC 4B 9F CD 52 D5 29 C6 09 00

bmzproject 24.02.2018 08:55

Re: Help me UDP3 i'm get value Opcode3
 
Цитата:

Сообщение от PROGRAMMATOR (Сообщение 430350)
Client:



Server:

Client:
https://uppic.cc/d/MYa

Link img : https://uppic.cc/d/MYa

03 09 46 5A A8 41 01 35 00 01 00 F6 00 // Header 
02 // SubHead 
40 07 // SubSlot 
C0 11 // Length 
C0 00 00 00 // Events (Action, State, PosRotation) 
02 05 00 3C // Action 
07 E8 // State 
B2 B3 91 08 0F 76 75 80 71 00 80 10 // PosRotation 
40 00 80 BD B2 87 C0 00 00 00 00 00 // Footer
Code: XML
I understand?

PROGRAMMATOR 24.02.2018 18:12

Re: Help me UDP3 i'm get value Opcode3
 
No, you did not understand.

Цитата:

C0 11 // Length
4544 bytes in 53 bytes packet?

The packet is encrypted and firstly you have to decrypt it.

Цитата:

03 09 46 5A A8 41 01 35 00 01 00 F6 00

// DECRYPTED bits = length (35 00) % 6 + 1

00 // SubHead.User
09 00 // Slot
1F 00 // Length
47 00 00 00 // Events (Action, State, PosRotation, WeaponSync?)
00 08 14 00 // Action
F0 1F // State
A2 CA CE 44 20 3D D9 D6 01 C4 02 00 // PosRotation
41 00 02 02 // WeaponSync?
F6 CA 1F 00 00 00 00 00 00 // Footer (9 bytes)
Regarding WeaponSync I am not sure but 41 00 02 02 does not look like weapon id.


Текущее время: 08:09. Часовой пояс GMT +3.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot