Commit c5903bda authored by TOM_RUS's avatar TOM_RUS

WOW-36532patch9.0.2_Beta

parent 819e0b70
...@@ -308,7 +308,7 @@ function CovenantSoulbindButtonMixin:OnEnter() ...@@ -308,7 +308,7 @@ function CovenantSoulbindButtonMixin:OnEnter()
GameTooltip:Hide(); GameTooltip:Hide();
local spell = Spell:CreateFromSpellID(self.spellID); local spell = Spell:CreateFromSpellID(self.spellID);
spell:ContinueOnSpellLoad(function() self.spellDataLoadedCancelCallback = spell:ContinueWithCancelOnSpellLoad(function()
EmbeddedItemTooltip:SetOwner(self, "ANCHOR_RIGHT", -12, -10); EmbeddedItemTooltip:SetOwner(self, "ANCHOR_RIGHT", -12, -10);
GameTooltip_AddHighlightLine(EmbeddedItemTooltip, self.name); GameTooltip_AddHighlightLine(EmbeddedItemTooltip, self.name);
GameTooltip_AddBlankLineToTooltip(EmbeddedItemTooltip); GameTooltip_AddBlankLineToTooltip(EmbeddedItemTooltip);
...@@ -316,11 +316,16 @@ function CovenantSoulbindButtonMixin:OnEnter() ...@@ -316,11 +316,16 @@ function CovenantSoulbindButtonMixin:OnEnter()
GameTooltip_AddBlankLineToTooltip(EmbeddedItemTooltip); GameTooltip_AddBlankLineToTooltip(EmbeddedItemTooltip);
EmbeddedItemTooltip_SetSpellWithTextureByID(EmbeddedItemTooltip.ItemTooltip, self.spellID, spell:GetSpellTexture()); EmbeddedItemTooltip_SetSpellWithTextureByID(EmbeddedItemTooltip.ItemTooltip, self.spellID, spell:GetSpellTexture());
EmbeddedItemTooltip:Show(); EmbeddedItemTooltip:Show();
self.spellDataLoadedCancelCallback = nil;
end); end);
end end
function CovenantSoulbindButtonMixin:OnLeave() function CovenantSoulbindButtonMixin:OnLeave()
EmbeddedItemTooltip:Hide(); EmbeddedItemTooltip:Hide();
if self.spellDataLoadedCancelCallback then
self.spellDataLoadedCancelCallback();
self.spellDataLoadedCancelCallback = nil;
end
end end
CovenantPreviewModelSceneContainerMixin = { }; CovenantPreviewModelSceneContainerMixin = { };
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<Texture parentKey="Portrait"> <Texture parentKey="Portrait">
<Anchors> <Anchors>
<Anchor point="TOPLEFT" x="6" y="-8"/> <Anchor point="TOPLEFT" x="6" y="-8"/>
<Anchor point="BOTTOMRIGHT" x="-6" y="10"/> <Anchor point="BOTTOMRIGHT" x="-6" y="12"/>
</Anchors> </Anchors>
</Texture> </Texture>
</Layer> </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 = {} CircularBufferMixin = {}
function CreateCircularBuffer(maxElements) function CreateCircularBuffer(maxElements)
...@@ -31,10 +45,10 @@ end ...@@ -31,10 +45,10 @@ end
function CircularBufferMixin:PushFront(element) function CircularBufferMixin:PushFront(element)
self.headIndex = self.headIndex + 1; self.headIndex = self.headIndex + 1;
local insertIndex = self.headIndex; local insertIndex = self.headIndex;
self.elements[insertIndex] = element; self.elements[insertIndex] = element;
self.headIndex = self.headIndex % self.maxElements; self.headIndex = self.headIndex % self.maxElements;
return insertIndex; return insertIndex;
...@@ -68,7 +82,7 @@ function CircularBufferMixin:RemoveIf(predicateFunction, transformFunction) ...@@ -68,7 +82,7 @@ function CircularBufferMixin:RemoveIf(predicateFunction, transformFunction)
transformFunction = transformFunction or PassThrough; transformFunction = transformFunction or PassThrough;
local elements = {}; local elements = {};
for i, entry in self:EnumerateIndexedEntries() do 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; elements[#elements + 1] = entry;
end end
end end
...@@ -85,8 +99,8 @@ function CircularBufferMixin:TransformIf(predicateFunction, transformFunction, e ...@@ -85,8 +99,8 @@ function CircularBufferMixin:TransformIf(predicateFunction, transformFunction, e
entryTransform = entryTransform or PassThrough; entryTransform = entryTransform or PassThrough;
for i, entry in ipairs(self.elements) do for i, entry in ipairs(self.elements) do
if securecall(predicateFunction, securecall(entryTransform, entry)) then if safesecurecall(predicateFunction, safesecurecall(entryTransform, entry)) then
self.elements[i] = securecall(transformFunction, securecall(entryTransform, entry)); self.elements[i] = safesecurecall(transformFunction, safesecurecall(entryTransform, entry));
changed = true; changed = true;
end end
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