From 8b50bff41aa13567129b9790f386ef69635c8ca0 Mon Sep 17 00:00:00 2001
From: MELERIX <MELERIX@users.noreply.github.com>
Date: Tue, 30 Oct 2012 19:52:45 +0000
Subject: [PATCH] BETA: Fixed '''"Restoration Impact"''' skill (Reported by:
 valdaron), also fixed handlers to avoid duplicate heal restoration and
 messages when power is <= 0.

'''NOTE: Don't remove skillTypes from heal skills yet, because core still depend of it to manage heal behavior.'''
---
 .../data/scripts/handlers/skillhandlers/Heal.java    |  6 ++++++
 .../scripts/handlers/skillhandlers/HealPercent.java  |  6 ++++++
 .../scripts/handlers/skillhandlers/ManaHeal.java     |  6 ++++++
 .../dist/game/data/stats/skills/01400-01499.xml      | 12 +++++++-----
 4 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/Heal.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/Heal.java
index b126fe48cd..1fcbde2fc8 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/Heal.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/Heal.java
@@ -106,6 +106,12 @@ public class Heal implements ISkillHandler
 		double hp;
 		for (L2Character target: (L2Character[]) targets)
 		{
+			// if skill power is "0 or less" don't show heal system message.
+			if (skill.getPower() <= 0)
+			{
+				continue;
+			}
+			
 			// We should not heal if char is dead/invul
 			if (target == null || target.isDead() || target.isInvul())
 				continue;
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/HealPercent.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/HealPercent.java
index f13b9e94bc..78d30680b9 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/HealPercent.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/HealPercent.java
@@ -82,6 +82,12 @@ public class HealPercent implements ISkillHandler
 		boolean full = skill.getPower() == 100.0;
 		for (L2Character target : (L2Character[]) targets)
 		{
+			// if skill power is "0 or less" don't show heal system message.
+			if (skill.getPower() <= 0)
+			{
+				continue;
+			}
+			
 			// 1505 - sublime self sacrifice
 			if ((target.isDead() || target.isInvul()) && (skill.getId() != 1505))
 			{
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/ManaHeal.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/ManaHeal.java
index 22fd35140a..af58ad7a9e 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/ManaHeal.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/ManaHeal.java
@@ -43,6 +43,12 @@ public class ManaHeal implements ISkillHandler
 	{
 		for (L2Character target: (L2Character[]) targets)
 		{
+			// if skill power is "0 or less" don't show heal system message.
+			if (skill.getPower() <= 0)
+			{
+				continue;
+			}
+			
 			if (target.isInvul())
 				continue;
 			
diff --git a/L2J_DataPack_BETA/dist/game/data/stats/skills/01400-01499.xml b/L2J_DataPack_BETA/dist/game/data/stats/skills/01400-01499.xml
index a5f07d96dc..77273187c8 100644
--- a/L2J_DataPack_BETA/dist/game/data/stats/skills/01400-01499.xml
+++ b/L2J_DataPack_BETA/dist/game/data/stats/skills/01400-01499.xml
@@ -2811,25 +2811,25 @@
 	</skill>
 	<skill id="1488" levels="3" name="Restoration Impact" enchantGroup1="1">
 		<!-- Confirmed CT2.5 -->
-		<table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 83 83 83 84 84 84 85 85 85 </table>
+		<table name="#aggroPoints"> 701 941 1083 </table>
 		<table name="#magicLvl"> 49 60 68 </table>
 		<table name="#mpConsume"> 18 22 26 </table>
 		<table name="#mpInitialConsume"> 5 6 7 </table>
-		<table name="#aggro"> 701 941 1083 </table>
 		<table name="#amount"> 10 15 20 </table>
+		<table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 83 83 83 84 84 84 85 85 85 </table>
 		<table name="#ench1amount"> 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 </table>
-		<set name="aggroPoints" val="#aggro" />
+		<set name="aggroPoints" val="#aggroPoints" />
 		<set name="castRange" val="600" />
 		<set name="effectRange" val="1100" />
 		<set name="hitTime" val="1000" />
 		<set name="isMagic" val="1" /> <!-- Magic Skill -->
 		<set name="magicLvl" val="#magicLvl" />
-		<set name="mpInitialConsume" val="#mpInitialConsume" />
 		<set name="mpConsume" val="#mpConsume" />
+		<set name="mpInitialConsume" val="#mpInitialConsume" />
 		<set name="negateAbnormals" val="life_force_kamael,9" />
 		<set name="operateType" val="A1" />
 		<set name="reuseDelay" val="15000" />
-		<set name="skillType" val="NEGATE" />
+		<set name="skillType" val="HEAL_PERCENT" />
 		<set name="target" val="TARGET_ONE" />
 		<enchant1 name="magicLvl" val="#enchantMagicLvl" />
 		<cond msgId="109">
@@ -2837,9 +2837,11 @@
 		</cond>
 		<for>
 			<effect name="HealPercent" noicon="1" val="#amount" />
+			<effect name="Negate" noicon="1" val="0" effectType="NEGATE" />
 		</for>
 		<enchant1for>
 			<effect name="HealPercent" noicon="1" val="#ench1amount" />
+			<effect name="Negate" noicon="1" val="0" effectType="NEGATE" />
 		</enchant1for>
 	</skill>
 	<skill id="1489" levels="1" name="Summoner Ability - Resist Attribute">
-- 
GitLab