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

Sends experience to the client's experience counter. More...

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

Public Member Functions

boolean encode (Player player)
 SendExpCounter (int experience)
 SendExpCounter (int skill, int experience, boolean counter)
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 boolean counter
final int experience
final int skill

Additional Inherited Members

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

Detailed Description

Sends experience to the client's experience counter.

Author
Michael | Chex

Definition at line 11 of file SendExpCounter.java.

Constructor & Destructor Documentation

◆ SendExpCounter() [1/2]

com.runehive.net.packet.out.SendExpCounter.SendExpCounter ( int skill,
int experience,
boolean counter )

Definition at line 17 of file SendExpCounter.java.

17 {
18 super(127, 6);
19 this.skill = skill;
20 this.experience = experience;
21 this.counter = counter;
22 }

References counter, experience, and skill.

◆ SendExpCounter() [2/2]

com.runehive.net.packet.out.SendExpCounter.SendExpCounter ( int experience)

Definition at line 24 of file SendExpCounter.java.

24 {
25 this(99, experience, true);
26 }

References experience.

Member Function Documentation

◆ encode()

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

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

Definition at line 29 of file SendExpCounter.java.

29 {
30 builder.writeByte(skill)
31 .writeInt(experience)
32 .writeByte(counter ? 1 : 0);
33 return true;
34 }

References com.runehive.net.packet.OutgoingPacket.builder, counter, experience, and skill.

Member Data Documentation

◆ counter

final boolean com.runehive.net.packet.out.SendExpCounter.counter
private

Definition at line 15 of file SendExpCounter.java.

Referenced by encode(), and SendExpCounter().

◆ experience

final int com.runehive.net.packet.out.SendExpCounter.experience
private

Definition at line 14 of file SendExpCounter.java.

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

◆ skill

final int com.runehive.net.packet.out.SendExpCounter.skill
private

Definition at line 13 of file SendExpCounter.java.

Referenced by encode(), and SendExpCounter().


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