1package com.osroyale.net.packet.out;
3import com.osroyale.game.world.entity.mob.player.Player;
4import com.osroyale.game.world.position.Position;
5import com.osroyale.net.packet.OutgoingPacket;
8 private final Position position;
9 private final Position offsetX, offsetY;
10 private int lockon, gfxMoving, startHeight, endHeight, time, speed, angle, creatorSize, startDistanceOffset;
12 public SendProjectileTestPacket(Position position, Position offset,
13 int angle,
int speed,
int gfxMoving,
int startHeight,
int endHeight,
14 int lockon,
int time,
int creatorSize,
int startDistanceOffset) {
16 this.position = position;
17 this.offsetY = offset;
18 this.offsetX = offset;
20 this.gfxMoving = gfxMoving;
21 this.startHeight = startHeight;
22 this.endHeight = endHeight;
26 this.creatorSize = creatorSize;
27 this.startDistanceOffset = startDistanceOffset;
31 public boolean encode(Player player) {
32 player.send(
new SendCoordinate(position));
35 .writeByte(offsetY.getY())
36 .writeByte(offsetY.getX())
38 .writeShort(gfxMoving)
39 .writeByte(startHeight)
44 .writeByte((creatorSize * 64) + (startDistanceOffset * 64));