Remove no longer used scripts.
And cataclysm text from Witch Doctor Unbagwa.
This commit is contained in:
@@ -157,312 +157,6 @@ GameObjectAI* GetAIgo_transpolyporter(GameObject *pGo)
|
||||
return new go_transpolyporterAI(pGo);
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_molthor
|
||||
######*/
|
||||
|
||||
enum MolthorData
|
||||
{
|
||||
NPC_HEART_OF_HAKKAR = 15069,
|
||||
|
||||
GO_HEART_OF_HAKKAR_SPELL_EMITTER = 180391,
|
||||
|
||||
QUEST_THE_HEART_OF_HAKKAR = 8183,
|
||||
|
||||
SPELL_MOLTHOR_HEART_THROW = 24214,
|
||||
|
||||
SAY_MOLTHOR_1 = 10473,
|
||||
SAY_MOLTHOR_2 = 10474,
|
||||
SAY_MOLTHOR_3 = 10537
|
||||
};
|
||||
|
||||
static float const riftHeartPosition[4] = { -11818.29f, 1345.13f, 8.014503f, 1.32645f };
|
||||
static int const emitterCount = 5;
|
||||
static float const emitterPositions[emitterCount][4] = {
|
||||
{ -11800.26f, 1233.462f, -0.576672f, 3.665196f }, // Yojamba Isle (verified by sniff)
|
||||
{ -11771.92f, 1273.80f, 3.96f, 0.0f },
|
||||
{ -11866.68f, 1233.164f, 3.900817f, 2.111848f }, // Yojamba Isle (verified by sniff)
|
||||
{ -14335.85f, 513.95f, 8.86f, 0.0f }, // Booty Bay
|
||||
{ -14421.20f, 475.50f, 11.54f, 0.0f }
|
||||
};
|
||||
|
||||
struct npc_molthorAI : public npc_escortAI
|
||||
{
|
||||
npc_molthorAI(Creature *pCreature) : npc_escortAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 m_uiTimer;
|
||||
uint32 m_uiPhase;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
m_uiTimer = 0;
|
||||
m_uiPhase = 0;
|
||||
}
|
||||
|
||||
void SpellHit(SpellCaster* pCaster, const SpellEntry* pSpell)
|
||||
{
|
||||
if (pSpell->Id == SPELL_MOLTHOR_HEART_THROW)
|
||||
{
|
||||
m_uiTimer = 2000;
|
||||
m_uiPhase = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId) override
|
||||
{
|
||||
if (uiPointId == 7)
|
||||
{
|
||||
SetEscortPaused(true);
|
||||
m_creature->CastSpell(m_creature, SPELL_MOLTHOR_HEART_THROW, false);
|
||||
}
|
||||
}
|
||||
|
||||
void SummonSpellEmitters()
|
||||
{
|
||||
Player *player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
for (const auto& emitterPosition : emitterPositions)
|
||||
{
|
||||
float x = emitterPosition[0];
|
||||
float y = emitterPosition[1];
|
||||
float z = emitterPosition[2];
|
||||
float o = emitterPosition[3];
|
||||
|
||||
if (GameObject *emitter = m_creature->SummonGameObject(GO_HEART_OF_HAKKAR_SPELL_EMITTER, x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 5000))
|
||||
// Why?
|
||||
emitter->Use(player);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateEscortAI(uint32 const uiDiff) override
|
||||
{
|
||||
if (m_uiPhase)
|
||||
{
|
||||
if (m_uiTimer <= uiDiff)
|
||||
{
|
||||
switch (m_uiPhase)
|
||||
{
|
||||
case 1:
|
||||
m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
DoScriptText(SAY_MOLTHOR_2, m_creature);
|
||||
|
||||
m_creature->SummonCreature(NPC_HEART_OF_HAKKAR,
|
||||
riftHeartPosition[0],
|
||||
riftHeartPosition[1],
|
||||
riftHeartPosition[2],
|
||||
riftHeartPosition[3],
|
||||
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
|
||||
|
||||
m_uiTimer = 20000;
|
||||
m_uiPhase = 2;
|
||||
break;
|
||||
case 2:
|
||||
m_creature->HandleEmote(EMOTE_ONESHOT_SHOUT);
|
||||
m_creature->MonsterYellToZone(SAY_MOLTHOR_3, 0, GetPlayerForEscort());
|
||||
SummonSpellEmitters();
|
||||
|
||||
m_uiTimer = 5000;
|
||||
m_uiPhase = 3;
|
||||
break;
|
||||
case 3:
|
||||
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
m_creature->SetWalk(false);
|
||||
SetEscortPaused(false);
|
||||
|
||||
m_uiTimer = 0;
|
||||
m_uiPhase = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
m_uiTimer -= uiDiff;
|
||||
}
|
||||
|
||||
if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_molthor(Creature *pCreature)
|
||||
{
|
||||
return new npc_molthorAI(pCreature);
|
||||
}
|
||||
|
||||
bool QuestComplete_npc_molthor(Player *pPlayer, Creature *pCreature, Quest const *pQuest)
|
||||
{
|
||||
npc_molthorAI *molthorAI = dynamic_cast<npc_molthorAI*>(pCreature->AI());
|
||||
|
||||
if (pQuest->GetQuestId() == QUEST_THE_HEART_OF_HAKKAR && molthorAI)
|
||||
{
|
||||
molthorAI->Start(true, pPlayer->GetObjectGuid(), nullptr, true);
|
||||
pCreature->MonsterSay(SAY_MOLTHOR_1);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_heart_of_hakkar
|
||||
######*/
|
||||
|
||||
enum HeartOfHakkarData
|
||||
{
|
||||
SPELL_CREATE_HEART_OF_HAKKAR_RIFT = 24202,
|
||||
SPELL_HEART_OF_HAKKAR_BANNING = 24203,
|
||||
SPELL_HEART_OF_HAKKAR_IMPLODE = 24204,
|
||||
SPELL_CREATE_HEART_OF_HAKKAR_EXPLOSION = 24215,
|
||||
SPELL_RITUAL_CAST_VISUAL = 24217,
|
||||
SPELL_CREATE_HEART_OF_HAKKAR_SUMMON_CIRCLE = 24602,
|
||||
|
||||
NPC_SERVANT_OF_THE_HAND = 15080,
|
||||
|
||||
GO_HEART_OF_HAKKAR_OBJECT = 180402
|
||||
};
|
||||
|
||||
static float const heartPosition[4] = { -11818.35f, 1344.856f, 4.266753f, 0.0f };
|
||||
static int const servantCount = 4;
|
||||
static float const servantPositions[servantCount][4] = {
|
||||
{ -11817.91f, 1325.021f, 1.559013f, 1.518436f },
|
||||
{ -11831.73f, 1331.291f, 1.938519f, 0.9424778f },
|
||||
{ -11835.16f, 1349.36f, 2.110108f, 6.056293f },
|
||||
{ -11801.4f, 1335.381f, 1.36269f, 2.617994f }
|
||||
};
|
||||
|
||||
struct npc_heart_of_hakkarAI : public ScriptedAI
|
||||
{
|
||||
npc_heart_of_hakkarAI(Creature *pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool m_bInitialized;
|
||||
uint32 m_uiTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
m_bInitialized = false;
|
||||
m_uiTimer = 0;
|
||||
}
|
||||
|
||||
void SummonServants()
|
||||
{
|
||||
for (const auto& servantPosition : servantPositions)
|
||||
{
|
||||
float x = servantPosition[0];
|
||||
float y = servantPosition[1];
|
||||
float z = servantPosition[2];
|
||||
float o = servantPosition[3];
|
||||
|
||||
Creature *servant = m_creature->SummonCreature(NPC_SERVANT_OF_THE_HAND, x, y, z, o, TEMPSUMMON_TIMED_DESPAWN, 30000);
|
||||
|
||||
if (servant)
|
||||
{
|
||||
servant->CastSpell(servant, SPELL_CREATE_HEART_OF_HAKKAR_SUMMON_CIRCLE, true);
|
||||
servant->CastSpell(servant, SPELL_RITUAL_CAST_VISUAL, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const uiDiff) override
|
||||
{
|
||||
if (!m_bInitialized)
|
||||
{
|
||||
m_creature->CastSpell(m_creature, SPELL_CREATE_HEART_OF_HAKKAR_RIFT, true);
|
||||
m_creature->CastSpell(m_creature, SPELL_HEART_OF_HAKKAR_BANNING, true);
|
||||
|
||||
float x = heartPosition[0];
|
||||
float y = heartPosition[1];
|
||||
float z = heartPosition[2];
|
||||
float o = heartPosition[3];
|
||||
m_creature->SummonGameObject(GO_HEART_OF_HAKKAR_OBJECT, x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 30000);
|
||||
|
||||
SummonServants();
|
||||
|
||||
m_bInitialized = true;
|
||||
m_uiTimer = 13000;
|
||||
}
|
||||
|
||||
if (m_uiTimer)
|
||||
{
|
||||
if (m_uiTimer <= uiDiff)
|
||||
{
|
||||
m_creature->CastSpell(m_creature, SPELL_CREATE_HEART_OF_HAKKAR_EXPLOSION, true);
|
||||
m_creature->CastSpell(m_creature, SPELL_HEART_OF_HAKKAR_IMPLODE, true);
|
||||
m_creature->ForcedDespawn(2000);
|
||||
m_uiTimer = 0;
|
||||
}
|
||||
else
|
||||
m_uiTimer -= uiDiff;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_heart_of_hakkar(Creature *pCreature)
|
||||
{
|
||||
return new npc_heart_of_hakkarAI(pCreature);
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_servant_of_the_hand
|
||||
######*/
|
||||
|
||||
enum ServantOfTheHandData
|
||||
{
|
||||
SPELL_TELEPORT_SPAWN_OUT = 24221
|
||||
};
|
||||
|
||||
struct npc_servant_of_the_handAI : public ScriptedAI
|
||||
{
|
||||
npc_servant_of_the_handAI(Creature *pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 m_uiSpawnOutTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
if (m_creature->IsTemporarySummon())
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
m_uiSpawnOutTimer = urand(0, 1) ? 25500 : 26500;
|
||||
}
|
||||
else
|
||||
m_uiSpawnOutTimer = 0;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const uiDiff) override
|
||||
{
|
||||
if (m_uiSpawnOutTimer)
|
||||
{
|
||||
if (m_uiSpawnOutTimer <= uiDiff)
|
||||
{
|
||||
m_creature->CastSpell(m_creature, SPELL_TELEPORT_SPAWN_OUT, false);
|
||||
m_uiSpawnOutTimer = 0;
|
||||
}
|
||||
else
|
||||
m_uiSpawnOutTimer -= uiDiff;
|
||||
}
|
||||
|
||||
if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_servant_of_the_hand(Creature *pCreature)
|
||||
{
|
||||
return new npc_servant_of_the_handAI(pCreature);
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_pats_hellfire_guy
|
||||
######*/
|
||||
@@ -526,8 +220,6 @@ float const ApesSummon[4] =
|
||||
-13773.6231f, -3.8856f, 41.5641f, 5.7f
|
||||
};
|
||||
|
||||
#define UNBAGWA_EVENT_START "Get ready everyone! Here come de apes!"
|
||||
|
||||
struct npc_witch_doctor_unbagwaAI : ScriptedAI
|
||||
{
|
||||
explicit npc_witch_doctor_unbagwaAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
@@ -592,7 +284,6 @@ struct npc_witch_doctor_unbagwaAI : ScriptedAI
|
||||
|
||||
void StartEvent()
|
||||
{
|
||||
m_creature->MonsterYell(UNBAGWA_EVENT_START);
|
||||
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
m_creature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_NONE);
|
||||
m_bStartEvent = true;
|
||||
@@ -684,22 +375,6 @@ void AddSC_stranglethorn_vale()
|
||||
//newscript->pGOHello = &GOHello_go_transpolyporter;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_molthor";
|
||||
newscript->GetAI = &GetAI_npc_molthor;
|
||||
newscript->pQuestRewardedNPC = &QuestComplete_npc_molthor;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_heart_of_hakkar";
|
||||
newscript->GetAI = &GetAI_npc_heart_of_hakkar;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_servant_of_the_hand";
|
||||
newscript->GetAI = &GetAI_npc_servant_of_the_hand;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_pats_hellfire_guy";
|
||||
newscript->GetAI = &GetAI_npc_pats_hellfire_guy;
|
||||
|
||||
Reference in New Issue
Block a user