Possible fix for table.sort having nil values?

This commit is contained in:
andrew6180
2024-10-18 11:39:48 -07:00
parent c1ede02c8a
commit 6480fbb303
+7
View File
@@ -1759,6 +1759,13 @@
-- https://github.com/TrinityCore/TrinityCore/blob/d81a9e5bc3b3e13b47332b3e7817bd0a0b228cbc/src/server/game/Spells/Auras/SpellAuraEffects.h#L313-L367 -- https://github.com/TrinityCore/TrinityCore/blob/d81a9e5bc3b3e13b47332b3e7817bd0a0b228cbc/src/server/game/Spells/Auras/SpellAuraEffects.h#L313-L367
-- absorb order from trinitycore -- absorb order from trinitycore
local function AbsorbAuraOrderPred(a, b) local function AbsorbAuraOrderPred(a, b)
if a and not b then
return true
end
if b and not a then
return false
end
local spellA = a[1] local spellA = a[1]
local spellB = b[2] local spellB = b[2]