forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathL2SpawnZone.cs
More file actions
57 lines (42 loc) · 1.47 KB
/
Copy pathL2SpawnZone.cs
File metadata and controls
57 lines (42 loc) · 1.47 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
49
50
51
52
53
54
55
56
57
using System.Collections.Generic;
using L2dotNET.Utility.Geometry;
namespace L2dotNET.Models.Zones
{
public class L2SpawnZone : L2ZoneType
{
private List<Location> _spawnLocs;
private List<Location> _chaoticSpawnLocs;
public L2SpawnZone(int id) : base(id) { }
public void AddSpawn(int x, int y, int z)
{
if (_spawnLocs == null)
_spawnLocs = new List<Location>();
_spawnLocs.Add(new Location(x, y, z));
}
public void AddChaoticSpawn(int x, int y, int z)
{
if (_chaoticSpawnLocs == null)
_chaoticSpawnLocs = new List<Location>();
_chaoticSpawnLocs.Add(new Location(x, y, z));
}
public List<Location> GetSpawns()
{
return _spawnLocs;
}
public Location GetSpawnLoc()
{
return (Location)Rnd.Get(_spawnLocs);
}
public Location GetChaoticSpawnLoc()
{
if (_chaoticSpawnLocs != null)
return (Location)Rnd.Get(_chaoticSpawnLocs);
return GetSpawnLoc();
}
public override void SetParameter(string name, string value) { }
public override void OnDieInside(L2Character character) { }
public override void OnReviveInside(L2Character character) { }
protected override void OnEnter(L2Character character) { }
protected override void OnExit(L2Character character) { }
}
}