forked from marcosvf132/TibiaAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInspectPlayer.cs
More file actions
37 lines (32 loc) · 1022 Bytes
/
InspectPlayer.cs
File metadata and controls
37 lines (32 loc) · 1022 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
34
35
36
37
using OXGaming.TibiaAPI.Constants;
namespace OXGaming.TibiaAPI.Network.ClientPackets
{
public class InspectPlayer : ClientPacket
{
public uint PlayerId { get; set; }
public byte InspectionState { get; set; }
public InspectPlayer(Client client)
{
Client = client;
PacketType = ClientPacketType.InspectPlayer;
}
public override void ParseFromNetworkMessage(NetworkMessage message)
{
// TODO: Determine inspection states.
InspectionState = message.ReadByte();
if (InspectionState <= 5)
{
PlayerId = message.ReadUInt32();
}
}
public override void AppendToNetworkMessage(NetworkMessage message)
{
message.Write((byte)ClientPacketType.InspectPlayer);
message.Write(InspectionState);
if (InspectionState <= 5)
{
message.Write(PlayerId);
}
}
}
}