mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/DB: Utgarde Keep
This commit is contained in:
105
sql/updates/world/2012_09_01_00_world_utgarde.sql
Normal file
105
sql/updates/world/2012_09_01_00_world_utgarde.sql
Normal file
@@ -0,0 +1,105 @@
|
||||
-- Frenzied geist
|
||||
DELETE FROM `creature_loot_template` WHERE `entry`=31671;
|
||||
-- Savage worg
|
||||
DELETE FROM `creature_loot_template` WHERE `entry`=31678 AND `item` IN(39211,39212,33454);
|
||||
INSERT INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `mincountOrRef`, `maxcount`) VALUES
|
||||
(31678,39211,70,3,5),
|
||||
(31678,39212,16,2,4),
|
||||
(31678,33454, 3,1,1);
|
||||
|
||||
-- Keleseth
|
||||
UPDATE `creature_template` SET `mechanic_immune_mask`=617289692 WHERE `entry` IN(23953,30748);
|
||||
-- Tunneling ghoul
|
||||
DELETE FROM `creature_loot_template` WHERE `entry`=31681;
|
||||
-- Dalronn heartsplitter
|
||||
UPDATE `creature_template` SET `mindmg`=380,`maxdmg`=580,`attackpower`=0,`dmg_multiplier`=10 WHERE `entry`=31660;
|
||||
-- Frenzied geist
|
||||
UPDATE `creature_template` SET `lootid`=28419 WHERE `entry`=31671;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=28419;
|
||||
-- Skarvald the constructor - On level 81 health fits/is blizzlike, depending on wowhead his level range is 72 - 81
|
||||
UPDATE `creature_template` SET `minlevel`=81,`maxlevel`=81 WHERE `entry`=31679;
|
||||
-- Tunneling ghoul
|
||||
UPDATE `creature_template` SET `lootid`=24084 WHERE `entry`=31681;
|
||||
-- Dragonflayer runecaster
|
||||
UPDATE `creature_template` SET `ScriptName`='',`AIName`='SmartAI' WHERE `entry`=23960;
|
||||
-- Dragonflayer strategist
|
||||
UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`unit_flags`=`unit_flags`|131072 WHERE `entry`=32246;
|
||||
-- Ingvar and undead Ingvar
|
||||
UPDATE `creature_template` SET `mindmg`=650,`maxdmg`=900,`attackpower`=200, `dmg_multiplier`=10 WHERE `entry` IN(31673,31674);
|
||||
UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|1 WHERE `entry` IN(23954,31673,23980,31674);
|
||||
-- Throw axe dummy
|
||||
UPDATE `creature_template` SET `unit_flags`=2|131072|33554432, `flags_extra`=`flags_extra`|2, `equipment_id`=720 WHERE `entry` IN(23997,31835);
|
||||
-- Throw axe target
|
||||
UPDATE `creature_template` SET `unit_flags`=2|4|256|512, `faction_A`=35, `faction_H`=35, `flags_extra`=`flags_extra`|128 WHERE `entry`=23996;
|
||||
|
||||
-- Dragonflayer runecaster
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=23960;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=23960 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `id`, `event_type`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `target_type`, `target_param2`, `comment`) VALUES
|
||||
(23960,1,0,2,5000,7000,14000,17000,11,42740,11,30,'Dragonflayer Runecaster - In combat - Cast Njords Rune of Protection'),
|
||||
(23960,2,0,4,5000,7000,14000,17000,11,59616,11,30,'Dragonflayer Runecaster - In combat - Cast Njords Rune of Protection'),
|
||||
(23960,3,0,2,1000,2000,15000,18000,11,54965, 1, 0,'Dragonflayer Runecaster - In combat - Cast Bolthorns Rune of Flame'),
|
||||
(23960,4,0,4,1000,2000,15000,18000,11,59617, 1, 0,'Dragonflayer Runecaster - In combat - Cast Bolthorns Rune of Flame');
|
||||
|
||||
-- Frenzied geist
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28419;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=28419 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts`(`entryorguid`,`event_type`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`target_type`,`comment`) VALUES
|
||||
(28419,0,5000,5000,30000,30000,11,40414,5,'Frenzied geist - In combat - Cast Fixate');
|
||||
|
||||
-- Difficulty data for spells used in utgarde keep
|
||||
DELETE FROM `spelldifficulty_dbc` WHERE `id` IN(42669,42708,42750,42723,42729,43667,42702) OR `spellid0` IN(42669,42708,42750,42723,42729,43667,42702);
|
||||
INSERT INTO `spelldifficulty_dbc`(`id`,`spellid0`,`spellid1`) VALUES
|
||||
(42669,42669,59706), -- Smash
|
||||
(42708,42708,59708), -- Staggering Roar
|
||||
(42750,42750,59719), -- Throw Axe
|
||||
(42723,42723,59709), -- Dark Smash
|
||||
(42729,42729,59734), -- Dreadful Roar
|
||||
(43667,43667,59389), -- Shadow Bolt
|
||||
(42702,42702,59397); -- Decrepify
|
||||
|
||||
-- Ticking Time Bomb, Fixate
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN(59686,40414);
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(59686,'spell_ticking_time_bomb'),
|
||||
(40414,'spell_fixate');
|
||||
|
||||
-- Proto-drake striders
|
||||
DELETE FROM `creature` WHERE `guid` IN(125940,125934,125915,125920,125914,125936,125937,125922);
|
||||
INSERT INTO `creature`(`guid`,`id`,`map`,`spawnmask`,`modelid`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`curhealth`,`MovementType`) VALUES
|
||||
(125914,24849,574,3,22287,212.429,-127.793,256.101,1.62166,3600,35928,2),
|
||||
(125915,24849,574,3,22287,211.854,-112.602,262.188,1.61856,3600,35928,2),
|
||||
(125920,24849,574,3,22287,211.024,-100.299,266.201,1.63628,3600,35928,2),
|
||||
(125922,24849,574,3,22288,213.777,-140.709,251.048,1.72496,3600,35928,2),
|
||||
(125934,24849,574,3,22287,252.247,-350.532,185.813,2.01344,3600,35928,2),
|
||||
(125936,24849,574,3,22287,243.964,-194.833,227.126,2.88377,3600,35928,2),
|
||||
(125937,24849,574,3,22288,221.534,-239.809,196.459,0.23628,3600,35928,2),
|
||||
(125940,24849,574,3,22287,238.382,-353.086,188.785,1.29762,3600,35928,2);
|
||||
|
||||
-- Waypoint assignments
|
||||
INSERT IGNORE INTO `creature_addon`(`guid`) VALUES
|
||||
(125940),
|
||||
(125934),
|
||||
(125915),
|
||||
(125920),
|
||||
(125914),
|
||||
(125936),
|
||||
(125937),
|
||||
(125922);
|
||||
|
||||
UPDATE `creature_addon` SET `path_id`=`guid`*10 WHERE `guid` IN(125940,125934,125915,125920,125914,125936,125937,125922);
|
||||
|
||||
-- Waypoint data
|
||||
DELETE FROM `waypoint_data` WHERE `id` IN(1259400,1259340,1259150,1259200,1259140,1259360,1259370,1259220);
|
||||
INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES
|
||||
(1259400,1,211.864,-352.629,196.144),
|
||||
(1259340,1,271.911,-318.506,185.049),
|
||||
(1259150,1,265.478,-199.246,186.812),
|
||||
(1259200,1,346.765,-99.2527,220.519),
|
||||
(1259140,1,295.597,-181.162,207.374),
|
||||
(1259360,1,271.68,-194.911,220.248),
|
||||
(1259370,1,238.947,-255.704,191.639),
|
||||
(1259220,1,149.42,-247.696,194.145);
|
||||
|
||||
INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`)
|
||||
SELECT `guid`*10,2,`position_x`,`position_y`,`position_z` FROM `creature` WHERE `guid` IN(125940,125934,125915,125920,125914,125936,125937,125922);
|
||||
@@ -74,6 +74,9 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto,
|
||||
// Pet charge effects (Infernal Awakening, Demon Charge)
|
||||
if (spellproto->SpellVisual[0] == 2816 && spellproto->SpellIconID == 15)
|
||||
return DIMINISHING_CONTROLLED_STUN;
|
||||
// Frost Tomb
|
||||
else if (spellproto->Id == 48400)
|
||||
return DIMINISHING_NONE;
|
||||
// Gnaw
|
||||
else if (spellproto->Id == 47481)
|
||||
return DIMINISHING_CONTROLLED_STUN;
|
||||
@@ -2982,6 +2985,16 @@ void SpellMgr::LoadDbcDataCorrections()
|
||||
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case 42730:
|
||||
spellInfo->EffectTriggerSpell[EFFECT_1] = 42739;
|
||||
break;
|
||||
case 59735:
|
||||
spellInfo->EffectTriggerSpell[EFFECT_1] = 59736;
|
||||
break;
|
||||
case 52611: // Summon Skeletons
|
||||
case 52612: // Summon Skeletons
|
||||
spellInfo->EffectMiscValueB[0] = 64;
|
||||
break;
|
||||
case 40244: // Simon Game Visual
|
||||
case 40245: // Simon Game Visual
|
||||
case 40246: // Simon Game Visual
|
||||
|
||||
@@ -83,7 +83,7 @@ enum Spells
|
||||
SPELL_WOE_STRIKE = 42730,
|
||||
|
||||
ENTRY_THROW_TARGET = 23996,
|
||||
SPELL_SHADOW_AXE_SUMMON = 42749
|
||||
SPELL_SHADOW_AXE_SUMMON = 42748
|
||||
};
|
||||
|
||||
class boss_ingvar_the_plunderer : public CreatureScript
|
||||
@@ -108,8 +108,10 @@ public:
|
||||
|
||||
bool bIsUndead;
|
||||
bool bEventInProgress;
|
||||
bool justTransformed;
|
||||
|
||||
uint32 uiSpawnResTimer;
|
||||
uint32 afterTransformTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -130,12 +132,9 @@ public:
|
||||
events.ScheduleEvent(EVENT_ENRAGE, urand(7,14)*IN_MILLISECONDS, 0, PHASE_HUMAN);
|
||||
events.ScheduleEvent(EVENT_SMASH, urand(12,17)*IN_MILLISECONDS, 0, PHASE_HUMAN);
|
||||
|
||||
events.ScheduleEvent(EVENT_DARK_SMASH, urand(14,22)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10,14)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
events.ScheduleEvent(EVENT_SHADOW_AXE, 30*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
|
||||
uiSpawnResTimer = 3000;
|
||||
afterTransformTimer = 2000;
|
||||
justTransformed = false;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_INGVAR_EVENT, NOT_STARTED);
|
||||
@@ -158,7 +157,12 @@ public:
|
||||
|
||||
bEventInProgress = true;
|
||||
bIsUndead = true;
|
||||
|
||||
events.SetPhase(PHASE_UNDEAD);
|
||||
events.ScheduleEvent(EVENT_DARK_SMASH, urand(14,18)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18,22)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10,14)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
events.ScheduleEvent(EVENT_SHADOW_AXE, 30*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
|
||||
DoScriptText(YELL_DEAD_1, me);
|
||||
}
|
||||
@@ -173,20 +177,21 @@ public:
|
||||
{
|
||||
bIsUndead = true;
|
||||
bEventInProgress = false;
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->UpdateEntry(MOB_INGVAR_UNDEAD);
|
||||
me->SetInCombatWith(me->getVictim());
|
||||
me->GetMotionMaster()->MoveChase(me->getVictim());
|
||||
justTransformed = true;
|
||||
|
||||
DoScriptText(YELL_AGGRO_2, me);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(YELL_AGGRO_1, me);
|
||||
if (!bIsUndead)
|
||||
DoScriptText(YELL_AGGRO_1, me);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_INGVAR_EVENT, IN_PROGRESS);
|
||||
|
||||
me->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
@@ -211,7 +216,7 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
if (!UpdateVictim() && !justTransformed)
|
||||
return;
|
||||
|
||||
if (bEventInProgress)
|
||||
@@ -229,6 +234,21 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if (justTransformed)
|
||||
{
|
||||
if (afterTransformTimer <= diff)
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetInCombatWithZone();
|
||||
me->GetMotionMaster()->MoveChase(me->getVictim());
|
||||
justTransformed = false;
|
||||
afterTransformTimer = 2000;
|
||||
} else
|
||||
afterTransformTimer -= diff;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
@@ -245,7 +265,7 @@ public:
|
||||
break;
|
||||
case EVENT_STAGGERING_ROAR:
|
||||
DoCast(me, SPELL_STAGGERING_ROAR);
|
||||
events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_HUMAN);
|
||||
events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18,22)*IN_MILLISECONDS, 0, PHASE_HUMAN);
|
||||
break;
|
||||
case EVENT_ENRAGE:
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
@@ -253,16 +273,16 @@ public:
|
||||
break;
|
||||
case EVENT_SMASH:
|
||||
DoCastVictim(SPELL_SMASH);
|
||||
events.ScheduleEvent(EVENT_SMASH, urand(12,17)*IN_MILLISECONDS, 0, PHASE_HUMAN);
|
||||
events.ScheduleEvent(EVENT_SMASH, urand(12,16)*IN_MILLISECONDS, 0, PHASE_HUMAN);
|
||||
break;
|
||||
// PHASE TWO
|
||||
case EVENT_DARK_SMASH:
|
||||
DoCastVictim(SPELL_DARK_SMASH);
|
||||
events.ScheduleEvent(EVENT_DARK_SMASH, urand(14,22)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
events.ScheduleEvent(EVENT_DARK_SMASH, urand(12,16)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
break;
|
||||
case EVENT_DREADFUL_ROAR:
|
||||
DoCast(me, SPELL_DREADFUL_ROAR);
|
||||
events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18,22)*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
break;
|
||||
case EVENT_WOE_STRIKE:
|
||||
DoCastVictim(SPELL_WOE_STRIKE);
|
||||
@@ -271,8 +291,7 @@ public:
|
||||
case EVENT_SHADOW_AXE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
|
||||
{
|
||||
me->SummonCreature(ENTRY_THROW_TARGET, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 2000);
|
||||
DoCast(me, SPELL_SHADOW_AXE_SUMMON);
|
||||
DoCast(target, SPELL_SHADOW_AXE_SUMMON);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_SHADOW_AXE, 30*IN_MILLISECONDS, 0, PHASE_UNDEAD);
|
||||
break;
|
||||
@@ -430,32 +449,34 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
uint32 uiDespawnTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Unit* target = me->FindNearestCreature(ENTRY_THROW_TARGET, 50);
|
||||
if (target)
|
||||
if (Creature* target = me->FindNearestCreature(ENTRY_THROW_TARGET, 50.0f))
|
||||
{
|
||||
DoCast(me, SPELL_SHADOW_AXE_DAMAGE);
|
||||
float x, y, z;
|
||||
target->GetPosition(x, y, z);
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
me->GetMotionMaster()->MoveCharge(x, y, z, 42.0f, 28);
|
||||
target->DisappearAndDie();
|
||||
}
|
||||
uiDespawnTimer = 7000;
|
||||
}
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (uiDespawnTimer <= diff)
|
||||
else
|
||||
{
|
||||
me->DealDamage(me, me->GetHealth());
|
||||
me->RemoveCorpse();
|
||||
uiDespawnTimer = 0;
|
||||
} else uiDespawnTimer -= diff;
|
||||
me->DisappearAndDie();
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type == POINT_MOTION_TYPE && id == 28)
|
||||
{
|
||||
DoCast(me, SPELL_SHADOW_AXE_DAMAGE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
if (TempSummon* summon = me->ToTempSummon())
|
||||
{
|
||||
summon->UnSummon(10000);
|
||||
}
|
||||
else
|
||||
me->DisappearAndDie();
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -43,6 +43,9 @@ enum KelsethEncounter
|
||||
NPC_FROSTTOMB = 23965,
|
||||
NPC_SKELETON = 23970,
|
||||
|
||||
NPC_RUNEMAGE = 23960,
|
||||
NPC_STRATEGIST = 23956,
|
||||
|
||||
SAY_START_COMBAT = 1,
|
||||
SAY_SUMMON_SKELETONS,
|
||||
SAY_FROST_TOMB,
|
||||
@@ -118,10 +121,7 @@ public:
|
||||
|
||||
struct boss_kelesethAI : public BossAI
|
||||
{
|
||||
boss_kelesethAI(Creature* creature) : BossAI(creature, DATA_PRINCEKELESETH_EVENT)
|
||||
{
|
||||
creature->SetReactState(REACT_DEFENSIVE);
|
||||
}
|
||||
boss_kelesethAI(Creature* creature) : BossAI(creature, DATA_PRINCEKELESETH_EVENT){}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -137,11 +137,36 @@ public:
|
||||
onTheRocks = true;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
instance->SetData(DATA_PRINCEKELESETH_EVENT, IN_PROGRESS);
|
||||
Talk(SAY_START_COMBAT);
|
||||
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
std::list<Creature*> runemages;
|
||||
me->GetCreatureListWithEntryInGrid(runemages, NPC_RUNEMAGE, 60.0f);
|
||||
if (!runemages.empty())
|
||||
{
|
||||
for (std::list<Creature*>::iterator itr = runemages.begin(); itr != runemages.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->isAlive() && (*itr)->IsWithinLOSInMap(me))
|
||||
(*itr)->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
std::list<Creature*> strategists;
|
||||
me->GetCreatureListWithEntryInGrid(strategists, NPC_STRATEGIST, 60.0f);
|
||||
if (!strategists.empty())
|
||||
{
|
||||
for (std::list<Creature*>::iterator itr = strategists.begin(); itr != strategists.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->isAlive() && (*itr)->IsWithinLOSInMap(me))
|
||||
(*itr)->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
@@ -165,10 +190,20 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ExecuteEvent(uint32 const eventId)
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
switch (eventId)
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SUMMON_SKELETONS:
|
||||
Talk(SAY_SUMMON_SKELETONS);
|
||||
SummonSkeletons();
|
||||
@@ -189,7 +224,10 @@ public:
|
||||
}
|
||||
events.ScheduleEvent(EVENT_FROST_TOMB, urand(14,19)*IN_MILLISECONDS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void SummonSkeletons()
|
||||
@@ -222,7 +260,6 @@ public:
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_DECREPIFY, urand(4,6)*IN_MILLISECONDS);
|
||||
|
||||
DoCast(SPELL_BONE_ARMOR);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
|
||||
@@ -275,6 +312,13 @@ public:
|
||||
break;
|
||||
case EVENT_SHADOW_FISSURE:
|
||||
DoCast(me, SPELL_SHADOW_FISSURE, true);
|
||||
if (TempSummon* temp = me->ToTempSummon())
|
||||
{
|
||||
if (Unit* summoner = temp->GetSummoner())
|
||||
{
|
||||
DoCast(summoner, SPELL_BONE_ARMOR);
|
||||
}
|
||||
}
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
|
||||
me->GetMotionMaster()->MoveChase(me->getVictim());
|
||||
|
||||
@@ -47,6 +47,7 @@ enum eEnums
|
||||
SPELL_CHARGE = 43651,
|
||||
SPELL_STONE_STRIKE = 48583,
|
||||
SPELL_SUMMON_SKARVALD_GHOST = 48613,
|
||||
SPELL_ENRAGE = 48193,
|
||||
MOB_SKARVALD_GHOST = 27390,
|
||||
//Spells of Dalronn and his Ghost
|
||||
MOB_DALRONN_THE_CONTROLLER = 24201,
|
||||
@@ -58,6 +59,20 @@ enum eEnums
|
||||
MOB_DALRONN_GHOST = 27389
|
||||
};
|
||||
|
||||
class SkarvaldChargePredicate
|
||||
{
|
||||
public:
|
||||
SkarvaldChargePredicate(Unit* unit) : me(unit) {}
|
||||
|
||||
bool operator() (WorldObject* object) const
|
||||
{
|
||||
return object->GetDistance2d(me) >= 5.0f && object->GetDistance2d(me) <= 30.0f;
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* me;
|
||||
};
|
||||
|
||||
class boss_skarvald_the_constructor : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -83,6 +98,7 @@ public:
|
||||
uint32 Response_Timer;
|
||||
uint32 Check_Timer;
|
||||
bool Dalronn_isDead;
|
||||
bool Enraged;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -90,6 +106,7 @@ public:
|
||||
StoneStrike_Timer = 10000;
|
||||
Dalronn_isDead = false;
|
||||
Check_Timer = 5000;
|
||||
Enraged = false;
|
||||
|
||||
ghost = (me->GetEntry() == MOB_SKARVALD_GHOST);
|
||||
if (!ghost && instance)
|
||||
@@ -116,6 +133,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage)
|
||||
{
|
||||
if (!Enraged && !ghost && me->HealthBelowPctDamaged(15, damage))
|
||||
{
|
||||
Enraged = true;
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (!ghost && instance)
|
||||
@@ -194,7 +220,7 @@ public:
|
||||
|
||||
if (Charge_Timer <= diff)
|
||||
{
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1), SPELL_CHARGE);
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, SkarvaldChargePredicate(me)), SPELL_CHARGE);
|
||||
Charge_Timer = 5000+rand()%5000;
|
||||
} else Charge_Timer -= diff;
|
||||
|
||||
@@ -204,7 +230,8 @@ public:
|
||||
StoneStrike_Timer = 5000+rand()%5000;
|
||||
} else StoneStrike_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
if (!me->HasUnitState(UNIT_STATE_CASTING))
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "utgarde_keep.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
|
||||
uint32 entry_search[3] =
|
||||
{
|
||||
@@ -164,7 +166,82 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
enum TickingTimeBomb
|
||||
{
|
||||
SPELL_TICKING_TIME_BOMB_EXPLODE = 59687
|
||||
};
|
||||
class spell_ticking_time_bomb : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_ticking_time_bomb() : SpellScriptLoader("spell_ticking_time_bomb") { }
|
||||
|
||||
class spell_ticking_time_bomb_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_ticking_time_bomb_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
return (bool) sSpellMgr->GetSpellInfo(SPELL_TICKING_TIME_BOMB_EXPLODE);
|
||||
}
|
||||
|
||||
void HandleOnEffectRemove(AuraEffect const* /* aurEff */, AuraEffectHandleModes /* mode */)
|
||||
{
|
||||
if (GetCaster() == GetTarget())
|
||||
{
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_TICKING_TIME_BOMB_EXPLODE, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_ticking_time_bomb_AuraScript::HandleOnEffectRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_ticking_time_bomb_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
enum Fixate
|
||||
{
|
||||
SPELL_FIXATE_TRIGGER = 40415
|
||||
};
|
||||
class spell_fixate : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_fixate() : SpellScriptLoader("spell_fixate") { }
|
||||
|
||||
class spell_fixate_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_fixate_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
return (bool) sSpellMgr->GetSpellInfo(SPELL_FIXATE_TRIGGER);
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
// The unit has to cast the taunt on hisself, but we need the original caster for SPELL_AURA_MOD_TAUNT
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_FIXATE_TRIGGER, true, 0, 0, GetHitUnit()->GetGUID());
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_fixate_SpellScript::HandleScriptEffect, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_fixate_SpellScript();
|
||||
}
|
||||
};
|
||||
void AddSC_utgarde_keep()
|
||||
{
|
||||
new npc_dragonflayer_forge_master();
|
||||
new spell_ticking_time_bomb();
|
||||
new spell_fixate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user