private static void TargetFilterSetup() { TargetFilterClear(); if (Battlegrounds.IsInsideBattleground) { includeTargets = PvpIncludeTargetsFilter; removeTargets = PvpRemoveTargetsFilter; weighTargets = PvpWeighTargetsFilter; } else if (IsInGroup) { includeTargets = GroupIncludeTargetsFilter; removeTargets = GroupRemoveTargetsFilter; weighTargets = GroupWeighTargetsFilter; } else { includeTargets = SoloIncludeTargetsFilter; removeTargets = SoloRemoveTargetsFilter; weighTargets = SoloWeighTargetsFilter; } Targeting.Instance.IncludeTargetsFilter += includeTargets; Targeting.Instance.RemoveTargetsFilter += removeTargets; Targeting.Instance.WeighTargetsFilter += weighTargets; }
private static void TargetFilterClear() { if (includeTargets != null) Targeting.Instance.IncludeTargetsFilter -= includeTargets; if (removeTargets != null) Targeting.Instance.RemoveTargetsFilter -= removeTargets; if (weighTargets != null) Targeting.Instance.WeighTargetsFilter -= weighTargets; includeTargets = null; removeTargets = null; weighTargets = null; }
private static void TargetFilterClear() { if (includeTargets != null) { Targeting.Instance.IncludeTargetsFilter -= includeTargets; } if (removeTargets != null) { Targeting.Instance.RemoveTargetsFilter -= removeTargets; } if (weighTargets != null) { Targeting.Instance.WeighTargetsFilter -= weighTargets; } includeTargets = null; removeTargets = null; weighTargets = null; }