Core/Scripts: Missing spawn after boss Varos and Urom deaths.Needed for a quest chain also.

This commit is contained in:
w1sht0l1v3
2011-12-13 13:58:03 +02:00
parent bd82427d65
commit f96d46260e
5 changed files with 47 additions and 2 deletions
@@ -0,0 +1,6 @@
DELETE FROM `creature_text` WHERE `entry`=28012;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(28012,0,0,'The trickster Mage-Lord Urom protects the third ring. He will appear alone and defenseless, but do not be fooled by appearences! Urom is a powerful conjurer who commands a menagerie of Phantasmal creatures. Seek him out above.',12,0,0,0,0,0,''),
(28012,1,1,'Your greatest challenge lies ahead. Ley-Guardian Eregos is a Blue dragon of immense power. You will find him flying above the uppermost ring.',12,0,0,0,0,0,'');
UPDATE `creature_template` SET `ScriptName`='npc_image_belgaristrasz' WHERE `entry`=28012;
@@ -289,6 +289,7 @@ public:
void JustDied(Unit* /*killer*/) void JustDied(Unit* /*killer*/)
{ {
_JustDied(); _JustDied();
DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
} }
void LeaveCombat() void LeaveCombat()
@@ -144,8 +144,8 @@ public:
void JustDied(Unit* /*killer*/) void JustDied(Unit* /*killer*/)
{ {
_JustDied(); _JustDied();
Talk(SAY_DEATH); Talk(SAY_DEATH);
DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
} }
private: private:
bool firstCoreEnergize; bool firstCoreEnergize;
@@ -50,6 +50,12 @@ enum Drakes
NPC_ETERNOS = 27659 NPC_ETERNOS = 27659
}; };
enum Says
{
SAY_VAROS = 0,
SAY_UROM = 1
};
class npc_oculus_drake : public CreatureScript class npc_oculus_drake : public CreatureScript
{ {
public: public:
@@ -174,7 +180,38 @@ public:
}; };
class npc_image_belgaristrasz : public CreatureScript
{
public:
npc_image_belgaristrasz() : CreatureScript("npc_image_belgaristrasz") { }
struct npc_image_belgaristraszAI : public ScriptedAI
{
npc_image_belgaristraszAI(Creature* creature) : ScriptedAI(creature) {}
void IsSummonedBy(Unit* summoner)
{
if (summoner->GetEntry() == NPC_VAROS)
{
Talk(SAY_VAROS);
me->DespawnOrUnsummon(60000);
}
if (summoner->GetEntry() == NPC_UROM)
{
Talk(SAY_UROM);
me->DespawnOrUnsummon(60000);
}
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new npc_image_belgaristraszAI(creature);
}
};
void AddSC_oculus() void AddSC_oculus()
{ {
new npc_oculus_drake(); new npc_oculus_drake();
new npc_image_belgaristrasz();
} }
@@ -71,6 +71,7 @@ enum OculusWorldStates
enum OculusSpells enum OculusSpells
{ {
SPELL_CENTRIFUGE_SHIELD = 50053 SPELL_CENTRIFUGE_SHIELD = 50053,
SPELL_DEATH_SPELL = 50415
}; };
#endif #endif