Skip to content

Commit

Permalink
Core/Script: update creature_text for Twilight Corruptor from sniffs
Browse files Browse the repository at this point in the history
  • Loading branch information
malcrom authored and ZxBiohazardZx committed Jan 8, 2012
1 parent 57e1972 commit 03a7f12
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
6 changes: 6 additions & 0 deletions sql/updates/world/2011_01_08_12_world_creature_text.sql
@@ -0,0 +1,6 @@
-- Twilight Corrupter say text
DELETE FROM `creature_text` WHERE `entry` IN (15625);
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(15625,0,0, 'Come, $N. See what the Nightmare brings...',14,0,100,0,0,0, 'Twilight Corrupter'),
(15625,1,0, 'The Nightmare cannot be stopped!',14,0,100,0,0,0, 'Twilight Corrupter'),
(15625,2,0, 'Twilight Corrupter squeezes the last bit of life out of $N and swallows their soul.',16,0,100,0,0,0, 'Twilight Corrupter');
Expand Up @@ -23,7 +23,8 @@ enum Yells
YELL_EVADE = 1,
YELL_RESPAWN1 = -1810010, // no creature_text
YELL_RESPAWN2 = -1810011, // no creature_text
YELL_RANDOM = 3
YELL_RANDOM = 2,
YELL_SPELL = 3,
};

enum Spells
Expand Down
16 changes: 12 additions & 4 deletions src/server/scripts/EasternKingdoms/duskwood.cpp
Expand Up @@ -25,6 +25,14 @@ EndScriptData */

#include "ScriptPCH.h"

enum Yells
{
YELL_TWILIGHTCORRUPTOR_RESPAWN = 0,
YELL_TWILIGHTCORRUPTOR_AGGRO = 1,
YELL_TWILIGHTCORRUPTOR_KILL = 2,
};


/*######
# at_twilight_grove
######*/
Expand All @@ -43,11 +51,11 @@ class at_twilight_grove : public AreaTriggerScript
TCorrupter->setFaction(14);
TCorrupter->SetMaxHealth(832750);
}
if (Unit* CorrupterSpeaker = player->SummonCreature(1, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()-1, 0, TEMPSUMMON_TIMED_DESPAWN, 15000))
if (Creature* CorrupterSpeaker = player->SummonCreature(1, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()-1, 0, TEMPSUMMON_TIMED_DESPAWN, 15000))
{
CorrupterSpeaker->SetName("Twilight Corrupter");
CorrupterSpeaker->SetVisible(true);
CorrupterSpeaker->MonsterYell("Come, $N. See what the Nightmare brings...", 0, player->GetGUID());
CorrupterSpeaker->AI()->Talk(YELL_TWILIGHTCORRUPTOR_RESPAWN, player->GetGUID());
}
}
return false;
Expand Down Expand Up @@ -89,15 +97,15 @@ class boss_twilight_corrupter : public CreatureScript
}
void EnterCombat(Unit* /*who*/)
{
me->MonsterYell("The Nightmare cannot be stopped!", 0, me->GetGUID());
Talk(YELL_TWILIGHTCORRUPTOR_AGGRO);
}

void KilledUnit(Unit* victim)
{
if (victim->GetTypeId() == TYPEID_PLAYER)
{
++KillCount;
me->MonsterTextEmote("Twilight Corrupter squeezes the last bit of life out of $N and swallows their soul.", victim->GetGUID(), true);
Talk(YELL_TWILIGHTCORRUPTOR_KILL, victim->GetGUID());

if (KillCount == 3)
{
Expand Down

0 comments on commit 03a7f12

Please sign in to comment.