Quantcast Beta API discussion - Page 5 - WoWInterface
 
Thread Tools Display Modes
07-06-12, 09:38 PM   #81
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,168
Guys, I think that's enough with the getglobal rants/speculations. Back on topic before I delete all of it.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

 
07-06-12, 10:30 PM   #82
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,152
I believe there needs to be a getbeer/setbeer pair.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of Revelation, Spamalyzer, TravelAgent, Volumizer, and many other AddOns.
 
07-08-12, 05:47 AM   #83
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 354
Originally Posted by endx7 View Post
It appears that GetAddOnMetadata() is no longer returning data for X- prefixed TOC metadata fields.
Does anyone know if this is an intentional change or an oversight? Perhaps TSquared can shed some light on the situation.
 
07-08-12, 05:54 AM   #84
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,571
Couldn't you just add those variables directly to the addon namespace?
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
07-08-12, 07:57 AM   #85
Tuller
A Black Drake
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 88
Other addons may read the metadata for one reason or another (ex, some addon loaders).
 
07-09-12, 01:07 PM   #86
Guillotine
A Cobalt Mageweaver
 
Guillotine's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 247
Originally Posted by Talyrius View Post
Does anyone know if this is an intentional change or an oversight? Perhaps TSquared can shed some light on the situation.
I posted in the dedicated thread as well, but this a known bug and should be fixed in the next build
 
07-10-12, 04:31 PM   #87
Lombra
A Scalebane Royal Guard
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 415
Originally Posted by yoshimo View Post
Try
Code:
IsQuestFlaggedCompleted(QuestID)
a lot weaker, but it seems to return 1 if completed and nil if not completed.
Why is it weaker? And am I understanding it right that this works without first needing to query anything?
__________________
Grab your sword and fight the Horde!
 
07-10-12, 05:26 PM   #88
Phanx
No Life!
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,406
Originally Posted by Lombra View Post
Why is it weaker? And am I understanding it right that this works without first needing to query anything?
Well, for one, if you want to scan a lot (eg. hundreds or thousands) of quests, as you would in an addon whose purpose is to direct you to quests you haven't yet completed, you have to make hundreds or thousands of function calls.

By contast, with QueryQuestsCompleted/GetQuestsCompleted, you have two function calls, and then you have a table containing every quest you've completed. Hundreds or thousands of table lookups are much faster than the same number of function calls.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
 
07-10-12, 06:04 PM   #89
Guillotine
A Cobalt Mageweaver
 
Guillotine's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 247
Originally Posted by Phanx View Post
By contast, with QueryQuestsCompleted/GetQuestsCompleted, you have two function calls, and then you have a table containing every quest you've completed. Hundreds or thousands of table lookups are much faster than the same number of function calls.
GetQuestsCompleted will be returning in a coming beta patch. It will no longer require a call to QueryQuestsCompleted though.

Last edited by Guillotine : 07-10-12 at 06:12 PM.
 
07-10-12, 06:29 PM   #90
Nimhfree
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 209
Originally Posted by Guillotine View Post
GetQuestsCompleted will be returning in a coming beta patch. It will no longer require a call to QueryQuestsCompleted though.
As the author of Grail I am quite interested in what is happening in this area. Is there someplace where I can get this information? Basically I am using the new API for the moment by detecting a lack of the old API and creating a function that uses the new to mimic the old. However, in doing a "server query" basically I am looping through over 10,000 quests to ask for their status. I am impressed so far that the results are so quick (assuming they are in fact coming back correctly).
 
07-10-12, 06:46 PM   #91
Lombra
A Scalebane Royal Guard
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 415
Originally Posted by Phanx View Post
Well, for one, if you want to scan a lot (eg. hundreds or thousands) of quests, as you would in an addon whose purpose is to direct you to quests you haven't yet completed, you have to make hundreds or thousands of function calls.

By contast, with QueryQuestsCompleted/GetQuestsCompleted, you have two function calls, and then you have a table containing every quest you've completed. Hundreds or thousands of table lookups are much faster than the same number of function calls.
Yeah, that is true. Didn't think of checking incomplete quests, too. I just thought what was meant was that this new function is somehow not functionally similar to a table lookup (nevermind how you built said table), but I suppose the lack of a "all completed quests"-API is what was meant.
__________________
Grab your sword and fight the Horde!
 
07-11-12, 07:32 AM   #92
gomisensei
A Defias Bandit
Join Date: Oct 2006
Posts: 2
RequestBattlefieldPositions

What was RequestBattlefieldPositions changed to? I see it being deleted, but can't find what replaced it
 
