Commit c5903bda authored by TOM_RUS's avatar TOM_RUS

WOW-36532patch9.0.2_Beta

parent 819e0b70
......@@ -308,7 +308,7 @@ function CovenantSoulbindButtonMixin:OnEnter()
GameTooltip:Hide();
local spell = Spell:CreateFromSpellID(self.spellID);
spell:ContinueOnSpellLoad(function()
self.spellDataLoadedCancelCallback = spell:ContinueWithCancelOnSpellLoad(function()
EmbeddedItemTooltip:SetOwner(self, "ANCHOR_RIGHT", -12, -10);
GameTooltip_AddHighlightLine(EmbeddedItemTooltip, self.name);
GameTooltip_AddBlankLineToTooltip(EmbeddedItemTooltip);
......@@ -316,11 +316,16 @@ function CovenantSoulbindButtonMixin:OnEnter()
GameTooltip_AddBlankLineToTooltip(EmbeddedItemTooltip);
EmbeddedItemTooltip_SetSpellWithTextureByID(EmbeddedItemTooltip.ItemTooltip, self.spellID, spell:GetSpellTexture());
EmbeddedItemTooltip:Show();
self.spellDataLoadedCancelCallback = nil;
end);
end
function CovenantSoulbindButtonMixin:OnLeave()
EmbeddedItemTooltip:Hide();
if self.spellDataLoadedCancelCallback then
self.spellDataLoadedCancelCallback();
self.spellDataLoadedCancelCallback = nil;
end
end
CovenantPreviewModelSceneContainerMixin = { };
......
......@@ -58,7 +58,7 @@
<Texture parentKey="Portrait">
<Anchors>
<Anchor point="TOPLEFT" x="6" y="-8"/>
<Anchor point="BOTTOMRIGHT" x="-6" y="10"/>
<Anchor point="BOTTOMRIGHT" x="-6" y="12"/>
</Anchors>
</Texture>
</Layer>
......
local securecall = securecall;
local type = type;
local error = error;
local CreateFromMixins = CreateFromMixins;
local function safesecurecall(fn, ...)
if type(fn) ~= "function" then
error("Function lookups forbidden");
return;
end
return securecall(fn, ...);
end
CircularBufferMixin = {}
function CreateCircularBuffer(maxElements)
......@@ -31,10 +45,10 @@ end
function CircularBufferMixin:PushFront(element)
self.headIndex = self.headIndex + 1;
local insertIndex = self.headIndex;
self.elements[insertIndex] = element;
self.headIndex = self.headIndex % self.maxElements;
return insertIndex;
......@@ -68,7 +82,7 @@ function CircularBufferMixin:RemoveIf(predicateFunction, transformFunction)
transformFunction = transformFunction or PassThrough;
local elements = {};
for i, entry in self:EnumerateIndexedEntries() do
if not securecall(predicateFunction, securecall(transformFunction, entry)) then
if not safesecurecall(predicateFunction, safesecurecall(transformFunction, entry)) then
elements[#elements + 1] = entry;
end
end
......@@ -85,8 +99,8 @@ function CircularBufferMixin:TransformIf(predicateFunction, transformFunction, e
entryTransform = entryTransform or PassThrough;
for i, entry in ipairs(self.elements) do
if securecall(predicateFunction, securecall(entryTransform, entry)) then
self.elements[i] = securecall(transformFunction, securecall(entryTransform, entry));
if safesecurecall(predicateFunction, safesecurecall(entryTransform, entry)) then
self.elements[i] = safesecurecall(transformFunction, safesecurecall(entryTransform, entry));
changed = true;
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment