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

Handles sending the progress bar data to the client. More...

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

Public Member Functions

boolean encode (Player player)
 SendProgressBar (int id, int amount)
 SendProgressBar (int id, int amount, String message)
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 amount
final int id
final String message

Additional Inherited Members

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

Detailed Description

Handles sending the progress bar data to the client.

Author
Daniel

Definition at line 12 of file SendProgressBar.java.

Constructor & Destructor Documentation

◆ SendProgressBar() [1/2]

com.runehive.net.packet.out.SendProgressBar.SendProgressBar ( int id,
int amount )

Definition at line 17 of file SendProgressBar.java.

17 {
18 this(id, amount, "");
19 }

References amount, and id.

◆ SendProgressBar() [2/2]

com.runehive.net.packet.out.SendProgressBar.SendProgressBar ( int id,
int amount,
String message )

Definition at line 21 of file SendProgressBar.java.

21 {
22 super(129, PacketType.VAR_BYTE);
23 this.id = id;
24 this.amount = amount;
25 this.message = message;
26 }

References amount, id, message, and com.runehive.net.packet.PacketType.VAR_BYTE.

Member Function Documentation

◆ encode()

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

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

Definition at line 29 of file SendProgressBar.java.

29 {
30 builder.writeInt(id)
31 .writeShort(amount)
32 .writeString(String.valueOf(message));
33 return true;
34 }

References amount, com.runehive.net.packet.OutgoingPacket.builder, and message.

Member Data Documentation

◆ amount

final int com.runehive.net.packet.out.SendProgressBar.amount
private

Definition at line 14 of file SendProgressBar.java.

Referenced by encode(), SendProgressBar(), and SendProgressBar().

◆ id

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

Definition at line 13 of file SendProgressBar.java.

Referenced by SendProgressBar(), and SendProgressBar().

◆ message

final String com.runehive.net.packet.out.SendProgressBar.message
private

Definition at line 15 of file SendProgressBar.java.

Referenced by encode(), and SendProgressBar().


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