RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.net.packet.OutgoingPacket Class Referenceabstract
Inheritance diagram for com.runehive.net.packet.OutgoingPacket:
Collaboration diagram for com.runehive.net.packet.OutgoingPacket:

Public Member Functions

void execute (Player player)
 OutgoingPacket (int opcode, int capacity)
 OutgoingPacket (int opcode, PacketType type)
 OutgoingPacket (int opcode, PacketType type, int size)

Protected Member Functions

abstract boolean encode (Player player)

Protected Attributes

final PacketBuilder builder

Private Attributes

final int opcode
final PacketType type

Detailed Description

Definition at line 6 of file OutgoingPacket.java.

Constructor & Destructor Documentation

◆ OutgoingPacket() [1/3]

com.runehive.net.packet.OutgoingPacket.OutgoingPacket ( int opcode,
int capacity )

Definition at line 12 of file OutgoingPacket.java.

12 {
13 this(opcode, PacketType.FIXED, capacity);
14 }

References com.runehive.net.packet.PacketType.FIXED, and opcode.

◆ OutgoingPacket() [2/3]

com.runehive.net.packet.OutgoingPacket.OutgoingPacket ( int opcode,
PacketType type )

Definition at line 16 of file OutgoingPacket.java.

16 {
17 this.opcode = opcode;
18 this.type = type;
19 this.builder = PacketBuilder.alloc();
20 }

References com.runehive.net.packet.PacketBuilder.alloc(), opcode, and type.

Here is the call graph for this function:

◆ OutgoingPacket() [3/3]

com.runehive.net.packet.OutgoingPacket.OutgoingPacket ( int opcode,
PacketType type,
int size )

Definition at line 22 of file OutgoingPacket.java.

22 {
23 this.opcode = opcode;
24 this.type = type;
25 this.builder = PacketBuilder.alloc(size, size);
26 }

References com.runehive.net.packet.PacketBuilder.alloc(), opcode, and type.

Here is the call graph for this function:

Member Function Documentation

◆ encode()

abstract boolean com.runehive.net.packet.OutgoingPacket.encode ( Player player)
abstractprotected

Reimplemented in com.runehive.net.packet.out.HintArrowClear, com.runehive.net.packet.out.HintArrowTile, com.runehive.net.packet.out.SendAddFriend, com.runehive.net.packet.out.SendAddIgnore, com.runehive.net.packet.out.SendAddObject, com.runehive.net.packet.out.SendAnnouncement, com.runehive.net.packet.out.SendBanner, com.runehive.net.packet.out.SendCameraMove, com.runehive.net.packet.out.SendCameraMovePosition, com.runehive.net.packet.out.SendCameraReset, com.runehive.net.packet.out.SendCameraShake, com.runehive.net.packet.out.SendCameraTurn, com.runehive.net.packet.out.SendCameraTurnPosition, com.runehive.net.packet.out.SendChatBoxInterface, com.runehive.net.packet.out.SendChatOption, com.runehive.net.packet.out.SendClanDetails, com.runehive.net.packet.out.SendColor, com.runehive.net.packet.out.SendConfig, com.runehive.net.packet.out.SendConstruction, com.runehive.net.packet.out.SendCoordinate, com.runehive.net.packet.out.SendEnterText, com.runehive.net.packet.out.SendEntityFeed, com.runehive.net.packet.out.SendEntityHintArrow, com.runehive.net.packet.out.SendExpCounter, com.runehive.net.packet.out.SendExpCounterSetting, com.runehive.net.packet.out.SendFadeScreen, com.runehive.net.packet.out.SendFont, com.runehive.net.packet.out.SendForceTab, com.runehive.net.packet.out.SendGameMessage, com.runehive.net.packet.out.SendGraphic, com.runehive.net.packet.out.SendGroundItem, com.runehive.net.packet.out.SendHintArrow, com.runehive.net.packet.out.SendInputAmount, com.runehive.net.packet.out.SendInputMessage, com.runehive.net.packet.out.SendInterface, com.runehive.net.packet.out.SendInterfaceAnimation, com.runehive.net.packet.out.SendInterfaceConfig, com.runehive.net.packet.out.SendInterfaceLayer, com.runehive.net.packet.out.SendInterfaceVisibility, com.runehive.net.packet.out.SendInterfaceWidget, com.runehive.net.packet.out.SendInventoryInterface, com.runehive.net.packet.out.SendItemModelOnInterface, com.runehive.net.packet.out.SendItemOnInterface, com.runehive.net.packet.out.SendItemOnInterfaceSlot, com.runehive.net.packet.out.SendItemOnInterfaceZoom, com.runehive.net.packet.out.SendKillFeed, com.runehive.net.packet.out.SendLMSFog, com.runehive.net.packet.out.SendLogout, com.runehive.net.packet.out.SendMapRegion, com.runehive.net.packet.out.SendMarquee, com.runehive.net.packet.out.SendMessage, com.runehive.net.packet.out.SendMinimapState, com.runehive.net.packet.out.SendMoveComponent, com.runehive.net.packet.out.SendMultiIcon, com.runehive.net.packet.out.SendNpcDisplay, com.runehive.net.packet.out.SendNpcHead, com.runehive.net.packet.out.SendNpcUpdate, com.runehive.net.packet.out.SendObjectAnimation, com.runehive.net.packet.out.SendPlayerDetails, com.runehive.net.packet.out.SendPlayerDialogueHead, com.runehive.net.packet.out.SendPlayerDisplay, com.runehive.net.packet.out.SendPlayerIndex, com.runehive.net.packet.out.SendPlayerOption, com.runehive.net.packet.out.SendPlayerUpdate, com.runehive.net.packet.out.SendPoison, com.runehive.net.packet.out.SendPrivateMessage, com.runehive.net.packet.out.SendPrivateMessageListStatus, com.runehive.net.packet.out.SendProgressBar, com.runehive.net.packet.out.SendProjectile, com.runehive.net.packet.out.SendProjectileTestPacket, com.runehive.net.packet.out.SendRemoveGroundItem, com.runehive.net.packet.out.SendRemoveInterface, com.runehive.net.packet.out.SendRemoveObject, com.runehive.net.packet.out.SendRunEnergy, com.runehive.net.packet.out.SendScreenMode, com.runehive.net.packet.out.SendScreenshot, com.runehive.net.packet.out.SendScrollbar, com.runehive.net.packet.out.SendSideBarInterface, com.runehive.net.packet.out.SendSkill, com.runehive.net.packet.out.SendSpecialAmount, com.runehive.net.packet.out.SendSpecialEnabled, com.runehive.net.packet.out.SendString, com.runehive.net.packet.out.SendTabBlink, com.runehive.net.packet.out.SendToggle, com.runehive.net.packet.out.SendTooltip, com.runehive.net.packet.out.SendURL, com.runehive.net.packet.out.SendWalkableInterface, com.runehive.net.packet.out.SendWidget, and com.runehive.net.packet.out.SendZoom.

