From 3de32843f243b6a39dc31c8276f01792e6bac809 Mon Sep 17 00:00:00 2001
From: Rumen Nikiforov <unafraid89@gmail.com>
Date: Thu, 17 Nov 2011 22:41:23 +0000
Subject: [PATCH] BETA: Removing duplicated effect CombatPointHeal and renaming
 CombatPointHealOverTime to CpHealOverTime

---
 .../scripts/handlers/EffectMasterHandler.java |  6 +-
 .../effecthandlers/CombatPointHeal.java       | 70 -------------------
 ...tHealOverTime.java => CpHealOverTime.java} |  8 +--
 3 files changed, 6 insertions(+), 78 deletions(-)
 delete mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/CombatPointHeal.java
 rename L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/{CombatPointHealOverTime.java => CpHealOverTime.java} (86%)

diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 563390da64..238759c49f 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -28,12 +28,11 @@ import handlers.effecthandlers.ChanceSkillTrigger;
 import handlers.effecthandlers.CharmOfCourage;
 import handlers.effecthandlers.CharmOfLuck;
 import handlers.effecthandlers.ClanGate;
-import handlers.effecthandlers.CombatPointHeal;
-import handlers.effecthandlers.CombatPointHealOverTime;
 import handlers.effecthandlers.ConfuseMob;
 import handlers.effecthandlers.Confusion;
 import handlers.effecthandlers.CpDamPercent;
 import handlers.effecthandlers.CpHeal;
+import handlers.effecthandlers.CpHealOverTime;
 import handlers.effecthandlers.CpHealPercent;
 import handlers.effecthandlers.DamOverTime;
 import handlers.effecthandlers.Debuff;
@@ -117,11 +116,10 @@ public final class EffectMasterHandler
 		CharmOfCourage.class,
 		CharmOfLuck.class,
 		ClanGate.class,
-		CombatPointHeal.class,
-		CombatPointHealOverTime.class,
 		ConfuseMob.class,
 		Confusion.class,
 		CpHeal.class,
+		CpHealOverTime.class,
 		CpHealPercent.class,
 		CpDamPercent.class,
 		DamOverTime.class,
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/CombatPointHeal.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/CombatPointHeal.java
deleted file mode 100644
index 7d2b4a4bc7..0000000000
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/CombatPointHeal.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package handlers.effecthandlers;
-
-import com.l2jserver.gameserver.model.L2Effect;
-import com.l2jserver.gameserver.model.actor.L2Character;
-import com.l2jserver.gameserver.network.SystemMessageId;
-import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
-import com.l2jserver.gameserver.skills.Env;
-import com.l2jserver.gameserver.templates.effects.EffectTemplate;
-import com.l2jserver.gameserver.templates.skills.L2EffectType;
-
-public class CombatPointHeal extends L2Effect
-{
-	public CombatPointHeal(Env env, EffectTemplate template)
-	{
-		super(env, template);
-	}
-	
-	/**
-	 * 
-	 * @see com.l2jserver.gameserver.model.L2Effect#getEffectType()
-	 */
-	@Override
-	public L2EffectType getEffectType()
-	{
-		return L2EffectType.COMBAT_POINT_HEAL;
-	}
-	
-	/**
-	 * 
-	 * @see com.l2jserver.gameserver.model.L2Effect#onActionTime()
-	 */
-	@Override
-	public boolean onActionTime()
-	{
-		return false;
-	}
-
-	@Override
-	public boolean onStart()
-	{
-		L2Character target = getEffected();
-		if (target.isInvul())
-			return false;
-		
-		double cp = calc();
-		
-		if ((target.getCurrentCp() + cp) > target.getMaxRecoverableCp())
-			cp = target.getMaxRecoverableCp() - target.getCurrentCp();
-		target.setCurrentCp(cp + target.getCurrentCp());
-		
-		SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CP_WILL_BE_RESTORED);
-		sm.addNumber((int) cp);
-		target.sendPacket(sm);
-		return false;
-	}
-}
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/CombatPointHealOverTime.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java
similarity index 86%
rename from L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/CombatPointHealOverTime.java
rename to L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java
index b1b69b8eac..ebc9c2bbd8 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/CombatPointHealOverTime.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/CpHealOverTime.java
@@ -20,15 +20,15 @@ import com.l2jserver.gameserver.skills.Env;
 import com.l2jserver.gameserver.templates.effects.EffectTemplate;
 import com.l2jserver.gameserver.templates.skills.L2EffectType;
 
-public class CombatPointHealOverTime extends L2Effect
+public class CpHealOverTime extends L2Effect
 {
-	public CombatPointHealOverTime(Env env, EffectTemplate template)
+	public CpHealOverTime(Env env, EffectTemplate template)
 	{
 		super(env, template);
 	}
 	
 	// Special constructor to steal this effect
-	public CombatPointHealOverTime(Env env, L2Effect effect)
+	public CpHealOverTime(Env env, L2Effect effect)
 	{
 		super(env, effect);
 	}
@@ -50,7 +50,7 @@ public class CombatPointHealOverTime extends L2Effect
 	@Override
 	public L2EffectType getEffectType()
 	{
-		return L2EffectType.COMBAT_POINT_HEAL_OVER_TIME;
+		return L2EffectType.CPHEAL_OVER_TIME;
 	}
 	
 	/**
-- 
GitLab