Jump to content

Recommended Posts

Posted

Config for Restore HP to RB After Respawn

 

Credits to L2jLive

 

Index: trunk/L2jLive_GameServer/java/com/l2jserver/Config.java
===================================================================
--- /tmp/svn_fs20100723-29606-42xkca-0	Fri Jul 23 14:39:09 2010
+++ /tmp/svn_fs20100723-29606-f7r0s-0	Fri Jul 23 14:39:09 2010
@@ -348,6 +348,7 @@
	public static int PK_REWARD_AMOUNT;
	public static boolean SHOW_ANNOUNCEMENTS_AT_LOGIN;
	public static int RAID_MAX_DISTANCE_FROM_SPAWN;
+	public static boolean RAID_MAX_DISTANCE_FROM_SPAWN_RESTORE;
	public static boolean SHOW_WELCOME_MESSAGE;

	/** ************************************************** **/
@@ -3269,6 +3270,7 @@
					Random_Of_Zaken_Spawn = Random_Of_Zaken_Spawn * 3600000;

					RAID_MAX_DISTANCE_FROM_SPAWN = Integer.parseInt(grandbossSettings.getProperty("RaidMaxDistanceFromSpawn", "0"));
+					RAID_MAX_DISTANCE_FROM_SPAWN_RESTORE = Boolean.parseBoolean(grandbossSettings.getProperty("RaidMaxDistanceFromSpawnRestore","True"));
				}
				catch (Exception e)
				{

Index: trunk/L2jLive_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2RaidBossInstance.java
===================================================================
--- /tmp/svn_fs20100723-29606-wrovyt-0	Fri Jul 23 14:39:09 2010
+++ /tmp/svn_fs20100723-29606-eix1l0-0	Fri Jul 23 14:39:09 2010
@@ -151,8 +151,11 @@
		{
			if(Config.RAID_MAX_DISTANCE_FROM_SPAWN > 0 && !isInsideRadius(spawnX, spawnY, spawnZ, Math.max(Config.RAID_MAX_DISTANCE_FROM_SPAWN, 100), true, false))
			{
-				super.setCurrentHp(super.getMaxHp());
-				super.setCurrentMp(super.getMaxMp());
+				if (Config.RAID_MAX_DISTANCE_FROM_SPAWN_RESTORE)
+				{
+					super.setCurrentHp(super.getMaxHp());
+					super.setCurrentMp(super.getMaxMp());
+				}
				getAggroList().clear();
				teleToLocation(spawnX, spawnY, spawnZ, false);
			}

Index: trunk/L2jLive_GameServer/java/config/Grandboss.properties
===================================================================
--- /tmp/svn_fs20100723-29606-hhde3z-0	Fri Jul 23 14:39:09 2010
+++ /tmp/svn_fs20100723-29606-1ozo7ka-0	Fri Jul 23 14:39:09 2010
@@ -99,3 +99,7 @@
# Raidboss will teleport back to spawn then aggro lost.
# Default: 0 (Disabled)
RaidMaxDistanceFromSpawn = 0
+
+# Restore HP and MP after Respawn?
+# Default: True
+RaidMaxDistanceFromSpawnRestore = True

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...