Переглянути джерело

Config option to set whether NPCs are attackable.

GodKratos 16 роки тому
батько
коміт
d898fe5884

+ 4 - 0
L2_GameServer/java/config/NPC.properties

@@ -28,6 +28,10 @@ AnnounceMammonSpawn = False
 # Retail: true
 # Retail: true
 AltMobAgroInPeaceZone = True
 AltMobAgroInPeaceZone = True
 
 
+# Defines whether NPCs are attackable by default
+# Retail: true
+AltAttackableNpcs = True
+
 # Allows non-GM players to view NPC stats via shift-click
 # Allows non-GM players to view NPC stats via shift-click
 AltGameViewNpc = False
 AltGameViewNpc = False
 
 

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

@@ -573,6 +573,7 @@ public final class Config
 	
 	
 	public static boolean	ANNOUNCE_MAMMON_SPAWN;
 	public static boolean	ANNOUNCE_MAMMON_SPAWN;
 	public static boolean	ALT_MOB_AGRO_IN_PEACEZONE;
 	public static boolean	ALT_MOB_AGRO_IN_PEACEZONE;
+	public static boolean	ALT_ATTACKABLE_NPCS;
 	public static boolean	ALT_GAME_VIEWNPC;
 	public static boolean	ALT_GAME_VIEWNPC;
 	public static int		MAX_DRIFT_RANGE;
 	public static int		MAX_DRIFT_RANGE;
     public static boolean	DEEPBLUE_DROP_RULES;
     public static boolean	DEEPBLUE_DROP_RULES;
@@ -1647,7 +1648,8 @@ public final class Config
 	                NPC.load(is);
 	                NPC.load(is);
 	                
 	                
 	                ANNOUNCE_MAMMON_SPAWN					= Boolean.parseBoolean(NPC.getProperty("AnnounceMammonSpawn", "True"));
 	                ANNOUNCE_MAMMON_SPAWN					= Boolean.parseBoolean(NPC.getProperty("AnnounceMammonSpawn", "True"));
-	                ALT_MOB_AGRO_IN_PEACEZONE				= Boolean.parseBoolean(NPC.getProperty("AltMobAgroInPeaceZone", "true"));
+	                ALT_MOB_AGRO_IN_PEACEZONE				= Boolean.parseBoolean(NPC.getProperty("AltMobAgroInPeaceZone", "True"));
+	                ALT_ATTACKABLE_NPCS						= Boolean.parseBoolean(NPC.getProperty("AltAttackableNpcs", "True"));
 	                ALT_GAME_VIEWNPC						= Boolean.parseBoolean(NPC.getProperty("AltGameViewNpc", "False"));
 	                ALT_GAME_VIEWNPC						= Boolean.parseBoolean(NPC.getProperty("AltGameViewNpc", "False"));
 	                MAX_DRIFT_RANGE							= Integer.parseInt(NPC.getProperty("MaxDriftRange", "300"));
 	                MAX_DRIFT_RANGE							= Integer.parseInt(NPC.getProperty("MaxDriftRange", "300"));
 	                DEEPBLUE_DROP_RULES						= Boolean.parseBoolean(NPC.getProperty("UseDeepBlueDropRules", "True"));
 	                DEEPBLUE_DROP_RULES						= Boolean.parseBoolean(NPC.getProperty("UseDeepBlueDropRules", "True"));

+ 1 - 1
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java

@@ -301,7 +301,7 @@ public class L2NpcInstance extends L2Character
 	@Override
 	@Override
 	public boolean isAttackable()
 	public boolean isAttackable()
 	{
 	{
-		return true;
+		return Config.ALT_ATTACKABLE_NPCS;
 	}
 	}
 	
 	
 	/**
 	/**