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

Shows the flashing yellow hint arrow pointing at a world tile (317 opcode 254, type=2). More...

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

Public Member Functions

 HintArrowTile (Position pos)
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

final Position pos

Static Private Attributes

static final int OPCODE = 254

Additional Inherited Members

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

Detailed Description

Shows the flashing yellow hint arrow pointing at a world tile (317 opcode 254, type=2).

Definition at line 8 of file HintArrowTile.java.

Constructor & Destructor Documentation

◆ HintArrowTile()

com.runehive.net.packet.out.HintArrowTile.HintArrowTile ( Position pos)

Definition at line 13 of file HintArrowTile.java.

13 {
14 // 1(type) + 2(x) + 2(y) + 1(z) = 6
15 super(OPCODE, /*capacity*/ 6);
16 this.pos = pos;
17 }

References OPCODE, and pos.

Member Function Documentation

◆ encode()

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

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

Definition at line 20 of file HintArrowTile.java.

20 {
21 builder.writeByte(2); // type=2 (tile location - right on coordinates)
22 builder.writeShort(pos.getX()); // absolute world X
23 builder.writeShort(pos.getY()); // absolute world Y
24 builder.writeByte(40); // height offset in pixels (40 = lower height)
25 return true;
26 }

References com.runehive.net.packet.OutgoingPacket.builder, and pos.

Member Data Documentation

◆ OPCODE

final int com.runehive.net.packet.out.HintArrowTile.OPCODE = 254
staticprivate

Definition at line 10 of file HintArrowTile.java.

Referenced by HintArrowTile().

◆ pos

final Position com.runehive.net.packet.out.HintArrowTile.pos
private

Definition at line 11 of file HintArrowTile.java.

Referenced by encode(), and HintArrowTile().


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