Skip to content

Commit f3dcce4

Browse files
committed
[3064] Culling of Stratholme - second half of the instance implementation
* Allows a complete event run and grant access to all encounters * Complete cinematics and events * Achievement and quest support included ToDo: burning city undead spawn - not yet implemented zombies spawn and zombie achievement - not yet implemented Please make sure that you update to the latest ACID and DB in order to enjoy the full experience!
1 parent e564f89 commit f3dcce4

8 files changed

Lines changed: 908 additions & 42 deletions

File tree

scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp

Lines changed: 596 additions & 18 deletions
Large diffs are not rendered by default.

scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@
77

88
enum
99
{
10-
MAX_ENCOUNTER = 9,
10+
MAX_ENCOUNTER = 10,
1111
MAX_SCOURGE_WAVES = 10,
1212
MAX_SCOURGE_TYPE_PER_WAVE = 4,
1313

1414
TYPE_GRAIN_EVENT = 0, // crates with plagued grain identified
1515
TYPE_ARTHAS_INTRO_EVENT = 1, // Arhas Speech and Walk to Gates and short intro with MalGanis
1616
TYPE_MEATHOOK_EVENT = 2, // Waves 1-5
1717
TYPE_SALRAMM_EVENT = 3, // Waves 6-10
18-
TYPE_EPOCH_EVENT = 4, // Townhall Event, Boss Killed
19-
TYPE_ARTHAS_ESCORT_EVENT = 5, // Townhall to Malganis
20-
TYPE_MALGANIS_EVENT = 6, // Malganis
21-
TYPE_INFINITE_CORRUPTER_TIME = 7, // Time for 25min Timer
22-
TYPE_INFINITE_CORRUPTER = 8,
18+
TYPE_ARTHAS_TOWNHALL_EVENT = 4, // Townhall escort event
19+
TYPE_EPOCH_EVENT = 5, // Townhall Event, Boss Killed
20+
TYPE_ARTHAS_ESCORT_EVENT = 6, // Burning city escort event
21+
TYPE_MALGANIS_EVENT = 7, // Malganis
22+
TYPE_INFINITE_CORRUPTER_TIME = 8, // Time for 25min Timer
23+
TYPE_INFINITE_CORRUPTER = 9, // Infinite corruptor event
2324

2425
// Main Encounter NPCs
2526
NPC_CHROMIE_INN = 26527,
@@ -32,8 +33,8 @@ enum
3233
// Dungeon bosses
3334
NPC_MEATHOOK = 26529,
3435
NPC_SALRAMM_THE_FLESHCRAFTER = 26530,
35-
// NPC_CHRONO_LORD_EPOCH = 26532,
36-
// NPC_MALGANIS = 26533,
36+
NPC_LORD_EPOCH = 26532,
37+
NPC_MALGANIS = 26533,
3738

3839
// Inn Event related NPC
3940
NPC_MICHAEL_BELFAST = 30571,
@@ -98,14 +99,16 @@ enum
9899
NPC_INFINITE_ADVERSARY = 27742,
99100
NPC_INFINITE_AGENT = 27744,
100101
NPC_INFINITE_HUNTER = 27743,
102+
NPC_TIME_RIFT = 28409,
103+
NPC_TIME_RIFT_BIG = 28439,
101104

102105
// Heroic event npcs
103106
NPC_INFINITE_CORRUPTER = 32273,
104-
NPC_TIME_RIFT = 28409,
105107
NPC_GUARDIAN_OF_TIME = 32281,
106108

107109
// Gameobjects
108110
GO_DOOR_BOOKCASE = 188686,
111+
GO_CITY_ENTRANCE_GATE = 191788,
109112
GO_DARK_RUNED_CHEST = 190663,
110113
GO_DARK_RUNED_CHEST_H = 193597,
111114

@@ -133,6 +136,9 @@ enum
133136
5253 Angelicas boutique
134137
5256 townhall
135138
5291 Inn */
139+
140+
// Achievements
141+
ACHIEV_CRIT_ZOMBIEFEST = 7180, // achiev 1872
136142
};
137143

138144
enum eInstancePosition

scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,18 @@ enum
3030
MAX_GRAIN_CRATES = 5,
3131
MAX_SCOURGE_SPAWN_POS = 5,
3232