Referenced by execute().

Here is the caller graph for this function:

◆ execute()

void com.runehive.net.packet.OutgoingPacket.execute ( Player player)

Definition at line 30 of file OutgoingPacket.java.

30 {
31 if (player.isBot) {
32 builder.release();
33 return;
34 }
35 if (!encode(player)) {
36 builder.release();
37 return;
38 }
39
40 if (!player.getSession().isPresent()) {
41 builder.release();
42 return;
43 }
44
45 GameSession session = player.getSession().get();
46 session.queueServerPacket(builder.toPacket(opcode, type));
47 }

References builder, encode(), com.runehive.game.world.entity.mob.player.Player.getSession(), com.runehive.game.world.entity.mob.player.Player.isBot, opcode, and type.

Referenced by com.runehive.game.world.entity.mob.movement.Movement.addPath(), com.runehive.game.world.entity.mob.movement.Movement.getNextPoint(), com.runehive.game.world.entity.mob.movement.Movement.onRegionChange(), com.runehive.game.world.entity.mob.movement.Movement.reset(), and com.runehive.game.world.entity.mob.player.Player.send().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ builder

final PacketBuilder com.runehive.net.packet.OutgoingPacket.builder
protected

Definition at line 10 of file OutgoingPacket.java.

Referenced by com.runehive.net.packet.out.HintArrowClear.encode(), com.runehive.net.packet.out.HintArrowTile.encode(), com.runehive.net.packet.out.SendAddFriend.encode(), com.runehive.net.packet.out.SendAddIgnore.encode(), com.runehive.net.packet.out.SendAddObject.encode(), com.runehive.net.packet.out.SendAnnouncement.encode(), com.runehive.net.packet.out.SendBanner.encode(), com.runehive.net.packet.out.SendCameraMove.encode(), com.runehive.net.packet.out.SendCameraMovePosition.encode(), com.runehive.net.packet.out.SendCameraShake.encode(), com.runehive.net.packet.out.SendCameraTurn.encode(), com.runehive.net.packet.out.SendCameraTurnPosition.encode(), com.runehive.net.packet.out.SendChatBoxInterface.encode(), com.runehive.net.packet.out.SendChatOption.encode(), com.runehive.net.packet.out.SendClanDetails.encode(), com.runehive.net.packet.out.SendColor.encode(), com.runehive.net.packet.out.SendConfig.encode(), com.runehive.net.packet.out.SendCoordinate.encode(), com.runehive.net.packet.out.SendEnterText.encode(), com.runehive.net.packet.out.SendEntityFeed.encode(), com.runehive.net.packet.out.SendEntityHintArrow.encode(), com.runehive.net.packet.out.SendExpCounter.encode(), com.runehive.net.packet.out.SendExpCounterSetting.encode(), com.runehive.net.packet.out.SendFadeScreen.encode(), com.runehive.net.packet.out.SendFont.encode(), com.runehive.net.packet.out.SendForceTab.encode(), com.runehive.net.packet.out.SendGameMessage.encode(), com.runehive.net.packet.out.SendGraphic.encode(), com.runehive.net.packet.out.SendGroundItem.encode(), com.runehive.net.packet.out.SendHintArrow.encode(), com.runehive.net.packet.out.SendInputAmount.encode(), com.runehive.net.packet.out.SendInputMessage.encode(), com.runehive.net.packet.out.SendInterface.encode(), com.runehive.net.packet.out.SendInterfaceAnimation.encode(), com.runehive.net.packet.out.SendInterfaceConfig.encode(), com.runehive.net.packet.out.SendInterfaceLayer.encode(), com.runehive.net.packet.out.SendInterfaceVisibility.encode(), com.runehive.net.packet.out.SendInterfaceWidget.encode(), com.runehive.net.packet.out.SendInventoryInterface.encode(), com.runehive.net.packet.out.SendItemModelOnInterface.encode(), com.runehive.net.packet.out.SendItemOnInterface.encode(), com.runehive.net.packet.out.SendItemOnInterfaceSlot.encode(), com.runehive.net.packet.out.SendItemOnInterfaceZoom.encode(), com.runehive.net.packet.out.SendKillFeed.encode(), com.runehive.net.packet.out.SendLMSFog.encode(), com.runehive.net.packet.out.SendMapRegion.encode(), com.runehive.net.packet.out.SendMarquee.encode(), com.runehive.net.packet.out.SendMessage.encode(), com.runehive.net.packet.out.SendMinimapState.encode(), com.runehive.net.packet.out.SendMoveComponent.encode(), com.runehive.net.packet.out.SendMultiIcon.encode(), com.runehive.net.packet.out.SendNpcHead.encode(), com.runehive.net.packet.out.SendNpcUpdate.encode(), com.runehive.net.packet.out.SendObjectAnimation.encode(), com.runehive.net.packet.out.SendPlayerDetails.encode(), com.runehive.net.packet.out.SendPlayerDialogueHead.encode(), com.runehive.net.packet.out.SendPlayerDisplay.encode(), com.runehive.net.packet.out.SendPlayerIndex.encode(), com.runehive.net.packet.out.SendPlayerOption.encode(), com.runehive.net.packet.out.SendPlayerUpdate.encode(), com.runehive.net.packet.out.SendPoison.encode(), com.runehive.net.packet.out.SendPrivateMessage.encode(), com.runehive.net.packet.out.SendPrivateMessageListStatus.encode(), com.runehive.net.packet.out.SendProgressBar.encode(), com.runehive.net.packet.out.SendProjectile.encode(), com.runehive.net.packet.out.SendProjectileTestPacket.encode(), com.runehive.net.packet.out.SendRemoveGroundItem.encode(), com.runehive.net.packet.out.SendRemoveInterface.encode(), com.runehive.net.packet.out.SendRemoveObject.encode(), com.runehive.net.packet.out.SendRunEnergy.encode(), com.runehive.net.packet.out.SendScreenMode.encode(), com.runehive.net.packet.out.SendScreenshot.encode(), com.runehive.net.packet.out.SendScrollbar.encode(), com.runehive.net.packet.out.SendSideBarInterface.encode(), com.runehive.net.packet.out.SendSkill.encode(), com.runehive.net.packet.out.SendSpecialAmount.encode(), com.runehive.net.packet.out.SendSpecialEnabled.encode(), com.runehive.net.packet.out.SendString.encode(), com.runehive.net.packet.out.SendTabBlink.encode(), com.runehive.net.packet.out.SendToggle.encode(), com.runehive.net.packet.out.SendTooltip.encode(), com.runehive.net.packet.out.SendURL.encode(), com.runehive.net.packet.out.SendWalkableInterface.encode(), com.runehive.net.packet.out.SendWidget.encode(), com.runehive.net.packet.out.SendZoom.encode(), and execute().

◆ opcode

final int com.runehive.net.packet.OutgoingPacket.opcode
private

Definition at line 8 of file OutgoingPacket.java.

Referenced by execute(), OutgoingPacket(), OutgoingPacket(), and OutgoingPacket().

◆ type

final PacketType com.runehive.net.packet.OutgoingPacket.type
private

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