#W# Removed: Got ride of stock treasurechest and dungeon trap spawners in favor of the new systems.

This commit is contained in:
WarrentyExpired 2026-10-26 13:19:14 -04:00
parent aedf8d276f
commit 6f6042b809
13 changed files with 4 additions and 2983 deletions

View file

@ -64,46 +64,6 @@ public static class TaskManager
// ==========================================
private static void OnServerBoot()
{
// Check if dungeon traps are disabled globally and if true deletes any spawners and traps.
if (!Settings.S_DungeonTraps)
{
List<Item> toDelete = new List<Item>();
foreach (Item item in World.Items.Values)
{
if (item is BaseTrap)
{
toDelete.Add(item);
continue;
}
if (item is BaseSpawner spawner)
{
bool spawnsTraps = false;
foreach (var entry in spawner.Entries)
{
if (entry?.SpawnedName != null && entry.SpawnedName.IndexOf("Trap", StringComparison.OrdinalIgnoreCase) >= 0)
{
spawnsTraps = true;
break;
}
}
if (spawnsTraps)
{
toDelete.Add(item);
}
}
}
int count = toDelete.Count;
for (int i = 0; i < count; i++)
{
if (toDelete[i] != null && !toDelete[i].Deleted)
{
toDelete[i].Delete();
}
}
if (count > 0)
{
Console.WriteLine($"TaskManager: S_DungeonTraps is FALSE. Purged {count} physical traps and trap spawners.");
}
}
}
}

View file

@ -113,11 +113,7 @@ namespace Server.Gumps
InvokeCommand("IS Data/Spawns/Underworld/**.json", from);
break;
case 4:
if (Settings.S_DungeonTraps)
{
InvokeCommand("IS Data/Spawns/traps.json", from);
}
InvokeCommand("IS Data/Spawns/Chests/**.json", from);
InvokeCommand("IS Data/Spawns/DungeonCrates/**.json", from);
InvokeCommand("IS Data/Spawns/Pedestals/**.json", from);
break;
case 5: InvokeCommand("WipeWildMobs", from); break;
@ -136,11 +132,7 @@ namespace Server.Gumps
InvokeCommand("Decorate", from);
InvokeCommand("IS Data/Spawns/Overworld/**.json", from);
InvokeCommand("IS Data/Spawns/Underworld/**.json", from);
if (Settings.S_DungeonTraps)
{
InvokeCommand("IS Data/Spawns/traps.json", from);
}
InvokeCommand("IS Data/Spawns/Chests/**.json", from);
InvokeCommand("IS Data/Spawns/DungeonCrates/**.json", from);
InvokeCommand("IS Data/Spawns/Pedestals/**.json", from);
from.SendMessage(0x3F, "World population complete.");

View file

@ -106,7 +106,7 @@ namespace Server.Custom
public override bool Decays => true;
public override bool IsDecoContainer => false;
private readonly TimeSpan _decayTime = TimeSpan.FromMinutes(Utility.RandomMinMax(15, 60));
private readonly TimeSpan _decayTime = TimeSpan.FromMinutes(Utility.RandomMinMax(45, 60));
public override TimeSpan DecayTime => _decayTime;
public override Rectangle2D Bounds

View file

@ -9,7 +9,6 @@ namespace Server
public static int S_Stables = 3; // 0-20 Extra stable slots
public static int S_DungeonBountyBoardDelay = 60; // 1-1440 minutes delay between bountie quests
public static int S_DungeonBountyRefusalDelay = 10; // 1-1440 minutes delay between refusing a quest
public static bool S_DungeonTraps = false; // Spawns Dugeon floor traps
public static bool S_RegionDungeonTraps = true; // Step activated dungeon traps
public static int S_RegionDungeonTrapsChance = 3; // 1-10 Chance to get a trap check per step
public static bool S_TrapDetected = false; // Get a message if the trap gets detected