33-
SAY_CHROMIE_HURRY = -1000000, // TODO
3433
SAY_SCOURGE_FESTIVAL_LANE = -1595003,
3534
SAY_SCOURGE_KINGS_SQUARE = -1595004,
3635
SAY_SCOURGE_MARKET_ROW = -1595005,
3736
SAY_SCOURGE_TOWN_HALL = -1595006,
3837
SAY_SCOURGE_ELDERS_SQUARE = -1595007,
3938

4039
SAY_MEET_TOWN_HALL = -1595008,
40+
SAY_CORRUPTOR_DESPAWN = -1595041,
4141

4242
WHISPER_CHROMIE_CRATES = -1595001,
4343
WHISPER_CHROMIE_GUARDIAN = -1595002,
44+
WHISPER_CHROMIE_HURRY = -1000000, // TODO
4445

4546
SPELL_CORRUPTION_OF_TIME = 60422, // triggers 60451
4647
};
@@ -55,8 +56,8 @@ static sSpawnLocation m_aArthasSpawnLocs[] = // need tuning
5556
{1957.13f, 1287.43f, 145.65f, 2.96f}, // bridge
5657
{2091.99f, 1277.25f, 140.47f, 0.43f}, // city entrance
5758
{2366.24f, 1195.25f, 132.04f, 3.15f}, // town hall
58-
{2534.46f, 1125.99f, 130.75f, 0.27f},
59-
{2363.77f, 1406.31f, 128.64f, 3.23f}
59+
{2534.98f, 1126.16f, 130.86f, 2.84f}, // burning stratholme
60+
{2363.44f, 1404.90f, 128.64f, 2.77f}, // crusader square gate
6061
};
6162

6263
static sSpawnLocation m_aIntroActorsSpawnLocs[] =
@@ -201,6 +202,8 @@ void instance_culling_of_stratholme::OnCreatureCreate(Creature* pCreature)
201202
case NPC_PATRICIA_O_REILLY:
202203
case NPC_LORDAERON_CRIER:
203204
case NPC_INFINITE_CORRUPTER:
205+
case NPC_LORD_EPOCH:
206+
case NPC_MALGANIS:
204207
m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid();
205208
break;
206209

@@ -248,6 +251,7 @@ void instance_culling_of_stratholme::OnObjectCreate(GameObject* pGo)
248251
break;
249252
case GO_DARK_RUNED_CHEST:
250253
case GO_DARK_RUNED_CHEST_H:
254+
case GO_CITY_ENTRANCE_GATE:
251255
break;
252256

253257
default:
@@ -291,11 +295,6 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData)
291295
SetData(TYPE_MEATHOOK_EVENT, IN_PROGRESS);
292296
}
293297
break;
294-
case TYPE_ARTHAS_ESCORT_EVENT:
295-
m_auiEncounter[uiType] = uiData;
296-
if (uiData == FAIL)
297-
m_uiArthasRespawnTimer = 10000;
298-
break;
299298
case TYPE_MEATHOOK_EVENT:
300299
m_auiEncounter[uiType] = uiData;
301300
if (uiData == DONE)
@@ -309,13 +308,41 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData)
309308
if (uiData == DONE)
310309
m_uiScourgeWaveTimer = 5000;
311310
break;
311+
case TYPE_ARTHAS_TOWNHALL_EVENT:
312+
m_auiEncounter[uiType] = uiData;
313+
if (uiData == DONE)
314+
{
315+
// despawn arthas and spawn him in the next point
316+
if (Creature* pArthas = GetSingleCreatureFromStorage(NPC_ARTHAS))
317+
pArthas->ForcedDespawn();
318+
319+
if (Player* pPlayer = GetPlayerInMap())
320+
DoSpawnArthasIfNeeded(pPlayer);
321+
}
322+
break;
312323
case TYPE_EPOCH_EVENT:
313324
m_auiEncounter[uiType] = uiData;
314325
break;
326+
case TYPE_ARTHAS_ESCORT_EVENT:
327+
// use fail in order to respawn Arthas
328+
if (uiData == FAIL)
329+
{
330+
m_uiArthasRespawnTimer = 10000;
331+
332+
// despawn the bosses if Arthas dies in order to avoid exploits
333+
if (Creature* pEpoch = GetSingleCreatureFromStorage(NPC_LORD_EPOCH, true))
334+
pEpoch->ForcedDespawn();
335+
if (Creature* pMalganis = GetSingleCreatureFromStorage(NPC_MALGANIS, true))
336+
pMalganis->ForcedDespawn();
337+
}
338+
else
339+
m_auiEncounter[uiType] = uiData;
340+
break;
315341
case TYPE_MALGANIS_EVENT:
316342
m_auiEncounter[uiType] = uiData;
317343
if (uiData == DONE)
318344
{
345+
DoUseDoorOrButton(GO_CITY_ENTRANCE_GATE);
319346
DoToggleGameObjectFlags(instance->IsRegularDifficulty() ? GO_DARK_RUNED_CHEST : GO_DARK_RUNED_CHEST_H, GO_FLAG_NO_INTERACT, false);
320347
DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_DARK_RUNED_CHEST : GO_DARK_RUNED_CHEST_H, 30 * MINUTE);
321348

@@ -354,13 +381,15 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData)
354381
SetData(TYPE_INFINITE_CORRUPTER_TIME, 0);
355382
break;
356383
case SPECIAL:
357-
DoChromieWhisper(SAY_CHROMIE_HURRY);
384+
DoChromieWhisper(WHISPER_CHROMIE_HURRY);
358385
break;
359386
case FAIL:
360387
// event failed - despawn the corruptor
361388
SetData(TYPE_INFINITE_CORRUPTER_TIME, 0);
362389
if (Creature* pCorrupter = GetSingleCreatureFromStorage(NPC_INFINITE_CORRUPTER))
363390
{
391+
DoOrSimulateScriptTextForThisInstance(SAY_CORRUPTOR_DESPAWN, NPC_INFINITE_CORRUPTER);
392+
364393
if (pCorrupter->isAlive())
365394
pCorrupter->ForcedDespawn();
366395
}
@@ -369,14 +398,15 @@ void instance_culling_of_stratholme::SetData(uint32 uiType, uint32 uiData)
369398
break;
370399
}
371400

372-
if (uiData == DONE || uiData == FAIL || uiType == TYPE_INFINITE_CORRUPTER_TIME)
401+
if (uiData == DONE || uiType == TYPE_INFINITE_CORRUPTER_TIME)
373402
{
374403
OUT_SAVE_INST_DATA;
375404

376405
std::ostringstream saveStream;
377406
saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " "
378407
<< m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " "
379-
<< m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8];
408+
<< m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " "
409+
<< m_auiEncounter[9];
380410

381411
m_strInstData = saveStream.str();
382412

@@ -397,6 +427,10 @@ void instance_culling_of_stratholme::OnCreatureDeath(Creature* pCreature)
397427
{
398428
switch (pCreature->GetEntry())
399429
{
430+
case NPC_MEATHOOK: SetData(TYPE_MEATHOOK_EVENT, DONE); break;
431+
case NPC_SALRAMM_THE_FLESHCRAFTER: SetData(TYPE_SALRAMM_EVENT, DONE); break;
432+
case NPC_LORD_EPOCH: SetData(TYPE_EPOCH_EVENT, DONE); break;
433+
400434
case NPC_ENRAGING_GHOUL:
401435
case NPC_ACOLYTE:
402436
case NPC_MASTER_NECROMANCER:
@@ -430,7 +464,8 @@ void instance_culling_of_stratholme::Load(const char* chrIn)
430464

431465
std::istringstream loadStream(chrIn);
432466
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]
433-
>> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8];
467+
>> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]
468+
>> m_auiEncounter[8] >> m_auiEncounter[9];
434469

435470
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
436471
{

sd2_revision_nr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#ifndef __SD2_REVISION_NR_H__
22
#define __SD2_REVISION_NR_H__
3-
#define SD2_REVISION_NR "3063"
3+
#define SD2_REVISION_NR "3064"
44
#endif // __SD2_REVISION_NR_H__

sql/mangos_scriptname_full.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ INSERT INTO scripted_event_id VALUES
416416
UPDATE instance_template SET ScriptName='instance_culling_of_stratholme' WHERE map=595;
417417
UPDATE creature_template SET ScriptName='npc_chromie' WHERE entry IN (26527, 27915);
418418
UPDATE creature_template SET ScriptName='spell_dummy_npc_crates_bunny' WHERE entry=27827;
419+
UPDATE creature_template SET ScriptName='npc_spell_dummy_crusader_strike' WHERE entry IN (28167,28169);
419420
UPDATE creature_template SET ScriptName='npc_arthas' WHERE entry=26499;
420421
DELETE FROM scripted_areatrigger WHERE entry=5291;
421422
INSERT INTO scripted_areatrigger VALUES

0 commit comments

Comments
 (0)