Reply
Thread Tools Display Modes
Unread 11-28-12, 06:09 AM   #1
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,191
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.

Last edited by Dridzt : 11-29-12 at 07:59 AM.
Dridzt is offline   Reply With Quote
Unread 11-28-12, 07:07 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,367
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.
__________________
| 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)

Last edited by zork : 11-28-12 at 07:19 AM.
zork is online now   Reply With Quote
Unread 11-28-12, 07:32 AM   #3
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,191
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.
Dridzt is offline   Reply With Quote
Unread 11-28-12, 08:09 AM   #4
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,034
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.
__________________
Xrystal is offline   Reply With Quote
Unread 11-28-12, 11:09 AM   #5
Screamie
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 2
Wink

Originally Posted by zork View Post
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

Last edited by Screamie : 11-28-12 at 11:35 AM.
Screamie is offline   Reply With Quote
Unread 11-28-12, 11:12 AM   #6
Rythal
Featured Artist
Featured
Join Date: Aug 2012
Posts: 1,085
calling settexture of "" in any form Minimap:SetPlayerTexture, frame:SetTexture etc results in an error now instead of silently failing.
Rythal is online now   Reply With Quote
Unread 11-28-12, 11:42 AM   #7
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 566
Originally Posted by Screamie View Post
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 ..

Last edited by Ketho : 11-28-12 at 11:45 AM.
Ketho is offline   Reply With Quote
Unread 11-28-12, 12:09 PM   #8
Screamie
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 2
Thumbs up

Originally Posted by Ketho View Post
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
Screamie is offline   Reply With Quote
Unread 11-29-12, 07:26 AM   #9
Rainrider
A Rage Talon Dragon Guard
Join Date: Nov 2008
Posts: 318
Those are the returns from UnitAura for Trap Launcher:
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.
Rainrider is offline   Reply With Quote
Unread 11-29-12, 07:55 AM   #10
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,034
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.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_112912_135347.jpg
Views:	432
Size:	145.6 KB
ID:	7422  
__________________
Xrystal is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » Assorted 5.1.0 changes (not all-inclusive)

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