new args for spell events
This commit is contained in:
+10
-3
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user