new args for spell events

This commit is contained in:
avitasia
2026-02-19 11:09:23 -08:00
parent 03528e64fd
commit 9d58c0f310
+10 -3
View File
@@ -366,11 +366,18 @@ if not Nampower:HasMinimumVersion(2, 25, 0) then
return return
end end
local function onSpellStart(itemId, spellId, casterGuid, targetGuid, castFlags, castTime) local spellTypeNames = {
[0] = "Normal",
[1] = "Channeling",
[2] = "Autorepeating",
}
local function onSpellStart(itemId, spellId, casterGuid, targetGuid, castFlags, castTime, duration, spellType)
local spellName = GetSpellRecField and GetSpellRecField(spellId, "name") or spellId local spellName = GetSpellRecField and GetSpellRecField(spellId, "name") or spellId
local spellTypeName = spellTypeNames[spellType] or "Unknown"
print(string.format( print(string.format(
"SPELL_START: %s (id:%d) | Caster: %s -> Target: %s | ItemId: %d | Flags: %d | CastTime: %d", "SPELL_START: %s (id:%d) | Caster: %s -> Target: %s | ItemId: %d | Flags: %d | CastTime: %dms | Duration: %dms | Type: %s",
tostring(spellName), spellId, casterGuid, targetGuid, itemId, castFlags, castTime tostring(spellName), spellId, casterGuid, targetGuid, itemId, castFlags, castTime, duration, spellTypeName
)) ))
end end