How do I use UnitBuff now in 8.0?
Before 8.0 I used to use UnitBuff("player", "Summon Chauffeur") and
UnitBuff("player", "Ban-Lu, Grandmaster's Companion") to check if my toon is on a mount on which you cant enter a pet battle and have my toons dismounted when the pb dialog pops up. Since 8.0 I now get the error: "Usage: UnitBuff("unit", [index][, "filter"])" And as I am a noob I have no idea what to and how to check now if my toon sits on "Summon Chauffeur" or "Ban-Lu, Grandmaster's Companion". Any help to fix this would be greatly appreciated! ps: any infos on what happend to the events BN_FRIEND_TOON_ONLINE, BN_FRIEND_TOON_OFFLINE, BN_FRIEND_INFO_CHANGED, BN_FRIEND_ACCOUNT_OFFLINE, BN_FRIEND_ACCOUNT_ONLINE (deleted, renamed?) would also be very helpful. tia |
1. You can now only get info via buff index.
for index = 1, 32 do local buffName = UnitBuff(unit, index) ... end 2. They are removed. |
You just can't query by name anymore. You'll have to iterate through all your buffs in a loop and check each of their names until it finds the one you're looking for, by checking their names one by one.
Example from wowpedia: lua Code:
btw: https://wow.gamepedia.com/Patch_8.0.1/API_changes Not a complete list, but it has a bunch of stuff. |
You can use AuraUtil.FindAuraByName("Ban-Lu, Grandmaster's Companion", "player")
|
Quote:
Turns out someone's already brought it up a couple weeks ago on here too, oops. http://www.wowinterface.com/forums/s...ad.php?t=56332 There's more stuff to play with! |
Posting here to save that.
|
Quote:
YOu guys are awsome! One last thing (before I go back to be silent reader for the next 9 years :)): An Addon I still use ut seeems to not be updated anymore uses GetMapContinents and GetCurrentMapAreaID. I have replaced GetCurrentMapAreaID with C_Map.GetBestMapForUnit("player") but which would be the best option to replace GetMapContinents? [its PetJournalEnhanced which uses them to make it possible to sort pets by continents/zones] |
It was actually updated a few hours before your post here (though not on this site yet)
|
Quote:
|
All times are GMT -6. The time now is 01:13 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI