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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock