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

Public Member Functions

boolean encode (Player player)
 SendGraphic (Graphic graphic, Position position)
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 Graphic graphic
final Position position

Additional Inherited Members

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

Detailed Description

Definition at line 8 of file SendGraphic.java.

Constructor & Destructor Documentation

◆ SendGraphic()

com.runehive.net.packet.out.SendGraphic.SendGraphic ( Graphic graphic,
Position position )

Definition at line 13 of file SendGraphic.java.

13 {
14 super(4, 6);
15 this.graphic = graphic;
16 this.position = position;
17 }

References graphic, and position.

Member Function Documentation

◆ encode()

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

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

Definition at line 20 of file SendGraphic.java.

20 {
21 player.send(new SendCoordinate(position));
22 builder.writeByte(0)
23 .writeShort(graphic.getId())
24 .writeByte(position.getHeight())
25 .writeShort(graphic.getDelay());
26 return true;
27 }

References com.runehive.net.packet.OutgoingPacket.builder, graphic, position, and com.runehive.game.world.entity.mob.player.Player.send().

Here is the call graph for this function:

Member Data Documentation

◆ graphic

final Graphic com.runehive.net.packet.out.SendGraphic.graphic
private

Definition at line 10 of file SendGraphic.java.

Referenced by encode(), and SendGraphic().

◆ position

final Position com.runehive.net.packet.out.SendGraphic.position
private

Definition at line 11 of file SendGraphic.java.

Referenced by encode(), and SendGraphic().


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