RuneHive-Game
Loading...
Searching...
No Matches
SendCameraMove.java
Go to the documentation of this file.
1package com.runehive.net.packet.out;
2
3import com.runehive.game.world.entity.mob.player.Player;
4import com.runehive.net.packet.OutgoingPacket;
5
6public class SendCameraMove extends OutgoingPacket {
7 private final int x;
8 private final int y;
9 private final int z;
10 private final int constantSpeed;
11 private final int variableSpeed;
12
13 public SendCameraMove(int x, int y, int z, int constantSpeed, int variableSpeed) {
14 super(166, 7);
15 this.x = x;
16 this.y = y;
17 this.z = z;
18 this.constantSpeed = constantSpeed;
19 this.variableSpeed = variableSpeed;
20 }
21
22 @Override
23 protected boolean encode(Player player) {
24 builder.writeByte(x);
25 builder.writeByte(y);
26 builder.writeShort(z);
27 builder.writeByte(constantSpeed);
28 builder.writeByte(variableSpeed);
29 return true;
30 }
31}
This class represents a character controlled by a player.
Definition Player.java:125
OutgoingPacket(int opcode, int capacity)
SendCameraMove(int x, int y, int z, int constantSpeed, int variableSpeed)