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

@@ -195,6 +195,7 @@ public class Config
public static boolean SHOW_NPC_LEVEL;
public static boolean SHOW_NPC_AGGRESSION;
public static boolean SHOW_NPC_CLAN_CREST;
public static boolean ATTACKABLES_CAMP_PLAYER_CORPSES;
public static int ZONE_TOWN;
public static int DEFAULT_PUNISH;
public static int DEFAULT_PUNISH_PARAM;
@@ -1539,6 +1540,7 @@ public class Config
SHOW_NPC_LEVEL = generalConfig.getBoolean("ShowNpcLevel", false);
SHOW_NPC_AGGRESSION = generalConfig.getBoolean("ShowNpcAggression", false);
SHOW_NPC_CLAN_CREST = generalConfig.getBoolean("ShowNpcClanCrest", false);
ATTACKABLES_CAMP_PLAYER_CORPSES = generalConfig.getBoolean("AttackablesCampPlayerCorpses", false);
FORCE_INVENTORY_UPDATE = generalConfig.getBoolean("ForceInventoryUpdate", false);
FORCE_COMPLETE_STATUS_UPDATE = generalConfig.getBoolean("ForceCompletePlayerStatusUpdate", true);
CHAR_DATA_STORE_INTERVAL = generalConfig.getInt("CharacterDataStoreInterval", 15) * 60 * 1000;

View File

@@ -492,7 +492,7 @@ 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().isPlayer() && (!getTarget().getActingPlayer().isAlikeDead() || getTarget().getActingPlayer().getAppearance().isInvisible()))))
if (!npc.isWalker() && ((getTarget() == null) || (getTarget().isPlayer() && ((!Config.ATTACKABLES_CAMP_PLAYER_CORPSES && getTarget().getActingPlayer().isAlikeDead()) || getTarget().getActingPlayer().getAppearance().isInvisible()))))
{
npc.setWalking();
npc.returnHome();