Merge pull request #7398 from Vincent-Michael/onyxiaCreatureText

Scripts/Onyxias Lair: Convert script_texts in creature_text
This commit is contained in:
Nay
2012-08-14 09:39:50 -07:00
2 changed files with 21 additions and 10 deletions
@@ -0,0 +1,8 @@
DELETE FROM `script_texts` WHERE `npc_entry`=10184;
DELETE FROM `creature_text` WHERE `entry`=10184;
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
(10184, 0, 0, 'How fortuitous. Usually, I must leave my lair in order to feed.', 14, 0, 100, 0, 0, 0, 'Onyxia - Aggro'),
(10184, 1, 0, 'Learn your place mortal!', 14, 0, 100, 0, 0, 0, 'Onyxia - Kill Player'),
(10184, 2, 0, 'This meaningless exertion bores me. I''ll incinerate you all from above!', 14, 0, 100, 0, 0, 0, 'Onyxia - Phase 2'),
(10184, 3, 0, 'It seems you''ll need another lesson, mortals!', 14, 0, 100, 0, 0, 0, 'Onyxia - Phase 3'),
(10184, 4, 0, '%s takes in a deep breath...', 41, 0, 100, 0, 0, 0, 'Onyxia - Deep Breath Emote');
@@ -35,11 +35,14 @@ EndScriptData */
enum Yells enum Yells
{ {
SAY_AGGRO = -1249000, // Say
SAY_KILL = -1249001, SAY_AGGRO = 0,
SAY_PHASE_2_TRANS = -1249002, SAY_KILL = 1,
SAY_PHASE_3_TRANS = -1249003, SAY_PHASE_2_TRANS = 2,
EMOTE_BREATH = -1249004, SAY_PHASE_3_TRANS = 3,
// Emote
EMOTE_BREATH = 4,
}; };
enum Spells enum Spells
@@ -184,7 +187,7 @@ public:
void EnterCombat(Unit* /*who*/) void EnterCombat(Unit* /*who*/)
{ {
DoScriptText(SAY_AGGRO, me); Talk(SAY_AGGRO);
me->SetInCombatWithZone(); me->SetInCombatWithZone();
if (instance) if (instance)
@@ -227,7 +230,7 @@ public:
void KilledUnit(Unit* /*victim*/) void KilledUnit(Unit* /*victim*/)
{ {
DoScriptText(SAY_KILL, me); Talk(SAY_KILL);
} }
void SpellHit(Unit* /*pCaster*/, const SpellInfo* Spell) void SpellHit(Unit* /*pCaster*/, const SpellInfo* Spell)
@@ -269,7 +272,7 @@ public:
me->SetCanFly(true); me->SetCanFly(true);
me->GetMotionMaster()->MovePoint(11, Phase2Location.GetPositionX(), Phase2Location.GetPositionY(), Phase2Location.GetPositionZ()+25); me->GetMotionMaster()->MovePoint(11, Phase2Location.GetPositionX(), Phase2Location.GetPositionY(), Phase2Location.GetPositionZ()+25);
me->SetSpeed(MOVE_FLIGHT, 1.0f); me->SetSpeed(MOVE_FLIGHT, 1.0f);
DoScriptText(SAY_PHASE_2_TRANS, me); Talk(SAY_PHASE_2_TRANS);
if (instance) if (instance)
instance->SetData(DATA_ONYXIA_PHASE, Phase); instance->SetData(DATA_ONYXIA_PHASE, Phase);
WhelpTimer = 5000; WhelpTimer = 5000;
@@ -416,7 +419,7 @@ public:
Phase = PHASE_END; Phase = PHASE_END;
if (instance) if (instance)
instance->SetData(DATA_ONYXIA_PHASE, Phase); instance->SetData(DATA_ONYXIA_PHASE, Phase);
DoScriptText(SAY_PHASE_3_TRANS, me); Talk(SAY_PHASE_3_TRANS);
SetCombatMovement(true); SetCombatMovement(true);
me->SetCanFly(false); me->SetCanFly(false);
@@ -432,7 +435,7 @@ public:
if (me->IsNonMeleeSpellCasted(false)) if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(false); me->InterruptNonMeleeSpells(false);
DoScriptText(EMOTE_BREATH, me); Talk(EMOTE_BREATH);
DoCast(me, PointData->SpellId); DoCast(me, PointData->SpellId);
DeepBreathTimer = 70000; DeepBreathTimer = 70000;
} }