RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
SendObjectAnimation.java
1
package
com.osroyale.net.packet.out;
2
3
import
com.osroyale.net.codec.ByteModification;
4
import
com.osroyale.game.world.entity.mob.player.Player;
5
import
com.osroyale.game.world.object.GameObject;
6
import
com.osroyale.net.packet.OutgoingPacket;
7
29
30
public
class
SendObjectAnimation
extends
OutgoingPacket {
31
32
private
final
int
animation;
33
private
final
GameObject
object;
34
35
public
SendObjectAnimation(
int
animation,
GameObject
object
) {
36
super(160, 4);
37
this.animation = animation;
38
this.object = object;
39
}
40
41
@Override
42
public
boolean
encode(
Player
player) {
43
player.send(
new
SendCoordinate
(
object
.getPosition()));
44
builder.writeByte(0,
ByteModification
.
SUB
)
45
.writeByte((
object
.getObjectType().getId() << 2) + (
object
.getDirection().getId() & 3),
ByteModification
.
SUB
)
46
.writeShort(animation,
ByteModification
.
ADD
);
47
return
true
;
48
}
49
50
}
com.osroyale.game.world.entity.mob.player.Player
Definition
Player.java:162
com.osroyale.net.packet.out.SendCoordinate
Definition
SendCoordinate.java:29
com.osroyale.net.codec.ByteModification
Definition
ByteModification.java:33
com.osroyale.net.codec.ByteModification.SUB
SUB
Definition
ByteModification.java:53
com.osroyale.net.codec.ByteModification.ADD
ADD
Definition
ByteModification.java:43
com.osroyale.game.world.object.GameObject
Definition
GameObject.java:13