Configuration for Attackable corpse camping.
This commit is contained in:
		| @@ -624,6 +624,7 @@ public class Config | ||||
| 	public static boolean ALT_GAME_VIEWNPC; | ||||
| 	public static boolean SHOW_NPC_LEVEL; | ||||
| 	public static boolean SHOW_NPC_AGGRESSION; | ||||
| 	public static boolean ATTACKABLES_CAMP_PLAYER_CORPSES; | ||||
| 	public static boolean SHOW_CREST_WITHOUT_QUEST; | ||||
| 	public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; | ||||
| 	public static int MIN_NPC_LEVEL_DMG_PENALTY; | ||||
| @@ -2116,6 +2117,7 @@ public class Config | ||||
| 			ALT_GAME_VIEWNPC = npcConfig.getBoolean("AltGameViewNpc", false); | ||||
| 			SHOW_NPC_LEVEL = npcConfig.getBoolean("ShowNpcLevel", false); | ||||
| 			SHOW_NPC_AGGRESSION = npcConfig.getBoolean("ShowNpcAggression", false); | ||||
| 			ATTACKABLES_CAMP_PLAYER_CORPSES = npcConfig.getBoolean("AttackablesCampPlayerCorpses", false); | ||||
| 			SHOW_CREST_WITHOUT_QUEST = npcConfig.getBoolean("ShowCrestWithoutQuest", false); | ||||
| 			ENABLE_RANDOM_ENCHANT_EFFECT = npcConfig.getBoolean("EnableRandomEnchantEffect", false); | ||||
| 			MIN_NPC_LEVEL_DMG_PENALTY = npcConfig.getInt("MinNPCLevelForDmgPenalty", 78); | ||||
|   | ||||
| @@ -474,8 +474,9 @@ public class AttackableAI extends CreatureAI | ||||
| 		} | ||||
| 		 | ||||
| 		// Order this attackable to return to its spawn because there's no target to attack | ||||
| 		if (!npc.isWalker() && ((getTarget() == null) || getTarget().isInvisible() || (getTarget().isPlayer() && !getTarget().getActingPlayer().isAlikeDead()))) | ||||
| 		if (!npc.isWalker() && ((getTarget() == null) || getTarget().isInvisible() || (getTarget().isPlayer() && !Config.ATTACKABLES_CAMP_PLAYER_CORPSES && getTarget().getActingPlayer().isAlikeDead()))) | ||||
| 		{ | ||||
| 			npc.setWalking(); | ||||
| 			npc.returnHome(); | ||||
| 			return; | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment