Thread Tools Display Modes
Unread 07-06-12, 09:38 PM   #81
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,629
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

Seerah is online now  
Unread 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,057
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.
Torhal is offline  
Unread 07-08-12, 05:47 AM   #83
Talyrius
A Rage Talon Dragon Guard
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 305
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.
Talyrius is offline  
Unread 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,367
Couldn't you just add those variables directly to the addon namespace?
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is online now  
Unread 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: 86
Other addons may read the metadata for one reason or another (ex, some addon loaders).
Tuller is offline  
Unread 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
Guillotine is offline  
Unread 07-10-12, 04:31 PM   #87
Lombra
A Cobalt Mageweaver
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 236
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!
Lombra is online now  
Unread 07-10-12, 05:26 PM   #88
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,409
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, ShieldsUp, 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!
Phanx is offline  
Unread 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.
Guillotine is offline  
Unread 07-10-12, 06:29 PM   #90
Nimhfree
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 148
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).
Nimhfree is offline  
Unread 07-10-12, 06:46 PM   #91
Lombra
A Cobalt Mageweaver
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 236
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!
Lombra is online now  
Unread 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
gomisensei is offline  
Unread 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: 566
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
Ketho is offline  
Unread 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.
Guillotine is offline  
Unread 07-15-12, 06:30 AM   #95
Jarod24
A Cyclonian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 49
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.
Jarod24 is offline  
Unread 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,171
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.
Haleth is online now  
Unread 07-16-12, 08:04 AM   #97
Jarod24
A Cyclonian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 49
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.
Jarod24 is offline  
Unread 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,171
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.
Haleth is online now  
Unread 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: trinityui@live.com | Google Talk: trinityui@gmail.com
Maul is offline  
Unread 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: 86
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?
Tuller is offline  
 

Go BackWoWInterface » WoD Beta » MoP 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