All pastes #754190 Raw Edit

Miscellany

public text v1 · immutable
#754190 ·published 2007-10-29 21:09 UTC
rendered paste body
Index: C:/Documents and Settings/Administrateur/workspace/L2J-EnCours/java/net/sf/l2j/gameserver/model/L2Character.java
===================================================================
--- C:/Documents and Settings/Administrateur/workspace/L2J-EnCours/java/net/sf/l2j/gameserver/model/L2Character.java	(revision 1208)
+++ C:/Documents and Settings/Administrateur/workspace/L2J-EnCours/java/net/sf/l2j/gameserver/model/L2Character.java	(working copy)
@@ -1413,13 +1428,6 @@
 		// Stop HP/MP/CP Regeneration task
 		getStatus().stopHpMpRegeneration();
 
-		// Stop all active skills effects in progress on the L2Character,
-		// if the Character isn't a Noblesse Blessed L2PlayableInstance
-		if (this instanceof L2PlayableInstance && ((L2PlayableInstance)this).isNoblesseBlessed())
-			((L2PlayableInstance)this).stopNoblesseBlessing(null);
-		else
-			stopAllEffects();
-
 		// Send the Server->Client packet StatusUpdate with current HP and MP to all other L2PcInstance to inform
 		broadcastStatusUpdate();
 
@@ -1439,8 +1447,17 @@
 	}
 
 	/** Sets HP, MP and CP and revives the L2Character. */
-	public void doRevive()
-	{
+	public void doRevive() {
+		doRevive(false);
+	}
+	public void doRevive(boolean KeepBuff) {
+		// Stop all active skills effects in progress on the L2Character,
+		// if the Character isn't a Noblesse Blessed L2PlayableInstance
+		if (this instanceof L2PlayableInstance && ((L2PlayableInstance)this).isNoblesseBlessed())
+			((L2PlayableInstance)this).stopNoblesseBlessing(null);
+		else if(!KeepBuff)
+			stopAllEffects();
+		
 		if (!isTeleporting())
 		{
 			setIsPendingRevive(false);
@@ -1459,6 +1476,7 @@
 
 	/** Revives the L2Character using skill. */
 	public void doRevive(double revivePower) { doRevive(); }
+	public void doRevive(double revivePower, boolean KeepBuff) { doRevive(KeepBuff); }
 
 	/**
 	 * Check if the active L2Skill can be casted.<BR><BR>

Index: C:/Documents and Settings/Administrateur/workspace/L2J-EnCours/java/net/sf/l2j/gameserver/handler/skillhandlers/Resurrect.java
===================================================================
--- C:/Documents and Settings/Administrateur/workspace/L2J-EnCours/java/net/sf/l2j/gameserver/handler/skillhandlers/Resurrect.java	(revision 1208)
+++ C:/Documents and Settings/Administrateur/workspace/L2J-EnCours/java/net/sf/l2j/gameserver/handler/skillhandlers/Resurrect.java	(working copy)
@@ -75,6 +75,8 @@
             activeChar.sendPacket(SystemMessage.sendString("No valid target to resurrect"));
         }
         
+        boolean keepbuff = skill.getId() == 1410;
+
         for (L2Character cha: targetToRes)
             if (activeChar instanceof L2PcInstance)
             {
@@ -83,13 +85,13 @@
             	else if (cha instanceof L2PetInstance)
             	{
             		if (((L2PetInstance)cha).getOwner() == activeChar)
-            			cha.doRevive(Formulas.getInstance().calculateSkillResurrectRestorePercent(skill.getPower(), activeChar.getWIT()));
+            			cha.doRevive(Formulas.getInstance().calculateSkillResurrectRestorePercent(skill.getPower(), activeChar.getWIT()), keepbuff);
             		else
                 		((L2PetInstance)cha).getOwner().reviveRequest((L2PcInstance)activeChar,skill,true);
             	}
-            	else cha.doRevive(Formulas.getInstance().calculateSkillResurrectRestorePercent(skill.getPower(), activeChar.getWIT()));
+            	else cha.doRevive(Formulas.getInstance().calculateSkillResurrectRestorePercent(skill.getPower(), activeChar.getWIT()), keepbuff);
             }
-            else cha.doRevive(Formulas.getInstance().calculateSkillResurrectRestorePercent(skill.getPower(), activeChar.getWIT()));
+            else cha.doRevive(Formulas.getInstance().calculateSkillResurrectRestorePercent(skill.getPower(), activeChar.getWIT()), keepbuff);
 	}