public static void RegisterLocation(MapPoint mp) { if (!mp.Internal && !Locations.Contains(mp)) { Locations.Add(mp); } }
private static void UnregisterLocation(MapPoint mp) { if (Locations.Contains(mp)) { Locations.Remove(mp); } }
public WorldChatMessage(PlayerMobile user, string text, MapPoint place, DateTime time) : this() { User = user; Text = text; Place = place; Time = time; }
public void SetLocation(MapPoint dest) { _Location = dest; }
public static DeceitBrazier FindBrazier(MapPoint p) { return FindBrazier(p.Location, p.Map); }
public RuneCodexEntry(string name, string desc, MapPoint dest) { Name = name ?? DefaultName; Description = desc ?? DefaultDescription; Location = dest; }
public override void Reset() { UseDefaults(); Location = MapPoint.Empty; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.GetVersion(); switch (version) { case 1: SpectateGate = new MapPoint(reader); goto case 0; case 0: { Map = reader.ReadMap(); BattlePriority = reader.ReadInt(); Eject = new MapPoint(reader); SpectateJoin = reader.ReadPoint3D(); BattleBounds = reader.ReadBlockList(r => r.ReadRect3D()); SpectateBounds = reader.ReadBlockList(r => r.ReadRect3D()); } break; } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.GetVersion(); switch (version) { case 1: _Name = reader.ReadString(); goto case 0; case 0: { _Description = reader.ReadString(); _Location = new MapPoint(reader); } break; } }
public MapPoint Get(int pos, int zoneId, int mapId, Mobile mob, bool reenter) { float x = mob.X; float y = mob.Y; // Hashtable hy = mob.SpawnerLink.ZoneHash; ZoneDelimiters zd = null; Hashtable continent = Continent(mapId); if (continent == null) { Console.WriteLine("Invalid mapId {0} -> DrNexus", mapId); return(null); } zd = continent[zoneId] as ZoneDelimiters; if (!(zd.Xmax + UNITSIZE > x && zd.Xmin - UNITSIZE < x && zd.Ymax + UNITSIZE > y && zd.Ymin - UNITSIZE < y)) { // Console.WriteLine( "Mob outside his zone {0} {1} [{2},{3};{4},{5}] {6}!", x, y, zd.Xmin, zd.Ymin, zd.Xmax, zd.Ymax, zoneId ); // return new MapPoint( mob.SpawnerLink.X, mob.SpawnerLink.Y, mob.SpawnerLink.Z ); return(this.NearestPoint(mob.SpawnerLink.ZoneHash, mapId, zoneId, x, y)); } if (!zd.Loaded) { Load(mapId, zoneId); } // coordx = coordx >> 2; Hashtable hy = null; hy = (Hashtable)Azeroth[mapId * 1024 + zoneId]; int coordy = (int)(y / (UNITSIZE * 0.5f)); if ((int)(coordy & 2) == 1) { x -= (UNITSIZE * 0.5f); } int coordx = (int)(x / UNITSIZE); if (hy == null) { Console.WriteLine("hy map == null for {0}/{1}", mapId, zoneId); return(null); } switch (pos) { case 0: coordy--; // if ( ( coordy & 1 ) == 0 ) coordx--; break; case 1: coordy--; // if ( ( coordy & 1 ) == 1 ) // coordx++; break; case 2: coordx++; break; case 5: coordx--; break; case 4: coordy++; // if ( ( coordy & 1 ) == 0 ) // coordx--; break; case 3: coordy++; // if ( ( coordy & 1 ) == 1 ) coordx++; break; } uint cx = (uint)coordx + 0x8000; uint cy = (uint)coordy + 0x8000; object o = hy[((uint)cx << 16) + (uint)cy]; if (o == null) { o = hy[cx + (uint)cy + 1]; if (o == null) { o = hy[cx + (uint)cy - 1]; if (o == null) { o = hy[(uint)((cx + 1) << 16) + (uint)cy]; if (o == null) { o = hy[(uint)((cx - 1) << 16) + (uint)cy]; if (o != null) { return(new MapPoint((float)--coordx * (UNITSIZE), (float)coordy * UNITSIZE * 0.5f, (float)o)); } } else { return(new MapPoint((float)++coordx * (UNITSIZE), (float)coordy * UNITSIZE * 0.5f, (float)o)); } } else { return(new MapPoint((float)coordx * (UNITSIZE), (float)--coordy * UNITSIZE * 0.5f, (float)o)); } } else { return(new MapPoint((float)coordx * (UNITSIZE), (float)++coordy * UNITSIZE * 0.5f, (float)o)); } if (reenter) { return(null); } MapPoint mp = NearestPoint(mob.SpawnerLink.ZoneHash, mapId, zoneId, x, y); return(Get(pos, zoneId, mapId, mob, true)); } return(new MapPoint((float)coordx * (UNITSIZE), (float)coordy * UNITSIZE * 0.5f, (float)o)); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); var version = reader.GetVersion(); switch (version) { case 2: NotifyPlayer = reader.ReadBool(); goto case 1; case 1: { SearchMode = reader.ReadFlag<StringSearchFlags>(); SearchCapsIgnore = reader.ReadBool(); } goto case 0; case 0: { if (version < 1) { SearchMode = StringSearchFlags.Contains; SearchCapsIgnore = true; } WhitespaceAliases = reader.ReadBlockList(r => r.ReadChar()); KeyWords = reader.ReadBlockList(r => r.ReadString()); LogEnabled = reader.ReadBool(); ConsoleWrite = reader.ReadBool(); PageStaff = reader.ReadBool(); NotifyStaff = reader.ReadBool(); NotifyAccess = reader.ReadFlag<AccessLevel>(); Jail = reader.ReadBool(); JailPoint = new MapPoint(reader); Squelch = reader.ReadBool(); Kick = reader.ReadBool(); Ban = reader.ReadBool(); } break; } }
public void EnsureDefaults() { LogEnabled = true; ConsoleWrite = true; PageStaff = true; NotifyStaff = true; NotifyAccess = AccessLevel.Counselor; HandleAccess = AccessLevel.Player; Jail = false; JailPoint = new MapPoint(Map.Felucca, new Point3D(5275, 1174, 0)); Squelch = false; Kick = false; Ban = false; SearchMode = StringSearchFlags.Contains; SearchCapsIgnore = true; WhitespaceAliases.AddRange( new[] { '_', ':', ';', '@', '#', '=', '-', '+', '*', '/', // '\\', '!', '"', '£', '$', '%', '^', '&', '"' // }); KeyWords.AddRange( new[] { "port: 2593", "port 2593", "port: 2595", "port 2595", "paypal", "no-ip", "joinuo", "uoisnotdead", "shard.li", "easyuo" }); }
protected override void EnsureConstructDefaults() { base.EnsureConstructDefaults(); TeamStats = new Dictionary<PlayerMobile, PvPTeam>(); BattleWellLoc = MapPoint.Empty; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.GetVersion(); _Axes = new Dictionary<PlayerMobile, ThrowableAxe>(); switch (version) { case 4: { ThrowableID = reader.ReadInt(); ThrowableHue = reader.ReadInt(); } goto case 3; case 3: { IncognitoMode = reader.ReadBool(); } goto case 2; case 2: { ThrowableMode = reader.ReadBool(); int count = reader.ReadInt(); if (count > 0) { for (int i = 0; i < count; i++) { var player = reader.ReadMobile<PlayerMobile>(); var axe = reader.ReadItem<ThrowableAxe>(); _Axes.Add(player, axe); } } } goto case 1; case 1: BattleWellLoc = new MapPoint(reader); goto case 0; case 0: { BattleWell = reader.ReadItem<BattleWell>(); GiveRankTrophies = reader.ReadBool(); GiveTrophies = reader.ReadBool(); NoConsume = reader.ReadBool(); PlayerStarted = reader.ReadBool(); reader.ReadString(); UseTemplates = reader.ReadBool(); UseTemplateEquipment = reader.ReadBool(); } break; } }