Thread Tools Display Modes
07-21-12, 08:04 AM   #121
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Lombra View Post
The old/current IsSpellKnown had a lot of "problems" with not recognising known spells. Namely a lot of spell IDs extracted from a combat log event were different than the ID of the same spell in your spell book, the latter of which worked with IsSpellKnown, while the combat log event did not. I've had to make a lot of special cases because of this. As far as I understand this function is now replaced with IsPlayerSpell.. has anyone noticed if this one is at all improved in this regard?
Currently, IsPlayerSpell is only used in ShardBar.lua to do stuff like "only show the shard bar if you're Affliction spec AND you know Soulburn". According to the Wowpedia docs its intended use is to check "does the player know this OR a spell that replaces this?", and should be used with the ID of the base spell, not the spell that replaces it.

So, for a shaman you should query the ID for Cleanse Spirit, not Purify Spirit (PS replaces CS for resto), and for a monk you should query Roll, not Chi Torpedo.

I'm not sure what the recommended API for determining whether the player has a particular upgrade is (eg. has the monk replaced Roll with Chi Torpedo?) or figuring out the associations. Probably you'll just have to keep doing it by hand if you need to know the specifics.
__________________
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-21-12, 08:40 AM   #122
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
If anyone is still working their actionbar addons to work with the new possess changes,
the only difference is that you have to use [vehicleui] instead of [bonusbar:5], and the
buttons are ranged from id 133 and beyond instead of id 121 and beyond.
 
07-21-12, 09:01 AM   #123
Maul
Ion Engines, Engage!
 
Maul's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 401
To clarify a bit, there are few override bar situations that are not triggered by [vehicleui]

One example is the quest Mental Training: Speaking the Truth to Power

These override bars are not considered vehicles. They used to be triggered by [bonusbar:5], but now they are not. Also, these bars use the action ID's 157-162, not the new 133-138 range.

I have a character with that quest active just for testing purposes. Right now, on live, [bonusbar:5] works fine for it. On the beta, I have found no macro conditional that will fire when this specific type of override bar is shown.
__________________

Twitter: @IonMaul | Windows Live: [email protected] | Google Talk: [email protected]

Last edited by Maul : 07-21-12 at 10:01 AM.
 
07-21-12, 09:21 AM   #124
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
As far as I'm aware - correct me if I'm wrong - the bar used here is the possess bar. As for the macro condition for it, there is none. It was requested (as posted on the previous page), along with the pet battle UI one. They responded saying they will add one for pet battles, but they made no mention of a possess bar condition.

Edit: Just noticed you posted there, derp. Link of the topic is a bit unnecessary then.

Last edited by Haleth : 07-21-12 at 09:24 AM.
 
07-21-12, 09:54 AM   #125
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Maul View Post
One example is the quest Mental Training: Speaking the Truth to Power

These override bars are not considered vehicles. They used to be triggered by [bonusbar:5], but now they are not. Also, these bars use the action ID's 157-162, not the new 133-138 range.

I have a character with that quest active just for testing purposed. Right now, on live, [bonusbar:5] works fine for it. On the beta, I have found no macro conditional that will fire when this specific type of override bar is shown.
For testing purposes, since you are on the quest, test every possibility of bar:1-6 and stance:1-N, just to see if any of those would work.
Also do bonusbar:N, you never know.

As for the thread linked, I'd post there if I had access.

Last edited by p3lim : 07-21-12 at 09:58 AM.
 
07-21-12, 10:03 AM   #126
Maul
Ion Engines, Engage!
 
Maul's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 401
Originally Posted by p3lim View Post
For testing purposes, since you are on the quest, test every possibility of bar:1-6 and stance:1-N, just to see if any of those would work.
Also do bonusbar:N, you never know.
I have done that, and even more
__________________

Twitter: @IonMaul | Windows Live: [email protected] | Google Talk: [email protected]
 
07-21-12, 10:32 AM   #127
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Meh, worth a shot
 
07-21-12, 10:34 AM   #128
TSquared
Big Daddy!
Join Date: May 2008
Posts: 527
Originally Posted by Vladinator View Post
No, this is new. The problem is I only saw behind the scenes when pet battles fired lua errors, these were not a part of the default interface, like FrameXML, GlueXML and so forth. There was no source file, only variables (and they were nowhere to be found in the current interface folder either). Now they seem to be fixed, and I have no screenshots, and I can't find any notes containing these specific errors. So all I can say is that it's something new they are doing. I was hoping someone else also played beta and saw these errors during pet battles, am I alone here noticing this?
OK, I think I know the confusion. The errors you saw were in the pat battle spell scripts as Meorawr mentioned. Not the pet battle UI. WoW uses lua for all scripting, not just UI. In fact lua was used for the UI after it was decided to use it for spell scripts. Pet battles is different in that the spell scripts are on the client and not the server, but it's not UI code and certainly shouldn't be exposed to outside "playing".

