diff --git a/sql/updates/world/master/2026_11_08_00_world_collegiate_calamity_delve.sql b/sql/updates/world/master/2026_11_08_00_world_collegiate_calamity_delve.sql new file mode 100644 index 00000000..c5d9fe99 --- /dev/null +++ b/sql/updates/world/master/2026_11_08_00_world_collegiate_calamity_delve.sql @@ -0,0 +1,23 @@ +-- Collegiate Calamity Delve Implementation +-- Map: 2933, Scenario: 3187, Zone: 16545 +-- Note: Full delve spawn data from complete run needed for boss and encounter placement + +-- Add delve template for Collegiate Calamity +DELETE FROM `delve_template` WHERE `id`=47; +INSERT INTO `delve_template` (`id`, `mapId`, `scenarioId`, `mapChallengeModeId`, `zoneId`, `factionId`, +`gossipMenuId`, `lfgDungeonsId`, `broadcastTextId`, `firstTierGossipOptionId`, +`entryX`, `entryY`, `entryZ`, `entryO`, +`exitX`, `exitY`, `exitZ`, `exitO`, `exitMapId`, +`activeScenarioId`, `rewardScenarioId`, `worldState26903`, `finalBossEntry`, +`tieredEntranceId`, `tieredEntranceUnknown3`, `traitTreeId`, `entranceUiWidgetSetId`, `modifierUiWidgetSetTier1`, +`companionSpawnX`, `companionSpawnY`, `companionSpawnZ`, `companionSpawnO`) +VALUES (47, 2933, 3187, 0, 16545, 0, +0, 0, 0, 0, +8784.42, -4449.41, 76.11, 5.60, +8458.07, -4915.77, 54.99, 0.0, 0, +0, 0, 0, 0, +0, 106, 0, 0, 0, +8784.42, -4449.41, 76.11, 5.60); + +-- Note: Creature spawns from entry sniff are ambient overworld spawns, not delve instance spawns +-- Full delve capture needed for instance-specific creature and GameObject placement diff --git a/src/server/scripts/KhazAlgar/Delves/CollegiateCalamity/instance_collegiate_calamity_delve.cpp b/src/server/scripts/KhazAlgar/Delves/CollegiateCalamity/instance_collegiate_calamity_delve.cpp new file mode 100644 index 00000000..7c42389f --- /dev/null +++ b/src/server/scripts/KhazAlgar/Delves/CollegiateCalamity/instance_collegiate_calamity_delve.cpp @@ -0,0 +1,105 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +/* + * Collegiate Calamity - map 2933, difficulty 208, scenario 3187, AreaTable 16545. + * A delve instance set in Thalassian University with academic-themed enemies. + * + * Scenario 3187: "Collegiate Calamity" - needs to be populated with step data from full delve capture. + * Current implementation provides basic delve framework without specific boss mechanics. + */ + +#include "delves_common.h" +#include "DB2Structure.h" +#include "Map.h" +#include "ScriptMgr.h" + +namespace +{ + +static char const* const ScriptName = "instance_collegiate_calamity_delve"; + +// Delve-specific encounter IDs (to be populated from full delve capture) +enum CollegiateCalamityIds : uint32 +{ + // Final boss entry - needs verification from full delve capture + // Currently set to 0 as the boss wasn't present in the entry sniff + NPC_FINAL_BOSS = 0, +}; + +// Entry position for the delve instance (from delve_template) +Position const EntryPosition = { 8784.42f, -4449.41f, 76.11f, 5.60f }; + +class instance_collegiate_calamity_delve : public InstanceMapScript +{ +public: + instance_collegiate_calamity_delve() : InstanceMapScript(ScriptName, 2933) { } + + struct instance_collegiate_calamity_delve_InstanceScript : public Delves::DelveInstanceScript + { + instance_collegiate_calamity_delve_InstanceScript(InstanceMap* map) + : Delves::DelveInstanceScript(map, 1 /* tier resolved at OnPlayerEnter */) + { + } + + void OnDelveStart() override + { + // Initialize delve-specific mechanics when players enter + // This can be expanded with custom Collegiate Calamity mechanics + } + + void OnDelveComplete() override + { + // Handle delve completion + Delves::DelveInstanceScript::OnDelveComplete(); + } + + void OnDelveFailed() override + { + // Handle delve failure + Delves::DelveInstanceScript::OnDelveFailed(); + } + + void OnCreatureCreate(Creature* creature) override + { + Delves::DelveInstanceScript::OnCreatureCreate(creature); + + // Hook for custom creature behavior + // Example: apply auras, set AI scripts, etc. + } + + void OnUnitDeath(Unit* unit) override + { + Delves::DelveInstanceScript::OnUnitDeath(unit); + + // If this is the final boss, trigger delve completion + if (Creature* creature = unit->ToCreature()) + if (creature->GetEntry() == NPC_FINAL_BOSS && IsFinalBoss(creature)) + OnScenarioComplete(); + } + + bool IsFinalBoss(Creature const* creature) const override + { + // Override to specify which creature is the final boss + return creature->GetEntry() == NPC_FINAL_BOSS; + } + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const override + { + return new instance_collegiate_calamity_delve_InstanceScript(map); + } +}; + +} // anonymous namespace + +void AddSC_instance_collegiate_calamity_delve() +{ + new instance_collegiate_calamity_delve(); +} \ No newline at end of file diff --git a/src/server/scripts/KhazAlgar/Delves/delves_common.cpp b/src/server/scripts/KhazAlgar/Delves/delves_common.cpp index e3ed35d3..14d9706c 100644 --- a/src/server/scripts/KhazAlgar/Delves/delves_common.cpp +++ b/src/server/scripts/KhazAlgar/Delves/delves_common.cpp @@ -78,6 +78,8 @@ namespace Delves Position(173.568f, -97.356f, 218.654f, 2.2864f), Position(151.821f, -65.059f, 226.183f, 4.6739f) }, // The Darkway (3003): the shadowmoon capture ends before the boss - no placements; the fallbacks below use the // boss's death position instead. + // Collegiate Calamity (2933): entry sniff only - no completion spawns captured. Will use boss death position fallback. + // Full delve capture needed for actual Fragment/HeavyTrunk/LeaveOBot placement. }; DelveCompletionSpawns const* GetCompletionSpawns(uint32 mapId) diff --git a/src/server/scripts/KhazAlgar/khaz_algar_script_loader.cpp b/src/server/scripts/KhazAlgar/khaz_algar_script_loader.cpp index fb8886b8..fbce7691 100644 --- a/src/server/scripts/KhazAlgar/khaz_algar_script_loader.cpp +++ b/src/server/scripts/KhazAlgar/khaz_algar_script_loader.cpp @@ -66,6 +66,7 @@ void AddSC_npc_delve_entrance(); void AddSC_npc_delvers_supplies(); // Midnight delves (12.1 retail void AddSC_instance_gulf_of_memory_delve(); +void AddSC_instance_collegiate_calamity_delve(); void AddSC_gulf_of_memory_encounters(); void AddSC_instance_the_darkway_delve(); void AddSC_npc_delve_companion(); @@ -126,6 +127,7 @@ void AddKhazAlgarScripts() // Midnight delves AddSC_instance_gulf_of_memory_delve(); + AddSC_instance_collegiate_calamity_delve(); AddSC_gulf_of_memory_encounters(); AddSC_instance_the_darkway_delve(); AddSC_npc_delve_companion();