RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.net.packet.out.SendPrivateMessage Class Reference
Inheritance diagram for com.runehive.net.packet.out.SendPrivateMessage:
Collaboration diagram for com.runehive.net.packet.out.SendPrivateMessage:

Public Member Functions

boolean encode (Player player)
 SendPrivateMessage (long name, PlayerRight rights, byte[] compressed)
Public Member Functions inherited from com.runehive.net.packet.OutgoingPacket
void execute (Player player)
 OutgoingPacket (int opcode, int capacity)
 OutgoingPacket (int opcode, PacketType type)
 OutgoingPacket (int opcode, PacketType type, int size)

Private Attributes

final byte[] compressed
final long name
final PlayerRight rights

Additional Inherited Members

Protected Attributes inherited from com.runehive.net.packet.OutgoingPacket
final PacketBuilder builder

Detailed Description

Definition at line 8 of file SendPrivateMessage.java.

Constructor & Destructor Documentation

◆ SendPrivateMessage()

com.runehive.net.packet.out.SendPrivateMessage.SendPrivateMessage ( long name,
PlayerRight rights,
byte[] compressed )

Definition at line 14 of file SendPrivateMessage.java.

14 {
15 super(196, PacketType.VAR_BYTE);
16 this.name = name;
17 this.rights = rights;
18 this.compressed = compressed;
19 }

References compressed, name, rights, and com.runehive.net.packet.PacketType.VAR_BYTE.

Member Function Documentation

◆ encode()

boolean com.runehive.net.packet.out.SendPrivateMessage.encode ( Player player)

Reimplemented from com.runehive.net.packet.OutgoingPacket.

Definition at line 22 of file SendPrivateMessage.java.

22 {
23 builder.writeLong(name)
24 .writeInt(player.relations.getPrivateMessageId())
25 .writeByte(rights.getCrown())
26 .writeBytes(compressed, compressed.length);
27 return true;
28 }

References com.runehive.net.packet.OutgoingPacket.builder, compressed, com.runehive.game.world.entity.mob.player.relations.PlayerRelation.getPrivateMessageId(), name, com.runehive.game.world.entity.mob.player.Player.relations, and rights.

Here is the call graph for this function:

Member Data Documentation

◆ compressed

final byte [] com.runehive.net.packet.out.SendPrivateMessage.compressed
private

Definition at line 12 of file SendPrivateMessage.java.

Referenced by encode(), and SendPrivateMessage().

◆ name

final long com.runehive.net.packet.out.SendPrivateMessage.name
private

Definition at line 10 of file SendPrivateMessage.java.

Referenced by encode(), and SendPrivateMessage().

◆ rights

final PlayerRight com.runehive.net.packet.out.SendPrivateMessage.rights
private

Definition at line 11 of file SendPrivateMessage.java.

Referenced by encode(), and SendPrivateMessage().


The documentation for this class was generated from the following file: