Siegh
Thronar Developer
Hello!
I have this spell where it applies a burn DoT to enemies. The burn values increase according to a formula considering the caster's level and magic level.
The issue is: after someone in the server cast this spell, the highest value a player has reached with it will be applied to every single other cast of the spell (???). For example: me with magic level 30 cast it, apply X damage. Every player who also cast it, even if they have 0 magic level, will apply the same X damage on their spells.
I've tried adding SUBID and CONDITIONID_COMBAT on it in order to prevent it from happening without any success.
How can I make sure the calculation is unique to every singular cast of the spell?
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, 8)
combat:setParameter(COMBAT_PARAM_EFFECT, 14)
function onCastSpell(creature, variant)
local burn = Condition(CONDITION_FIRE, CONDITIONID_COMBAT)
burn:setParameter(CONDITION_PARAM_DELAYED, true)
burn:addDamage(10, 1000, -((creature:getMagicLevel()*0.3)+(creature:getLevel()*3)))
burn:setParameter(CONDITION_PARAM_SUBID, 161)
combat:setCondition(burn)
--
combat:execute(creature, variant)
return true
end
I have this spell where it applies a burn DoT to enemies. The burn values increase according to a formula considering the caster's level and magic level.
The issue is: after someone in the server cast this spell, the highest value a player has reached with it will be applied to every single other cast of the spell (???). For example: me with magic level 30 cast it, apply X damage. Every player who also cast it, even if they have 0 magic level, will apply the same X damage on their spells.
I've tried adding SUBID and CONDITIONID_COMBAT on it in order to prevent it from happening without any success.
How can I make sure the calculation is unique to every singular cast of the spell?