forked from jo3bingham/TibiaAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreatureLight.cs
More file actions
33 lines (28 loc) · 952 Bytes
/
CreatureLight.cs
File metadata and controls
33 lines (28 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using OXGaming.TibiaAPI.Constants;
namespace OXGaming.TibiaAPI.Network.ServerPackets
{
public class CreatureLight : ServerPacket
{
public uint CreatureId { get; set; }
public byte Brightness { get; set; }
public byte LightColor { get; set; }
public CreatureLight(Client client)
{
Client = client;
PacketType = ServerPacketType.CreatureLight;
}
public override void ParseFromNetworkMessage(NetworkMessage message)
{
CreatureId = message.ReadUInt32();
Brightness = message.ReadByte();
LightColor = message.ReadByte();
}
public override void AppendToNetworkMessage(NetworkMessage message)
{
message.Write((byte)ServerPacketType.CreatureLight);
message.Write(CreatureId);
message.Write(Brightness);
message.Write(LightColor);
}
}
}