--- upgrade_system_core.lua
+++ upgrade_system_core.lua
@@ -474,6 +474,9 @@
player:registerEvent("UpgradeSystemHealth")
player:registerEvent("UpgradeSystemMana")
player:registerEvent("UpgradeSystemPD")
+
+ local loginHP = player:getHealth()
+ local loginMP = player:getMana()
local maxHP = player:getMaxHealth()
local maxMP = player:getMaxMana()
@@ -536,6 +539,14 @@
end
end
end
+ local currentHP = player:getHealth()
+ if(currentHP <= loginHP) then
+ player:addHealth(loginHP - currentHP)
+ end
+ local currentMP = player:getMana()
+ if(currentMP <= loginMP) then
+ player:addMana(loginMP - currentMP)
+ end
end
function us_onManaChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)