public TheLightOfDawn(Dictionary <string, string> args) : base(args) { QBCLog.BehaviorLoggingContext = this; try { // QuestRequirement* attributes are explained here... // http://www.thebuddyforum.com/mediawiki/index.php?title=Honorbuddy_Programming_Cookbook:_QuestId_for_Custom_Behaviors // ...and also used for IsDone processing. QuestId = GetAttributeAsNullable <int>("QuestId", false, ConstrainAs.QuestId(this), null) ?? 0; QuestRequirementComplete = GetAttributeAsNullable <QuestCompleteRequirement>("QuestCompleteRequirement", false, null, null) ?? QuestCompleteRequirement.NotComplete; QuestRequirementInLog = GetAttributeAsNullable <QuestInLogRequirement>("QuestInLogRequirement", false, null, null) ?? QuestInLogRequirement.InLog; DistanceToFollowWarlord = 45.0; Location_Battlefield = new Blackspot(new WoWPoint(2266.047, -5300.083, 89.15713), 95.0f, 10.0f); Location_WaitForBattleToComplete = new WoWPoint(2282.805, -5207.55, 82.10373).FanOutRandom(20.0); Location_WaitToChatWithDarion = new WoWPoint(2431.67, -5137.021, 83.84176).FanOutRandom(20.0); AuraId_TheMightOfMograine = 53642; } catch (Exception except) { // Maintenance problems occur for a number of reasons. The primary two are... // * Changes were made to the behavior, and boundary conditions weren't properly tested. // * The Honorbuddy core was changed, and the behavior wasn't adjusted for the new changes. // In any case, we pinpoint the source of the problem area here, and hopefully it // can be quickly resolved. QBCLog.Exception(except); IsAttributeProblem = true; } }
public BlackspotType(XElement xElement) : base(xElement) { try { var height = GetAttributeAsNullable <double>("Height", false, new ConstrainTo.Domain <double>(0.0, 10000.0), null) ?? 1.0; var location = GetAttributeAsNullable <Vector3>("", true, ConstrainAs.Vector3NonEmpty, null) ?? Vector3.Zero; var name = GetAttributeAs <string>("Name", false, ConstrainAs.StringNonEmpty, null) ?? string.Empty; var radius = GetAttributeAsNullable <double>("Radius", false, ConstrainAs.Range, null) ?? 10.0; _blackspot = new Blackspot(location, (float)radius, (float)height, CreateBlackspotName(name, location)); HandleAttributeProblem(); } catch (Exception except) { if (Query.IsExceptionReportingNeeded(except)) { QBCLog.Exception(except, "PROFILE PROBLEM with \"{0}\"", xElement.ToString()); } IsAttributeProblem = true; } }
public BlackspotType(Vector3 location, string name = "", double radius = 10.0, double height = 1.0) { _blackspot = new Blackspot(location, (float)radius, (float)height, CreateBlackspotName(name, location)); }
/// <summary> /// <p>Returns 'true', if BLACKSPOT was defined as part of a QBcore-based behavior; otherwise, 'false'.</p> /// /// <p>Not all blackspots are created equal. Please see the comments in Query.IsTargetInBlackspot() for /// a better understanding.</p> /// </summary> /// <param name="blackspot"></param> /// <returns></returns> public static bool IsQbcoreDefined(Blackspot blackspot) { return(blackspot.Name.StartsWith(QbcoreNamePrefix)); }