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

Public Member Functions

boolean encode (Player player)
 SendNpcHead (int npcId, int interfaceId)
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 interfaceId
final int npcId

Additional Inherited Members

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

Detailed Description

Definition at line 8 of file SendNpcHead.java.

Constructor & Destructor Documentation

◆ SendNpcHead()

com.runehive.net.packet.out.SendNpcHead.SendNpcHead ( int npcId,
int interfaceId )

Definition at line 13 of file SendNpcHead.java.

13 {
14 super(75, 4);
15 this.npcId = npcId;
16 this.interfaceId = interfaceId;
17 }

References interfaceId, and npcId.

Member Function Documentation

◆ encode()

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

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

Definition at line 20 of file SendNpcHead.java.

20 {
21 builder.writeShort(npcId, ByteModification.ADD, ByteOrder.LE)
22 .writeShort(interfaceId, ByteModification.ADD, ByteOrder.LE);
23 return true;
24 }

References com.runehive.net.codec.ByteModification.ADD, com.runehive.net.packet.OutgoingPacket.builder, interfaceId, com.runehive.net.codec.ByteOrder.LE, and npcId.

Member Data Documentation

◆ interfaceId

final int com.runehive.net.packet.out.SendNpcHead.interfaceId
private

Definition at line 11 of file SendNpcHead.java.

Referenced by encode(), and SendNpcHead().

◆ npcId

final int com.runehive.net.packet.out.SendNpcHead.npcId
private

Definition at line 10 of file SendNpcHead.java.

Referenced by encode(), and SendNpcHead().


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