WoWInterface

WoWInterface (http://www.wowinterface.com/forums/index.php)
-   Tutorials & Other Helpful Info. (http://www.wowinterface.com/forums/forumdisplay.php?f=12)
-   -   Assorted 5.1.0 changes (not all-inclusive) (http://www.wowinterface.com/forums/showthread.php?t=45267)

Dridzt 11-28-12 05:09 AM

Assorted 5.1.0 changes (not all-inclusive)
 
Selected changes that I think might be of interest for quick fixes/spotting broken addons.

First of all:
Zork's post for nameplate changes in 5.1.0
Ketho's comprehensive diff list

*LIGHT_FORCE -> *CHI (meaning SPELL_POWER_LIGHT_FORCE -> SPELL_POWER_CHI, LIGHT_FORCE -> CHI in event args etc, best doing a case sensitive search for LIGHT_FORCE)

new event: LOSS_OF_CONTROL_UPDATE
new event: UPDATE_VEHICLE_ACTIONBAR
new event: GROUP_JOINED arg1 = partyCategory (LE_PARTY_CATEGORY_HOME LE_PARTY_CATEGORY_INSTANCE etc)

removed chat: BATTLEGROUND / BATTLEGROUND_LEADER
new chat: INSTANCE_CHAT / INSTANCE_CHAT_LEADER
removed globalstring: BATTLEGROUND_MESSAGE|CHAT_BATTLEGROUND_GET|CHAT_BATTLEGROUND_LEADER_GET|CHAT_BATTLEGROUND_SEND
added globalstring: CHAT_INSTANCE_CHAT_GET|CHAT_INSTANCE_CHAT_LEADER_GET|CHAT_INSTANCE_CHAT_SEND

added globalstring: FACTION_STANDING_INCREASED_ACH_BONUS|FACTION_STANDING_INCREASED_DOUBLE_BONUS

Code:

local id, rep, maxRep, name, text, texture, reaction, threshold, nextThreshold = GetFriendshipReputation();
-- name inserted after maxRep, nextThreshold added in 5.1.0

local totalMembers, onlineMembers, onlineAndMobileMembers = GetNumGuildMembers();
-- onlineAndMobileMembers added in 5.1.0

local speciesID, customName, petLevel, xp, maxXp, displayID, isFavorite, name, petIcon = C_PetJournal.GetPetInfoByPetID(petID);
-- isFavorite inserted after displayID in 5.1.0

removed: GetFriendshipReputationByID(factionID)
added: local friendID, friendRep, friendMaxRep, friendName, friendText, friendTexture, friendTextLevel, friendThreshold, nextFriendThreshold = GetFriendshipReputation(factionID);
-- not a direct replacement as returns have been changed as well

local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, shouldConsolidate, spellId, canApplyAura, isBossDebuff, isCastByPlayer, [points1, points2, points3], unknown  = UnitAura|Buff|Debuff()
-- isCastByPlayer has been moved after isBossDebuff, points1-3 bumped 1 position to #15, #16, #17, unknown return at #18

local status, mapName, [instanceID, levelRangeMin, levelRangeMax,] teamSize, registeredMatch, [eligibleInQueue, waitingOnOtherActivity,] suspend = GetBattlefieldStatus(i);
-- instanceID, levelRangeMin, levelRangeMax, removed between mapName, teamSize, eligibleInQueue, waitingOnOtherActivity removed after registeredMatch, suspend added  in 5.1.0

removed: IsInScenarioGroup()

:SetTexture()
-- no longer accepts an empty string "" as no_texture, nil still works without causing the green texture of death effect

removed: PetExpBar*
added: PlayerFrameMultiGroupFrame

-- Instance Difficulty globals added
DIFFICULTY_DUNGEON_NORMAL = 1;
DIFFICULTY_DUNGEON_HEROIC = 2;
DIFFICULTY_RAID10_NORMAL = 3;
DIFFICULTY_RAID25_NORMAL = 4;
DIFFICULTY_RAID10_HEROIC = 5;
DIFFICULTY_RAID25_HEROIC = 6;
DIFFICULTY_RAID_LFR = 7;
DIFFICULTY_DUNGEON_CHALLENGE = 8;
DIFFICULTY_RAID40 = 9;

removed macros: /clearmaintank /clearmainassist (and their shorthand versions)
added macros: /stopspelltarget /summonbattlepet /randomfavoritepet /dismissbattlepet /dismisspet /summonpet (and their shorthand versions)
macro conditionals added:
"HasVehicleActionBar", "HasOverrideActionBar", "HasTempShapeshiftActionBar",
"HasOverrideUI", "GetVehicleBarIndex", "GetOverrideBarIndex",
"HasExtraActionBar", "GetTempShapeshiftBarIndex", "CanExitVehicle"

Miscellanea / Trivia:
Chat bubbles have their own font so it can be overridden separately
"ChatBubbleFont" there's also _KO|_RU|_ZH variants.

Interface option for setting "displayWorldPVPObjectives" cvar removed (not sure if cvar itself still exists)

A stray global _ was removed from WatchFrame.lua, we'll see if that resolves some of the map taint issues.

zork 11-28-12 06:07 AM

Aehm...wait.

Where did you find that Blizzard added those conditions? Do you have any source of information?
Lua Code:
  1. "HasVehicleActionBar", "HasOverrideActionBar", "HasTempShapeshiftActionBar",
  2. "HasOverrideUI", "GetVehicleBarIndex", "GetOverrideBarIndex",
  3. "HasExtraActionBar", "GetTempShapeshiftBarIndex", "CanExitVehicle"

So I could basically rewrite this
Lua Code:
  1. RegisterStateDriver(frame, "visibility", "[petbattle][overridebar][vehicleui][possessbar,@vehicle,exists] hide; show")

to
Lua Code:
  1. RegisterStateDriver(frame, "visibility", "[petbattle][HasOverrideUI] hide; show")

The caveat is that "HasOverrideUI" has to return true on every single occasion where the OverrideActionBar is shown. (Means the main actionbar got swapped out and the override actionbar got swapped in). The problem we had till now is that vehicleui, overridebar and possessbar fired under certain situation while actually showing the OverrideActionBar.

Need to test this with Phanx's macro.
Lua Code:
  1. /run local s=SecureCmdOptionParse print(s("[extrabar]extrabar"),s("[overridebar]overridebar"),s("[possessbar]possessbar"),s("[vehicleui]vehicleui"))
http://wowprogramming.com/docs/api/SecureCmdOptionParse


------------

Regarding UnitAura change.

Are you kidding on that? Why would they have removed value1, value2 and value3 returns? Any aura value tracker now relies on those values.

Dridzt 11-28-12 06:32 AM

Found the conditionals in RestrictedEnvironment.lua (diff from 5.0.5b) DIRECT_MACRO_CONDITIONAL_NAMES

Not sure you can use them like that, there should be proper macro options somewhere, these are just new functions added to state evaluation.

About UnitAura() ... yea I know makes no sense.

Xrystal 11-28-12 07:09 AM

The UnitAura change didn't seem to affect my little addon I wrote to watch for the Harmony self buff on my druid. After the patch it still works as expected. Unless those extra options contained values that were needed? For the Harmony self buff it returned the bonus heal %age but I never really needed it for my use.

Screamie 11-28-12 10:09 AM

Quote:

Originally Posted by zork (Post 269626)
Regarding UnitAura change.

Are you kidding on that? Why would they have removed value1, value2 and value3 returns? Any aura value tracker now relies on those values.

They haven't removed the return values from UnitAura/UnitBuff, but they added a extra return value after isBossDebuff return value. So this works for me:

Lua Code:
  1. local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, _,
  2. _, spellId, _, isBossDebuff, _, value1, value2, value3 = UnitBuff("player", index)

(this is taken from my private fix for freeAbsorbTracker by Freebaser).

But what this extra value Returns...hmm i don't know. It Returns me anytime nil

Hope this Helps

Screamie

Rythal 11-28-12 10:12 AM

calling settexture of "" in any form Minimap:SetPlayerTexture, frame:SetTexture etc results in an error now instead of silently failing.

Ketho 11-28-12 10:42 AM

Quote:

Originally Posted by Screamie (Post 269649)
They haven't removed the return values from UnitAura/UnitBuff, but they added a extra return value after isBossDebuff return value. So this works for me:
[...]

The diff suggests differently
https://github.com/tekkub/wow-ui-sou...6872ff#L56L604
Code:

- local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, shouldConsolidate, spellId, canApplyAura, isBossDebuff, points1, points2, points3, isCastByPlayer = UnitDebuff(unit, index, filter);
+ local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, shouldConsolidate, spellId, canApplyAura, isBossDebuff, isCastByPlayer = UnitDebuff(unit, index, filter);

Not sure what to believe anymore though. Or maybe they just switched them around ..

Screamie 11-28-12 11:09 AM

Quote:

Originally Posted by Ketho (Post 269659)
The diff suggests differently
https://github.com/tekkub/wow-ui-sou...6872ff#L56L604
Code:

- local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, shouldConsolidate, spellId, canApplyAura, isBossDebuff, points1, points2, points3, isCastByPlayer = UnitDebuff(unit, index, filter);
+ local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, shouldConsolidate, spellId, canApplyAura, isBossDebuff, isCastByPlayer = UnitDebuff(unit, index, filter);

Not sure what to believe anymore though. Or maybe they just switched them around ..

Ah Okay then is the return value #14 isCastByPlayer and #15, #16, #17 are value1-value3

Fixed another addon with the same method as i do on freeAbsorbTracker (added a _, as return value #14 and then the #15 is value1.

Greetings Screamie

Rainrider 11-29-12 06:26 AM

Those are the returns from UnitAura for Trap Launcher:
Quote:

Dump: value=UnitAura("player", 2)
[1]="Trap Launcher",
[2]="",
[3]="INTERFACE\\ICONS\\ability_hunter_traplauncher",
[4]=0,
[6]=0,
[7]=0,
[8]="player",
[11]=77769,
[12]=true,
[14]=true,
[15]=60192,
[16]=82939,
[17]=82941,
[18]=82948
Maybe somebody can shed some light on the last 4.

Xrystal 11-29-12 06:55 AM

1 Attachment(s)
60192 - Freezing Trap
82939 - Explosive Trap
82941 - Ice Trap
82948 - Snake Trap

Recalling my hunter set up it looks like these are the spells available on the flyout spell button for the trap launcher ability.

Yep, screenshot.


All times are GMT -6. The time now is 10:22 AM.

vBulletin © 2014, Jelsoft Enterprises Ltd
©2012 ZAM Network LLC