Skip to content

Commit

Permalink
Add support for Thaddius screams throughout Naxxramas
Browse files Browse the repository at this point in the history
Screams from Thaddius will now be heard by players anywhere within the
instance until the boss is defeated.
Timer is guesswork.

(based on cmangos/mangos-classic@1addaf7)

Signed-off-by: Cala <calaftp@free.fr>

(based on cmangos/mangos-tbc@8bb02b2)

Signed-off-by: Cala <calaftp@free.fr>
  • Loading branch information
cala committed Sep 11, 2016
1 parent 6cacd69 commit 214f5c0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
8 changes: 4 additions & 4 deletions sql/scriptdev2/scriptdev2.sql
Expand Up @@ -3798,10 +3798,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen
(-1533033,'You die now!',8877,1,0,0,'thaddius SAY_SLAY'),
(-1533034,'Now YOU feel pain!',8871,1,0,0,'thaddius SAY_ELECT'),
(-1533035,'Thank... you...',8870,1,0,0,'thaddius SAY_DEATH'),
(-1533036,'Pleeease!',8873,1,0,0,'thaddius SAY_SCREAM1'),
(-1533037,'Stop, make it stop!',8874,1,0,0,'thaddius SAY_SCREAM2'),
(-1533038,'Help me! Save me!',8875,1,0,0,'thaddius SAY_SCREAM3'),
(-1533039,'Please, nooo!',8876,1,0,0,'thaddius SAY_SCREAM4'),
(-1533036,'REUSE_ME',0,0,0,0,'REUSE'),
(-1533037,'REUSE_ME',0,0,0,0,'REUSE'),
(-1533038,'REUSE_ME',0,0,0,0,'REUSE'),
(-1533039,'REUSE_ME',0,0,0,0,'REUSE'),

(-1533040,'Foolishly you have sought your own demise.',8807,1,0,0,'gothik SAY_SPEECH_1'),
(-1533041,'Death is the only escape.',8806,1,0,0,'gothik SAY_KILL'),
Expand Down
5 changes: 0 additions & 5 deletions src/scriptdev2/scripts/northrend/naxxramas/boss_thaddius.cpp
Expand Up @@ -54,11 +54,6 @@ enum
SAY_SLAY = -1533033,
SAY_ELECT = -1533034,
SAY_DEATH = -1533035,
// Background screams in Instance if Thaddius still alive, needs general support most likely
SAY_SCREAM1 = -1533036,
SAY_SCREAM2 = -1533037,
SAY_SCREAM3 = -1533038,
SAY_SCREAM4 = -1533039,
EMOTE_POLARITY_SHIFT = -1533151,

// Thaddius Spells
Expand Down
Expand Up @@ -53,7 +53,8 @@ instance_naxxramas::instance_naxxramas(Map* pMap) : ScriptedInstance(pMap),
m_uiHorsemenAchievTimer(0),
m_uiHorseMenKilled(0),
m_dialogueHelper(aNaxxDialogue),
m_uiLivingPoisonTimer(5000)
m_uiLivingPoisonTimer(5000),
m_uiScreamsTimer(2 * MINUTE * IN_MILLISECONDS)
{
Initialize();
}
Expand Down Expand Up @@ -608,6 +609,18 @@ void instance_naxxramas::Update(uint32 uiDiff)
m_uiLivingPoisonTimer -= uiDiff;
}

if (m_uiScreamsTimer && m_auiEncounter[TYPE_THADDIUS] != DONE)
{
if (m_uiScreamsTimer <= uiDiff)
{
if (Player* pPlayer = GetPlayerInMap())
pPlayer->GetMap()->PlayDirectSoundToMap(SOUND_SCREAM1 + urand(0,3));
m_uiScreamsTimer = (2 * MINUTE + urand(0, 30)) * IN_MILLISECONDS;
}
else
m_uiScreamsTimer -= uiDiff;
}

if (m_uiTauntTimer)
{
if (m_uiTauntTimer <= uiDiff)
Expand Down
4 changes: 4 additions & 0 deletions src/scriptdev2/scripts/northrend/naxxramas/naxxramas.h
Expand Up @@ -12,6 +12,9 @@ enum
// A few instance-script related texts
SAY_THADDIUS_GREET = -1533029,

// Background screams in Instance if Thaddius still alive, four of them from 8873 to 8876
SOUND_SCREAM1 = 8873,

// Kel'Thuzad
SAY_KELTHUZAD_CAT_DIED = -1533089,
// Kel'Thuzad's taunts after killing Wing Bosses
Expand Down Expand Up @@ -289,6 +292,7 @@ class instance_naxxramas : public ScriptedInstance
uint32 m_uiHorsemenAchievTimer;
uint8 m_uiHorseMenKilled;
uint32 m_uiLivingPoisonTimer;
uint32 m_uiScreamsTimer;

DialogueHelper m_dialogueHelper;
};
Expand Down

0 comments on commit 214f5c0

Please sign in to comment.