// Empty, for now #endregion #region Overrides of CustomForcedBehavior public override void OnStart() { // Hunting ground processing... // NB: We had to defer this processing from the constructor, because XElement isn't available // to parse child XML nodes until OnStart() is called. HuntingGrounds = HuntingGroundsType.GetOrCreate(Element, "HuntingGrounds", HuntingGroundCenter); IsAttributeProblem |= HuntingGrounds.IsAttributeProblem; // Let QuestBehaviorBase do basic initializaion of the behavior, deal with bad or deprecated attributes, // capture configuration state, install BT hooks, etc. This will also update the goal text. OnStart_QuestBehaviorCore( string.Format("Using {0} on {1}", GetItemNameFromId(ItemId), string.Join(", ", MobIds.Select(m => GetMobNameFromId(m)).Distinct()))); // If the quest is complete, this behavior is already done... // So we don't want to falsely inform the user of things that will be skipped. if (!IsDone) { ItemToUse = Me.CarriedItems.FirstOrDefault(i => (i.Entry == ItemId)); if (ItemToUse == null) { LogError("[PROFILE ERROR] Unable to locate in our bags", GetItemNameFromId(ItemId)); TreeRoot.Stop(); BehaviorDone(); } CurrentHuntingGroundWaypoint = HuntingGrounds.FindFirstWaypoint(Me.Location); } }
public override void OnStart() { // Let QuestBehaviorBase do basic initializaion of the behavior, deal with bad or deprecated attributes, // capture configuration state, install BT hooks, etc. This will also update the goal text. var isBehaviorShouldRun = OnStart_QuestBehaviorCore( string.Format("Using {0} on {1}", Utility.GetItemNameFromId(ItemId), string.Join(", ", MobIds.Select(m => Utility.GetObjectNameFromId(m)).Distinct()))); // If the quest is complete, this behavior is already done... // So we don't want to falsely inform the user of things that will be skipped. if (isBehaviorShouldRun) { _waitTimerAfterUsingItem.WaitTime = TimeSpan.FromMilliseconds(WaitTimeAfterItemUse); } }