Configuration for Attackable corpse camping.

This commit is contained in:
MobiusDevelopment
2022-07-23 01:09:01 +00:00
parent 563794ef55
commit 9e41afee0a
84 changed files with 195 additions and 32 deletions

View File

@@ -622,6 +622,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;
@@ -2163,6 +2164,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);

View File

@@ -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;
}