RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.net.packet.out.SendString Class Reference

The OutgoingPacket that sends a string to a Players itemcontainer in the client. More...

Inheritance diagram for com.runehive.net.packet.out.SendString:
Collaboration diagram for com.runehive.net.packet.out.SendString:

Public Member Functions

boolean encode (Player player)
 SendString (Object string, int id)
 SendString (Object string, int id, boolean override)
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 int id
final boolean override
final Object string

Additional Inherited Members

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

Detailed Description

The OutgoingPacket that sends a string to a Players itemcontainer in the client.

Author
Daniel | Obey

Definition at line 14 of file SendString.java.

Constructor & Destructor Documentation

◆ SendString() [1/2]

com.runehive.net.packet.out.SendString.SendString ( Object string,
int id,
boolean override )

Definition at line 20 of file SendString.java.

20 {
21 super(126, PacketType.VAR_SHORT);
22 this.string = string;
23 this.id = id;
24 this.override = override;
25 }

References id, override, string, and com.runehive.net.packet.PacketType.VAR_SHORT.

◆ SendString() [2/2]

com.runehive.net.packet.out.SendString.SendString ( Object string,
int id )

Definition at line 27 of file SendString.java.

27 {
28 this(string, id, false);
29 }

References id, and string.

Member Function Documentation

◆ encode()

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

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

Definition at line 32 of file SendString.java.

32 {
33 if (!override) {
34 if (id != 0 && !player.playerAssistant.checkSendString(String.valueOf(string), id)) {
35 return false;
36 }
37 }
38 builder.writeString(String.valueOf(string)).writeInt(id);
39 return true;
40 }

References com.runehive.net.packet.OutgoingPacket.builder, com.runehive.game.world.entity.mob.player.PlayerAssistant.checkSendString(), override, and com.runehive.game.world.entity.mob.player.Player.playerAssistant.

Here is the call graph for this function:

Member Data Documentation

◆ id

final int com.runehive.net.packet.out.SendString.id
private

Definition at line 17 of file SendString.java.

Referenced by SendString(), and SendString().

◆ override

final boolean com.runehive.net.packet.out.SendString.override
private

Definition at line 18 of file SendString.java.

Referenced by encode(), and SendString().

◆ string

final Object com.runehive.net.packet.out.SendString.string
private

Definition at line 16 of file SendString.java.

Referenced by SendString(), and SendString().


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