forked from marcosvf132/TibiaAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBottomRow.cs
More file actions
31 lines (27 loc) · 980 Bytes
/
BottomRow.cs
File metadata and controls
31 lines (27 loc) · 980 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
using OXGaming.TibiaAPI.Constants;
namespace OXGaming.TibiaAPI.Network.ServerPackets
{
public class BottomRow : Map
{
private const int MapSizeX = 18;
private const int MapSizeY = 14;
public BottomRow(Client client)
{
Client = client;
PacketType = ServerPacketType.BottomRow;
}
public override void ParseFromNetworkMessage(NetworkMessage message)
{
var position = Client.WorldMapStorage.GetPosition();
position.Y++;
Client.WorldMapStorage.SetPosition(position.X, position.Y, position.Z);
Client.WorldMapStorage.ScrollMap(0, -1);
message.ReadArea(0, MapSizeY - 1, MapSizeX - 1, MapSizeY - 1, Fields);
}
public override void AppendToNetworkMessage(NetworkMessage message)
{
message.Write((byte)ServerPacketType.BottomRow);
base.AppendToNetworkMessage(message);
}
}
}