Hello, I've been like 3 hours and I can't do that works. I also want to know if it is safe to register the event in OnSpawn? Same as self:registerEvent('amplificationPotions')
What does not work is the attacker:getStorageValue(Storage.dromePotions.iceAmplification), the rest works fine
Lua:
function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
if attacker:getStorageValue(Storage.dromePotions.iceAmplification) == 1 then
if primaryType == COMBAT_FIREDAMAGE then
print("Primary damage type is FIRE.. amplyfing damage")
print("Initial damage value: " .. primaryDamage)
primaryDamage = primaryDamage / 0.92
print("Modified damage value: " .. primaryDamage)
end
if secondaryType == COMBAT_FIREDAMAGE then
print("Primary damage type is FIRE.. amplyfing damage")
print("Initial damage value: " .. primaryDamage)
secondaryDamage = secondaryDamage / 0.92
print("Modified damage value: " .. primaryDamage)
end
end
return primaryDamage, primaryType, secondaryDamage, secondaryType
end