RuneHive-Game
Loading...
Searching...
No Matches
SendLMSFog.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 SendLMSFog extends OutgoingPacket {
7
8 private final boolean enable;
9 private final int fogStrength;
10
11 public SendLMSFog(int fogStrength) {
12 super(116, 5);
13 this.enable = true;
14 this.fogStrength = fogStrength;
15 }
16
17 public SendLMSFog(boolean enable) {
18 super(116, 5);
19 this.enable = enable;
20 this.fogStrength = 0;
21 }
22
23 @Override
24 protected boolean encode(Player player) {
25 builder.writeByte(enable ? 1 : 0).writeInt(fogStrength);
26 return true;
27 }
28}
This class represents a character controlled by a player.
Definition Player.java:125
OutgoingPacket(int opcode, int capacity)