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

Handles sending the deposit friend packet. More...

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

Public Member Functions

 SendAddFriend (long username, int world)
 SendAddFriend (long username, int world, boolean display)
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)

Protected Member Functions

boolean encode (Player player)

Private Attributes

boolean display
final long username
int world

Additional Inherited Members

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

Detailed Description

Handles sending the deposit friend packet.

Author
Daniel

Definition at line 11 of file SendAddFriend.java.

Constructor & Destructor Documentation

◆ SendAddFriend() [1/2]

com.runehive.net.packet.out.SendAddFriend.SendAddFriend ( long username,
int world,
boolean display )

Definition at line 17 of file SendAddFriend.java.

17 {
18 super(50, 10);
19 this.username = username;
20 this.world = world;
21 this.display = display;
22 }

References display, username, and world.

◆ SendAddFriend() [2/2]

com.runehive.net.packet.out.SendAddFriend.SendAddFriend ( long username,
int world )

Definition at line 24 of file SendAddFriend.java.

24 {
25 this(username, world, true);
26 }

References username, and world.

Member Function Documentation

◆ encode()

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

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

Definition at line 29 of file SendAddFriend.java.

29 {
30 world = world != 0 ? world + 9 : world;
31 builder.writeLong(username);
32 builder.writeByte(world);
33 builder.writeByte(display ? 1 : 0);
34 return true;
35 }

References com.runehive.net.packet.OutgoingPacket.builder, display, username, and world.

Member Data Documentation

◆ display

boolean com.runehive.net.packet.out.SendAddFriend.display
private

Definition at line 15 of file SendAddFriend.java.

Referenced by encode(), and SendAddFriend().

◆ username

final long com.runehive.net.packet.out.SendAddFriend.username
private

Definition at line 13 of file SendAddFriend.java.

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

◆ world

int com.runehive.net.packet.out.SendAddFriend.world
private

Definition at line 14 of file SendAddFriend.java.

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


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