Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Serverside Modding => Topic started by: Kobiesan on April 03, 2016, 02:34:53 am
-
Hi. I recently made a dummy script for a spell that does 150 damage to a target but if they are knocked down it does 300 damage instead. It works perfect HOWEVER it doesn't show the damage dealt when you cast it. The target's health changes but no numbers pop up on the screen showing the damage done. Can anyone crack the code?
function Tenderizer(effectIndex, spell)
if (spell:GetTarget():HasAuraWithMechanic(12)) then
spell:GetCaster():DealDamage(spell:GetTarget(), 300, 80914)
else
spell:GetCaster():DealDamage(spell:GetTarget(), 150, 80914)
end
end
RegisterDummySpell(80914, Tenderizer)
-
It only deals damage, it's not actually casting the spells... That's what I'd assume. Does DealDamage() take the spell variable as parameter for cast ?
-
It only deals damage, it's not actually casting the spells... That's what I'd assume. Does DealDamage() take the spell variable as parameter for cast ?
What do you mean? DealDamage deals damage to target with specified spell. I think the problem might be that it deals damage to the target with the spell value of itself but the spell doesn't do anything other than do this script. But I don't know how to fix that.
-
Bump.
-
Somehow I just doubt that DealDamage() is actually the function you are looking for. Something like CastSpell or similar seems far more plausible. But, I never worked too much with LUA.