forked from jo3bingham/TibiaAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFeatureEvent.cs
More file actions
41 lines (35 loc) · 1.07 KB
/
FeatureEvent.cs
File metadata and controls
41 lines (35 loc) · 1.07 KB
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
34
35
36
37
38
39
40
41
using OXGaming.TibiaAPI.Constants;
namespace OXGaming.TibiaAPI.Network.ClientPackets
{
public class FeatureEvent : ClientPacket
{
public uint UnknownUInt1 { get; set; }
public byte EventType { get; set; }
public bool ShowWindow { get; set; }
public FeatureEvent(Client client)
{
Client = client;
PacketType = ClientPacketType.FeatureEvent;
}
public override void ParseFromNetworkMessage(NetworkMessage message)
{
EventType = message.ReadByte();
ShowWindow = message.ReadBool();
if (!ShowWindow)
{
// TODO
UnknownUInt1 = message.ReadUInt32();
}
}
public override void AppendToNetworkMessage(NetworkMessage message)
{
message.Write((byte)ClientPacketType.FeatureEvent);
message.Write(EventType);
message.Write(ShowWindow);
if (!ShowWindow)
{
message.Write(UnknownUInt1);
}
}
}
}