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:
SECURE_ACTIONS.leavevehicle =
function (self, unit, button)
VehicleExit();
end;
Small change to ITEM_QUALITY_COLORS.
Lua Code:
local r, g, b = GetItemQualityColor(i);
local color = CreateColor(r, g, b, 1);
ITEM_QUALITY_COLORS[i] = { r = r, g = g, b = b, hex = color:GenerateHexColorMarkup(), color = color };
With related new function GenerateHexColorMarkup.
Lua Code:
function ColorMixin:GenerateHexColorMarkup()
return "|c"..self:GenerateHexColor();
end
New map function.
Lua Code:
{
Name = "GetPlayerMapPosition",
Type = "Function",
Documentation = { "Only works for the player and party members." },
Arguments =
{
{ Name = "uiMapID", Type = "number", Nilable = false },
{ Name = "unitToken", Type = "string", Nilable = false },
},
Returns =
{
{ Name = "position", Type = "table", Mixin = "Vector2DMixin", Nilable = true },
},
},
New GameTooltip functions.
Lua Code:
function GameTooltip_SetTitle(tooltip, text, overrideColor, wrap)
local titleColor = overrideColor or HIGHLIGHT_FONT_COLOR;
local r, g, b, a = titleColor:GetRGBA();
tooltip:SetText(text, r, g, b, a, wrap);
end
function GameTooltip_AddNormalLine(tooltip, text, wrap)
GameTooltip_AddColoredLine(tooltip, text, NORMAL_FONT_COLOR, wrap);
end
function GameTooltip_AddInstructionLine(tooltip, text, wrap)
GameTooltip_AddColoredLine(tooltip, text, GREEN_FONT_COLOR, wrap);
end
function GameTooltip_AddColoredLine(tooltip, text, color, wrap)
local r, g, b, a = color:GetRGBA();
tooltip:AddLine(text, r, g, b, a, wrap);
end
function EmbeddedItemTooltip_SetSpellByQuestReward(self, rewardIndex, questID)
local texture, name, isTradeskillSpell, isSpellLearned, hideSpellLearnText, isBoostSpell, garrFollowerID, genericUnlock, spellID = GetQuestLogRewardSpell(rewardIndex, questID);
if garrFollowerID then
EmbeddedItemTooltip_PrepareForFollower(self);
local data = GarrisonFollowerTooltipTemplate_BuildDefaultDataForID(garrFollowerID);
GarrisonFollowerTooltipTemplate_SetGarrisonFollower(self.FollowerTooltip, data);
EmbeddedItemTooltip_UpdateSize(self);
return true;
elseif name and texture then
self.itemID = nil;
self.spellID = spellID;
self:Show();
EmbeddedItemTooltip_PrepareForSpell(self);
self.Tooltip:SetOwner(self, "ANCHOR_NONE");
self.Tooltip:SetQuestLogRewardSpell(rewardIndex, questID);
SetItemButtonQuality(self, LE_ITEM_QUALITY_COMMON);
SetItemButtonCount(self, 0);
self.Icon:SetTexture(texture);
self.Tooltip:SetPoint("TOPLEFT", self.Icon, "TOPRIGHT", 0, 10);
EmbeddedItemTooltip_UpdateSize(self);
return true;
end
return false;
end
New Achievement function.
Lua Code:
function OpenAchievementFrameToAchievement(achievementID)
if ( not AchievementFrame ) then
AchievementFrame_LoadUI();
end
if ( not AchievementFrame:IsShown() ) then
AchievementFrame_ToggleAchievementFrame();
end
AchievementFrame_SelectAchievement(achievementID);
end
New util function.
Lua Code:
function CallMethodOnNearestAncestor(self, methodName, ...)
local ancestor = self:GetParent();
while ancestor and not ancestor[methodName] do
ancestor = ancestor:GetParent();
end
if ancestor then
ancestor[methodName](ancestor, ...);
return true;
end
return false;
end