forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSsqZone.cs
More file actions
48 lines (37 loc) · 1.11 KB
/
Copy pathSsqZone.cs
File metadata and controls
48 lines (37 loc) · 1.11 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
42
43
44
45
46
47
48
using L2dotNET.DataContracts.Shared.Enums;
using L2dotNET.Models.Player;
using L2dotNET.Network.serverpackets;
using L2dotNET.Tables;
namespace L2dotNET.Models.Zones.Classes
{
class SsqZone : L2Zone
{
public SsqZone(IdFactory idFactory) : base(idFactory)
{
ZoneId = idFactory.NextId();
Enabled = true;
}
public override void OnEnter(L2Object obj)
{
if (!Enabled)
return;
base.OnEnter(obj);
obj.OnEnterZoneAsync(this);
if (!(obj is L2Player))
return;
L2Player p = (L2Player)obj;
p.SendSystemMessage((SystemMessageId)Template.EnteringMessageNo);
}
public override void OnExit(L2Object obj, bool cls)
{
if (!Enabled)
return;
base.OnExit(obj, cls);
obj.OnExitZoneAsync(this, cls);
if (!(obj is L2Player))
return;
L2Player p = (L2Player)obj;
p.SendSystemMessage((SystemMessageId)Template.LeavingMessageNo);
}
}
}