Go Back   WowAce Forums > Official Addon Threads > General AddOns
General AddOns Authors, post your release ready addons here to get feedback or just to let everyone know about it.

Reply
 
Thread Tools
Old 08-01-2011   #1
kunda
Senior Member
 
Join Date: Oct 2006
Posts: 464
Default BattlegroundTargets

http://www.wowace.com/addons/battlegroundtargets/

Code:
-- -------------------------------------------------------------------------- --
-- BattlegroundTargets by kunda                                               --
-- -------------------------------------------------------------------------- --
--                                                                            --
-- BattlegroundTargets is a World of Warcraft AddOn.                          --
-- BattlegroundTargets is a 'Enemy Unit Frame' for battlegrounds.             --
-- BattlegroundTargets is not a 'real' (Enemy) Unit Frame.                    --
-- BattlegroundTargets simply generates buttons with target macros.           --
--                                                                            --
-- Features:                                                                  --
-- # Shows all battleground enemies with role, class and name.                --
--   - Left-click : set target                                                --
--   - Right-click: set focus                                                 --
-- # Independent settings for '10 vs 10', '15 vs 15' and '40 vs 40'.          --
-- # Specialization                                                           --
-- # Target                                                                   --
-- # Main Assist Target                                                       --
-- # Focus                                                                    --
-- # Enemy Flag/Orb Carrier                                                   --
-- # Target Count                                                             --
-- # Health                                                                   --
-- # Range Check                                                              --
-- # Guild Groups                                                             --
--                                                                            --
-- -------------------------------------------------------------------------- --
--                                                                            --
-- These events are always registered:                                        --
-- - PLAYER_REGEN_DISABLED                                                    --
-- - PLAYER_REGEN_ENABLED                                                     --
-- - ZONE_CHANGED_NEW_AREA (to determine if current zone is a battleground)   --
-- - PLAYER_LEVEL_UP (only registered if player level < level cap)            --
--                                                                            --
-- In Battleground:                                                           --
-- # If enabled: ------------------------------------------------------------ --
--   - UPDATE_BATTLEFIELD_SCORE                                               --
--   - PLAYER_DEAD                                                            --
--   - PLAYER_UNGHOST                                                         --
--   - PLAYER_ALIVE                                                           --
--                                                                            --
-- # Range Check: --------------------------------------- VERY HIGH CPU USAGE --
--   - Events:                                                                --
--        1) Combat Log: --- COMBAT_LOG_EVENT_UNFILTERED                      --
--        2) Class: -------- PLAYER_TARGET_CHANGED                            --
--                         - UNIT_HEALTH_FREQUENT                             --
--                         - UPDATE_MOUSEOVER_UNIT                            --
--                         - UNIT_TARGET                                      --
--      3/4) Mix: ---------- COMBAT_LOG_EVENT_UNFILTERED                      --
--                         - PLAYER_TARGET_CHANGED                            --
--                         - UNIT_HEALTH_FREQUENT                             --
--                         - UPDATE_MOUSEOVER_UNIT                            --
--                         - UNIT_TARGET                                      --
--   - The data to determine the distance to an enemy is not always available.--
--     This is restricted by the WoW API.                                     --
--   - This feature is a compromise between CPU usage (FPS), lag/network      --
--     bandwidth (no SendAdd0nMessage), fast and easy visual recognition and  --
--     suitable data.                                                         --
--                                                                            --
-- # Health: ------------------------------------------------- HIGH CPU USAGE --
--   - Events:             - UNIT_TARGET                                      --
--                         - UNIT_HEALTH_FREQUENT                             --
--                         - UPDATE_MOUSEOVER_UNIT                            --
--   - The health from an enemy is not always available.                      --
--     This is restricted by the WoW API.                                     --
--   - A raidmember/raidpet MUST target(focus/mouseover) an enemy OR          --
--     you/yourpet MUST target/focus/mouseover an enemy to get the health.    --
--                                                                            --
-- # Target Count: ------------------------------------ HIGH MEDIUM CPU USAGE --
--   - Event:              - UNIT_TARGET                                      --
--                                                                            --
-- # Guild Groups: ----------------------------------------- MEDIUM CPU USAGE --
--   - Events:             - GROUP_ROSTER_UPDATE                              --
--                         - UNIT_TARGET                                      --
--                                                                            --
-- # Main Assist Target: ------------------------------- LOW MEDIUM CPU USAGE --
--   - Events:             - GROUP_ROSTER_UPDATE                              --
--                         - UNIT_TARGET                                      --
--                                                                            --
-- # Leader: ------------------------------------------- LOW MEDIUM CPU USAGE --
--   - Event:              - UNIT_TARGET                                      --
--                                                                            --
-- # Level: (only if player level < level cap) ---------------- LOW CPU USAGE --
--   - Event:              - UNIT_TARGET                                      --
--                                                                            --
-- # Target: -------------------------------------------------- LOW CPU USAGE --
--   - Event:              - PLAYER_TARGET_CHANGED                            --
--                                                                            --
-- # Focus: --------------------------------------------------- LOW CPU USAGE --
--   - Event:              - PLAYER_FOCUS_CHANGED                             --
--                                                                            --
-- # Enemy Flag/Orb Carrier: ----------------------------- VERY LOW CPU USAGE --
--   - Events:             - CHAT_MSG_BG_SYSTEM_HORDE                         --
--                         - CHAT_MSG_BG_SYSTEM_ALLIANCE                      --
--                         - CHAT_MSG_BG_SYSTEM_NEUTRAL                       --
--                         - CHAT_MSG_RAID_BOSS_EMOTE                         --
--   Flag/Orb detection in case of disconnect, UI reload or mid-battle-joins: --
--   (temporarily registered until each enemy is scanned)                     --
--                         - UNIT_TARGET                                      --
--                         - UPDATE_MOUSEOVER_UNIT                            --
--                         - PLAYER_TARGET_CHANGED                            --
--                                                                            --
-- # No SendAdd0nMessage(): ------------------------------------------------- --
--   This AddOn does not use/need SendAdd0nMessage(). SendAdd0nMessage()      --
--   increases the available data by transmitting information to other        --
--   players. This has certain pros and cons. I may include (opt-in) such     --
--   functionality in some future release. maybe. dontknow.                   --
--                                                                            --
-- -------------------------------------------------------------------------- --
--                                                                            --
-- slash commands: /bgt - /bgtargets - /battlegroundtargets                   --
--                                                                            --
-- -------------------------------------------------------------------------- --
--                                                                            --
-- Thanks to all who helped with the localization.                            --
--                                                                            --
-- Special thanks to Roma.                                                    --
--                                                                            --
-- -------------------------------------------------------------------------- --
Screenshot:


