From 56a4d6417c33053434b7a6549997fb199ba1e475 Mon Sep 17 00:00:00 2001 From: leper Date: Tue, 21 May 2013 23:50:42 +0000 Subject: [PATCH] Small cleanup. This was SVN commit r13416. --- binaries/data/mods/public/simulation/components/Heal.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/binaries/data/mods/public/simulation/components/Heal.js b/binaries/data/mods/public/simulation/components/Heal.js index fbd40ad5f7..7185bd5cc7 100644 --- a/binaries/data/mods/public/simulation/components/Heal.js +++ b/binaries/data/mods/public/simulation/components/Heal.js @@ -80,16 +80,13 @@ Heal.prototype.PerformHeal = function(target) var cmpHealth = Engine.QueryInterface(target, IID_Health); if (!cmpHealth) return; - - var hp = +this.template.HP; - hp = ApplyTechModificationsToEntity("Heal/HP", hp, this.entity); - - var targetState = cmpHealth.Increase(hp); + + var targetState = cmpHealth.Increase(ApplyTechModificationsToEntity("Heal/HP", +this.template.HP, this.entity)); // Add XP var cmpLoot = Engine.QueryInterface(target, IID_Loot); var cmpPromotion = Engine.QueryInterface(this.entity, IID_Promotion); - if (targetState!==undefined && cmpLoot && cmpPromotion) + if (targetState !== undefined && cmpLoot && cmpPromotion) { // HP healed * XP per HP cmpPromotion.IncreaseXp((targetState.new-targetState.old)*(cmpLoot.GetXp()/cmpHealth.GetMaxHitpoints()));