Skip to content

Commit

Permalink
Botanica: Port all texts to broadcast text
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Aug 26, 2023
1 parent 009259a commit 2ad6b4c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 59 deletions.
24 changes: 0 additions & 24 deletions sql/scriptdev2/scriptdev2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4180,30 +4180,6 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadc
-- -1 552 000 THE ARCATRAZ

-- -1 553 000 THE BOTANICA
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadcast_text_id,comment) VALUES
('-1553000','What are you doing? These specimens are very delicate!','11144','1','0','0','19944','freywinn SAY_AGGRO'),
('-1553001','Your life cycle is now concluded.','11145','1','0','0','19945','freywinn SAY_KILL_1'),
('-1553002','You will feed the worms.','11146','1','0','0','19946','freywinn SAY_KILL_2'),
('-1553003','Endorel anuminor!','11147','1','0','0','19947','freywinn SAY_TREE_1'),
('-1553004','Nature bends to my will....','11148','1','0','0','19948','freywinn SAY_TREE_2'),
('-1553005','The specimens... must be preserved.','11149','1','0','0','19949','freywinn SAY_DEATH'),

('-1553006','%s emits a strange noise.','0','2','0','0','10755','laj EMOTE_SUMMON'),

('-1553007','Who disturbs this sanctuary?','11230','1','0','0','20024','warp SAY_AGGRO'),
('-1553008','You must die! But wait: this does not-- No, no... you must die!','11231','1','0','0','20025','warp SAY_SLAY_1'),
('-1553009','What am I doing? Why do I...','11232','1','0','0','20026','warp SAY_SLAY_2'),
('-1553010','Children, come to me!','11233','1','0','0','18376','warp SAY_SUMMON_1'),
('-1553011','Maybe this is not-- No, we fight! Come to my aid!','11234','1','0','0','20022','warp SAY_SUMMON_2'),
('-1553012','So... confused. Do not... belong here.','11235','1','0','0','20028','warp SAY_DEATH'),
('-1553013','You won''t... get far.','11212','1','0','0','20019','Thorngrin YELL on Death'),
('-1553014','I hate to say I told you so...','11207','1','0','0','20014','Thorngrind YELL on Player Kill'),
('-1553015','Your life will be mine!','11208','1','0','0','20015','Thorngrin YELL on Sacrifice'),
('-1553016','You seek a prize, eh? How about death?','11206','1','0','0','20013','Thorngrin YELL on 20% HP'),
('-1553017','I revel in your pain!','11209','1','0','0','20016','Thorngrin YELL on 50% HP'),
('-1553018','I''ll incinerate you!','11210','1','0','0','20017','Thorngrin YELL on Hellfire 1'),
('-1553019','Scream while you burn!','11211','1','0','0','20018','Thorngrin YELL on Hellfire 2'),
('-1553020','What aggravation is this? You will die!','11205','1','0','0','20012','Thorngrin YELL on Aggro');

-- -1 554 000 THE MECHANAR
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 @@ -25,12 +25,12 @@ EndScriptData */

