Ejemplo n.º 1
0
 internal static bool IsBattlegroundMap(this WowMapId map)
 {
     return(map == WowMapId.AlteracValley ||
            map == WowMapId.WarsongGulch ||
            map == WowMapId.ArathiBasin ||
            map == WowMapId.EyeOfTheStorm ||
            map == WowMapId.StrandOfTheAncients);
 }
Ejemplo n.º 2
0
 public InteractableObject(int entryId, WowMapId mapId, WowZoneId zoneId, Vector3 position,
                           InteractableObjectType objectType, MailboxFactionType factionType = MailboxFactionType.None)
 {
     EntryId     = entryId;
     MapId       = mapId;
     ZoneId      = zoneId;
     Position    = position;
     ObjectType  = objectType;
     FactionType = factionType;
 }
Ejemplo n.º 3
0
 public Npc(string name, int entryId, WowMapId mapId, WowZoneId zoneId, Vector3 position,
            NpcType type, NpcSubType subType = NpcSubType.None)
 {
     Name     = name;
     EntryId  = entryId;
     MapId    = mapId;
     ZoneId   = zoneId;
     Position = position;
     Type     = type;
     SubType  = subType;
 }
Ejemplo n.º 4
0
        public bool TryGetPointsOfInterest(WowMapId mapId, PoiType poiType, Vector3 position, float maxRadius, out IEnumerable <Vector3> nodes)
        {
            KeyValuePair <WowMapId, PoiType> KeyValuePair = new(mapId, poiType);

            if (PointsOfInterest.ContainsKey(mapId) &&
                PointsOfInterest[mapId].ContainsKey(poiType))
            {
                nodes = PointsOfInterest[mapId][poiType].Where(e => e.GetDistance(position) < maxRadius);
                return(nodes.Any());
            }

            nodes = null;
            return(false);
        }
Ejemplo n.º 5
0
        internal static bool IsDungeonMap(this WowMapId map)
        {
            return(map == WowMapId.RagefireChasm ||
                   map == WowMapId.WailingCaverns ||
                   map == WowMapId.Deadmines ||
                   map == WowMapId.ShadowfangKeep ||
                   map == WowMapId.StormwindStockade

                   || map == WowMapId.HellfireRamparts ||
                   map == WowMapId.TheBloodFurnace ||
                   map == WowMapId.TheSlavePens ||
                   map == WowMapId.TheUnderbog ||
                   map == WowMapId.TheSteamvault

                   || map == WowMapId.UtgardeKeep ||
                   map == WowMapId.AzjolNerub);
        }
Ejemplo n.º 6
0
        public IDungeonProfile TryGetProfileByMapId(WowMapId mapId)
        {
            return(mapId switch
            {
                WowMapId.RagefireChasm => new RagefireChasmProfile(),
                WowMapId.WailingCaverns => new WailingCavernsProfile(),
                WowMapId.Deadmines => new DeadminesProfile(),
                WowMapId.ShadowfangKeep => new ShadowfangKeepProfile(),
                WowMapId.StormwindStockade => new StockadeProfile(),

                WowMapId.HellfireRamparts => new HellfireRampartsProfile(),
                WowMapId.TheBloodFurnace => new TheBloodFurnaceProfile(),
                WowMapId.TheSlavePens => new TheSlavePensProfile(),
                WowMapId.TheUnderbog => new TheUnderbogProfile(),
                WowMapId.TheSteamvault => new TheSteamvaultProfile(),

                WowMapId.UtgardeKeep => new UtgardeKeepProfile(),
                WowMapId.AzjolNerub => new AzjolNerubProfile(),

                _ => null
            });
Ejemplo n.º 7
0
 public void CachePoi(WowMapId mapId, PoiType poiType, Vector3 position)
 {
     if (!PointsOfInterest.ContainsKey(mapId))
     {
         PointsOfInterest.TryAdd(mapId, new Dictionary <PoiType, List <Vector3> >()
         {
             { poiType, new List <Vector3>()
               {
                   position
               } }
         });
     }
     else if (!PointsOfInterest[mapId].ContainsKey(poiType))
     {
         PointsOfInterest[mapId].Add(poiType, new List <Vector3>()
         {
             position
         });
     }
     else if (!PointsOfInterest[mapId][poiType].Any(e => e == position))
     {
         PointsOfInterest[mapId][poiType].Add(position);
     }
 }
Ejemplo n.º 8
0
 public void CacheOre(WowMapId mapId, WowOreId displayId, Vector3 position)
 {
     if (!OreNodes.ContainsKey(mapId))
     {
         OreNodes.TryAdd(mapId, new Dictionary <WowOreId, List <Vector3> >()
         {
             { displayId, new List <Vector3>()
               {
                   position
               } }
         });
     }
     else if (!OreNodes[mapId].ContainsKey(displayId))
     {
         OreNodes[mapId].Add(displayId, new List <Vector3>()
         {
             position
         });
     }
     else if (!OreNodes[mapId][displayId].Any(e => e == position))
     {
         OreNodes[mapId][displayId].Add(position);
     }
 }
Ejemplo n.º 9
0
 /// <inheritdoc cref="IStaticDeathRoute.IsUseable(WowMapId, Vector3, Vector3)"/>
 public bool IsUseable(WowMapId mapId, Vector3 start, Vector3 end)
 {
     return(mapId == WowMapId.Northrend && ((start.GetDistance(Path[0]) < 4.0f && end.GetDistance(Path[^ 1]) < 4.0f) || end.GetDistance2D(DeathPoint) < 5.0f));