It's true that some UI is on the c side. But those are rare cases. Usually from the early days when WoW was trying to hide data from players (item/spell tooltips), or do to not want to expose too much position information to help fight bots (namplates, floating combat text).

On a slightly separate note: the blizzard addons in the addon UI in the glue screens is just a development issue. New features always show up there during PTR or Beta testing. It will be fixed before launch.
 
07-21-12, 10:50 AM   #129
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Pet battle spell scripts are client side? Is that not very insecure? The reason those global cooldown hacks were possible back in the days is because the global cooldown was client-imposed, until they changed it as a response to the hacks.
 
07-21-12, 10:54 AM   #130
Meorawr
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 193
I think the way it works is the scripts are client side just to facilitate the playing-out of a battle, the server still (hopefully) validates everything, and communicates only the bare-bones of "what just happened" to each client which then use the scripts to process the visual-side of things on the client (such as weather mechanics, etc).

I think a similar comparison would be with SC2 replays, which I think are just re-enacted out on the client. Might be wrong though.

Technically this could cause two clients to become out of sync if one was using modified scripts, so for instance one end might display a pet as having 200 more health than it should, but as long as the server doesn't trust the clients in any way then all's good. I hope.

Meanwhile, at Blizzard...

Last edited by Meorawr : 07-21-12 at 11:10 AM.
 
07-21-12, 12:38 PM   #131
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Originally Posted by Meorawr View Post
A badly Photoshop'd image? I don't get it.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
 
07-21-12, 12:47 PM   #132
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
I agree with you TSquared and Meorawr.

About the battles themselves, this is how I see it; the server receives the action you wish to take and returns the client the outcome, as soon as you have sent your action an event fires to tell the client the result. This is why you can win a pet and get the quest completion screen at the start of the round and not have to wait for the end, because the game already was told what happened.

So it's safe, just client side visuals and such are handled by the client. In reality you can have a "skip animations" option to turn off all visuals for pet battles and just tell you the results as soon as they are received from the server, seconds after you have chosen your action.

Last edited by Vlad : 07-21-12 at 12:56 PM.
 
07-21-12, 11:05 PM   #133
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Maul, using Mind Control/Dominate Mind and the alike also counts as possess.

According to those tests, the buttons on the actual actionbar were still 133+, though the two buttons that replaces the stancebar are the actual buttons that is counted as the possess buttons by the blizzard ui.

So, question in my head was this: Why have two elements for 1 bar?
Easy enough, the StanceBar handles anything "default", anything that is considered part of a class, like druid forms, warrior stances, shadowform etc, while the possessbar handles anything else (mostly exit buttons from a possessive state).

So what we need [possess] or something alike it for is just to know when to swap the buttons replaced on the main menu bar securely. Anything non-secure can be detected with UPDATE_POSSESS_BAR and IsPossessBarVisible().

You can quote me on that for the post on the US forums, as I can't post there myself.
 
07-22-12, 06:30 AM   #134
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I think p3lim is right on the actionbar front. I cannot say this for sure because I'm not creating actionbar buttons on my own, I use the default buttons. But I think so.

The possessbar itself is just a two button frame replacing the stancebar. Showing two buttons (current possess spell and leave button). It has nothing to do with the actionbar buttons. The leave button triggers VehicleExit() onClick.

Two answer p3lims question. I think they added it because the posses buttons may not have an actionbutton spell to exit the possess state and the possess may not trigger the override bar (vehicle ui) thus no exit button will spawn.

You can check the bar index by using the new index functions.

Code:
return GetVehicleBarIndex()
return GetOverrideBarIndex()
return GetTempShapeshiftBarIndex()
return GetBonusBarIndex()
return GetActionBarPage()
If GetBonusBarIndex() is returning any value between 7 and 11 ... that would be a problem though.

Vehiclebar = 12
TempShapeshift = 13
OverrideBar = 14
ActionBarPages = 1-6

See: http://www.wowinterface.com/forums/s...83&postcount=6

p.s. Good to know that the petbattle ui state is in. I can now finish my macro conditions for the state driver.
__________________
| 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-22-12 at 06:38 AM.
 
