RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
SendGameMessage.java
1package com.osroyale.net.packet.out;
2
3import com.osroyale.net.packet.OutgoingPacket;
4import com.osroyale.net.packet.PacketType;
5import com.osroyale.game.world.entity.mob.player.Player;
6
35
36public class SendGameMessage extends OutgoingPacket {
37
38 private final int id;
39 private final int time;
40 private final Object context;
41
42 public SendGameMessage(int id, int time, Object context) {
43 super(114, PacketType.VAR_BYTE);
44 this.id = id;
45 this.time = time;
46 this.context = context;
47 }
48
49 @Override
50 public boolean encode(Player player) {
51 builder.writeShort(id).writeShort(time * 3000)
52 .writeString(String.valueOf(context));
53 return true;
54 }
55
56}