(fix/SpellCache): correct rebuild condition to avoid constant rebuilding
(cherry picked from commit 08b47ad7ad3848054e4764bec9dae2dc22b24aa3)
This commit is contained in:
+14
-15
@@ -110,20 +110,19 @@ local misses = 0
|
|||||||
local lastId
|
local lastId
|
||||||
print("####")
|
print("####")
|
||||||
while misses < 4000000 do
|
while misses < 4000000 do
|
||||||
id = id + 1
|
id = id + 1
|
||||||
local name = GetSpellInfo(id)
|
local name, _, icon = GetSpellInfo(id)
|
||||||
local icon = GetSpellTexture(id)
|
if (icon and icon:lower() == "interface\\icons\\trade_engineering") then -- 136243 is the a gear icon, we can ignore those spells
|
||||||
if (icon == "Interface\\Icons\\trade_engineering") then -- 136243 is the a gear icon, we can ignore those spells
|
misses = 0
|
||||||
misses = 0
|
elseif name and name ~= "" and icon then
|
||||||
elseif name and name ~= "" and icon then
|
if misses > 10000 then
|
||||||
if misses > 10000 then
|
print(("holes[%s] = %s"):format(lastId, id - 1))
|
||||||
print(("holes[%s] = %s"):format(lastId, id - 1))
|
end
|
||||||
end
|
lastId = id
|
||||||
lastId = id
|
misses = 0
|
||||||
misses = 0
|
else
|
||||||
else
|
misses = misses + 1
|
||||||
misses = misses + 1
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
print("lastId", lastId)
|
print("lastId", lastId)
|
||||||
]]
|
]]
|
||||||
@@ -214,7 +213,7 @@ function spellCache.Load(data)
|
|||||||
num = num + 1;
|
num = num + 1;
|
||||||
end
|
end
|
||||||
|
|
||||||
if(num < 39000 or metaData.locale ~= locale or metaData.build ~= build
|
if(num < 16000 or metaData.locale ~= locale or metaData.build ~= build
|
||||||
or metaData.version ~= version or not metaData.spellCacheStrings)
|
or metaData.version ~= version or not metaData.spellCacheStrings)
|
||||||
then
|
then
|
||||||
metaData.build = build;
|
metaData.build = build;
|
||||||
|
|||||||
Reference in New Issue
Block a user