mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
DB/Quest: Convert support for 'Strength of One' to SAI
Closes #24641
(cherry picked from commit 44aba5dcdf)
This commit is contained in:
@@ -27,8 +27,6 @@ npc_draenei_survivor
|
||||
npc_engineer_spark_overgrind
|
||||
npc_injured_draenei
|
||||
npc_magwin
|
||||
go_ravager_cage
|
||||
npc_death_ravager
|
||||
EndContentData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
@@ -620,105 +618,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
enum RavegerCage
|
||||
{
|
||||
NPC_DEATH_RAVAGER = 17556,
|
||||
|
||||
SPELL_REND = 13443,
|
||||
SPELL_ENRAGING_BITE = 30736,
|
||||
|
||||
QUEST_STRENGTH_ONE = 9582
|
||||
};
|
||||
|
||||
class go_ravager_cage : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_ravager_cage() : GameObjectScript("go_ravager_cage") { }
|
||||
|
||||
struct go_ravager_cageAI : public GameObjectAI
|
||||
{
|
||||
go_ravager_cageAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
me->UseDoorOrButton();
|
||||
if (player->GetQuestStatus(QUEST_STRENGTH_ONE) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (Creature* ravager = me->FindNearestCreature(NPC_DEATH_RAVAGER, 5.0f, true))
|
||||
{
|
||||
ravager->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
ravager->SetReactState(REACT_AGGRESSIVE);
|
||||
ravager->AI()->AttackStart(player);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
GameObjectAI* GetAI(GameObject* go) const override
|
||||
{
|
||||
return new go_ravager_cageAI(go);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_death_ravager : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_death_ravager() : CreatureScript("npc_death_ravager") { }
|
||||
|
||||
struct npc_death_ravagerAI : public ScriptedAI
|
||||
{
|
||||
npc_death_ravagerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
RendTimer = 30000;
|
||||
EnragingBiteTimer = 20000;
|
||||
}
|
||||
|
||||
uint32 RendTimer;
|
||||
uint32 EnragingBiteTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (RendTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_REND);
|
||||
RendTimer = 30000;
|
||||
}
|
||||
else RendTimer -= diff;
|
||||
|
||||
if (EnragingBiteTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_ENRAGING_BITE);
|
||||
EnragingBiteTimer = 15000;
|
||||
}
|
||||
else EnragingBiteTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_death_ravagerAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
// 29528 - Inoculate Nestlewood Owlkin
|
||||
class spell_inoculate_nestlewood : public AuraScript
|
||||
{
|
||||
@@ -742,7 +641,5 @@ void AddSC_azuremyst_isle()
|
||||
new npc_engineer_spark_overgrind();
|
||||
new npc_injured_draenei();
|
||||
new npc_magwin();
|
||||
new npc_death_ravager();
|
||||
new go_ravager_cage();
|
||||
RegisterAuraScript(spell_inoculate_nestlewood);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user