Pārlūkot izejas kodu

Separated autoloot for Raid/Grandbosses. Check config file for details.

_DS_ 16 gadi atpakaļ
vecāks
revīzija
bb494b6d41

+ 8 - 1
L2_GameServer/java/config/Character.properties

@@ -453,10 +453,17 @@ AltPartyRange2 = 1400
 StartingAdena = 0
 StartingAdena = 0
 
 
 # This option, when set to True, will enable automatically picking up items.
 # This option, when set to True, will enable automatically picking up items.
-# If set False it will force the player to pickup dropped items from mobs. (This excludes herbs mentioned above.)
+# If set False it will force the player to pickup dropped items from mobs.
+# This excludes herbs mentioned above and items from Raid/GrandBosses with minions.
 # Default: False
 # Default: False
 AutoLoot = False
 AutoLoot = False
 
 
+# This option, when set to True, will enable automatically picking up items from Raid/GrandBosses with minions.
+# If set False it will force the player to pickup dropped items from bosses.
+# This excludes herbs mentioned above and items from mobs.
+# Default: False
+AutoLootRaids = False
+
 # This is the time in seconds that it will take for the player command "//unstuck" to activate.
 # This is the time in seconds that it will take for the player command "//unstuck" to activate.
 # Default: 300
 # Default: 300
 UnstuckInterval = 300
 UnstuckInterval = 300

+ 3 - 0
L2_GameServer/java/net/sf/l2j/Config.java

@@ -149,6 +149,7 @@ public final class Config
 	public static int ALT_PARTY_RANGE2;
 	public static int ALT_PARTY_RANGE2;
 	public static int STARTING_ADENA;
 	public static int STARTING_ADENA;
 	public static boolean AUTO_LOOT;
 	public static boolean AUTO_LOOT;
+	public static boolean AUTO_LOOT_RAIDS;
 	public static int UNSTUCK_INTERVAL;
 	public static int UNSTUCK_INTERVAL;
 	public static int PLAYER_SPAWN_PROTECTION;
 	public static int PLAYER_SPAWN_PROTECTION;
 	public static boolean RESPAWN_RANDOM_ENABLED;
 	public static boolean RESPAWN_RANDOM_ENABLED;
@@ -1214,6 +1215,7 @@ public final class Config
 					ALT_PARTY_RANGE2 = Integer.parseInt(Character.getProperty("AltPartyRange2", "1400"));
 					ALT_PARTY_RANGE2 = Integer.parseInt(Character.getProperty("AltPartyRange2", "1400"));
 					STARTING_ADENA = Integer.parseInt(Character.getProperty("StartingAdena", "0"));
 					STARTING_ADENA = Integer.parseInt(Character.getProperty("StartingAdena", "0"));
 					AUTO_LOOT = Boolean.parseBoolean(Character.getProperty("AutoLoot", "false"));
 					AUTO_LOOT = Boolean.parseBoolean(Character.getProperty("AutoLoot", "false"));
+					AUTO_LOOT_RAIDS = Boolean.parseBoolean(Character.getProperty("AutoLootRaids", "false"));
 					UNSTUCK_INTERVAL = Integer.parseInt(Character.getProperty("UnstuckInterval", "300"));
 					UNSTUCK_INTERVAL = Integer.parseInt(Character.getProperty("UnstuckInterval", "300"));
 					PLAYER_SPAWN_PROTECTION = Integer.parseInt(Character.getProperty("PlayerSpawnProtection", "0"));
 					PLAYER_SPAWN_PROTECTION = Integer.parseInt(Character.getProperty("PlayerSpawnProtection", "0"));
 					RESPAWN_RANDOM_ENABLED = Boolean.parseBoolean(Character.getProperty("RespawnRandomInTown", "True"));
 					RESPAWN_RANDOM_ENABLED = Boolean.parseBoolean(Character.getProperty("RespawnRandomInTown", "True"));
@@ -2152,6 +2154,7 @@ public final class Config
 		else if (pName.equalsIgnoreCase("LifeCrystalNeeded")) LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(pValue);
 		else if (pName.equalsIgnoreCase("LifeCrystalNeeded")) LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(pValue);
 		else if (pName.equalsIgnoreCase("SpBookNeeded")) SP_BOOK_NEEDED = Boolean.parseBoolean(pValue);
 		else if (pName.equalsIgnoreCase("SpBookNeeded")) SP_BOOK_NEEDED = Boolean.parseBoolean(pValue);
 		else if (pName.equalsIgnoreCase("AutoLoot")) AUTO_LOOT = Boolean.parseBoolean(pValue);
 		else if (pName.equalsIgnoreCase("AutoLoot")) AUTO_LOOT = Boolean.parseBoolean(pValue);
+		else if (pName.equalsIgnoreCase("AutoLootRaids")) AUTO_LOOT_RAIDS = Boolean.parseBoolean(pValue);
 		else if (pName.equalsIgnoreCase("AutoLootHerbs")) AUTO_LOOT_HERBS = Boolean.parseBoolean(pValue);
 		else if (pName.equalsIgnoreCase("AutoLootHerbs")) AUTO_LOOT_HERBS = Boolean.parseBoolean(pValue);
 
 
 		else if (pName.equalsIgnoreCase("AltKarmaPlayerCanBeKilledInPeaceZone")) ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean.parseBoolean(pValue);
 		else if (pName.equalsIgnoreCase("AltKarmaPlayerCanBeKilledInPeaceZone")) ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean.parseBoolean(pValue);

+ 3 - 1
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/L2Attackable.java

@@ -1383,7 +1383,9 @@ public class L2Attackable extends L2Npc
 							_log.fine("Item id to drop: " + item.getItemId() + " amount: " + item.getCount());
 							_log.fine("Item id to drop: " + item.getItemId() + " amount: " + item.getCount());
 
 
 						// Check if the autoLoot mode is active
 						// Check if the autoLoot mode is active
-						if (Config.AUTO_LOOT || isFlying())
+						if (isFlying()
+								|| (!isRaid() && Config.AUTO_LOOT)
+								|| (isRaid() && Config.AUTO_LOOT_RAIDS))
 							player.doAutoLoot(this, item); // Give the item(s) to the L2PcInstance that has killed the L2Attackable
 							player.doAutoLoot(this, item); // Give the item(s) to the L2PcInstance that has killed the L2Attackable
 						else
 						else
 							dropItem(player, item); // drop the item on the ground
 							dropItem(player, item); // drop the item on the ground