Thread Tools Display Modes
11-14-10, 10:31 PM   #1
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2010
Posts: 200
Battleground scoring

I'm attempting to recreate an addon that tracks your killing blows, honorable kills, etc. in a broker frame. Right now I'm using the following API to find these values:

GetNumBattlefieldScores()
GetBattlefieldScore(i)

These work perfectly for what I'm trying to do except for ONE thing; they won't seem to update unless I open and close the PvP stats frame. Is there a way to get these to work without having to open/close the PvP Stats frame?

Thanks in advance!
  Reply With Quote
11-15-10, 12:38 AM   #2
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
There doesn't seem to be any simple way to get it to update..

In WorldStateFrame.lua it calls WorldStateScoreFrame_Update() which updates GetNumBattlefieldScores() and GetBattlefieldScore(index)
.. but it doesn't seem to work

I also tried a quick opening and then hiding the frame in this macro, but it also didn't work though
Code:
/run ShowUIPanel(WorldStateScoreFrame)
/run HideUIPanel(WorldStateScoreFrame)
  Reply With Quote
11-15-10, 02:25 AM   #3
lilsparky
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 117
Originally Posted by Waky View Post
I'm attempting to recreate an addon that tracks your killing blows, honorable kills, etc. in a broker frame. Right now I'm using the following API to find these values:

GetNumBattlefieldScores()
GetBattlefieldScore(i)

These work perfectly for what I'm trying to do except for ONE thing; they won't seem to update unless I open and close the PvP stats frame. Is there a way to get these to work without having to open/close the PvP Stats frame?

Thanks in advance!


you should register the event "UPDATE_BATTLEFIELD_SCORE" then periodically call RequestBattlefieldScoreData() i think.

edit: i've always thought a great mod would be to mimic a sports ticker scrolling at the bottom of the screen. have sliding text show the latest stats and interesting info from the current match or even have it listen to a global broadcast from other people running the mod and then show stats from other battlegrounds. not necessarily useful, but it'd be pretty funny.

Last edited by lilsparky : 11-15-10 at 02:28 AM.
  Reply With Quote
11-15-10, 03:31 AM   #4
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Did some quick testing and yes lilsparky is right ..
  Reply With Quote
11-15-10, 02:23 PM   #5
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2010
Posts: 200
Woohoo, that was the problem thank you very much you two. I was so confused why it wasn't updating!

Thanks again very much guys!

Last edited by Waky : 11-15-10 at 02:25 PM.
  Reply With Quote
11-22-10, 10:35 AM   #6
Beoko
Guest
Posts: n/a
Originally Posted by lilsparky View Post
edit: i've always thought a great mod would be to mimic a sports ticker scrolling at the bottom of the screen. have sliding text show the latest stats and interesting info from the current match or even have it listen to a global broadcast from other people running the mod and then show stats from other battlegrounds. not necessarily useful, but it'd be pretty funny.
Bit of a necro, but I found this idea extremely interesting. I made a rough outline of addon functionality:

Code:
- What do you want to broadcast?
    - PvP:
        - Generic Objectives
        - Enemy killing blows
        - Etc
    - PvE:
        - Generic Objectives
        - Raid Boss deaths
        - Etc
- What do you want to see broadcasted to you?
    - PvP:
        - Generic Objectives
        - Enemy killing blows
        - Etc
    - PvE:
        - Generic Objectives
        - Raid Boss deaths
        - Etc
- Which channels do you want to broadcast in?
    - Party
    - Guild
    - Battleground
    - Raid
    - Etc
- Which channels do you listen to for broadcasts from other people?
    - Party
    - Guild
    - Battleground
    - Raid
    - Etc
Of course, this entirely depends on the number of people that install the addon, so it could be something awesome or something that never catches on. I'll have some free time in December, and I'll see where this goes once I'm able to start playing again.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Battleground scoring

Thread Tools
Display Modes

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

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