From 5942f79adf70c05ec3f2efcfbe0a4a3dde128c6b Mon Sep 17 00:00:00 2001 From: Buds Date: Wed, 26 Feb 2025 20:55:27 +0100 Subject: [PATCH] cache buildup optimization for 11.1 --- WeakAurasOptions/Cache.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/WeakAurasOptions/Cache.lua b/WeakAurasOptions/Cache.lua index 7c449c1cbe..66c57e8a79 100644 --- a/WeakAurasOptions/Cache.lua +++ b/WeakAurasOptions/Cache.lua @@ -49,6 +49,11 @@ function spellCache.Build() holes[243806] = 261127 holes[262591] = 281624 holes[301101] = 324269 + elseif WeakAuras.IsRetail() then + holes = {} + holes[556606] = 936050 + holes[936051] = 1049295 + holes[1049296] = 1213133 end wipe(cache) local co = coroutine.create(function() @@ -113,8 +118,9 @@ local lastId print("####") while misses < 4000000 do id = id + 1 - local name = GetSpellInfo(id) - local icon = GetSpellTexture(id) + local spellInfo = C_Spell.GetSpellInfo(id) + local name = spellInfo and spellInfo.name + local icon = C_Spell.GetSpellTexture(id) if icon == 136243 then -- 136243 is the a gear icon, we can ignore those spells misses = 0 elseif name and name ~= "" and icon then