Quantcast New/changed in build 26522. - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-30-18, 08:18 PM   #1
thomasjohnshannon
A Theradrim Guardian
 
thomasjohnshannon's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 62
New/changed in build 26522.

I was looking over the code from the patch and here are a few of the things I noticed.

Old loot code has been removed. RIP Master Loot

New functions and table info added to C_TaxiMap.

Updated cancelaura macro command function. Now uses CancelSpellByName(name) instead of CancelUnitBuff(unit, spell, [filter or rank]).

New leave vehicle slash function.

Lua Code:
  1. SECURE_ACTIONS.leavevehicle =
  2. function (self, unit, button)
  3.    VehicleExit();
  4. end;

Small change to ITEM_QUALITY_COLORS.

Lua Code:
  1. local r, g, b = GetItemQualityColor(i);
  2. local color = CreateColor(r, g, b, 1);
  3. ITEM_QUALITY_COLORS[i] = { r = r, g = g, b = b, hex = color:GenerateHexColorMarkup(), color = color };
With related new function GenerateHexColorMarkup.

Lua Code:
  1. function ColorMixin:GenerateHexColorMarkup()
  2.   return "|c"..self:GenerateHexColor();
  3. end

New map function.
Lua Code:
  1. {
  2.   Name = "GetPlayerMapPosition",
  3.   Type = "Function",
  4.   Documentation = { "Only works for the player and party members." },
  5.  
  6.   Arguments =
  7.   {
  8.     { Name = "uiMapID", Type = "number", Nilable = false },
  9.     { Name = "unitToken", Type = "string", Nilable = false },
  10.   },
  11.  
  12.   Returns =
  13.   {
  14.     { Name = "position", Type = "table", Mixin = "Vector2DMixin", Nilable = true },
  15.   },
  16. },

New GameTooltip functions.

Lua Code:
  1. function GameTooltip_SetTitle(tooltip, text, overrideColor, wrap)
  2.   local titleColor = overrideColor or HIGHLIGHT_FONT_COLOR;
  3.   local r, g, b, a = titleColor:GetRGBA();
  4.   tooltip:SetText(text, r, g, b, a, wrap);
  5. end
  6.  
  7. function GameTooltip_AddNormalLine(tooltip, text, wrap)
  8.   GameTooltip_AddColoredLine(tooltip, text, NORMAL_FONT_COLOR, wrap);
  9. end
  10.  
  11. function GameTooltip_AddInstructionLine(tooltip, text, wrap)
  12.   GameTooltip_AddColoredLine(tooltip, text, GREEN_FONT_COLOR, wrap);
  13. end
  14.  
  15. function GameTooltip_AddColoredLine(tooltip, text, color, wrap)
  16.   local r, g, b, a = color:GetRGBA();
  17.   tooltip:AddLine(text, r, g, b, a, wrap);
  18. end
  19.  
  20. function EmbeddedItemTooltip_SetSpellByQuestReward(self, rewardIndex, questID)
  21.   local texture, name, isTradeskillSpell, isSpellLearned, hideSpellLearnText, isBoostSpell, garrFollowerID, genericUnlock, spellID = GetQuestLogRewardSpell(rewardIndex, questID);
  22.   if garrFollowerID then
  23.     EmbeddedItemTooltip_PrepareForFollower(self);
  24.     local data = GarrisonFollowerTooltipTemplate_BuildDefaultDataForID(garrFollowerID);
  25.     GarrisonFollowerTooltipTemplate_SetGarrisonFollower(self.FollowerTooltip, data);
  26.     EmbeddedItemTooltip_UpdateSize(self);
  27.     return true;
  28.   elseif name and texture then
  29.     self.itemID = nil;
  30.     self.spellID = spellID;
  31.  
  32.     self:Show();
  33.     EmbeddedItemTooltip_PrepareForSpell(self);
  34.     self.Tooltip:SetOwner(self, "ANCHOR_NONE");
  35.     self.Tooltip:SetQuestLogRewardSpell(rewardIndex, questID);
  36.     SetItemButtonQuality(self, LE_ITEM_QUALITY_COMMON);
  37.     SetItemButtonCount(self, 0);
  38.     self.Icon:SetTexture(texture);
  39.     self.Tooltip:SetPoint("TOPLEFT", self.Icon, "TOPRIGHT", 0, 10);
  40.     EmbeddedItemTooltip_UpdateSize(self);
  41.     return true;
  42.   end
  43.   return false;
  44. end

New Achievement function.

Lua Code:
  1. function OpenAchievementFrameToAchievement(achievementID)
  2.   if ( not AchievementFrame ) then
  3.     AchievementFrame_LoadUI();
  4.   end
  5.   if ( not AchievementFrame:IsShown() ) then
  6.     AchievementFrame_ToggleAchievementFrame();
  7.   end
  8.   AchievementFrame_SelectAchievement(achievementID);
  9. end

New util function.

Lua Code:
  1. function CallMethodOnNearestAncestor(self, methodName, ...)
  2.   local ancestor = self:GetParent();
  3.   while ancestor and not ancestor[methodName] do
  4.     ancestor = ancestor:GetParent();
  5.   end
  6.  
  7.   if ancestor then
  8.     ancestor[methodName](ancestor, ...);
  9.     return true;
  10.   end
  11.  
  12.   return false;
  13. end
__________________
Thomas aka Urnn

Last edited by thomasjohnshannon : 04-30-18 at 10:32 PM.
  Reply With Quote
 

WoWInterface » PTR » PTR API and Graphics Changes » New/changed in build 26522.

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