Download:
http://www.wowace.com/addons/battlegroundtargets/files/

kunda

Last edited by kunda; 12-23-2012 at 08:14 PM. Reason: update
kunda is offline   Reply With Quote
Old 08-02-2011   #2
gamemaster128
Senior Member
 
gamemaster128's Avatar
 
Join Date: Oct 2008
Location: Portland, OR, US
Posts: 446
Default Re: BattlegroundTargets

This looks pretty useful. I'll definitely try it out.
gamemaster128 is offline   Reply With Quote
Old 08-02-2011   #3
lilsparky
Amazing Member
 
lilsparky's Avatar
 
Join Date: Jun 2007
Location: los angeles
Posts: 1,639
Default Re: BattlegroundTargets

i have no idea why it's taken so long for somebody to write this. i wish i was still actively playing...

might be nice to parse the combat log and associate heals/damage with targets. perhaps identify healers who are healing your target. or healers who are healing flag carriers...
lilsparky is offline   Reply With Quote
Old 08-02-2011   #4
Nephtys_ch
Newbie
 
Join Date: Oct 2006
Posts: 1
Default Re: BattlegroundTargets

Great add-on

Bug report :

is not Bassin d'Arathi but Bassin Arathi

elseif locale == "frFR" then
BattlegroundTargets_BGNames = {
["Vallée d'Alterac"] = "Alterac Valley",
["Goulet des Chanteguerres"] = "Warsong Gulch",
["Bassin Arathi"] = "Arathi Basin",
["L'Œil du cyclone"] = "Eye of the Storm",
["Rivage des Anciens"] = "Strand of the Ancients",
["Île des Conquérants"] = "Isle of Conquest",
["La bataille de Gilnéas"] = "Battle for Gilneas",
["Pics-Jumeaux"] = "Twin Peaks",
Nephtys_ch is offline   Reply With Quote
Old 08-02-2011   #5
kunda
Senior Member
 
Join Date: Oct 2006
Posts: 464
Default Re: BattlegroundTargets

frFR bgname is fixed in BattlegroundTargets-40200-3. Thanks.
http://www.wowace.com/addons/battlegroundtargets/files/
kunda is offline   Reply With Quote
Old 08-03-2011   #6
Jakek321
Newbie
 
Join Date: Mar 2011
Posts: 1
Default Re: BattlegroundTargets

I have a suggestion for this addon. I think that you should add a right click to focus like on gladius and maybe a range finder to see if someone is in range because that would make this addon the proest shit ever made for rbgs

Last edited by Jakek321; 08-03-2011 at 01:48 AM.
Jakek321 is offline   Reply With Quote
Old 08-03-2011   #7
Vranx
Full Member
 
Vranx's Avatar
 
Join Date: Nov 2007
Posts: 169
Default Re: BattlegroundTargets

Great mod! Is there a way to change the texture?
__________________
Vranx UI
Vranx is offline   Reply With Quote
Old 08-03-2011   #8
Vranx
Full Member
 
Vranx's Avatar
 
Join Date: Nov 2007
Posts: 169
Default Re: BattlegroundTargets

I got into a rated bg today that switched our faction so the mod was showing my own team.
__________________
Vranx UI
Vranx is offline   Reply With Quote
Old 08-04-2011   #9
kunda
Senior Member
 
Join Date: Oct 2006
Posts: 464
Default Re: BattlegroundTargets

@Jakek321:
Focus: I added a focus indicator and right-click to set focus (focus is set to your current target).
Range check: Range check for enemies is tricky, always wacky and never precise. I think about it.

@Vranx:
Textures: Which textures? You can change any texture by modifying the code and/or the included textures.
Same-faction battlegrounds: Is this really live? I remember some PTR tests but I thought this has never made it to the live servers. And: I never joined a same-faction (rated) battleground. Anyway, I added some additional check to cover such situation.

http://www.wowace.com/addons/battlegroundtargets/files/

Some general thoughts:
BattlegroundTargets is simple and I want to keep it simple. What I want to avoid is combatlog scanning and SendAddonMessage(s), especially in combat. I am not a friend of combatlog scanning in combat and I am not a friend of SendAddonMessage(s) in combat. Some suggested features requires such techniques to give an acceptable result.
To be honest: If I do not find a resource-friendly method to add hp/range/whatever check I will not include it.
Current BattlegroundTargets fits all my needs: relative simple, it works as described, no errors, less CPU/memory usage, highly configurable.

I think about the suggestions, Thanks.
kunda is offline   Reply With Quote
Old 08-05-2011   #10
Vranx
Full Member
 
Vranx's Avatar
 
Join Date: Nov 2007
Posts: 169
Default Re: BattlegroundTargets

Sorry for not being specific. I was referring to the class colored bars. On oUF I can change them. Don't see a texture included for it.

I have done 6 or 7 rated BG's, twice it has switched my faction so I can verify that its live for sure.

Appreciate your work. Like the mod!
__________________
Vranx UI
Vranx is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:01 PM.