function DamageEngine_HookSpell takes unit source, widget target, real amount, boolean b1, boolean b2, attacktype at, damagetype dt, weapontype wt returns nothing
set udg_DamageEventType = udg_DamageTypeSpell
endfunction
function DamageEngine_HookSpellBJ takes unit c, unit t, real amt, attacktype attype, damagetype dmgtype returns nothing
set udg_DamageEventType = udg_DamageTypeSpell
endfunction
hook UnitDamageTarget DamageEngine_HookSpell
hook UnitDamageTargetBJ DamageEngine_HookSpellBJ