07-22-12, 09:06 AM   #135
Maul
Ion Engines, Engage!
 
Maul's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 401
Originally Posted by p3lim View Post
Maul, using Mind Control/Dominate Mind and the alike also counts as possess.

According to those tests, the buttons on the actual actionbar were still 133+, though the two buttons that replaces the stancebar are the actual buttons that is counted as the possess buttons by the blizzard ui.
I am not too concerned about Dominate Mind type of actions, as they seem to now be considered [pet] and the pet action ID's 1-10 properly reflect abilities using Dominate Mind. I can live with that as a solution.

My primary concern is the "non-vehicle" vehicle bars (I used to call them "possess" states because that is how they seem to behave, that a character would "possess" an NPC or object rather than mount a vehicle). This bar would be better called the "Alt Player Action Bar" based on the fact that their textures are in the "PLAYERACTIONBARALT" art folder. Which reminds me, this state is the same used by the darkmoon faire. Since [bonusbar:5] no longer seems valid, the darkmoon alt action bars most likely also do not have any macro conditional that an addon can react to. I will have to remember to test that the next time the DMF is up.

So the new macro conditional I am seeking would probably be better called [actionbaralt] or something along those lines, though I think [possess] or [possessui] works just as well, as the character is possessing something for the time being (like a DMF tonk)

And, from my tests, these alternate action bars on the beta so far use the higher action ID range I indicated previously (157-162).

Originally Posted by p3lim View Post
So what we need [possess] or something alike it for is just to know when to swap the buttons replaced on the main menu bar securely. Anything non-secure can be detected with UPDATE_POSSESS_BAR and IsPossessBarVisible().
Exactly, and for my addon, I need to be able to securely assign the proper action ID range based on what is happening. So far, I can do that for everything save for these "possess"/"alt action bar" states and the extra action button (but that has a work-a-round, though I would prefer a direct macro conditional for knowing when the extra button is active or not)
__________________

Twitter: @IonMaul | Windows Live: [email protected] | Google Talk: [email protected]

Last edited by Maul : 07-22-12 at 09:09 AM.
 
07-22-12, 01:16 PM   #136
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Enabling the taintlog crashes the game client. At least for me.
__________________
| 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-22-12, 03:11 PM   #137
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Maul View Post
I am not too concerned about Dominate Mind type of actions, as they seem to now be considered [pet] and the pet action ID's 1-10 properly reflect abilities using Dominate Mind. I can live with that as a solution.

My primary concern is the "non-vehicle" vehicle bars (I used to call them "possess" states because that is how they seem to behave, that a character would "possess" an NPC or object rather than mount a vehicle). This bar would be better called the "Alt Player Action Bar" based on the fact that their textures are in the "PLAYERACTIONBARALT" art folder. Which reminds me, this state is the same used by the darkmoon faire. Since [bonusbar:5] no longer seems valid, the darkmoon alt action bars most likely also do not have any macro conditional that an addon can react to. I will have to remember to test that the next time the DMF is up.

So the new macro conditional I am seeking would probably be better called [actionbaralt] or something along those lines, though I think [possess] or [possessui] works just as well, as the character is possessing something for the time being (like a DMF tonk)

And, from my tests, these alternate action bars on the beta so far use the higher action ID range I indicated previously (157-162).
It might be that spells like Dominate Mind work in a different way, and that has been the case before.
I don't know of an easy way to test this except for DMF, which is for one week once a month, and I really cba doing the whole Hyjal chain again, let alone level up a character to that level then do it.
 
07-22-12, 03:22 PM   #138
Maul
Ion Engines, Engage!
 
Maul's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 401
Originally Posted by p3lim View Post
It might be that spells like Dominate Mind work in a different way, and that has been the case before.
I don't know of an easy way to test this except for DMF, which is for one week once a month, and I really cba doing the whole Hyjal chain again, let alone level up a character to that level then do it.
It is not an easy condition to test like vehicles. Which is why after running a few characters through Hyjal and recognizing the one quest I linked was a perfect test case, I purposely stopped one of my characters on that quest, just so I can test things like this
__________________

Twitter: @IonMaul | Windows Live: [email protected] | Google Talk: [email protected]
 
07-23-12, 01:39 AM   #139
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
In case you want to test the possessbar. The second DK quest available is using it. So easily accessible.

http://imgur.com/a/7PMpD#0
__________________
| 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-23-12, 03:02 AM   #140
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Easiest way to test vehicles is the jousting at the Argent Colisseum. You can stay on a vehicle as long as you like and you can dismount/remount all the time.
 
 

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