enum
{
SAY_AGGRO = -1553000,
SAY_KILL_1 = -1553001,
SAY_KILL_2 = -1553002,
SAY_TREE_1 = -1553003,
SAY_TREE_2 = -1553004,
SAY_DEATH = -1553005,
SAY_AGGRO = 19944,
SAY_KILL_1 = 19945,
SAY_KILL_2 = 19946,
SAY_TREE_1 = 19947,
SAY_TREE_2 = 19948,
SAY_DEATH = 19949,

SPELL_TRANQUILITY = 34550,
SPELL_TREE_FORM = 34551,
Expand Down Expand Up @@ -67,7 +67,7 @@ struct boss_high_botanist_freywinnAI : public ScriptedAI

void Aggro(Unit* /*pWho*/) override
{
DoScriptText(SAY_AGGRO, m_creature);
DoBroadcastText(SAY_AGGRO, m_creature);
}

void JustSummoned(Creature* pSummoned) override
Expand Down Expand Up @@ -115,12 +115,12 @@ struct boss_high_botanist_freywinnAI : public ScriptedAI

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

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

void UpdateAI(const uint32 uiDiff) override
Expand All @@ -136,7 +136,7 @@ struct boss_high_botanist_freywinnAI : public ScriptedAI
m_creature->RemoveAllAuras();

DoCastSpellIfCan(nullptr, SPELL_TREE_FORM, CAST_TRIGGERED);
DoScriptText(urand(0, 1) ? SAY_TREE_1 : SAY_TREE_2, m_creature);
DoBroadcastText(urand(0, 1) ? SAY_TREE_1 : SAY_TREE_2, m_creature);

SetCombatMovement(false);
m_bCanMoveFree = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ EndScriptData */

enum
{
EMOTE_SUMMON = -1553006,
EMOTE_SUMMON = 10755,

SPELL_ALLERGIC_REACTION = 34697,
SPELL_TELEPORT_SELF = 34673,
Expand Down Expand Up @@ -161,7 +161,7 @@ struct boss_lajAI : public ScriptedAI
{
// Summon adds and restart chasing the victim
DoSummons();
DoScriptText(EMOTE_SUMMON, m_creature);
DoBroadcastText(EMOTE_SUMMON, m_creature);

if (m_creature->GetVictim())
m_creature->GetMotionMaster()->MoveChase(m_creature->GetVictim());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ EndScriptData */

enum
{
SAY_DEATH = -1553013,
SAY_PLAYER_KILL = -1553014,
SAY_SACRIFICE = -1553015,
SAY_20_HP = -1553016,
SAY_50_HP = -1553017,
SAY_HELLFIRE_1 = -1553018,
SAY_HELLFIRE_2 = -1553019,
SAY_AGGRO = -1553020,
SAY_DEATH = 20019,
SAY_PLAYER_KILL = 20014,
SAY_SACRIFICE = 20015,
SAY_20_HP = 20013,
SAY_50_HP = 20016,
SAY_HELLFIRE_1 = 20017,
SAY_HELLFIRE_2 = 20018,
SAY_AGGRO = 20012,

SPELL_HELLFIRE = 34659,
SPELL_HELLFIRE_H = 39131,
Expand Down Expand Up @@ -65,18 +65,18 @@ struct boss_thorngrinAI : ScriptedAI

void Aggro(Unit* /*who*/) override
{
DoScriptText(SAY_AGGRO, m_creature);
DoBroadcastText(SAY_AGGRO, m_creature);
}

void KilledUnit(Unit* victim) override
{
if (victim->GetTypeId() == TYPEID_PLAYER)
DoScriptText(SAY_PLAYER_KILL, m_creature);
DoBroadcastText(SAY_PLAYER_KILL, m_creature);
}

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

void UpdateAI(const uint32 diff) override
Expand Down Expand Up @@ -116,13 +116,13 @@ struct boss_thorngrinAI : ScriptedAI

if (!m_below50 && m_creature->GetHealthPercent() <= 50.f)
{
DoScriptText(SAY_50_HP, m_creature);
DoBroadcastText(SAY_50_HP, m_creature);
m_below50 = true;
}

if (!m_below20 && m_creature->GetHealthPercent() <= 20.f)
{
DoScriptText(SAY_20_HP, m_creature);
DoBroadcastText(SAY_20_HP, m_creature);
m_below20 = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ EndScriptData */

enum
{
SAY_AGGRO = -1553007,
SAY_SLAY_1 = -1553008,
SAY_SLAY_2 = -1553009,
SAY_SUMMON_1 = -1553010,
SAY_SUMMON_2 = -1553011,
SAY_DEATH = -1553012,
SAY_AGGRO = 20024,
SAY_SLAY_1 = 20025,
SAY_SLAY_2 = 20026,
SAY_SUMMON_1 = 18376,
SAY_SUMMON_2 = 20022,
SAY_DEATH = 20028,

SPELL_WAR_STOMP = 34716,
SPELL_SUMMON_SAPLINGS = 34741, // this will leech the health from all saplings
Expand Down Expand Up @@ -80,17 +80,17 @@ struct boss_warp_splinterAI : public ScriptedAI

void Aggro(Unit* /*pWho*/) override
{
DoScriptText(SAY_AGGRO, m_creature);
DoBroadcastText(SAY_AGGRO, m_creature);
}

void KilledUnit(Unit* /*pVictim*/) override
{
DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature);
DoBroadcastText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature);
}

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

void JustSummoned(Creature* summoned) override
Expand All @@ -115,7 +115,7 @@ struct boss_warp_splinterAI : public ScriptedAI
DoCastSpellIfCan(m_creature, saplingsSummonSpells[i], CAST_TRIGGERED);

DoCastSpellIfCan(m_creature, SPELL_SUMMON_SAPLINGS, CAST_TRIGGERED);
DoScriptText(urand(0, 1) ? SAY_SUMMON_1 : SAY_SUMMON_2, m_creature);
DoBroadcastText(urand(0, 1) ? SAY_SUMMON_1 : SAY_SUMMON_2, m_creature);
}

void UpdateAI(const uint32 uiDiff) override
Expand Down

0 comments on commit 2ad6b4c

Please sign in to comment.