07-11-12, 10:57 AM   #93
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 676
Originally Posted by gomisensei View Post
What was RequestBattlefieldPositions changed to? I see it being deleted, but can't find what replaced it
According to wowprogramming, GetBattlefieldPosition and the like were already deprecated in favor of GetPlayerMapPosition, since all battleground members are also your raid members

Last edited by Ketho : 07-11-12 at 12:03 PM. Reason: *battlegroup
 
07-11-12, 01:25 PM   #94
Guillotine
A Cobalt Mageweaver
 
Guillotine's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 247
Originally Posted by Nimhfree View Post
As the author of Grail I am quite interested in what is happening in this area. Is there someplace where I can get this information? Basically I am using the new API for the moment by detecting a lack of the old API and creating a function that uses the new to mimic the old. However, in doing a "server query" basically I am looping through over 10,000 quests to ask for their status. I am impressed so far that the results are so quick (assuming they are in fact coming back correctly).
This information is now available directly on the client and requires no server query. (Hence the removal of QueryQuestsCompleted.) The new IsQuestFlaggedCompleted function is the way to go if you want to know whether a particular quest is completed (e.g. which quests do I still need to complete for the mechanical chicken?), but the old GetQuestsCompleted function will still be made available for those who need an overarching view of what quests have been completed.
 
07-15-12, 06:30 AM   #95
Jarod24
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 61
I've been toying around with pet battles and here is what i got.

PET_BATTLE_FINAL_ROUND is done at the end of a battle. It returns a single integer argument: 1== Win 2== Lose/Forfeit

PET_BATTLE_OPENING_START triggers during the start. Has only what seems like a timestamp as its argument.


Does anyone however know the UnitID for these pets ?

If you as a monk for example call UnitHealth("pet") with your battle-pet summoned you get nothing returned since 'pet' is used for the hunter/warlock pets.
 
07-15-12, 06:36 AM   #96
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Mod
Featured
Join Date: Sep 2008
Posts: 1,173
They use new functions and events entirely.

https://github.com/Ketho/wow-ui-sour...etBattleUI.lua

Code:
PET_BATTLE_PET_CHANGED
PET_BATTLE_MAX_HEALTH_CHANGED
PET_BATTLE_HEALTH_CHANGED
Code:
C_PetBattles.GetHealth(petOwner, petIndex)
petOwner and petIndex are table entries of the unit frame in question, e.g. PetBattleFrame.BottomFrame.PetSelectionFrame.Pet1.
 
07-16-12, 08:04 AM   #97
Jarod24
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 61
Originally Posted by Haleth View Post
They use new functions and events entirely.

https://github.com/Ketho/wow-ui-sour...etBattleUI.lua

Code:
PET_BATTLE_PET_CHANGED
PET_BATTLE_MAX_HEALTH_CHANGED
PET_BATTLE_HEALTH_CHANGED
Code:
C_PetBattles.GetHealth(petOwner, petIndex)
petOwner and petIndex are table entries of the unit frame in question, e.g. PetBattleFrame.BottomFrame.PetSelectionFrame.Pet1.
Hm, too bad. All i really wanted was a nice simple way to ask about pet health at any time.
If the petbattleframe isnt visible/loaded then this will not work.
If i manually target my pet and use UnitHealth("target") then it returns the value.
Why would they not add a simple unitid-string that could be used aswell instead of having us go via the UI.
 
07-16-12, 08:15 AM   #98
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Mod
Featured
Join Date: Sep 2008
Posts: 1,173
I also hope they add a new macro condition for being in a pet battle - currently if you have custom action bars, pretty much all you can do is set their alpha to 0 and add a frame which blocks mouse events once the pet battle UI shows up.
 
07-16-12, 09:56 AM   #99
Maul
Ion Engines, Engage!
 
Maul's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 401
Originally Posted by Haleth View Post
I also hope they add a new macro condition for being in a pet battle - currently if you have custom action bars, pretty much all you can do is set their alpha to 0 and add a frame which blocks mouse events once the pet battle UI shows up.
A thousand times yes!

We have [vehicleui]

All we need is -

[possessui]

[extrabar]/][extrabutton]

[petbattleui]

Or, fix the [bonusbar] conditional to respond to all these states.

Just something before live hits
__________________

Twitter: @IonMaul | Windows Live: [email protected] | Google Talk: [email protected]
 
07-16-12, 11:27 AM   #100
Tuller
A Black Drake
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 88
I'd rather them be [petbattleui] [possessui], [extrabar] than [bonusbar:x] since its much less cryptic that way. Do we have some sort of suggestion on the official forums for this?
 
 

WoWInterface » Legion Beta » MoP Beta archived threads » Beta API discussion

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