Skip to content

Commit

Permalink
HFR: Port all texts to bct
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Sep 30, 2023
1 parent 7c54e21 commit 23b4541
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 102 deletions.
29 changes: 0 additions & 29 deletions sql/scriptdev2/scriptdev2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3959,35 +3959,6 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadc
-- -1 542 000 BLOOD FURNACE

-- -1 543 000 HELLFIRE RAMPARTS
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadcast_text_id,comment) VALUES
('-1543000','Do you smell that? Fresh meat has somehow breached our citadel. Be wary of any intruders.','0','1','0','0','13999','gargolmar SAY_TAUNT'),
('-1543001','Heal me, quickly!','10329','1','0','0','17498','gargolmar SAY_HEAL'),
('-1543002','Back off, pup!','10330','1','0','0','17499','gargolmar SAY_SURGE'),
('-1543003','What have we here?','10331','1','0','0','17502','gargolmar SAY_AGGRO_1'),
('-1543004','This may hurt a little....','10332','1','0','0','17503','gargolmar SAY_AGGRO_2'),
('-1543005','I''m going to enjoy this...','10333','1','0','0','17504','gargolmar SAY_AGGRO_3'),
('-1543006','Say farewell!','10334','1','0','0','17500','gargolmar SAY_KILL_1'),
('-1543007','Much too easy.','10335','1','0','0','17501','gargolmar SAY_KILL_2'),
('-1543008','Hahah.. <cough> ..argh!','10336','1','0','0','0','gargolmar SAY_DIE'),

('-1543009','You dare stand against ME?','10280','1','0','0','17634','omor SAY_AGGRO_1'),
('-1543010','I will not be defeated!','10279','1','0','0','17633','omor SAY_AGGRO_2'),
('-1543011','Your insolence will be your death!','10281','1','0','0','17635','omor SAY_AGGRO_3'),
('-1543012','Achor she-ki! Feast, my pet! Eat your fill!','10277','1','0','0','17637','omor SAY_SUMMON'),
('-1543013','A-kreesh!','10278','1','0','0','17636','omor SAY_CURSE'),
('-1543014','Die, weakling!','10282','1','0','0','17631','omor SAY_KILL_1'),
('-1543015','It is... not over.','10284','1','0','0','17630','omor SAY_DIE'),
('-1543016','I am victorious!','10283','1','0','0','17632','omor SAY_WIPE'),

('-1543017','You have faced many challenges.... Pity they were all in vain! Soon your people will kneel to MY lord!','10292','1','0','0','13981','vazruden SAY_INTRO'),
('-1543018','Your time is running out!','10294','1','0','0','17492','vazruden SAY_AGGRO1'),
('-1543019','You are nothing! I answer a higher call....','10295','1','0','0','17493','vazruden SAY_AGGRO2'),
('-1543020','The dark lord laughs at you!','10296','1','0','0','17494','vazruden SAY_AGGRO3'),
('-1543021','Is there no one left to test me? ','10293','1','0','0','17491','vazruden SAY_TAUNT'),
('-1543022','It is over! Finished!','10297','1','0','0','17495','vazruden SAY_KILL1'),
('-1543023','Your days are done!','10298','1','0','0','17496','vazruden SAY_KILL2'),
('-1543024','My lord will be... the end of you all!','10299','1','0','0','17497','vazruden SAY_DEATH'),
('-1543025','Nazan descends from the sky.','0','3','0','0','20472','vazruden EMOTE_DESCEND');

-- -1 544 000 MAGTHERIDON'S LAIR
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadcast_text_id,comment) VALUES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ EndScriptData */

enum
{
SAY_INTRO = -1543017,
SAY_AGGRO1 = -1543018,
SAY_AGGRO2 = -1543019,
SAY_AGGRO3 = -1543020,
SAY_TAUNT = -1543021,
SAY_KILL1 = -1543022,
SAY_KILL2 = -1543023,
SAY_DEATH = -1543024,
EMOTE_DESCEND = -1543025,
SAY_INTRO = 13981,
SAY_AGGRO1 = 17492,
SAY_AGGRO2 = 17493,
SAY_AGGRO3 = 17494,
SAY_TAUNT = 17491,
SAY_KILL1 = 17495,
SAY_KILL2 = 17496,
SAY_DEATH = 17497,
EMOTE_DESCEND = 20472,

// vazruden
SPELL_REVENGE = 19130,
Expand Down Expand Up @@ -168,7 +168,7 @@ struct boss_vazruden_heraldAI : public CombatAI
{
if (vazruden->IsInCombat())
{
DoScriptText(SAY_TAUNT, vazruden);
DoBroadcastText(SAY_TAUNT, vazruden);
vazruden->AI()->EnterEvadeMode();
}
}
Expand Down Expand Up @@ -221,7 +221,7 @@ struct boss_vazruden_heraldAI : public CombatAI

void DoMoveToCenter()
{
DoScriptText(SAY_INTRO, m_creature);
DoBroadcastText(SAY_INTRO, m_creature);
SetCombatMovement(false);
SetCombatScriptStatus(true);
SetMeleeEnabled(false);
Expand Down Expand Up @@ -251,7 +251,7 @@ struct boss_vazruden_heraldAI : public CombatAI
m_creature->SetWalk(false);
m_creature->GetMotionMaster()->MovePoint(POINT_ID_LANDING, landingPhasePos.x, landingPhasePos.y, landingPhasePos.z);
SetCombatScriptStatus(true);
DoScriptText(EMOTE_DESCEND, m_creature);
DoBroadcastText(EMOTE_DESCEND, m_creature);
}

void HandleAttackDelay()
Expand Down Expand Up @@ -391,6 +391,7 @@ struct boss_vazrudenAI : public CombatAI
});

