[Core/Scripts] BWL - Make Razorgore talk, script blackwing mage, make his spell break eggs
This commit is contained in:
9
data/sql/updates/db_world/0000_00_00_00.sql
Normal file
9
data/sql/updates/db_world/0000_00_00_00.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
-- Blackwing Mage [12420]
|
||||
SET @BWL_MAGE = 12420;
|
||||
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@BWL_MAGE;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = @BWL_MAGE;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(@BWL_MAGE, 0, 0, 0, 0, 0, 100, 0, 0, 0, 3400, 4700, 0, 11, 17290, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Cast Fireball'),
|
||||
(@BWL_MAGE, 0, 1, 0, 9, 0, 100, 0, 0, 10, 15000, 25000, 0, 11, 22271, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Cast Arcane Explosion on Close');
|
||||
@@ -64,7 +64,8 @@ enum BWLMisc
|
||||
{
|
||||
// Razorgore Egg Event
|
||||
ACTION_PHASE_TWO = 1,
|
||||
DATA_EGG_EVENT
|
||||
DATA_EGG_EVENT = 2,
|
||||
TALK_EGG_BROKEN_RAND = 3,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@ enum Spells
|
||||
SPELL_CHANNEL = 45537,
|
||||
SPELL_EGG_DESTROY = 19873,
|
||||
|
||||
SPELL_CLEAVE = 22540,
|
||||
SPELL_CLEAVE = 19632,
|
||||
SPELL_WARSTOMP = 24375,
|
||||
SPELL_FIREBALLVOLLEY = 22425,
|
||||
SPELL_CONFLAGRATION = 23023
|
||||
@@ -90,6 +90,9 @@ public:
|
||||
{
|
||||
if (action == ACTION_PHASE_TWO)
|
||||
DoChangePhase();
|
||||
|
||||
if (action == TALK_EGG_BROKEN_RAND)
|
||||
Talk(urand(SAY_EGGS_BROKEN1, SAY_EGGS_BROKEN3));
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask)
|
||||
@@ -176,7 +179,18 @@ public:
|
||||
void HandleOnHit()
|
||||
{
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
{
|
||||
instance->SetData(DATA_EGG_EVENT, SPECIAL);
|
||||
}
|
||||
if (GameObject* egg = GetCaster()->FindNearestGameObject(GO_EGG, 100))
|
||||
{
|
||||
if (!egg)
|
||||
return;
|
||||
|
||||
GetCaster()->GetAI()->DoAction(TALK_EGG_BROKEN_RAND);
|
||||
egg->SetLootState(GO_READY);
|
||||
egg->UseDoorOrButton(10000);
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
Reference in New Issue
Block a user