Skip to content

Commit

Permalink
Arca: Migrate all texts to bct and minor modernization
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Aug 4, 2023
1 parent e6d236c commit acef50f
Show file tree
Hide file tree
Showing 6 changed files with 200 additions and 310 deletions.
62 changes: 0 additions & 62 deletions sql/scriptdev2/scriptdev2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4178,68 +4178,6 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadc
('-1550044','%s begins to cast Pyroblast!','0','3','0','0','20775','kaelthas EMOTE_PYROBLAST');

-- -1 552 000 THE ARCATRAZ
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadcast_text_id,comment) VALUES
('-1552000','It is a small matter to control the mind of the weak... for I bear allegiance to powers untouched by time, unmoved by fate. No force on this world or beyond harbors the strength to bend our knee... not even the mighty Legion! ','11122','1','0','0','19112','skyriss SAY_INTRO'),
('-1552001','Bear witness to the agent of your demise!','11123','1','0','0','19113','skyriss SAY_AGGRO'),
('-1552002','Your fate is written.','11124','1','0','0','19813','skyriss SAY_KILL_1'),
('-1552003','The chaos I have sown here is but a taste....','11125','1','0','0','19814','skyriss SAY_KILL_2'),
('-1552004','You will do my bidding, weakling.','11127','1','0','0','19816','skyriss SAY_MIND_1'),
('-1552005','Your will is no longer your own.','11128','1','0','0','19817','skyriss SAY_MIND_2'),
('-1552006','Flee in terror.','11129','1','0','0','19818','skyriss SAY_FEAR_1'),
('-1552007','I will show you horrors undreamed of.','11130','1','0','0','19819','skyriss SAY_FEAR_2'),
('-1552008','We span the universe, as countless as the stars!','11131','1','0','0','19821','skyriss SAY_IMAGE'),
('-1552009','I am merely one of... infinite multitudes.','11126','1','0','0','19815','skyriss SAY_DEATH'),

('-1552010','Where in Bonzo''s Brass Buttons am I? And who are-- yaaghh, that''s one mother of a headache!','11171','1','0','6','19108','millhouse SAY_INTRO_1'),
('-1552011','"Lowly"? I don''t care who you are, friend: no one refers to the mighty Millhouse Manastorm as "lowly"!','11172','1','0','5','19116','millhouse SAY_INTRO_2'),
('-1552012','I just need to get some things ready first. You guys go ahead and get started. I need to summon up some water....','11173','1','0','0','19117','millhouse SAY_WATER'),
('-1552013','Fantastic! Next, some protective spells. Yeah, now we''re cookin''!','11174','1','0','0','19119','millhouse SAY_BUFFS'),
('-1552014','And of course I''ll need some mana. You guys are gonna love this; just wait....','11175','1','0','0','19120','millhouse SAY_DRINK'),
('-1552015','Aaalllriiiight!! Who ordered up an extra large can of whoop-ass?','11176','1','0','0','19121','millhouse SAY_READY'),
('-1552016','I didn''t even break a sweat on that one!','11177','1','0','0','19824','millhouse SAY_KILL_1'),
('-1552017','You guys feel free to jump in anytime.','11178','1','0','0','19825','millhouse SAY_KILL_2'),
('-1552018','I''m gonna light you up, sweet cheeks!','11179','1','0','0','19826','millhouse SAY_PYRO'),
('-1552019','Ice, ice baby.','11180','1','0','0','19827','millhouse SAY_ICEBLOCK'),
('-1552020','Heal me! For the love of all that''s holy, heal me! I''m dying!!','11181','1','0','0','19828','millhouse SAY_LOWHP'),
('-1552021','You''ll be hearing from my lawyer!','11182','1','0','0','19829','millhouse SAY_DEATH'),
('-1552022','Who''s bad? Who''s bad? That''s right: we bad!','11183','1','0','4','19146','millhouse SAY_COMPLETE'),

