the darkway part 1

This commit is contained in:
luis
2026-11-09 23:54:09 -03:00
parent 59479e2ce4
commit 3878bc38fe
2 changed files with 44 additions and 20 deletions
@@ -17,21 +17,27 @@
/*
* The Darkway - map 3003, difficulty 208, scenario 3184, LFGDungeons 3083, AreaTable 16642, entered from map 0.
* Evidence: REPORT.md 2.2 / 6.5 and the shadowmoon 12.0.7.68974 capture, which ENDS INSIDE the delve during step
* 16101 - so the boss fight, the completion and the reward objects were never observed for this map.
* Evidence: 70783_thedarkwaydelve.pkt.sql / _parsed.txt - a FULL delve capture (12.1.0.70783) that reaches
* SMSG_SCENARIO_COMPLETED.
*
* Scenario 3184 steps: 16133 "Technician Mireille spoken to" (GameEvent 98477) -> 16100 "Sabotaged Ley Lines
* examined" (GameEvent 101992) -> 16102 "Voidbreaker Oglok slain" (kill 252102) -> 16101 "Ley Line Focusers"
* (CastSpell 1256207 x6 / GameEvent 101861 x6) -> 16103 "Infiltrator Gulkat slain" (criteria 60399 / GameEvent 85913).
*
* The final boss is DungeonEncounter 3361 "Infiltrator Gulkat" (DungeonEncounter.db2, MapID 3003). The world DB has
* THREE creature_template rows of that name - 251015, 251600, 256817 - and no capture shows which one the delve
* spawns, so delve_template.finalBossEntry stays 0 and the death of any of the three counts (IsFinalBoss override).
* Reward object placements are unknown for this map; DelveInstanceScript falls back to the boss's death position.
* The final boss is Infiltrator Gulkat (251600, DungeonEncounter 3361). He is NOT a static spawn: his create
* block arrives ~0.66 s after step 16103 becomes current (SCENARIO_STATE 21:56:46.050 -> create 21:56:46.713)
* at the position below, so he is summoned when the scenario reaches that step - the same pattern as
* The Gulf of Memory's Mul'tha'ul. The creature_template has two other rows named "Infiltrator Gulkat"
* (251015, 256817) which are NOT used by this delve.
*
* Completion objects (capture, "might be temporary spawn" rows): Bountiful Heavy Trunks 584518/584515 and
* Leave-O-Bot 205496 - positions in DelveCompletionSpawns (delves_common.cpp). No Fragment of Revelation.
*/
#include "delves_common.h"
#include "Creature.h"
#include "DB2Structure.h"
#include "InstanceScenario.h"
#include "Map.h"
#include "ScriptMgr.h"
namespace
@@ -48,15 +54,17 @@ enum TheDarkwayData
enum TheDarkwayIds : uint32
{
DUNGEON_ENCOUNTER_INFILTRATOR_GULKAT = 3361,
NPC_INFILTRATOR_GULKAT = 251600, // "Infiltrator Gulkat" - final boss (DungeonEncounter 3361)
DUNGEON_ENCOUNTER_GULKAT = 3361, // SMSG_ENCOUNTER_START/END + SMSG_BOSS_KILL
SCENARIO_STEP_INFILTRATOR = 16103, // Scenario 3184 final step "Infiltrator Gulkat slain"
};
// creature_template rows named "Infiltrator Gulkat" (tch_ws_world) - the capture never reached him
constexpr uint32 InfiltratorGulkatEntries[] = { 251015, 251600, 256817 };
// 70783_thedarkwaydelve.pkt.sql: create block of 251600 (CreateObject2), creature position quad
Position const GulkatSpawnPos = { 3105.751f, 4805.854f, 598.976f, 3.1935f };
DungeonEncounterData const encounters[] =
{
{ BOSS_INFILTRATOR_GULKAT, {{ DUNGEON_ENCOUNTER_INFILTRATOR_GULKAT }} }
{ BOSS_INFILTRATOR_GULKAT, {{ DUNGEON_ENCOUNTER_GULKAT }} }
};
class instance_the_darkway_delve : public InstanceMapScript
@@ -73,23 +81,33 @@ public:
LoadDungeonEncounterData(encounters);
}
void OnScenarioStepChanged(ScenarioStepEntry const* step) override
{
// Step 16103 becomes current -> the server summons Gulkat ~0.7 s later (capture timeline).
if (!step || step->ID != SCENARIO_STEP_INFILTRATOR || _bossSummoned)
return;
_bossSummoned = true;
instance->SummonCreature(NPC_INFILTRATOR_GULKAT, GulkatSpawnPos);
}
bool IsFinalBoss(Creature const* creature) const override
{
for (uint32 entry : InfiltratorGulkatEntries)
if (creature->GetEntry() == entry)
return true;
return false;
return creature->GetEntry() == NPC_INFILTRATOR_GULKAT;
}
void OnUnitDeath(Unit* unit) override
{
// No boss AI is bound (entry unknown): close the encounter here so SMSG_BOSS_KILL 3361 goes out.
// No boss AI is bound: close the encounter here so SMSG_BOSS_KILL 3361 goes out.
if (Creature const* creature = unit ? unit->ToCreature() : nullptr)
if (IsFinalBoss(creature) && GetBossState(BOSS_INFILTRATOR_GULKAT) != DONE)
SetBossState(BOSS_INFILTRATOR_GULKAT, DONE);
DelveInstanceScript::OnUnitDeath(unit);
}
private:
bool _bossSummoned = false;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
@@ -66,6 +66,9 @@ namespace Delves
Position HeavyTrunkA; // 584517
Position HeavyTrunkB; // 584519
Position LeaveOBot; // 205496
// Some delves use the "Bountiful" trunk variants instead of 584517/584519; 0 = use the defaults.
uint32 HeavyTrunkAEntry = 0;
uint32 HeavyTrunkBEntry = 0;
};
DelveCompletionSpawns const CompletionSpawns[] =
@@ -76,12 +79,15 @@ namespace Delves
// The Shadow Enclave (eversong 2612261 / 2621018 == deatholme 742784 / 757442)
{ 2952, {}, Position(166.078f, -101.342f, 218.528f, 1.5184f),
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): full delve capture 2026_11_08_07_06_40. No Fragment of Revelation.
// Heavy Trunks + Leave-O-Bot captured from .pkt.sql create blocks.
{ 2933, {}, Position(8684.763f, -4302.332f, 99.325f, 5.9516f),
Position(8687.529f, -4297.799f, 99.325f, 5.8469f), Position(8692.314f, -4295.394f, 99.409f, 0.3265f) },
// The Darkway (70783_thedarkwaydelve.pkt.sql, commented "might be temporary spawn" rows):
// Bountiful Heavy Trunks 584518/584515 + Leave-O-Bot 205496. No Fragment of Revelation.
{ 3003, {}, Position(3088.867f, 4811.938f, 598.892f, 0.4189f),
Position(3091.364f, 4801.626f, 598.892f, 6.1959f), Position(3200.856f, 4805.387f, 620.936f, 3.1678f),
584518, 584515 },
};
DelveCompletionSpawns const* GetCompletionSpawns(uint32 mapId)
@@ -312,8 +318,8 @@ namespace Delves
{
if (DelveCompletionSpawns const* spawns = GetCompletionSpawns(instance->GetId()))
{
SpawnDelveGameObject(GO_HEAVY_TRUNK_A, spawns->HeavyTrunkA);
SpawnDelveGameObject(GO_HEAVY_TRUNK_B, spawns->HeavyTrunkB);
SpawnDelveGameObject(spawns->HeavyTrunkAEntry ? spawns->HeavyTrunkAEntry : GO_HEAVY_TRUNK_A, spawns->HeavyTrunkA);
SpawnDelveGameObject(spawns->HeavyTrunkBEntry ? spawns->HeavyTrunkBEntry : GO_HEAVY_TRUNK_B, spawns->HeavyTrunkB);
return;
}