// 30May2013-08:11UTC chinajade public static List <string> CheckCore( WoWObject wowObject, QuestBehaviorBase coreAttributes) { var exclusionReasons = new List <string>(); const BlacklistFlags interestingBlacklistFlags = BlacklistFlags.Combat | BlacklistFlags.Interact | BlacklistFlags.Pull; if (!Query.IsViable(wowObject)) { exclusionReasons.Add("[NotViable]"); return(exclusionReasons); } foreach (var blacklistEntry in Blacklist.GetEntries(wowObject.Guid)) { if ((blacklistEntry.Flags & interestingBlacklistFlags) == 0) { continue; } var blacklistInfo = new List <string>(); var blacklistTimeRemaining = blacklistEntry.Started + blacklistEntry.Length - DateTime.Now; blacklistInfo.Add(string.Format("Time({0}/{1})", Utility.PrettyTime(blacklistTimeRemaining), Utility.PrettyTime(blacklistEntry.Length))); if (blacklistEntry.Flags.HasFlag(BlacklistFlags.Combat)) { blacklistInfo.Add("ForCombat"); } if (blacklistEntry.Flags.HasFlag(BlacklistFlags.Interact)) { blacklistInfo.Add("ForInteract"); } if (blacklistEntry.Flags.HasFlag(BlacklistFlags.Loot)) { blacklistInfo.Add("ForLoot"); } if (blacklistEntry.Flags.HasFlag(BlacklistFlags.Node)) { blacklistInfo.Add("ForNode"); } if (blacklistEntry.Flags.HasFlag(BlacklistFlags.Pull)) { blacklistInfo.Add("ForPull"); } exclusionReasons.Add(string.Format("Blacklisted({0})", string.Join(",", blacklistInfo))); } if (!Query.IsStateMatch_IgnoreMobsInBlackspots(wowObject, coreAttributes.IgnoreMobsInBlackspots)) { var coveringBlackspots = from blackspot in Query.FindCoveringBlackspots(wowObject.Location) select string.Format("Blackspot({0}, r:{1})", blackspot.Location, blackspot.Radius); exclusionReasons.Add(string.Format("InBlackspot(object @{0}; {1})", wowObject.Location, string.Join(", ", coveringBlackspots))); } if (!Query.IsStateMatch_MeshNavigable(wowObject, coreAttributes.MovementBy)) { exclusionReasons.Add("NotMeshNavigable"); } if (Query.IsInCompetition(wowObject, coreAttributes.NonCompeteDistance)) { int playerCount = Query.FindPlayersNearby(wowObject.Location, coreAttributes.NonCompeteDistance).Count(); if (playerCount > 0) { exclusionReasons.Add(string.Format("InCompetition({0} players within {1:F1}, expires in {2})", playerCount, coreAttributes.NonCompeteDistance, Utility.PrettyTime(Query.InCompetitionTimeRemaining(wowObject)))); } var wowUnit = wowObject.ToUnit(); bool isTagged = (wowUnit != null) && !Query.IsSharedWorldResource(wowUnit) && !wowUnit.IsUntagged(); if (isTagged) { exclusionReasons.Add("TaggedByOtherPlayer"); } } return(exclusionReasons); }