('-1552023','I knew the prince would be angry, but I... I have not been myself. I had to let them out! The great one speaks to me, you see. Wait--outsiders. Kael''thas did not send you! Good... I''ll just tell the prince you released the prisoners!','11222','1','0','0','19103','mellichar YELL_INTRO1'),
('-1552024','The naaru kept some of the most dangerous beings in existence here in these cells. Let me introduce you to another....','11223','1','0','0','19104','mellichar YELL_INTRO2'),
('-1552025','Yes, yes... another! Your will is mine!','11224','1','0','0','19106','mellichar YELL_RELEASE1'),
('-1552026','Behold, yet another terrifying creature of incomprehensible power!','11225','1','0','0','19107','mellichar YELL_RELEASE2A'),
('-1552027','What is this? A lowly gnome? I will do better, oh great one.','11226','1','0','0','19109','mellichar YELL_RELEASE2B'),
('-1552028','Anarchy! Bedlam! Oh, you are so wise! Yes, I see it now, of course!','11227','1','0','0','19110','mellichar YELL_RELEASE3'),
('-1552029','One final cell remains. Yes, O great one, right away!','11228','1','0','0','19111','mellichar YELL_RELEASE4'),
('-1552030','Welcome, O great one. I am your humble servant.','11229','1','0','0','19114','mellichar YELL_WELCOME'),

('-1552031','It is unwise to anger me!','11086','1','0','0','19978','dalliah SAY_AGGRO'),
('-1552032','That is much better.','11091','1','0','0','19984','dalliah SAY_HEAL_1'),
('-1552033','Ahh... just what I needed.','11092','1','0','0','19985','dalliah SAY_HEAL_2'),
('-1552034','Completely ineffective. Just like someone else I know.','11087','1','0','0','19980','dalliah SAY_KILL_1'),
('-1552035','You chose the wrong opponent.','11088','1','0','0','19981','dalliah SAY_KILL_2'),
('-1552036','I''ll cut you to pieces!','11090','1','0','0','19983','dalliah SAY_WHIRLWIND_1'),
('-1552037','Reap the whirlwind!','11089','1','0','0','19982','dalliah SAY_WHIRLWIND_2'),
('-1552038','Now I''m really angry.','11093','1','0','0','19986','dalliah SAY_DEATH'),

('-1552039','Have you come to kill Dalliah? Can I watch?','11237','1','0','1','19968','soccothrates SAY_DALLIAH_AGGRO_1'),
('-1552040','This may be the end for you, Dalliah. What a shame that would be.','11245','1','0','1','19975','soccothrates SAY_DALLIAH_TAUNT_1'),
('-1552041','Having problems, Dalliah? How nice.','11244','1','0','1','19974','soccothrates SAY_DALLIAH_TAUNT_2'),
('-1552042','I suggest a new strategy: you draw their attacks while I gather reinforcements.','11246','1','0','1','19976','soccothrates SAY_DALLIAH_TAUNT_3'),
('-1552043','Finally! Well done!','11247','1','0','66','19977','soccothrates SAY_DALLIAH_DEAD'),
('-1552044','On guard!','11241','1','0','0','19971','soccothrates SAY_CHARGE_1'),
('-1552045','Defend yourself, for all the good it will do....','11242','1','0','0','19972','soccothrates SAY_CHARGE_2'),
('-1552046','Knew this was... the only way out.','11243','1','0','0','19973','soccothrates SAY_DEATH'),
('-1552047','Yes, that was quite satisfying.','11239','1','0','0','19969','soccothrates SAY_KILL'),
('-1552048','At last, a target for my frustrations!','11238','1','0','0','19967','soccothrates SAY_AGGRO'),

('-1552049','Did you call on me?','11236','1','0','397','20051','soccothrates SAY_INTRO_1'),
('-1552050','Why would I call on you?','0','1','0','396','20055','dalliah SAY_INTRO_2'),
('-1552051','To do your heavy lifting, most likely.','0','1','0','396','20052','soccothrates SAY_INTRO_3'),
('-1552052','When I need someone to prance around like an overstuffed peacock, I''ll call on you.','0','1','0','396','20056','dalliah SAY_INTRO_4'),
('-1552053','Then I''ll commit myself to ignoring you.','0','1','0','396','20053','soccothrates SAY_INTRO_5'),
('-1552054','What would you know about commitment, sheet-sah?','0','1','0','396','20057','dalliah SAY_INTRO_6'),
('-1552055','You''re the one who should be-- Wait, we have company...','0','1','0','396','20054','soccothrates SAY_INTRO_7');

-- -1 553 000 THE BOTANICA
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 @@ -33,20 +33,20 @@ EndScriptData */

