/// <summary> /// Clones the zone with a clean regiontree. /// </summary> /// <returns>Cloned zone instance</returns> object ICloneable.Clone() { Zone b = new Zone(); b.ProsmiseLocation = this.ProsmiseLocation; b.CathelayaLocation = this.CathelayaLocation; b.RegionCode = this.RegionCode; b.Regiontree = new Regiontree(); b.Type = this.Type; b.weather = this.Weather; b.map = this.map; return b; }
public Respawn(MapObject corpse, Zone zone) { this.Tick = Environment.TickCount; this.Object = corpse; this.Zone = zone; }
protected bool TryFindZoneString(string name, out Zone zone) { object bzone; CoreService.TryFindType(name, out bzone); zone = bzone as Zone; return zone != null; }
protected void SetMembers(Zone zone, byte zoneid, HeightMap heightmap, ZoneType type, byte cathelaya_map, Point cathelaya_location, byte promise_map, Point promise_location, uint regioncode) { zone.Map = zoneid; zone.Regiontree = new Regiontree(); zone.Type = type; zone.Heightmap = heightmap; zone.CathelayaLocation = new WorldCoordinate(cathelaya_location, cathelaya_map); zone.ProsmiseLocation = new WorldCoordinate(promise_location, promise_map); zone.RegionCode = regioncode; }
/// <summary> /// Try to get the specified zone. /// </summary> /// <param name="id"></param> /// <param name="map"></param> /// <returns></returns> public bool TryGetZone(uint id, out Zone map) { return maps.TryGetValue(id, out map); }
/// <summary> /// Tries to get a cloned zone /// </summary> /// <param name="zoneid">id to find</param> /// <param name="zone">Zone to find</param> /// <returns></returns> public bool TryFindClonedZone(byte zoneid, out Zone zone) { this.TryGetZone(zoneid, out zone); zone = (Zone)((ICloneable)zone).Clone(); return zone != null; }