#region Summary and Documentation
// QUICK DOX:
// This behavior locates MOBID on the HUNTINGGROUNDS. Once the mob is located,
// the behavior will:
// 1) Target the mob,
// 2) Close to within MOVEWITHMAXRANGEOFMOB
// 3) Terminate (with the target still selected)
//
// If the requested mob(s) could not be locate, the toon's "current target" is cleared.
// This enables the profile writer to conditionally perform subsequent actions
// similar to the following:
// <If Condition="(Me.CurrentTarget != null) && (Me.CurrentTarget.Entry == 12345)">
// <!-- whatever -->
//
// The behavior is necessary because there is no locale-independent method of
// selecting a target in the WoWclient LUA.
//
// BEHAVIOR ATTRIBUTES:
// *** ALSO see the documentation in QuestBehaviorBase.cs. All of the attributes it provides
// *** are available here, also. The documentation on the attributes QuestBehaviorBase provides
// *** is _not_ repeated here, to prevent documentation inconsistencies.
//
// Basic Attributes:
// MobIdN [at least one FactionIdN or one MobIdN is REQUIRED]
// Identifies the mobs on which the targeting should take place.
// The MobIdN can represent either an NPC (WoWUnit).
// Although a MobIdN can specify a WoWObject, WoWObjects are not
// targetable by the WoWclient.
//
// Optional Target Qualifiers:
// [COLOR="#FF0000"]TargetOnlyIfHealthPercentAbove [optional; Default: 0.0]
// This attribute qualifies a target that fulfills the MobIdN selection.
// The target must have a HealthPercent AT or ABOVE the value specified
// for this attribute to be considered a qualified target.
// TargetOnlyIfHealthPercentBelow [optional; Default: 100.0]
// This attribute qualifies a target that fulfills the MobIdN selection.
// The target must have a HealthPercent AT or BELOW the value specified
// for this attribute to be considered a qualified target.[/COLOR]
// TargetOnlyIfMobHasAuraIdN [optional; Default: none]
// This attribute qualifies a target that fullfills the MobIdN or FactionIdN selection.
// The target *must* possess an aura that matches one of the defined
// TargetOnlyIfMobHasAuraIdN, in order to be considered a qualified target.
// TargetOnlyIfMobMissingAuraIdN [optional; Default: none]
// This attribute qualifies a target that fullfills the MobIdN or FactionIdN selection.
// The target must *not* possess an aura that matches one of the defined
// TargetOnlyIfMobMissingAuraIdN, in order to be considered a qualified target.
//
// Tunables:
// IgnoreLoSToTarget [optional; Default: false]
// If true, the behavior will not consider Line of Sight when trying to interact
// with the selected target.
// MoveWithinMaxRangeOfMob [optional; Default: 30.0]
// Defines the maximum range at which the toon should be from the selected target
// before the behavior terminates.
// If the toon is out of range, the toon will be moved within this distance
// of the mob.
// WaitForNpcs [optional; Default: true]
// This value affects what happens if there are no MobIds in the immediate area.
// If true, the behavior will move to the next hunting ground waypoint, or if there
// is only one waypoint, the behavior will stand and wait for MobIdN to respawn.
// If false, and the behavior cannot locate MobIdN in the immediate area, the behavior
// considers itself complete.
// X/Y/Z [optional; Default: toon's current location when behavior is started]
// This specifies the location where the toon should loiter
// while waiting to interact with MobIdN. If you need a large hunting ground
// you should prefer using the <HuntingGrounds> sub-element, as it allows for
// multiple locations (waypoints) to visit.
// This value is automatically converted to a <HuntingGrounds> waypoint.
//
// BEHAVIOR EXTENSION ELEMENTS (goes between <CustomBehavior ...> and </CustomBehavior> tags)
// See the "Examples" section for typical usage.
// HuntingGrounds [optional; Default: none]
// The HuntingGrounds contains a set of Waypoints we will visit to seek mobs
// that fulfill the quest goal. The <HuntingGrounds> element accepts the following
// attributes:
// WaypointVisitStrategy= [optional; Default: Random]
// [Allowed values: InOrder, PickOneAtRandom, Random]
// Determines the strategy that should be employed to visit each waypoint.
// Any mobs encountered while traveling between waypoints will be considered
// viable. The Random strategy is highly recommended unless there is a compelling
// reason to otherwise. The Random strategy 'spread the toons out', if
// multiple bos are running the same quest.
// The PickOneAtRandom strategy will only visit one waypoint on the list
// and camp the mobs from the single selected waypoint. This is another good tactic
// for spreading toons out in heavily populated areas.
// Each Waypoint is provided by a <Hotspot ... /> element with the following
// attributes:
// Name [optional; Default: X/Y/Z location of the waypoint]
// The name of the waypoint is presented to the user as it is visited.
// This can be useful for debugging purposes, and for making minor adjustments
// (you know which waypoint to be fiddling with).
// X/Y/Z [REQUIRED; Default: none]
// The world coordinates of the waypoint.
// Radius [optional; Default: 10.0]
// Once the toon gets within Radius of the waypoint, the next waypoint
// will be sought.
//
// THINGS TO KNOW:
// * Profiles do not run while in combat!
// Thus, this behavior is only useful when you can arrange to run it in out-of-combat
// situations.
//
// * Watch your PullDistance!
// Consider the following unexpected scenario with a typical pull distance of 25...
// 1) The behavior runs, locates target 12345, moves to within 30 yards, and terminates
// 2) Honorbuddy decides to 'pull' a mob at 25 yards, and changes the target that
// was just chosen
// 3) Honorbuddy kills the selected target, and may leave the dead mob selected,
// or it may clear the target.
// 4) Honorbuddy runs the next statement in the profile, but the mob is not the
// one that was selected by the behavior, thus the <If> yields unexpected results.
//
#endregion
#region Examples
// EXAMPLE:
// <CustomBehavior File="TargetAndMoveToMob" MobId="12345" >
// <HuntingGrounds>
// <Hotspot X="123.0" Y="234.0" Z="345.0" />
// <Hotspot X="543.0" Y="432.0" Z="321.0" />
// </HuntingGrounds>
// </CustomBehavior>
// <If Condition="(Me.CurrentTarget != null) && (Me.CurrentTarget.Entry == 12345)">
// <!-- ...do something with selected target... -->
// </If>