enum
{
SAY_SOCCOTHRATES_AGGRO = -1552039,
SAY_SOCCOTHRATES_DEATH = -1552043,

YELL_MELLICHAR_INTRO1 = -1552023,
YELL_MELLICHAR_INTRO2 = -1552024,
YELL_MELLICHAR_RELEASE1 = -1552025,
YELL_MELLICHAR_RELEASE2 = -1552026,
YELL_MELLICHAR_RELEASE3 = -1552027,
YELL_MELLICHAR_RELEASE4 = -1552028,
YELL_MELLICHAR_RELEASE5 = -1552029,
YELL_MELLICAR_WELCOME = -1552030,
SAY_SKYRISS_INTRO = -1552000,
SAY_SKYRISS_AGGRO = -1552001,
SAY_MILLHOUSE_COMPLETE = -1552022,
SAY_SOCCOTHRATES_AGGRO = 19968,
SAY_SOCCOTHRATES_DEATH = 19977,

YELL_MELLICHAR_INTRO1 = 19103,
YELL_MELLICHAR_INTRO2 = 19104,
YELL_MELLICHAR_RELEASE1 = 19106,
YELL_MELLICHAR_RELEASE2 = 19107,
YELL_MELLICHAR_RELEASE3 = 19109,
YELL_MELLICHAR_RELEASE4 = 19110,
YELL_MELLICHAR_RELEASE5 = 19111,
YELL_MELLICAR_WELCOME = 19114,
SAY_SKYRISS_INTRO = 19112,
SAY_SKYRISS_AGGRO = 19113,
SAY_MILLHOUSE_COMPLETE = 19146,

// Spells used by Mellichar during the dialogue
SPELL_TARGET_BETA = 36854,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,26 @@ EndContentData */

#include "AI/ScriptDevAI/include/sc_common.h"
#include "arcatraz.h"
#include "AI/ScriptDevAI/base/CombatAI.h"

/*#####
# npc_millhouse_manastorm
#####*/

enum
{
SAY_INTRO_1 = -1552010,
SAY_INTRO_2 = -1552011,
SAY_WATER = -1552012,
SAY_BUFFS = -1552013,
SAY_DRINK = -1552014,
SAY_READY = -1552015,
SAY_KILL_1 = -1552016,
SAY_KILL_2 = -1552017,
SAY_PYRO = -1552018,
SAY_ICEBLOCK = -1552019,
SAY_LOWHP = -1552020,
SAY_DEATH = -1552021,
SAY_INTRO_1 = 19108,
SAY_INTRO_2 = 19116,
SAY_WATER = 19117,
SAY_BUFFS = 19119,
SAY_DRINK = 19120,
SAY_READY = 19121,
SAY_KILL_1 = 19824,
SAY_KILL_2 = 19825,
SAY_PYRO = 19826,
SAY_ICEBLOCK = 19827,
SAY_LOWHP = 19828,
SAY_DEATH = 19829,

SPELL_CONJURE_WATER = 36879,
SPELL_ARCANE_INTELLECT = 36880,
Expand Down Expand Up @@ -82,19 +83,20 @@ static const DialogueEntry aIntroDialogue[] =

static const float fRoomCenterCoords[3] = {445.8804f, -158.7055f, 43.06898f};

struct npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper
struct npc_millhouse_manastormAI : public CombatAI, private DialogueHelper
{
npc_millhouse_manastormAI(Creature* pCreature) : ScriptedAI(pCreature),
DialogueHelper(aIntroDialogue)
npc_millhouse_manastormAI(Creature* creature) : CombatAI(creature, 0),
DialogueHelper(aIntroDialogue),
m_instance(static_cast<ScriptedInstance*>(creature->GetInstanceData()))
{
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
InitializeDialogueHelper(m_pInstance);
Reset();
m_instance = (ScriptedInstance*)creature->GetInstanceData();
InitializeDialogueHelper(m_instance);
m_attackDistance = 25.0f;
StartNextDialogueText(NPC_MILLHOUSE);
AddOnKillText(SAY_KILL_1, SAY_KILL_2);
}

ScriptedInstance* m_pInstance;
ScriptedInstance* m_instance;

bool m_bHasLowHp;
uint32 m_uiPyroblastTimer;
Expand All @@ -106,6 +108,7 @@ struct npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper

void Reset() override
{
CombatAI::Reset();
m_bHasLowHp = false;
m_uiPyroblastTimer = urand(6000, 9000);
m_uiFireballTimer = urand(2500, 4000);
Expand All @@ -115,18 +118,9 @@ struct npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper
m_uiArcaneMissileTimer = urand(5000, 8000);
}

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

void JustDied(Unit* /*pVictim*/) override
void JustDied(Unit* /*victim*/) override
{
DoScriptText(SAY_DEATH, m_creature);

/*for questId 10886 (heroic mode only)
if (m_instance && m_instance->GetData(TYPE_HARBINGERSKYRISS) != DONE)
->FailQuest();*/
}

void EnterEvadeMode() override
Expand All @@ -144,13 +138,13 @@ struct npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper
Reset();
}

void JustDidDialogueStep(int32 iEntry) override
void JustDidDialogueStep(int32 textEntry) override
{
switch (iEntry)
switch (textEntry)
{
case TYPE_WARDEN_2:
if (m_pInstance)
m_pInstance->SetData(TYPE_WARDEN_2, DONE);
if (m_instance)
m_instance->SetData(TYPE_WARDEN_2, DONE);
break;
case SAY_WATER:
DoCastSpellIfCan(m_creature, SPELL_CONJURE_WATER);
Expand Down Expand Up @@ -242,11 +236,6 @@ struct npc_millhouse_manastormAI : public ScriptedAI, private DialogueHelper
}
};

UnitAI* GetAI_npc_millhouse_manastorm(Creature* pCreature)
{
return new npc_millhouse_manastormAI(pCreature);
}

/*#####
# npc_warden_mellichar
#####*/
Expand All @@ -257,65 +246,65 @@ enum
SPELL_SIMPLE_TELEPORT = 12980,
};

struct npc_warden_mellicharAI : public ScriptedAI
struct npc_warden_mellicharAI : public CombatAI
{
npc_warden_mellicharAI(Creature* pCreature) : ScriptedAI(pCreature)
npc_warden_mellicharAI(Creature* creature) : CombatAI(creature, 0),
m_instance(static_cast<ScriptedInstance*>(creature->GetInstanceData()))
{
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
SetCombatMovement(false);
Reset();
}

ScriptedInstance* m_pInstance;
ScriptedInstance* m_instance;

uint32 m_uiIntroTimer;
ObjectGuid m_targetPlayerGuid;

void Reset() override
{
CombatAI::Reset();
m_uiIntroTimer = 5000;
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
}

void AttackStart(Unit* /*pWho*/) override {}
void AttackStart(Unit* /*who*/) override {}

void Aggro(Unit* pWho) override
void Aggro(Unit* who) override
{
m_creature->InterruptNonMeleeSpells(false);
m_creature->SetFacingToObject(pWho);
m_targetPlayerGuid = pWho->GetObjectGuid();
m_creature->SetFacingToObject(who);
m_targetPlayerGuid = who->GetObjectGuid();

DoCastSpellIfCan(m_creature, SPELL_BUBBLE_VISUAL);

// In theory the Seal Sphere should protect the npc from being attacked, but because LoS isn't enabled for Gameobjects we have to use this workaround
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER);
SetReactState(REACT_PASSIVE);

if (m_pInstance)
m_pInstance->SetData(TYPE_HARBINGERSKYRISS, IN_PROGRESS);
if (m_instance)
m_instance->SetData(TYPE_HARBINGERSKYRISS, IN_PROGRESS);
}

void JustSummoned(Creature* pSummoned) override
void JustSummoned(Creature* summoned) override
{
pSummoned->CastSpell(pSummoned, SPELL_SIMPLE_TELEPORT, TRIGGERED_NONE);
summoned->CastSpell(summoned, SPELL_SIMPLE_TELEPORT, TRIGGERED_NONE);

if (pSummoned->GetEntry() != NPC_MILLHOUSE && pSummoned->GetEntry() != NPC_SKYRISS)
if (summoned->GetEntry() != NPC_MILLHOUSE && summoned->GetEntry() != NPC_SKYRISS)
{
if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_targetPlayerGuid))
pSummoned->AI()->AttackStart(pTarget);
summoned->AI()->AttackStart(pTarget);
}
}

