RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
SendWidget.java
1package com.osroyale.net.packet.out;
2
3import com.osroyale.game.world.entity.mob.player.Player;
4import com.osroyale.net.packet.OutgoingPacket;
5
36
37public class SendWidget extends OutgoingPacket {
38
39 private final WidgetType type;
40 private final int seconds;
41
42 public SendWidget(WidgetType type, int seconds) {
43 super(178, 3);
44 this.type = type;
45 this.seconds = seconds;
46 }
47
48 @Override
49 public boolean encode(Player player) {
50 builder.writeByte(type.icon)
51 .writeShort(seconds * 50);
52 return true;
53 }
54
55public enum WidgetType {
56 ANTI_FIRE(1),
57 VENGEANCE(2),
58 FROZEN(3),
59 TELEBLOCK(4),
60 SKULL(5),
61 CLAN(6),
62 STUN(7),
63 POISON(1);
64
65 private final int icon;
66 WidgetType(int icon) {
67 this.icon = icon;
68 }
69 }
70
71}