DoCastSpellIfCan(nullptr, SPELL_DEFENSIVE_STATE, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT);
AddOnKillText(SAY_KILL1, SAY_KILL2);
}

ScriptedInstance* m_instance;
Expand All @@ -400,15 +401,15 @@ struct boss_vazrudenAI : public CombatAI
{
switch (urand(0, 2))
{
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
case 0: DoBroadcastText(SAY_AGGRO1, m_creature); break;
case 1: DoBroadcastText(SAY_AGGRO2, m_creature); break;
case 2: DoBroadcastText(SAY_AGGRO3, m_creature); break;
}
}

void EnterEvadeMode() override
{
DoScriptText(SAY_TAUNT, m_creature);
DoBroadcastText(SAY_TAUNT, m_creature);
CombatAI::EnterEvadeMode();
if (Creature* nazan = m_instance->GetSingleCreatureFromStorage(NPC_VAZRUDEN_HERALD))
if (nazan->IsInCombat())
Expand All @@ -417,7 +418,7 @@ struct boss_vazrudenAI : public CombatAI

void JustDied(Unit* /*killer*/) override
{
DoScriptText(SAY_DEATH, m_creature);
DoBroadcastText(SAY_DEATH, m_creature);

if (m_instance)
m_instance->SetData(TYPE_VAZRUDEN, DONE);
Expand All @@ -442,11 +443,6 @@ struct boss_vazrudenAI : public CombatAI
m_instance->SetData(TYPE_VAZRUDEN, FAIL);
}

void KilledUnit(Unit* /*victim*/) override
{
DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature);
}