void JustDied(Unit* /*pKiller*/) override
void JustDied(Unit* /*killer*/) override
{
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER);
if (m_pInstance)
if (m_instance)
{
if (Creature* pSkyriss = m_pInstance->GetSingleCreatureFromStorage(NPC_SKYRISS))
if (Creature* skyriss = m_instance->GetSingleCreatureFromStorage(NPC_SKYRISS))
{
if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_targetPlayerGuid))
pSkyriss->AI()->AttackStart(pTarget);
if (Unit* target = m_creature->GetMap()->GetUnit(m_targetPlayerGuid))
skyriss->AI()->AttackStart(target);
}
}
}
Expand All @@ -336,11 +325,6 @@ struct npc_warden_mellicharAI : public ScriptedAI
}
};

UnitAI* GetAI_npc_warden_mellichar(Creature* pCreature)
{
return new npc_warden_mellicharAI(pCreature);
}

/*######
## npc_arcatraz_defender
######*/
Expand All @@ -353,20 +337,19 @@ enum
SPELL_PROTEAN_SUBDUAL_H = 40449,
};

struct npc_arcatraz_defenderAI : public ScriptedAI
struct npc_arcatraz_defenderAI : public CombatAI
{
npc_arcatraz_defenderAI(Creature* pCreature) : ScriptedAI(pCreature)
npc_arcatraz_defenderAI(Creature* creature) : CombatAI(creature, 0), m_isRegularMode(creature->GetMap()->IsRegularDifficulty())
{
m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty();
Reset();
}

bool m_bIsRegularMode;
bool m_isRegularMode;
uint32 m_uiFlamingWeaponTimer;
uint32 m_uiProteanSubdualTimer;

void Reset() override
{
CombatAI::Reset();
m_uiFlamingWeaponTimer = urand(3000, 6000);
m_uiProteanSubdualTimer = 2000;
}
Expand All @@ -378,7 +361,7 @@ struct npc_arcatraz_defenderAI : public ScriptedAI

if (m_uiFlamingWeaponTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature->GetVictim(), m_bIsRegularMode ? SPELL_FLAMING_WEAPON : SPELL_FLAMING_WEAPON_H) == CAST_OK)
if (DoCastSpellIfCan(m_creature->GetVictim(), m_isRegularMode ? SPELL_FLAMING_WEAPON : SPELL_FLAMING_WEAPON_H) == CAST_OK)
m_uiFlamingWeaponTimer = urand(3000, 6000);
}
else
Expand All @@ -389,7 +372,7 @@ struct npc_arcatraz_defenderAI : public ScriptedAI
{
if (m_uiProteanSubdualTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature->GetVictim(), m_bIsRegularMode ? SPELL_PROTEAN_SUBDUAL : SPELL_PROTEAN_SUBDUAL_H) == CAST_OK)
if (DoCastSpellIfCan(m_creature->GetVictim(), m_isRegularMode ? SPELL_PROTEAN_SUBDUAL : SPELL_PROTEAN_SUBDUAL_H) == CAST_OK)
m_uiProteanSubdualTimer = urand(2000, 3000);
}
else
Expand All @@ -400,25 +383,20 @@ struct npc_arcatraz_defenderAI : public ScriptedAI
}
};

UnitAI* GetAI_npc_arcatraz_defender(Creature* pCreature)
{
return new npc_arcatraz_defenderAI(pCreature);
}

void AddSC_arcatraz()
{
Script* pNewScript = new Script;
pNewScript->Name = "npc_millhouse_manastorm";
pNewScript->GetAI = &GetAI_npc_millhouse_manastorm;
pNewScript->GetAI = &GetNewAIInstance<npc_millhouse_manastormAI>;
pNewScript->RegisterSelf();

pNewScript = new Script;
pNewScript->Name = "npc_warden_mellichar";
pNewScript->GetAI = &GetAI_npc_warden_mellichar;
pNewScript->GetAI = &GetNewAIInstance<npc_warden_mellicharAI>;
pNewScript->RegisterSelf();

pNewScript = new Script;
pNewScript->Name = "npc_arcatraz_defender";
pNewScript->GetAI = &GetAI_npc_arcatraz_defender;
pNewScript->GetAI = &GetNewAIInstance<npc_arcatraz_defenderAI>;
pNewScript->RegisterSelf();
}
Loading

0 comments on commit acef50f

Please sign in to comment.