mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
fix(Raid/AQ40): Ouro not spawning (#9285)
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1637594598317103800');
|
||||||
|
UPDATE `creature_template` SET `ScriptName`='npc_ouro_spawner' WHERE `entry`=15957;
|
||||||
|
UPDATE `creature_template` SET `flags_extra`='128' WHERE `entry`=15957;
|
||||||
|
UPDATE `creature_template` SET `InhabitType`='9' WHERE `entry`=15957;
|
||||||
@@ -22,8 +22,8 @@ SDComment: No model for submerging. Currently just invisible.
|
|||||||
SDCategory: Temple of Ahn'Qiraj
|
SDCategory: Temple of Ahn'Qiraj
|
||||||
EndScriptData */
|
EndScriptData */
|
||||||
|
|
||||||
#include "ScriptMgr.h"
|
|
||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
|
#include "ScriptMgr.h"
|
||||||
#include "temple_of_ahnqiraj.h"
|
#include "temple_of_ahnqiraj.h"
|
||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
@@ -32,7 +32,59 @@ enum Spells
|
|||||||
SPELL_SANDBLAST = 26102,
|
SPELL_SANDBLAST = 26102,
|
||||||
SPELL_GROUND_RUPTURE = 26100,
|
SPELL_GROUND_RUPTURE = 26100,
|
||||||
SPELL_BIRTH = 26262, // The Birth Animation
|
SPELL_BIRTH = 26262, // The Birth Animation
|
||||||
SPELL_DIRTMOUND_PASSIVE = 26092
|
SPELL_DIRTMOUND_PASSIVE = 26092,
|
||||||
|
SPELL_SUMMON_OURO = 26061
|
||||||
|
};
|
||||||
|
|
||||||
|
class npc_ouro_spawner : public CreatureScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
npc_ouro_spawner() : CreatureScript("npc_ouro_spawner") {}
|
||||||
|
|
||||||
|
CreatureAI* GetAI(Creature* creature) const
|
||||||
|
{
|
||||||
|
return new npc_ouro_spawnerAI(creature);
|
||||||
|
}
|
||||||
|
|
||||||
|
struct npc_ouro_spawnerAI : public ScriptedAI
|
||||||
|
{
|
||||||
|
npc_ouro_spawnerAI(Creature* creature) : ScriptedAI(creature)
|
||||||
|
{
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool hasSummoned;
|
||||||
|
|
||||||
|
void Reset() override
|
||||||
|
{
|
||||||
|
hasSummoned = false;
|
||||||
|
DoCast(me, SPELL_DIRTMOUND_PASSIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MoveInLineOfSight(Unit* who) override
|
||||||
|
{
|
||||||
|
// Spawn Ouro on LoS check
|
||||||
|
if (!hasSummoned && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 40.0f))
|
||||||
|
{
|
||||||
|
DoCast(me, SPELL_SUMMON_OURO);
|
||||||
|
hasSummoned = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ScriptedAI::MoveInLineOfSight(who);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JustSummoned(Creature* creature) override
|
||||||
|
{
|
||||||
|
// Despawn when Ouro is spawned
|
||||||
|
if (creature->GetEntry() == NPC_OURO)
|
||||||
|
{
|
||||||
|
creature->SetInCombatWithZone();
|
||||||
|
creature->CastSpell(creature, SPELL_BIRTH, false);
|
||||||
|
me->DespawnOrUnsummon();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_ouro : public CreatureScript
|
class boss_ouro : public CreatureScript
|
||||||
@@ -145,5 +197,6 @@ public:
|
|||||||
|
|
||||||
void AddSC_boss_ouro()
|
void AddSC_boss_ouro()
|
||||||
{
|
{
|
||||||
|
new npc_ouro_spawner();
|
||||||
new boss_ouro();
|
new boss_ouro();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ enum Creatures
|
|||||||
NPC_VEM = 15544,
|
NPC_VEM = 15544,
|
||||||
NPC_KRI = 15511,
|
NPC_KRI = 15511,
|
||||||
NPC_VEKLOR = 15276,
|
NPC_VEKLOR = 15276,
|
||||||
NPC_VEKNILASH = 15275
|
NPC_VEKNILASH = 15275,
|
||||||
|
NPC_OURO = 15517
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class AI, class T>
|
template <class AI, class T>
|
||||||
|
|||||||
Reference in New Issue
Block a user