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

Public Member Functions

boolean encode (Player player)
 SendObjectAnimation (int animation, GameObject object)
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 animation
final GameObject object

Additional Inherited Members

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

Detailed Description

Definition at line 8 of file SendObjectAnimation.java.

Constructor & Destructor Documentation

◆ SendObjectAnimation()

com.runehive.net.packet.out.SendObjectAnimation.SendObjectAnimation ( int animation,
GameObject object )

Definition at line 13 of file SendObjectAnimation.java.

13 {
14 super(160, 4);
15 this.animation = animation;
16 this.object = object;
17 }

References animation, and object.

Member Function Documentation

◆ encode()

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

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

Definition at line 20 of file SendObjectAnimation.java.

20 {
21 player.send(new SendCoordinate(object.getPosition()));
22 builder.writeByte(0, ByteModification.SUB)
23 .writeByte((object.getObjectType().getId() << 2) + (object.getDirection().getId() & 3), ByteModification.SUB)
24 .writeShort(animation, ByteModification.ADD);
25 return true;
26 }

References com.runehive.net.codec.ByteModification.ADD, animation, com.runehive.net.packet.OutgoingPacket.builder, com.runehive.game.world.entity.mob.player.Player.send(), and com.runehive.net.codec.ByteModification.SUB.

Here is the call graph for this function:

Member Data Documentation

◆ animation

final int com.runehive.net.packet.out.SendObjectAnimation.animation
private

Definition at line 10 of file SendObjectAnimation.java.

Referenced by encode(), and SendObjectAnimation().

◆ object

final GameObject com.runehive.net.packet.out.SendObjectAnimation.object
private

Definition at line 11 of file SendObjectAnimation.java.

Referenced by SendObjectAnimation().


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