SmartTargeting automatically swaps your key bindings for "target nearest enemy" and "target nearest enemy player" when you enter/leave a battleground, arena or outdoor PvP zone (such as Wintergrasp). It's oblivious to whether you're using <tab> or any other key for targeting enemies. This addon is based on TabBinder. Another similar addon is SmartTabTarget.
The "<Entering ...>" text in the image will not be shown, it's just there to illustrate that the player entered a PvP/PvE zone,
There is not really any configuration for this addon beyond disabling notifications (see commands section below). The addon is small, uses nearly no resources at all and (should) just work out of the box.
In PvE I've set up <tab> to "target nearest enemy", and <shift-tab> to "target nearest enemy player". When I now enter Wintergrasp/Tol Barad, a battleground or an arena then these two will be swapped so <tab> will "target nearest enemy player" and <shift-tab> will "target nearest enemy".
Two slash commands have been added to the addon to allow easier control.
Command prefixes: /smarttargeting or /st
Commands: (examples using /st prefix)
/st - passing no command will force swap the current key bindings.
/st quiet - will enable/disable the notifications of key binding swaps.
- If you want to change the key bindings permanently (say, going from using TAB and SHIFT-TAB to for example T and SHIFT-T) then this must be done using the Blizzard Key Bindings UI (if this doesn't make any sense to you, you probably don't need to worry about it).
- You should not run other addons changing key bindings for targeting nearest enemy/enemy player at the same time as SmartTargeting, they may interfere with each other.
Differences from TabBinder
- SmartTargeting swaps "target nearest enemy" and "target nearest enemy player", TabBinder only sets the key bindings. This means that if you got a key binding for both targeting functions, you'll lose one of them as you move into a PvP-zone with TabBinder.
- Improved battleground detection, TabBinder had a list of battleground names, but there's a function you can use instead to detect if you're in a battleground. This means that SmartTargeting should work with new battlegrounds and while it still print messages in English, it should work with non-English clients.
- If you're in combat when you enter/leave a PvP zone, then SmartTargeting should set your bindings as soon as you leave combat (you're not allowed to change keybindings while in combat), TabBinder doesn't do this.
Differences from SmartTabTarget
- SmartTabTarget is much more customizable than SmartTargeting, although its code is also significantly larger than SmartTargeting.
- It appears that SmartTabTarget only sets what the <tab> key should target, and that it won't swap "target nearest enemy"/"target nearest enemy player" keys like SmartTargeting. This means that <tab> must be used to target enemies (which often is what most people want), and that you can't have a key to "target all enemies" while in PvP zones nor a key to "target all enemy players" while in PvE zones (you can, but it will be lost when you move between PvP/PvE zones).
- Update for 5.1.0.
- Update for 5.0.4.
- Fixed World PvP zones (Wintergrasp/Tol Barad) bugs; flagged as combat zones when no battle is in progress (i.e. Ironclad Garrison/Wintergrasp).
- Combined database entries.
- Databases will be reset.
- Re-added quieting functionality.
- Slash command to enable/disable quieting. (/st quiet).
- Update for 4.3.
- Added slash command to force swap bindings.
- Re-wrote code to hopefully optimize runtime performance as much as possible.
- Remove option to silence the addon.
- However, output has now been reduced to only give a message when bindings are swapped; removed output when bindings are stored.
- Update for 4.2.
- Updated for 4.1.
- Made it possible to turn off notification of switching key bindings for targeting.
- When user only had one key binding, addon would spam a message about setting key bindings when in a battleground, this should now be fixed.
- Removed message about not being able to change key bindings while in combat, this caused spam in some situations, especially Tol Barad.
- Should swap key bindings upon starting/ending Tol Barad battle. Currently using an event that is sent much more than necessary, but the code that checks if key bindings needs to be swapped is not CPU intensive, so it won't be noticeable. When I find a better event to listen for I'll release a new version.
- Seems like the fix in 1.3 didn't help. I've now taken a different approach that should solve the problem, but this change unfortunately means you'll have to change the key bindings using the Blizzard Key Bindings UI when you want to permanently change the key bindings. Since almost, if not all of you use the default UI for changing key bindings permanently, I believe this will not be a problem.
- When leaving a dungeon/battleground and entering a zone where the player immediately is in combat caused Smarttargeting to swap keys incorrectly. This has been attempted corrected with this release.
- Fixed a bug with binding keys being swapped around when [involuntarily] logging out in a PvP zone and reenter in a PvE zone.
- Less chance of it swapping wrong (making you target all enemies in PvP zones with preferred targeting key and only target enemy players in PvE zones with preferred targeting key).
- Initial release.
|File Name||Release Type||Game Version||Downloads||Date|
- Deadly Boss Mods
- Combat, PvP, Minigames, and Boss Encounters
- 3,901,961 Monthly Downloads
- Master Plan
- 2,352,944 Monthly Downloads
- 2,045,181 Monthly Downloads
- Achievements, Quests & Leveling, and Map & Minimap
- 1,137,271 Monthly Downloads
- Garrison Mission Manager
- 868,425 Monthly Downloads