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

Classes

enum  WidgetType

Public Member Functions

boolean encode (Player player)
 SendWidget (WidgetType type, int seconds)
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 seconds
final WidgetType type

Additional Inherited Members

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

Detailed Description

Definition at line 6 of file SendWidget.java.

Constructor & Destructor Documentation

◆ SendWidget()

com.runehive.net.packet.out.SendWidget.SendWidget ( WidgetType type,
int seconds )

Definition at line 11 of file SendWidget.java.

11 {
12 super(178, 3);
13 this.type = type;
14 this.seconds = seconds;
15 }

References seconds, and type.

Member Function Documentation

◆ encode()

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

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

Definition at line 18 of file SendWidget.java.

18 {
19 builder.writeByte(type.icon)
20 .writeShort(seconds * 50);
21 return true;
22 }

References com.runehive.net.packet.OutgoingPacket.builder, seconds, and type.

Member Data Documentation

◆ seconds

final int com.runehive.net.packet.out.SendWidget.seconds
private

Definition at line 9 of file SendWidget.java.

Referenced by encode(), and SendWidget().

◆ type

final WidgetType com.runehive.net.packet.out.SendWidget.type
private

Definition at line 8 of file SendWidget.java.

Referenced by encode(), and SendWidget().


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