public override void OnRegister() { for (var index = 0; index < _GuardLocs.Length; index++) { Point3D p = _GuardLocs[index]; IPooledEnumerable eable = Map.GetMobilesInRange(p, 0); bool empty = true; foreach (object m in eable) { if (m is KhaldunCampGuard) { empty = false; break; } } eable.Free(); if (empty) { KhaldunCampGuard guard = new KhaldunCampGuard(); guard.MoveToWorld(p, Map); } } for (int i = 0; i < _BlockerLocs.Length; i++) { for (var index = 0; index < _BlockerLocs[i].Length; index++) { Point3D p = _BlockerLocs[i][index]; IPooledEnumerable eable = Map.GetItemsInRange(p, 0); bool empty = true; foreach (object m in eable) { if (m is KhaldunCampBlocker) { empty = false; break; } } eable.Free(); if (empty) { KhaldunCampBlocker blocker = new KhaldunCampBlocker(i); blocker.MoveToWorld(p, Map); } } } }
public override void OnRegister() { foreach (var p in _GuardLocs) { IPooledEnumerable eable = Map.GetMobilesInRange(p, 0); bool empty = true; foreach (var m in eable) { if (m is KhaldunCampGuard) { empty = false; break; } } eable.Free(); if (empty) { var guard = new KhaldunCampGuard(); guard.MoveToWorld(p, Map); } } for (int i = 0; i < _BlockerLocs.Length; i++) { foreach (var p in _BlockerLocs[i]) { IPooledEnumerable eable = Map.GetItemsInRange(p, 0); bool empty = true; foreach (var m in eable) { if (m is KhaldunCampBlocker) { empty = false; break; } } eable.Free(); if (empty) { var blocker = new KhaldunCampBlocker(i); blocker.MoveToWorld(p, Map); } } } }