From 9d58c0f3108d52602ac3a4b12571d1fd1de2ae2d Mon Sep 17 00:00:00 2001 From: avitasia Date: Thu, 19 Feb 2026 11:09:23 -0800 Subject: [PATCH] new args for spell events --- helper.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/helper.lua b/helper.lua index 294f89a..ce34fd6 100644 --- a/helper.lua +++ b/helper.lua @@ -366,11 +366,18 @@ if not Nampower:HasMinimumVersion(2, 25, 0) then return 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 spellTypeName = spellTypeNames[spellType] or "Unknown" print(string.format( - "SPELL_START: %s (id:%d) | Caster: %s -> Target: %s | ItemId: %d | Flags: %d | CastTime: %d", - tostring(spellName), spellId, casterGuid, targetGuid, itemId, castFlags, castTime + "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, duration, spellTypeName )) end