Thread Tools Display Modes
07-06-12, 10:30 PM   #81
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
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 NPCScan and many other AddOns.
 
07-08-12, 05:47 AM   #82
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
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   #83
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Couldn't you just add those variables directly to the addon namespace?
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
07-08-12, 07:57 AM   #84
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 91
Other addons may read the metadata for one reason or another (ex, some addon loaders).
 
07-10-12, 04:31 PM   #85
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
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   #86
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
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.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
 
07-10-12, 06:29 PM   #87
Nimhfree
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 267
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   #88
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
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   #89
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   #90
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
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-15-12, 06:30 AM   #91
Jarod24
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 66
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   #92
Haleth
This Space For Rent
 
Haleth's Avatar
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   #93
Jarod24
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 66
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   #94
Haleth
This Space For Rent
 
Haleth's Avatar
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   #95
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   #96
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 91
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?
 
07-16-12, 12:03 PM   #97
Maul
Ion Engines, Engage!
 
Maul's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 401
I am not all that keen on [bonusbar:x] either, especially since the whole bonus bar system has been revamped to be override bars. I am all for keeping things consistent. But, if it is easier to fix the [bonusbar] conditional than add new ones, it would be better than the current state of addons needing to react to UI changes in a secure way.

I have not seen anything on the beta forums yet. And quite frankly, I have been a bit out of touch on how and where to best make UI suggestions that will reach the UI team.
__________________

Twitter: @IonMaul | Windows Live: [email protected] | Google Talk: [email protected]
 
07-17-12, 05:33 PM   #98
Farmbuyer
A Cyclonian
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 43
Originally Posted by Jarod24 View Post
This seems like it's the trend with the newer functions; that they are returning true/false instead of 1/nil.
Makes sense. Lua didn't have a boolean type when those original functions were initially implemented. Even the upstream standard library used 1/nil returns.


IsInRaid() --true/false
IsInGroup() --true/false, will return true if you are in a raid as well as a party
Now that GetNumRaidMembers has morphed into GetNumGroupMembers, I wonder if GetRaidRosterInfo will return valid data while in a "plain" party? I'd like to think so, but haven't seen anything mentioned anywhere. Will try to test... sometime this week.


P.S.: I second Torhal's suggestion of getbeer/setbeer globals.
 
07-18-12, 08:43 AM   #99
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Is there any update on the macro-condition front?

I mean...how are we supposed to hide frames once the petbattleui loads. I know there is a "start" and "close" event but it is impossible to hide stuff in combat.

Lua Code:
  1. frame:RegisterEvent("PET_BATTLE_OPENING_START")
  2. frame:RegisterEvent("PET_BATTLE_CLOSE")

When fighting a pet battle: Does that trigger combat mode?

Nevertheless. Macro conditions for all the UI states are a must. Thus I sign what Tuller wrote.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 07-18-12 at 08:49 AM.
 
07-18-12, 09:02 AM   #100
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 942
You are not "in combat" while in a pet battle. This I know because I was able to open and use the Bartender options while in one.
 
 

WoWInterface » Site Forums » Archived Beta Forums » 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