forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppearing.cs
More file actions
41 lines (33 loc) · 1.03 KB
/
Copy pathAppearing.cs
File metadata and controls
41 lines (33 loc) · 1.03 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 System;
using System.Threading.Tasks;
using L2dotNET.Models.Player;
using L2dotNET.Network.serverpackets;
namespace L2dotNET.Network.clientpackets
{
class Appearing : PacketBase
{
private readonly GameClient _client;
public Appearing(IServiceProvider serviceProvider, Packet packet, GameClient client) : base(serviceProvider)
{
_client = client;
}
public override async Task RunImpl()
{
await Task.Run(() =>
{
L2Player player = _client.CurrentPlayer;
int x = player.X;
int y = player.Y;
if (player.Obsx != -1)
{
x = player.Obsx;
y = player.Obsy;
}
player.SendPacketAsync(new UserInfo(player));
player.ValidateVisibleObjects(x, y, false);
player.UpdateVisibleStatus();
player.SendActionFailedAsync();
});
}
}
}