mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
removed useless GetSpellRecField checks
This commit is contained in:
@@ -5901,11 +5901,9 @@ function CleveRoids.Frame:SPELL_QUEUE_EVENT()
|
|||||||
queueType = eventCode,
|
queueType = eventCode,
|
||||||
queueTime = GetTime()
|
queueTime = GetTime()
|
||||||
}
|
}
|
||||||
if GetSpellRecField then
|
local name = C_Spell.GetSpellName(spellId)
|
||||||
local name = C_Spell.GetSpellName(spellId)
|
if name then
|
||||||
if name then
|
CleveRoids.queuedSpell.spellName = name
|
||||||
CleveRoids.queuedSpell.spellName = name
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
-- BUGFIX: Update casting state when spell is queued (for [casting] conditional)
|
-- BUGFIX: Update casting state when spell is queued (for [casting] conditional)
|
||||||
if CleveRoids.UpdateCastingState then
|
if CleveRoids.UpdateCastingState then
|
||||||
@@ -5942,11 +5940,9 @@ function CleveRoids.Frame:SPELL_CAST_EVENT()
|
|||||||
targetGuid = targetGuid,
|
targetGuid = targetGuid,
|
||||||
timestamp = GetTime()
|
timestamp = GetTime()
|
||||||
}
|
}
|
||||||
if GetSpellRecField then
|
local name = C_Spell.GetSpellName(spellId)
|
||||||
local name = C_Spell.GetSpellName(spellId)
|
if name then
|
||||||
if name then
|
CleveRoids.lastCastSpell.spellName = name
|
||||||
CleveRoids.lastCastSpell.spellName = name
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Track pending cast for SPELL_GO correlation (reactive ability detection)
|
-- Track pending cast for SPELL_GO correlation (reactive ability detection)
|
||||||
|
|||||||
+2
-6
@@ -247,7 +247,6 @@ function CleveRoids.GetChannelDurationFromTooltipByID(spellID)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Fallback: resolve name and scan tooltip
|
-- Fallback: resolve name and scan tooltip
|
||||||
if not GetSpellRecField then return nil end
|
|
||||||
local spellName = C_Spell.GetSpellName(spellID)
|
local spellName = C_Spell.GetSpellName(spellID)
|
||||||
if not spellName then return nil end
|
if not spellName then return nil end
|
||||||
return CleveRoids.GetSpellDurationFromTooltip(spellName)
|
return CleveRoids.GetSpellDurationFromTooltip(spellName)
|
||||||
@@ -7105,10 +7104,7 @@ function CleveRoids.ApplySetBonusModifier(spellID, baseDuration)
|
|||||||
local modifiedDuration = modifier.modifier(baseDuration)
|
local modifiedDuration = modifier.modifier(baseDuration)
|
||||||
|
|
||||||
if modifiedDuration ~= baseDuration and CleveRoids.debug then
|
if modifiedDuration ~= baseDuration and CleveRoids.debug then
|
||||||
local spellName = "Unknown"
|
local spellName = C_Spell.GetSpellName(spellID) or "Unknown"
|
||||||
if GetSpellRecField then
|
|
||||||
spellName = C_Spell.GetSpellName(spellID) or spellName
|
|
||||||
end
|
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(
|
DEFAULT_CHAT_FRAME:AddMessage(
|
||||||
string.format("|cff00ffff[Set Bonus Modifier]|r %s (ID:%d): %.1fs -> %.1fs (%d/%d pieces)",
|
string.format("|cff00ffff[Set Bonus Modifier]|r %s (ID:%d): %.1fs -> %.1fs (%d/%d pieces)",
|
||||||
spellName, spellID, baseDuration, modifiedDuration,
|
spellName, spellID, baseDuration, modifiedDuration,
|
||||||
@@ -7585,7 +7581,7 @@ local function GetSpellSchool(spellName, spellID)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- If we only have spellID but no name, try to get name from GetSpellRecField
|
-- If we only have spellID but no name, try to get name from GetSpellRecField
|
||||||
if spellID and not spellName and GetSpellRecField then
|
if spellID and not spellName then
|
||||||
spellName = C_Spell.GetSpellName(spellID)
|
spellName = C_Spell.GetSpellName(spellID)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user