void ExecuteAction(uint32 action) override
{
switch (action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ EndScriptData */

enum
{
SAY_AGGRO_1 = -1543009,
SAY_AGGRO_2 = -1543010,
SAY_AGGRO_3 = -1543011,
SAY_SUMMON = -1543012,
SAY_CURSE = -1543013,
SAY_KILL_1 = -1543014,
SAY_DIE = -1543015,
SAY_WIPE = -1543016,
SAY_AGGRO_1 = 17634,
SAY_AGGRO_2 = 17633,
SAY_AGGRO_3 = 17635,
SAY_SUMMON = 17637,
SAY_CURSE = 17636,
SAY_KILL_1 = 17631,
SAY_KILL_2 = 17632,
SAY_DIE = 17630,

SPELL_ORBITAL_STRIKE = 30637,
SPELL_SHADOW_WHIP = 30638,
Expand Down Expand Up @@ -71,6 +71,7 @@ struct boss_omor_the_unscarredAI : public CombatAI
AddCustomAction(OMOR_PULL_BACK, true, [&]() {HandlePullBack(); });
SetCombatMovement(false);
SetRangedMode(true, 100.f, TYPE_PROXIMITY);
AddOnKillText(SAY_KILL_1, SAY_KILL_2);
}

bool m_inRegularMode;
Expand All @@ -87,38 +88,23 @@ struct boss_omor_the_unscarredAI : public CombatAI
{
switch (urand(0, 2))
{
case 0: DoScriptText(SAY_AGGRO_1, m_creature); break;
case 1: DoScriptText(SAY_AGGRO_2, m_creature); break;
case 2: DoScriptText(SAY_AGGRO_3, m_creature); break;
case 0: DoBroadcastText(SAY_AGGRO_1, m_creature); break;
case 1: DoBroadcastText(SAY_AGGRO_2, m_creature); break;
case 2: DoBroadcastText(SAY_AGGRO_3, m_creature); break;
}
}

void KilledUnit(Unit* /*victim*/) override
{
if (urand(0, 1))
return;

DoScriptText(SAY_KILL_1, m_creature);
}

void JustSummoned(Creature* summoned) override
{
DoScriptText(SAY_SUMMON, m_creature);
DoBroadcastText(SAY_SUMMON, m_creature);

if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
summoned->AI()->AttackStart(pTarget);
}

void JustDied(Unit* /*killer*/) override
{
DoScriptText(SAY_DIE, m_creature);
}

void EnterEvadeMode() override
{
DoScriptText(SAY_WIPE, m_creature);

ScriptedAI::EnterEvadeMode();
DoBroadcastText(SAY_DIE, m_creature);
}

void HandlePullBack()
Expand Down Expand Up @@ -171,7 +157,7 @@ struct boss_omor_the_unscarredAI : public CombatAI
if (DoCastSpellIfCan(target, m_inRegularMode ? SPELL_TREACHEROUS_AURA : SPELL_BANE_OF_TREACHERY_H) == CAST_OK)
{
ResetCombatAction(action, urand(8000, 16000));
DoScriptText(SAY_CURSE, m_creature);
DoBroadcastText(SAY_CURSE, m_creature);
}
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ EndScriptData */

enum
{
SAY_TAUNT = -1543000,
SAY_HEAL = -1543001,
SAY_SURGE = -1543002,
SAY_AGGRO_1 = -1543003,
SAY_AGGRO_2 = -1543004,
SAY_AGGRO_3 = -1543005,
SAY_KILL_1 = -1543006,
SAY_KILL_2 = -1543007,
SAY_DIE = -1543008,
SAY_TAUNT = 13999,
SAY_HEAL = 17498,
SAY_SURGE = 17499,
SAY_AGGRO_1 = 17502,
SAY_AGGRO_2 = 17503,
SAY_AGGRO_3 = 17504,
SAY_KILL_1 = 17500,
SAY_KILL_2 = 17501,
SOUND_DIE = 10336,

SPELL_MORTAL_WOUND = 30641,
SPELL_MORTAL_WOUND_H = 36814,
Expand Down Expand Up @@ -65,6 +65,7 @@ struct boss_watchkeeper_gargolmarAI : public CombatAI
AddCombatAction(GARGOLMAR_ACTION_SURGE, 4800u);
AddCombatAction(GARGOLMAR_ACTION_RETALIATION, 0u);
AddCombatAction(GARGOLMAR_ACTION_OVERPOWER, 3600u, 14800u);
AddOnKillText(SAY_KILL_1, SAY_KILL_2);
}

ScriptedInstance* m_instance;
Expand Down Expand Up @@ -97,35 +98,30 @@ struct boss_watchkeeper_gargolmarAI : public CombatAI
}
}

void Aggro(Unit* /*pWho*/) override
void Aggro(Unit* /*who*/) override
{
switch (urand(0, 2))
{
case 0: DoScriptText(SAY_AGGRO_1, m_creature); break;
case 1: DoScriptText(SAY_AGGRO_2, m_creature); break;
case 2: DoScriptText(SAY_AGGRO_3, m_creature); break;
case 0: DoBroadcastText(SAY_AGGRO_1, m_creature); break;
case 1: DoBroadcastText(SAY_AGGRO_2, m_creature); break;
case 2: DoBroadcastText(SAY_AGGRO_3, m_creature); break;
}
}

void MoveInLineOfSight(Unit* who) override
{
if (!m_HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f))
{
DoScriptText(SAY_TAUNT, m_creature);
DoBroadcastText(SAY_TAUNT, m_creature);
m_HasTaunted = true;
}

ScriptedAI::MoveInLineOfSight(who);
}

void KilledUnit(Unit* /*victim*/) override
{
DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature);
}

void JustDied(Unit* /*killer*/) override
{
DoScriptText(SAY_DIE, m_creature);
DoPlaySoundToSet(m_creature, SOUND_DIE);
}

void ExecuteAction(uint32 action)
Expand All @@ -135,7 +131,7 @@ struct boss_watchkeeper_gargolmarAI : public CombatAI
case GARGOLMAR_ACTION_YELL_FOR_HEAL:
if (m_creature->GetHealthPercent() < 40.0f)
{
DoScriptText(SAY_HEAL, m_creature);
DoBroadcastText(SAY_HEAL, m_creature);

CreatureList watcherList;
GetCreatureListWithEntryInGrid(watcherList, m_creature, NPC_HELLFIRE_WATCHER, 100.0f);
Expand All @@ -159,7 +155,7 @@ struct boss_watchkeeper_gargolmarAI : public CombatAI
if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_FARTHEST_AWAY, 0, SPELL_SURGE, SELECT_FLAG_PLAYER))
{
if (DoCastSpellIfCan(target, SPELL_SURGE) == CAST_OK)
DoScriptText(SAY_SURGE, m_creature);
DoBroadcastText(SAY_SURGE, m_creature);

ResetCombatAction(action, GetSubsequentActionTimer(GargolmarActions(action)));
return;
Expand Down

0 comments on commit 23b4541

Please sign in to comment.