--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-29 16:51:27 -05:00
16 changed files with 2969 additions and 880 deletions
+170
View File
@@ -0,0 +1,170 @@
-- Kil'jaeden --
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 45909;
DELETE FROM `spell_script_target` WHERE `entry` IN (46589, 45839);
INSERT INTO `spell_script_target` () VALUES (46589, 1, 30598);
INSERT INTO `spell_script_target` () VALUES (46589, 1, 30614);
INSERT INTO `spell_script_target` () VALUES (45839, 1, 25653);
DELETE FROM `creature_template` WHERE entry in (30598, 30614);
INSERT INTO `creature_template` () VALUES
(30598, 0, 4449, 0, 4449, 0, 'Spike Target', '', '', 70, 70, 1, 1, 0, 0, 0, 14, 14, 0, 1, 1, 0, 0, 0, 0, 0, 2600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 1, 0, 0, 128, ''),
(30614, 0, 4449, 0, 4449, 0, 'Spike Target 2', '', '', 70, 70, 1, 1, 0, 0, 0, 14, 14, 0, 1, 1, 0, 0, 0, 0, 0, 2600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 1, 0, 0, 128, '');
UPDATE `creature_template` SET `flags_extra` = 128 WHERE `entry` IN (30614, 30598, 25735);
UPDATE `creature_template` SET `minlevel` = 73, `maxlevel` = 73, unit_flags = 33554432, minhealth=5000000, maxhealth=5000000 WHERE entry IN (26046, 25319);
UPDATE `creature_template` SET `minlevel` = 70, `unit_flags` = 33554432 WHERE entry = 26046;
UPDATE `creature_template` SET `minlevel` =70, `maxlevel` = 70, `unit_flags` = 33554432, spell1 = 45848, spell2 = 45862, spell3 = 45860, spell4 = 45856, minhealth = 5000000, maxhealth=5000000 WHERE entry=25653;
UPDATE `creature_template` SET `minlevel` = 70, `maxlevel` = 70, `minhealth` = 20000, maxhealth = 20000 WHERE entry = 25502;
UPDATE `creature_template` SET `minhealth` = 12600000, maxhealth = 12600000, minmana = 2000000, maxmana = 2000000 WHERE entry = 25315;
UPDATE `creature_template` SET `minhealth` = 110000, maxhealth = 110000, minmana = 100000, maxmana = 100000 WHERE entry =25708;
UPDATE `creature_template` SET `minlevel` = 73, `maxlevel` = 73 WHERE entry = 25735;
DELETE FROM creature WHERE id IN (25319, 25588, 25608);
INSERT INTO creature (id, map, spawnMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, DeathState, MovementType) VALUES
(25319, 580, 1, 0, 0, 1701.7, 635.515, 72.2884, 4.65461, 25, 0, 0, 1, 0, 0, 0),
(25608, 580, 1, 0, 0, 1698.9, 627.877, 27.6233, 0.034907, 604800, 0, 0, 1, 0, 0, 0);
DELETE FROM gameobject WHERE id=188415;
INSERT INTO gameobject (id, map, spawnMask, position_x, position_y, position_z, orientation, rotation0, rotation1, rotation2, rotation3, spawntimesecs, animprogress, state) VALUES
(188415, 580, 1, 1653.12, 635.41, 28.0932, 0.0977725, 0, 0, 0.0488668, 0.998805, 25, 0, 1),
(188415, 580, 1, 1704.14, 583.591, 28.1696, 1.59003, 0, 0, 0.713874, 0.700274, 25, 0, 1),
(188415, 580, 1, 1745.68, 621.823, 28.0505, 2.93777, 0, 0, 0.994812, 0.101733, 25, 0, 1),
(188415, 580, 1, 1694.48, 674.29, 28.0502, 4.86985, 0, 0, 0.649302, -0.760531, 25, 0, 1);
UPDATE `gameobject_template` SET `type` = 1 WHERE `entry` = 188415;
-- M'uru --
UPDATE `creature_template` SET `modelid_A` = 23842 WHERE `entry` = 25744;
UPDATE `creature_template` SET `flags_extra` = 128 WHERE entry IN (25855, 25770);
UPDATE `creature_template` SET `spell1` = 46262, flags_extra = 128, scriptname = '' WHERE entry = 25879;
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (46242, 46228, 46228, 46262);
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (46242, 46247, 0, 'Black Hole Visual (Birth)');
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (46228, 46235, 0, 'Black Hole Visual (Grown)');
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (46228, -46247, 0, 'Black Hole Visual (Grown)');
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES (46262, 46265, 0, 'Void Zone Visual');
DELETE FROM `spell_script_target` WHERE `entry` IN (45976, 46177);
INSERT INTO `spell_script_target` VALUES (45976, 1, 25770);
INSERT INTO `spell_script_target` VALUES (46177, 1, 25770);
-- EAI for Berserks FROM Megamage
DELETE FROM `eventai_scripts` WHERE `creature_id` = 25798;
INSERT INTO `eventai_scripts` (`id`, `creature_id`, `event_type`, `event_flags`,`event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`, `event_chance`, `event_inverse_phase_mask`) VALUES
(2579800, 25798, 11, 0, 0*1000, 0*1000, 0*1000, 0*1000, 11, 45769, 0, 0, 20, 1, 0, 0, 21, 1, 0, 0,"Shadowsword Berserker - Sunwell Radiance", 100, 0),
(2579801, 25798, 0, 1, 10*1000, 12*1000, 10*1000, 15*1000, 11, 46160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowsword Berserker - Cast Flurry', 70, 0),
(2579802, 25798, 1, 0, 180*1000, 180*1000, 0*1000, 0*1000, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowsword Berserker - 180s OOC => Evade', 100, 0);
-- Brutallus --
UPDATE `creature_template` SET `unit_flags` = 0 WHERE `entry` = 24882;
-- Felmyst --
UPDATE `creature_template` SET `modelid_H` = 22838 WHERE `entry` = 25038;
DELETE FROM `script_texts` WHERE `entry` BETWEEN '-1580109' and '-1580036';
INSERT INTO `script_texts` (`entry`, `content_default`, `sound`, `type`, `comment`) VALUES
(-1580036, 'Glory to Kil\'jaeden! Death to all who oppose!', 12477, 1, 'felmyst - YELL_BIRTH'),
(-1580037, 'I kill for the master!', 12480, 1, 'felmyst - YELL_KILL1'),
(-1580038, 'The end has come!', 12481, 1, 'felmyst - YELL_KILL2'),
(-1580039, 'Choke on your final breath!', 12478, 1, 'felmyst - YELL_BREATH'),
(-1580040, 'I am stronger than ever before!', 12479, 1, 'felmyst- YELL_TAKEOFF'),
(-1580041, 'No more hesitation! Your fates are written!', 12482, 1, 'felmyst - YELL_BERSERK'),
(-1580042, 'Kil\'jaeden... will... prevail...', 12483, 1, 'felmyst - YELL_DEATH'),
(-1580043, 'Madrigosa deserved a far better fate. You did what had to be done, but this battle is far from over.', 12439, 1, 'felmyst - YELL_KALECGOS'),
(-1580044, 'Fire to the aid of shadow!', 12489, 1, 'eredar - YELL_CANFLAGRATION'),
(-1580045, 'Sacrolash!', 12492, 1, 'eredar - YELL_SISTER_SACROLASH_DEAD'),
(-1580046, 'Fire consume.', 12490, 1, 'eredar - YELL_ALY_KILL_1'),
(-1580047, 'Ed-ir Halach!', 12491, 1, 'eredar - YELL_ALY_KILL_2'),
(-1580048, 'De-ek Anur!', 12494, 1, 'eredar - YELL_ALY_DEAD'),
(-1580049, 'Your luck has run its curse!', 12493, 1, 'eredar - YELL_BERSERK'),
(-1580050, 'Shadow to the aid of fire!', 12485, 1, 'eredar - YELL_SHADOW_NOVA'),
(-1580051, 'Alythess! Your fire burns within me!', 12488, 1, 'eredar - YELL_SISTER_ALYTHESS_DEAD'),
(-1580052, 'Shadow engulf.', 12486, 1, 'eredar - YELL_SAC_KILL_1'),
(-1580053, 'Ee-nok Kryul!', 12487, 1, 'eredar - YELL_SAC_KILL_2'),
(-1580054, 'I... fade.', 0, 1, 'eredar - YELL_SAC_DEAD'),
(-1580055, 'Time is a luxury you no longer possess!', 0, 1, 'eredar - YELL_ENRAGE'),
(-1580056, 'Misery...', 12484, 1, 'eredar - YELL_INTRO_SAC_1'),
(-1580057, 'Depravity...', 0, 1, 'eredar - YELL_INTRO_ALY_2'),
(-1580058, 'Confusion...', 0, 1, 'eredar - YELL_INTRO_SAC_3'),
(-1580059, 'Hatred...', 0, 1, 'eredar - YELL_INTRO_ALY_4'),
(-1580060, 'Mistrust...', 0, 1, 'eredar - YELL_INTRO_SAC_5'),
(-1580061, 'Chaos...', 0, 1, 'eredar - YELL_INTRO_ALY_6'),
(-1580062, 'These are the hallmarks...', 0, 1, 'eredar - YELL_INTRO_SAC_7'),
(-1580063, 'These are the pillars...', 0, 1, 'eredar - YELL_INTRO_ALY_8'),
(-1580064, 'directs Shadow Nova at $N', 0, 3, 'eredar - emote shadow nova'),
(-1580065, 'directs Conflagration at $N', 0, 3, 'eredar - emote conflagration'),
(-1580066, 'All my plans have led to this!', 12495, 1, 'KJ - SAY_KJ_OFFCOMBAT1'),
(-1580067, 'Stay on task! Do not waste tim!', 12496, 1, 'KJ - SAY_KJ_OFFCOMBAT2'),
(-1580068, 'I have waited long enough!', 12497, 1, 'KJ - SAY_KJ_OFFCOMBAT3'),
(-1580069, 'Fail me and suffer for eternity!', 12498, 1, 'KJ - SAY_KJ_OFFCOMBAT4'),
(-1580070, 'Drain the girl! Drain her power until there is nothing but a vacant shell!', 12499, 1, 'KJ - SAY_KJ_OFFCOMBAT5'),
(-1580071, 'The expendible have perished... So be it! Now I shall succeed where Sargeras could not! I will bleed this wretched world and secure my place as the true master of the Burning Legion. The end has come! Let the unraveling of this world commence!', 12500, 1, 'KJ - SAY_KJ_EMERGE'),
(-1580072, 'Another step towards destruction!', 12501, 1, 'KJ - SAY_KJ_SLAY1'),
(-1580073, 'Anak-ky\'ri!', 12502, 1, 'KJ - SAY_KJ_SLAY2'),
(-1580074, 'Who can you trust?', 12503, 1, 'KJ - SAY_KJ_REFLECTION1'),
(-1580075, 'The enemy is among you.', 12504, 1, 'KJ - SAY_KJ_REFLECTION2'),
(-1580076, 'Chaos!', 12505, 1, 'KJ - SAY_KJ_DARKNESS1'),
(-1580077, 'Destruction!', 12506, 1, 'KJ - SAY_KJ_DARKNESS2'),
(-1580078, 'Oblivion!', 12507, 1, 'KJ - SAY_KJ_DARKNESS3'),
(-1580079, 'I will not be denied! This world shall fall!', 12508, 1, 'KJ - SAY_KJ_PHASE3'),
(-1580080, 'Do not harbor false hope. You cannot win!', 12509, 1, 'KJ - SAY_KJ_PHASE4'),
(-1580081, 'Aggghh! The powers of the Sunwell... turned... against me! What have you done? WHAT HAVE YOU DONE?', 12510, 1, 'KJ - SAY_KJ_PHASE5'),
(-1580082, 'Anveena, you must awaken, this world needs you!', 12445, 1, 'KJ - SAY_KALECGOS_AWAKEN'),
(-1580083, 'I serve only the Master now.', 12511, 1, 'KJ - SAY_ANVEENA_IMPRISONED'),
(-1580084, 'You must let go! You must become what you were always meant to be! The time is now, Anveena!', 12446, 1, 'KJ - SAY_KALECGOS_LETGO'),
(-1580085, 'But I\'m... lost... I cannot find my way back!', 12512, 1, 'KJ - SAY_ANVEENA_LOST'),
(-1580086, 'Anveena, I love you! Focus on my voice, come back for me now! Only you can cleanse the Sunwell!', 12447, 1, 'KJ - SAY_KALECGOS_FOCUS'),
(-1580087, 'Kalec... Kalec?', 12513, 1, 'KJ - SAY_ANVEENA_KALEC'),
(-1580088, 'Yes, Anveena! Let fate embrace you now!', 12448, 1, 'KJ - SAY_KALECGOS_FATE'),
(-1580089, 'The nightmare is over, the spell is broken! Goodbye, Kalec, my love!', 12514, 1, 'KJ - SAY_ANVEENA_GOODBYE'),
(-1580090, 'Goodbye, Anveena, my love. Few will remember your name, yet this day you change the course of destiny. What was once corrupt is now pure. Heroes, do not let her sacrifice be in vain.', 12450, 1, 'KJ - SAY_KALECGOS_GOODBYE'),
(-1580091, 'Strike now, heroes, while he is weakened! Vanquish the Deceiver!', 12449, 1, 'KJ - SAY_KALECGOS_ENCOURAGE'),
(-1580092, 'You are not alone. The Blue Dragonflight shall help you vanquish the Deceiver.', 12438, 1, 'KJ - SAY_KALECGOS_JOIN'),
(-1580093, 'Nooooooooooooo!', 12527, 1, 'KJ - SAY_KJ_DEATH'),
(-1580094, 'begins to channel dark energy', 0, 3, 'KJ - EMOTE_KJ_DARKNESS'),
(-1580095, 'I will channel my power into the orbs, be ready!', 12440, 1, 'KJ - SAY_KALEC_ORB_READY1'),
(-1580096, 'I have empowered another orb! Use it quickly!', 12441, 1, 'KJ - SAY_KALEC_ORB_READY2'),
(-1580097, 'Another orb is ready! Make haste!', 12442, 1, 'KJ - SAY_KALEC_ORB_READY3'),
(-1580098, 'I have channeled all I can! The power is in your hands!', 12443, 1, 'KJ - SAY_KALEC_ORB_READY4'),
(-1580099, 'Mortal heroes, your victory here today was foretold long ago. My brother\'s anguished cry of defeat will echo across the universe, bringing renewed hope to all those who still stand against the Burning Crusade.', 12515, 0, 'prophet velen - SAY1'),
(-1580100, 'As the Legion\'s final defeat draws ever-nearer, stand proud in the knowledge that you have saved worlds without number from the flame. Just as this day marks an ending, so too does it herald a new beginning...', 12516, 0, 'prophet velen - SAY2'), -- van mégegy hang 12517 ami ehhez tartozik
(-1580101, 'The creature Entropius, whom you were forced to destroy, was once the noble naaru, M\'uru. In life, M\'uru channeled vast energies of LIGHT and HOPE. For a time, a misguided few sought to steal those energies...', 12518, 0, 'prophet velen - SAY3'),
(-1580102, 'Then fortunate it is, that I have reclaimed the noble naaru\'s spark from where it fell! Where faith dwells, hope is never lost, young blood elf.', 12519, 0, 'prophet velen - SAY4'),
(-1580103, 'Gaze now, mortals - upon the HEART OF M\'URU! Unblemished. Bathed by the light of Creation - just as it was at the Dawn.', 12520, 0, 'prophet velen - SAY5'),
(-1580104, 'In time, the light and hope held within - will rebirth more than this mere fount of power... Mayhap, they will rebirth the soul of a nation.', 12521, 0, 'prophet velen - SAY6'),
(-1580105, 'Salvation, young one. It waits for us all.', 12522, 0, 'prophet velen - SAY7'),
(-1580106, 'Farewell...', 12523, 0, 'prophet velen - SAY8'),
(-1580107, 'Our arrogance was unpardonable. We damned one of the most noble beings of all. We may never atone for this sin.', 12524, 0, 'lady liadrinn - SAY1'),
(-1580108, 'Can it be?', 12525, 0, 'lady liadrinn - SAY2'),
(-1580109, 'Blessed ancestors! I feel it... so much love... so much grace... there are... no words... impossible to describe...', 12525, 0, 'lady liadrinn - SAY3');
-- Kil'jaeden script --
UPDATE `creature_template` SET `ScriptName` = 'boss_kiljaeden' WHERE `entry` = 25315;
UPDATE `creature_template` SET `ScriptName` = 'boss_kalecgosKJ' WHERE `entry` = 25319;
UPDATE `creature_template` SET `ScriptName` = 'mob_kiljaeden_controller' WHERE `entry` = 25608;
UPDATE `creature_template` SET `ScriptName` = 'mob_hand_of_the_deceiver' WHERE `entry` = 25588;
UPDATE `creature_template` SET `ScriptName` = 'mob_felfire_portal' WHERE `entry` = 25603;
UPDATE `creature_template` SET `ScriptName` = 'mob_volatile_felfire_fiend' WHERE `entry` = 25598;
UPDATE `creature_template` SET `ScriptName` = 'mob_armageddon' WHERE `entry` = 25735;
UPDATE `creature_template` SET `ScriptName` = 'mob_shield_orb' WHERE `entry` = 25502;
UPDATE `creature_template` SET `ScriptName` = 'mob_sinster_reflection' WHERE `entry` = 25708;
UPDATE `gameobject_template` SET `ScriptName` = 'go_orb_of_the_blue_flight' WHERE `entry` = 188415;
-- M'uru& Entropius --
UPDATE `creature_template` SET `ScriptName` = "npc_void_sentinel" WHERE `entry` = 25772;
UPDATE `creature_template` SET `ScriptName` = "npc_dark_fiend" WHERE `entry` = 25744;
UPDATE `creature_template` SET `ScriptName` = "boss_muru" WHERE `entry` = 25741;
UPDATE `creature_template` SET `ScriptName` = "boss_entropius" WHERE `entry` = 25840;
UPDATE `creature_template` SET `ScriptName` = "npc_muru_portal" WHERE `entry` = 25770;
UPDATE `creature_template` SET `ScriptName` = "mob_eventai" WHERE `entry` = 25798;
@@ -405,17 +405,6 @@ void hyjalAI::Reset()
//Visibility //Visibility
DoHide = true; DoHide = true;
//CreatureList.clear();
//If Jaina evades, reset the visibility of all other creatures in the grid.
/*if(CreatureList.empty())
return;
for(std::list<uint64>::iterator itr = CreatureList.begin(); itr != CreatureList.end(); ++itr)
if(Creature* cr = (Unit::GetCreature(*m_creature, *itr)))
cr->SetVisibility(VISIBILITY_ON);
CreatureList.clear();*/
} }
void hyjalAI::EnterEvadeMode() void hyjalAI::EnterEvadeMode()
@@ -505,9 +494,6 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
++EnemyCount; ++EnemyCount;
pCreature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); pCreature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
//pCreature->GetMotionMaster()->MovePoint(0, AttackLoc[0],AttackLoc[1],AttackLoc[2]);
//pCreature->AddThreat(m_creature, 0.0f);
//DoZoneInCombat(pCreature);
pCreature->setActive(true); pCreature->setActive(true);
switch(entry) switch(entry)
{ {
@@ -675,44 +661,10 @@ void hyjalAI::UpdateWorldState(uint32 id, uint32 state)
player->SendUpdateWorldState(id,state); player->SendUpdateWorldState(id,state);
} }
}else debug_log("TSCR: HyjalAI: UpdateWorldState, but PlayerList is empty"); }else debug_log("TSCR: HyjalAI: UpdateWorldState, but PlayerList is empty");
//remove everything above this line only when/if the core patch for this is accepted and needed
//m_creature->GetMap()->UpdateWorldState(field, value);
} }
void hyjalAI::Retreat() void hyjalAI::Retreat()
{ {
/*CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
Cell cell(pair);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
// First get all creatures.
std::list<Creature*> creatures;
Trinity::AllFriendlyCreaturesInGrid creature_check(m_creature);
Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> creature_searcher(m_creature, creatures, creature_check);
TypeContainerVisitor
<Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>,
GridTypeMapContainer> creature_visitor(creature_searcher);
CellLock<GridReadGuard> cell_lock(cell, pair);
// Get Creatures
cell_lock->Visit(cell_lock, creature_visitor, *(m_creature->GetMap()));
CreatureList.clear();
if(!creatures.empty())
{
for(std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
{
(*itr)->CastSpell(*itr, SPELL_TELEPORT_VISUAL, true);
(*itr)->setFaction(35);//make them friendly so mobs won't attack them
CreatureList.push_back((*itr)->GetGUID());
}
DoCast(m_creature, SPELL_TELEPORT_VISUAL);
bRetreat = true;
RetreatTimer = 1000;
}*/
if(pInstance) if(pInstance)
{ {
if(Faction == 0) if(Faction == 0)
@@ -732,8 +684,6 @@ void hyjalAI::Retreat()
JainaDummy->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); JainaDummy->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
((hyjalAI*)JainaDummy->AI())->IsDummy = true; ((hyjalAI*)JainaDummy->AI())->IsDummy = true;
DummyGuid = JainaDummy->GetGUID(); DummyGuid = JainaDummy->GetGUID();
//((hyjalAI*)JainaDummy->AI())->MassTeleportTimer = 20000;
//((hyjalAI*)JainaDummy->AI())->DoMassTeleport = true;
} }
AddWaypoint(0,JainaDummySpawn[1][0],JainaDummySpawn[1][1],JainaDummySpawn[1][2]); AddWaypoint(0,JainaDummySpawn[1][0],JainaDummySpawn[1][1],JainaDummySpawn[1][2]);
Start(false, false, false); Start(false, false, false);
@@ -867,11 +817,6 @@ void hyjalAI::UpdateAI(const uint32 diff)
} }
if(Overrun) if(Overrun)
DoOverrun(Faction, diff); DoOverrun(Faction, diff);
/* if(m_creature->GetEntry() == 17772)
{
if(!m_creature->HasAura(SPELL_BRILLIANCE_AURA,0))
DoCast(m_creature, SPELL_BRILLIANCE_AURA, true);
}*/
if(bRetreat) if(bRetreat)
{ {
if(RetreatTimer < diff) if(RetreatTimer < diff)
@@ -891,13 +836,6 @@ void hyjalAI::UpdateAI(const uint32 diff)
break; break;
} }
m_creature->SetVisibility(VISIBILITY_OFF); m_creature->SetVisibility(VISIBILITY_OFF);
/*if(CreatureList.empty())
return;
for(std::list<uint64>::iterator itr = CreatureList.begin(); itr != CreatureList.end(); ++itr)
if(Unit* pUnit = Unit::GetUnit(*m_creature, *itr))
pUnit->SetVisibility(VISIBILITY_OFF);
CreatureList.clear();*/
}else RetreatTimer -= diff; }else RetreatTimer -= diff;
} }
@@ -1026,14 +964,12 @@ void hyjalAI::HideNearPos(float x, float y)
// Get Creatures // Get Creatures
cell_lock->Visit(cell_lock, creature_visitor, *(m_creature->GetMap())); cell_lock->Visit(cell_lock, creature_visitor, *(m_creature->GetMap()));
//CreatureList.clear();
if(!creatures.empty()) if(!creatures.empty())
{ {
for(std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr) for(std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
{ {
(*itr)->SetVisibility(VISIBILITY_OFF); (*itr)->SetVisibility(VISIBILITY_OFF);
(*itr)->setFaction(35);//make them friendly so mobs won't attack them (*itr)->setFaction(35);//make them friendly so mobs won't attack them
//CreatureList.push_back((*itr)->GetGUID());
} }
} }
} }
@@ -78,20 +78,20 @@ float AllianceOverrunWP[55][3]=//waypoints in the alliance base used in the end
{5043.42,-1853.75,1324.52},//19 {5043.42,-1853.75,1324.52},//19
{5053.02,-1864.13,1330.36},//20 {5053.02,-1864.13,1330.36},//20
{5062.49,-1852.47,1330.49},//21 {5062.49,-1852.47,1330.49},//21
{5015.27, -1738.77, 1324.83},//35//start 22
{5027.97, -1775.25, 1321.87},//34 23
{5015.94, -1821.24, 1321.86},//33 24
{4983.25, -1857.4, 1320.48},//32 25
{4981.51, -1883.7, 1322.34},//31 26
{5002.33, -1893.98, 1325.88},//30 27
{5049.32, -1886.54, 1331.69},//29 28
{5089.68, -1846.88, 1328.99},//28 29
{5127.90, -1825.14, 1335.58},//27 30
{5163.27, -1789.08, 1337.04},//26 31
{5138.97, -1755.88, 1334.57},//25 32
{5096.63, -1742.22, 1329.61},//24 33
{5065.81, -1729.43, 1325.66},//23 34
{5049.32, -1726.31, 1320.64},//22 start {5049.32, -1726.31, 1320.64},//22 start
{5065.81, -1729.43, 1325.66},//23
{5096.63, -1742.22, 1329.61},//24
{5138.97, -1755.88, 1334.57},//25
{5163.27, -1789.08, 1337.04},//26
{5127.90, -1825.14, 1335.58},//27
{5089.68, -1846.88, 1328.99},//28
{5049.32, -1886.54, 1331.69},//29
{5002.33, -1893.98, 1325.88},//30
{4981.51, -1883.7, 1322.34},//31
{4983.25, -1857.4, 1320.48},//32
{5015.94, -1821.24, 1321.86},//33
{5027.97, -1775.25, 1321.87},//34
{5015.27, -1738.77, 1324.83},//35
{5081.07, -1902.10, 1346.36},//36 abo start {5081.07, -1902.10, 1346.36},//36 abo start
{5107.65, -1912.03, 1356.49},//37 {5107.65, -1912.03, 1356.49},//37
{5132.83, -1927.07, 1362.42},//38 {5132.83, -1927.07, 1362.42},//38
@@ -173,45 +173,9 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
{ {
if(m_creature->GetEntry() == GARGOYLE) if(m_creature->GetEntry() == GARGOYLE)
{ {
switch(OverrunType) DummyTarget[0] = AllianceOverrunWP[50+OverrunType][0]; //+OverrunType 0 - 4
{ DummyTarget[1] = AllianceOverrunWP[50+OverrunType][1];
case 0: DummyTarget[2] = AllianceOverrunWP[50+OverrunType][2];
{
DummyTarget[0] = AllianceOverrunWP[50][0];
DummyTarget[1] = AllianceOverrunWP[50][1];
DummyTarget[2] = AllianceOverrunWP[50][2];
}
break;
case 1:
{
DummyTarget[0] = AllianceOverrunWP[51][0];
DummyTarget[1] = AllianceOverrunWP[51][1];
DummyTarget[2] = AllianceOverrunWP[51][2];
}
break;
case 2:
{
DummyTarget[0] = AllianceOverrunWP[52][0];
DummyTarget[1] = AllianceOverrunWP[52][1];
DummyTarget[2] = AllianceOverrunWP[52][2];
}
break;
case 3:
{
DummyTarget[0] = AllianceOverrunWP[53][0];
DummyTarget[1] = AllianceOverrunWP[53][1];
DummyTarget[2] = AllianceOverrunWP[53][2];
}
break;
case 4:
{
DummyTarget[0] = AllianceOverrunWP[54][0];
DummyTarget[1] = AllianceOverrunWP[54][1];
DummyTarget[2] = AllianceOverrunWP[54][2];
}
break;
}
} }
if(m_creature->GetEntry() == ABOMINATION) if(m_creature->GetEntry() == ABOMINATION)
{ {
@@ -220,13 +184,14 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
switch(OverrunType) switch(OverrunType)
{ {
case 0: case 0:
AddWaypoint( 4, AllianceOverrunWP[35][0]+irand(-3,3), AllianceOverrunWP[35][1]+irand(-3,3), AllianceOverrunWP[35][2]); AddWaypoint( 4, AllianceOverrunWP[22][0]+irand(-3,3), AllianceOverrunWP[22][1]+irand(-3,3), AllianceOverrunWP[22][2]);
AddWaypoint( 5, AllianceOverrunWP[34][0]+irand(-3,3), AllianceOverrunWP[34][1]+irand(-3,3), AllianceOverrunWP[34][2]); AddWaypoint( 5, AllianceOverrunWP[23][0]+irand(-3,3), AllianceOverrunWP[23][1]+irand(-3,3), AllianceOverrunWP[23][2]);
AddWaypoint( 6, AllianceOverrunWP[33][0]+irand(-3,3), AllianceOverrunWP[33][1]+irand(-3,3), AllianceOverrunWP[33][2]); AddWaypoint( 6, AllianceOverrunWP[24][0]+irand(-3,3), AllianceOverrunWP[24][1]+irand(-3,3), AllianceOverrunWP[24][2]);
AddWaypoint( 7, AllianceOverrunWP[32][0]+irand(-3,3), AllianceOverrunWP[32][1]+irand(-3,3), AllianceOverrunWP[32][2]); AddWaypoint( 7, AllianceOverrunWP[25][0]+irand(-3,3), AllianceOverrunWP[25][1]+irand(-3,3), AllianceOverrunWP[25][2]);
AddWaypoint( 8, AllianceOverrunWP[31][0]+irand(-3,3), AllianceOverrunWP[31][1]+irand(-3,3), AllianceOverrunWP[31][2]); AddWaypoint( 8, AllianceOverrunWP[26][0]+irand(-3,3), AllianceOverrunWP[26][1]+irand(-3,3), AllianceOverrunWP[26][2]);
AddWaypoint( 9, AllianceOverrunWP[30][0]+irand(-3,3), AllianceOverrunWP[30][1]+irand(-3,3), AllianceOverrunWP[30][2]); AddWaypoint( 9, AllianceOverrunWP[27][0]+irand(-3,3), AllianceOverrunWP[27][1]+irand(-3,3), AllianceOverrunWP[27][2]);
AddWaypoint(10, AllianceOverrunWP[29][0]+irand(-3,3), AllianceOverrunWP[29][1]+irand(-3,3), AllianceOverrunWP[29][2]); AddWaypoint(10, AllianceOverrunWP[28][0]+irand(-3,3), AllianceOverrunWP[28][1]+irand(-3,3), AllianceOverrunWP[28][2]);
AddWaypoint(11, AllianceOverrunWP[36][0]+irand(-3,3), AllianceOverrunWP[36][1]+irand(-3,3), AllianceOverrunWP[36][2]); AddWaypoint(11, AllianceOverrunWP[36][0]+irand(-3,3), AllianceOverrunWP[36][1]+irand(-3,3), AllianceOverrunWP[36][2]);
AddWaypoint(12, AllianceOverrunWP[37][0]+irand(-3,3), AllianceOverrunWP[37][1]+irand(-3,3), AllianceOverrunWP[37][2]); AddWaypoint(12, AllianceOverrunWP[37][0]+irand(-3,3), AllianceOverrunWP[37][1]+irand(-3,3), AllianceOverrunWP[37][2]);
AddWaypoint(13, AllianceOverrunWP[38][0]+irand(-3,3), AllianceOverrunWP[38][1]+irand(-3,3), AllianceOverrunWP[38][2]); AddWaypoint(13, AllianceOverrunWP[38][0]+irand(-3,3), AllianceOverrunWP[38][1]+irand(-3,3), AllianceOverrunWP[38][2]);
@@ -241,13 +206,14 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
Start(true, true, true); Start(true, true, true);
break; break;
case 1: case 1:
AddWaypoint( 4, AllianceOverrunWP[35][0]+irand(-3,3), AllianceOverrunWP[35][1]+irand(-3,3), AllianceOverrunWP[35][2]); AddWaypoint( 4, AllianceOverrunWP[22][0]+irand(-3,3), AllianceOverrunWP[22][1]+irand(-3,3), AllianceOverrunWP[22][2]);
AddWaypoint( 5, AllianceOverrunWP[34][0]+irand(-3,3), AllianceOverrunWP[34][1]+irand(-3,3), AllianceOverrunWP[34][2]); AddWaypoint( 5, AllianceOverrunWP[23][0]+irand(-3,3), AllianceOverrunWP[23][1]+irand(-3,3), AllianceOverrunWP[23][2]);
AddWaypoint( 6, AllianceOverrunWP[33][0]+irand(-3,3), AllianceOverrunWP[33][1]+irand(-3,3), AllianceOverrunWP[33][2]); AddWaypoint( 6, AllianceOverrunWP[24][0]+irand(-3,3), AllianceOverrunWP[24][1]+irand(-3,3), AllianceOverrunWP[24][2]);
AddWaypoint( 7, AllianceOverrunWP[32][0]+irand(-3,3), AllianceOverrunWP[32][1]+irand(-3,3), AllianceOverrunWP[32][2]); AddWaypoint( 7, AllianceOverrunWP[25][0]+irand(-3,3), AllianceOverrunWP[25][1]+irand(-3,3), AllianceOverrunWP[25][2]);
AddWaypoint( 8, AllianceOverrunWP[31][0]+irand(-3,3), AllianceOverrunWP[31][1]+irand(-3,3), AllianceOverrunWP[31][2]); AddWaypoint( 8, AllianceOverrunWP[26][0]+irand(-3,3), AllianceOverrunWP[26][1]+irand(-3,3), AllianceOverrunWP[26][2]);
AddWaypoint( 9, AllianceOverrunWP[30][0]+irand(-3,3), AllianceOverrunWP[30][1]+irand(-3,3), AllianceOverrunWP[30][2]); AddWaypoint( 9, AllianceOverrunWP[27][0]+irand(-3,3), AllianceOverrunWP[27][1]+irand(-3,3), AllianceOverrunWP[27][2]);
AddWaypoint(10, AllianceOverrunWP[29][0]+irand(-3,3), AllianceOverrunWP[29][1]+irand(-3,3), AllianceOverrunWP[29][2]); AddWaypoint(10, AllianceOverrunWP[28][0]+irand(-3,3), AllianceOverrunWP[28][1]+irand(-3,3), AllianceOverrunWP[28][2]);
AddWaypoint(11, AllianceOverrunWP[36][0]+irand(-3,3), AllianceOverrunWP[36][1]+irand(-3,3), AllianceOverrunWP[36][2]); AddWaypoint(11, AllianceOverrunWP[36][0]+irand(-3,3), AllianceOverrunWP[36][1]+irand(-3,3), AllianceOverrunWP[36][2]);
AddWaypoint(12, AllianceOverrunWP[37][0]+irand(-3,3), AllianceOverrunWP[37][1]+irand(-3,3), AllianceOverrunWP[37][2]); AddWaypoint(12, AllianceOverrunWP[37][0]+irand(-3,3), AllianceOverrunWP[37][1]+irand(-3,3), AllianceOverrunWP[37][2]);
AddWaypoint(13, AllianceOverrunWP[38][0]+irand(-3,3), AllianceOverrunWP[38][1]+irand(-3,3), AllianceOverrunWP[38][2]); AddWaypoint(13, AllianceOverrunWP[38][0]+irand(-3,3), AllianceOverrunWP[38][1]+irand(-3,3), AllianceOverrunWP[38][2]);
@@ -262,21 +228,9 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
Start(true, true, true); Start(true, true, true);
break; break;
default: default:
AddWaypoint( 4, AllianceOverrunWP[35][0]+irand(-3,3), AllianceOverrunWP[35][1]+irand(-3,3), AllianceOverrunWP[35][2]); for(uint8 i = 22; i < 36; i++)
AddWaypoint( 5, AllianceOverrunWP[34][0]+irand(-3,3), AllianceOverrunWP[34][1]+irand(-3,3), AllianceOverrunWP[34][2]); AddWaypoint( i-18, AllianceOverrunWP[i][0]+irand(-3,3), AllianceOverrunWP[i][1]+irand(-3,3), AllianceOverrunWP[i][2]);
AddWaypoint( 6, AllianceOverrunWP[33][0]+irand(-3,3), AllianceOverrunWP[33][1]+irand(-3,3), AllianceOverrunWP[33][2]);
AddWaypoint( 7, AllianceOverrunWP[32][0]+irand(-3,3), AllianceOverrunWP[32][1]+irand(-3,3), AllianceOverrunWP[32][2]);
AddWaypoint( 8, AllianceOverrunWP[31][0]+irand(-3,3), AllianceOverrunWP[31][1]+irand(-3,3), AllianceOverrunWP[31][2]);
AddWaypoint( 9, AllianceOverrunWP[30][0]+irand(-3,3), AllianceOverrunWP[30][1]+irand(-3,3), AllianceOverrunWP[30][2]);
AddWaypoint(10, AllianceOverrunWP[29][0]+irand(-3,3), AllianceOverrunWP[29][1]+irand(-3,3), AllianceOverrunWP[29][2]);
AddWaypoint(11, AllianceOverrunWP[28][0]+irand(-3,3), AllianceOverrunWP[28][1]+irand(-3,3), AllianceOverrunWP[28][2]);
AddWaypoint(12, AllianceOverrunWP[27][0]+irand(-3,3), AllianceOverrunWP[27][1]+irand(-3,3), AllianceOverrunWP[27][2]);
AddWaypoint(13, AllianceOverrunWP[26][0]+irand(-3,3), AllianceOverrunWP[26][1]+irand(-3,3), AllianceOverrunWP[26][2]);
AddWaypoint(14, AllianceOverrunWP[25][0]+irand(-3,3), AllianceOverrunWP[25][1]+irand(-3,3), AllianceOverrunWP[25][2]);
AddWaypoint(15, AllianceOverrunWP[24][0]+irand(-3,3), AllianceOverrunWP[24][1]+irand(-3,3), AllianceOverrunWP[24][2]);
AddWaypoint(16, AllianceOverrunWP[23][0]+irand(-3,3), AllianceOverrunWP[23][1]+irand(-3,3), AllianceOverrunWP[23][2]);
AddWaypoint(17, AllianceOverrunWP[22][0]+irand(-3,3), AllianceOverrunWP[22][1]+irand(-3,3), AllianceOverrunWP[22][2]);
//m_creature->SetHomePosition(AllianceOverrunWP[0][0]+irand(-3,3), AllianceOverrunWP[0][1]+irand(-3,3), AllianceOverrunWP[0][2],0);
SetDespawnAtEnd(true); SetDespawnAtEnd(true);
LastOverronPos = 17; LastOverronPos = 17;
Start(true, true, true); Start(true, true, true);
@@ -347,21 +301,8 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
Start(true, true, true); Start(true, true, true);
break; break;
default: default:
AddWaypoint( 4, AllianceOverrunWP[35][0]+irand(-3,3), AllianceOverrunWP[35][1]+irand(-3,3), AllianceOverrunWP[35][2]); for(uint8 i = 22; i < 36; i++)
AddWaypoint( 5, AllianceOverrunWP[34][0]+irand(-3,3), AllianceOverrunWP[34][1]+irand(-3,3), AllianceOverrunWP[34][2]); AddWaypoint( i-18, AllianceOverrunWP[i][0]+irand(-3,3), AllianceOverrunWP[i][1]+irand(-3,3), AllianceOverrunWP[i][2]);
AddWaypoint( 6, AllianceOverrunWP[33][0]+irand(-3,3), AllianceOverrunWP[33][1]+irand(-3,3), AllianceOverrunWP[33][2]);
AddWaypoint( 7, AllianceOverrunWP[32][0]+irand(-3,3), AllianceOverrunWP[32][1]+irand(-3,3), AllianceOverrunWP[32][2]);
AddWaypoint( 8, AllianceOverrunWP[31][0]+irand(-3,3), AllianceOverrunWP[31][1]+irand(-3,3), AllianceOverrunWP[31][2]);
AddWaypoint( 9, AllianceOverrunWP[30][0]+irand(-3,3), AllianceOverrunWP[30][1]+irand(-3,3), AllianceOverrunWP[30][2]);
AddWaypoint(10, AllianceOverrunWP[29][0]+irand(-3,3), AllianceOverrunWP[29][1]+irand(-3,3), AllianceOverrunWP[29][2]);
AddWaypoint(11, AllianceOverrunWP[28][0]+irand(-3,3), AllianceOverrunWP[28][1]+irand(-3,3), AllianceOverrunWP[28][2]);
AddWaypoint(12, AllianceOverrunWP[27][0]+irand(-3,3), AllianceOverrunWP[27][1]+irand(-3,3), AllianceOverrunWP[27][2]);
AddWaypoint(13, AllianceOverrunWP[26][0]+irand(-3,3), AllianceOverrunWP[26][1]+irand(-3,3), AllianceOverrunWP[26][2]);
AddWaypoint(14, AllianceOverrunWP[25][0]+irand(-3,3), AllianceOverrunWP[25][1]+irand(-3,3), AllianceOverrunWP[25][2]);
AddWaypoint(15, AllianceOverrunWP[24][0]+irand(-3,3), AllianceOverrunWP[24][1]+irand(-3,3), AllianceOverrunWP[24][2]);
AddWaypoint(16, AllianceOverrunWP[23][0]+irand(-3,3), AllianceOverrunWP[23][1]+irand(-3,3), AllianceOverrunWP[23][2]);
AddWaypoint(17, AllianceOverrunWP[22][0]+irand(-3,3), AllianceOverrunWP[22][1]+irand(-3,3), AllianceOverrunWP[22][2]);
//m_creature->SetHomePosition(AllianceOverrunWP[0][0]+irand(-3,3), AllianceOverrunWP[0][1]+irand(-3,3), AllianceOverrunWP[0][2],0);
SetDespawnAtEnd(true); SetDespawnAtEnd(true);
LastOverronPos = 17; LastOverronPos = 17;
Start(true, true, true); Start(true, true, true);
@@ -398,25 +339,10 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
Start(true, true, true); Start(true, true, true);
break; break;
default: default:
AddWaypoint( 5, HordeOverrunWP[0][0]+irand(-10,10), HordeOverrunWP[0][1]+irand(-10,10), HordeOverrunWP[0][2]); for(uint8 i = 0; i < 16; i++)
AddWaypoint( 6, HordeOverrunWP[1][0]+irand(-10,10), HordeOverrunWP[1][1]+irand(-10,10), HordeOverrunWP[1][2]); AddWaypoint( i+6, HordeOverrunWP[i][0]+irand(-10,10), HordeOverrunWP[i][1]+irand(-10,10), HordeOverrunWP[i][2]);
AddWaypoint( 7, HordeOverrunWP[2][0]+irand(-10,10), HordeOverrunWP[2][1]+irand(-10,10), HordeOverrunWP[2][2]);
AddWaypoint( 8, HordeOverrunWP[3][0]+irand(-10,10), HordeOverrunWP[3][1]+irand(-10,10), HordeOverrunWP[3][2]);
AddWaypoint( 9, HordeOverrunWP[4][0]+irand(-10,10), HordeOverrunWP[4][1]+irand(-10,10), HordeOverrunWP[4][2]);
AddWaypoint(10, HordeOverrunWP[5][0]+irand(-10,10), HordeOverrunWP[5][1]+irand(-10,10), HordeOverrunWP[5][2]);
AddWaypoint(11, HordeOverrunWP[6][0]+irand(-10,10), HordeOverrunWP[6][1]+irand(-10,10), HordeOverrunWP[6][2]);
AddWaypoint(12, HordeOverrunWP[7][0]+irand(-10,10), HordeOverrunWP[7][1]+irand(-10,10), HordeOverrunWP[7][2]);
AddWaypoint(13, HordeOverrunWP[8][0]+irand(-10,10), HordeOverrunWP[8][1]+irand(-10,10), HordeOverrunWP[8][2]);
AddWaypoint(14, HordeOverrunWP[9][0]+irand(-10,10), HordeOverrunWP[9][1]+irand(-10,10), HordeOverrunWP[9][2]);
AddWaypoint(15, HordeOverrunWP[10][0]+irand(-10,10), HordeOverrunWP[10][1]+irand(-10,10), HordeOverrunWP[10][2]);
AddWaypoint(16, HordeOverrunWP[11][0]+irand(-10,10), HordeOverrunWP[11][1]+irand(-10,10), HordeOverrunWP[11][2]);
AddWaypoint(17, HordeOverrunWP[12][0]+irand(-10,10), HordeOverrunWP[12][1]+irand(-10,10), HordeOverrunWP[12][2]);
AddWaypoint(18, HordeOverrunWP[13][0]+irand(-10,10), HordeOverrunWP[13][1]+irand(-10,10), HordeOverrunWP[13][2]);
AddWaypoint(19, HordeOverrunWP[14][0]+irand(-10,10), HordeOverrunWP[14][1]+irand(-10,10), HordeOverrunWP[14][2]);
AddWaypoint(20, HordeOverrunWP[15][0]+irand(-10,10), HordeOverrunWP[15][1]+irand(-10,10), HordeOverrunWP[15][2]);
//m_creature->SetHomePosition(AllianceOverrunWP[2][0]+irand(-10,10), AllianceOverrunWP[2][1]+irand(-10,10), AllianceOverrunWP[2][2],0);
SetDespawnAtEnd(true); SetDespawnAtEnd(true);
LastOverronPos = 20; LastOverronPos = 21;
Start(true, true, true); Start(true, true, true);
break; break;
} }
@@ -425,32 +351,11 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
{ {
for(uint8 i = 0; i < 6; i++) for(uint8 i = 0; i < 6; i++)
AddWaypoint(i, HordeWPs[i][0]+irand(-10,10), HordeWPs[i][1]+irand(-10,10), HordeWPs[i][2]); AddWaypoint(i, HordeWPs[i][0]+irand(-10,10), HordeWPs[i][1]+irand(-10,10), HordeWPs[i][2]);
switch(OverrunType) for(uint8 i = 0; i < 16; i++)
{ AddWaypoint( i+6, HordeOverrunWP[i][0]+irand(-10,10), HordeOverrunWP[i][1]+irand(-10,10), HordeOverrunWP[i][2]);
case 0: SetDespawnAtEnd(true);
default: LastOverronPos = 21;
AddWaypoint( 5, HordeOverrunWP[0][0]+irand(-10,10), HordeOverrunWP[0][1]+irand(-10,10), HordeOverrunWP[0][2]); Start(true, true, true);
AddWaypoint( 6, HordeOverrunWP[1][0]+irand(-10,10), HordeOverrunWP[1][1]+irand(-10,10), HordeOverrunWP[1][2]);
AddWaypoint( 7, HordeOverrunWP[2][0]+irand(-10,10), HordeOverrunWP[2][1]+irand(-10,10), HordeOverrunWP[2][2]);
AddWaypoint( 8, HordeOverrunWP[3][0]+irand(-10,10), HordeOverrunWP[3][1]+irand(-10,10), HordeOverrunWP[3][2]);
AddWaypoint( 9, HordeOverrunWP[4][0]+irand(-10,10), HordeOverrunWP[4][1]+irand(-10,10), HordeOverrunWP[4][2]);
AddWaypoint(10, HordeOverrunWP[5][0]+irand(-10,10), HordeOverrunWP[5][1]+irand(-10,10), HordeOverrunWP[5][2]);
AddWaypoint(11, HordeOverrunWP[6][0]+irand(-10,10), HordeOverrunWP[6][1]+irand(-10,10), HordeOverrunWP[6][2]);
AddWaypoint(12, HordeOverrunWP[7][0]+irand(-10,10), HordeOverrunWP[7][1]+irand(-10,10), HordeOverrunWP[7][2]);
AddWaypoint(13, HordeOverrunWP[8][0]+irand(-10,10), HordeOverrunWP[8][1]+irand(-10,10), HordeOverrunWP[8][2]);
AddWaypoint(14, HordeOverrunWP[9][0]+irand(-10,10), HordeOverrunWP[9][1]+irand(-10,10), HordeOverrunWP[9][2]);
AddWaypoint(15, HordeOverrunWP[10][0]+irand(-10,10), HordeOverrunWP[10][1]+irand(-10,10), HordeOverrunWP[10][2]);
AddWaypoint(16, HordeOverrunWP[11][0]+irand(-10,10), HordeOverrunWP[11][1]+irand(-10,10), HordeOverrunWP[11][2]);
AddWaypoint(17, HordeOverrunWP[12][0]+irand(-10,10), HordeOverrunWP[12][1]+irand(-10,10), HordeOverrunWP[12][2]);
AddWaypoint(18, HordeOverrunWP[13][0]+irand(-10,10), HordeOverrunWP[13][1]+irand(-10,10), HordeOverrunWP[13][2]);
AddWaypoint(19, HordeOverrunWP[14][0]+irand(-10,10), HordeOverrunWP[14][1]+irand(-10,10), HordeOverrunWP[14][2]);
AddWaypoint(20, HordeOverrunWP[15][0]+irand(-10,10), HordeOverrunWP[15][1]+irand(-10,10), HordeOverrunWP[15][2]);
//m_creature->SetHomePosition(AllianceOverrunWP[2][0]+irand(-10,10), AllianceOverrunWP[2][1]+irand(-10,10), AllianceOverrunWP[2][2],0);
SetDespawnAtEnd(true);
LastOverronPos = 20;
Start(true, true, true);
break;
}
} }
} }
} }
@@ -464,25 +369,6 @@ void hyjal_trashAI::JustDied(Unit *victim)
if((pInstance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE && !m_creature->isWorldBoss()) || (damageTaken < m_creature->GetMaxHealth()/4 && m_creature->isWorldBoss())) if((pInstance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE && !m_creature->isWorldBoss()) || (damageTaken < m_creature->GetMaxHealth()/4 && m_creature->isWorldBoss()))
m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);//no loot m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);//no loot
if(IsOverrun)
{
float x,y,z,o;
m_creature->GetHomePosition(x,y,z,o);
Creature* pUnit = m_creature->SummonCreature(m_creature->GetEntry(),x,y,z,o, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
if(pUnit)
{
((hyjal_trashAI*)pUnit->AI())->faction = faction;
((hyjal_trashAI*)pUnit->AI())->IsOverrun = true;
((hyjal_trashAI*)pUnit->AI())->OverrunType = OverrunType;
((hyjal_trashAI*)pUnit->AI())->SetupOverrun = true;
((hyjal_trashAI*)pUnit->AI())->DummyTarget[0] = DummyTarget[0];
((hyjal_trashAI*)pUnit->AI())->DummyTarget[1] = DummyTarget[1];
((hyjal_trashAI*)pUnit->AI())->DummyTarget[2] = DummyTarget[2];
pUnit->setActive(true);
pUnit->AI()->EnterEvadeMode();
}
}
} }
struct mob_giant_infernalAI : public hyjal_trashAI struct mob_giant_infernalAI : public hyjal_trashAI
@@ -563,8 +449,6 @@ struct mob_giant_infernalAI : public hyjal_trashAI
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID)); m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
CanMove = true; CanMove = true;
/*if (m_creature->getVictim())
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());*/
if (pInstance) if (pInstance)
{ {
if (pInstance->GetData(DATA_ALLIANCE_RETREAT) && !pInstance->GetData(DATA_HORDE_RETREAT)) if (pInstance->GetData(DATA_ALLIANCE_RETREAT) && !pInstance->GetData(DATA_HORDE_RETREAT))
@@ -657,29 +541,10 @@ struct mob_abominationAI : public hyjal_trashAI
} }
if (i == LastOverronPos && IsOverrun) if (i == LastOverronPos && IsOverrun)
{ {
if(faction == 0 && LastOverronPos == 17)//alliance round if((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21))
{ {
Creature* pUnit = m_creature->SummonCreature(m_creature->GetEntry(),4928.48+irand(-10,10), -1526.38+irand(-10,10), 1326.83,0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); m_creature->setDeathState(DEAD);
if(pUnit) m_creature->RemoveCorpse();
{
((hyjal_trashAI*)pUnit->AI())->faction = faction;
((hyjal_trashAI*)pUnit->AI())->IsOverrun = true;
((hyjal_trashAI*)pUnit->AI())->OverrunType = 2;//default
((hyjal_trashAI*)pUnit->AI())->SetupOverrun = false;
pUnit->setActive(true);
}
}
if(faction == 1 && LastOverronPos == 20)//horde round
{
Creature* pUnit = m_creature->SummonCreature(m_creature->GetEntry(),5458.01+irand(-10,10),-2340.27+irand(-10,10),1459.60,0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
if(pUnit)
{
((hyjal_trashAI*)pUnit->AI())->faction = faction;
((hyjal_trashAI*)pUnit->AI())->IsOverrun = true;
((hyjal_trashAI*)pUnit->AI())->OverrunType = 10;//default
((hyjal_trashAI*)pUnit->AI())->SetupOverrun = false;
pUnit->setActive(true);
}
} }
} }
} }
@@ -721,7 +586,7 @@ struct mob_abominationAI : public hyjal_trashAI
if(KnockDownTimer<diff) if(KnockDownTimer<diff)
{ {
DoCast(m_creature->getVictim(),SPELL_KNOCKDOWN); DoCast(m_creature->getVictim(),SPELL_KNOCKDOWN);
KnockDownTimer = 30000+rand()%25000; KnockDownTimer = 15000+rand()%10000;
}else KnockDownTimer -= diff; }else KnockDownTimer -= diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
@@ -776,30 +641,12 @@ struct mob_ghoulAI : public hyjal_trashAI
if (i == LastOverronPos && IsOverrun) if (i == LastOverronPos && IsOverrun)
{ {
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACKUNARMED); m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACKUNARMED);
if(faction == 0 && LastOverronPos == 17)//alliance round if((faction == 0 && LastOverronPos == 17) || (faction == 1 && LastOverronPos == 21))
{ {
Creature* pUnit = m_creature->SummonCreature(m_creature->GetEntry(),4928.48+irand(-10,10), -1526.38+irand(-10,10), 1326.83,0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); m_creature->setDeathState(DEAD);
if(pUnit) m_creature->RemoveCorpse();
{
((hyjal_trashAI*)pUnit->AI())->faction = faction;
((hyjal_trashAI*)pUnit->AI())->IsOverrun = true;
((hyjal_trashAI*)pUnit->AI())->OverrunType = 6;//default
((hyjal_trashAI*)pUnit->AI())->SetupOverrun = false;
pUnit->setActive(true);
}
}
if(faction == 1 && LastOverronPos == 20)//horde round
{
Creature* pUnit = m_creature->SummonCreature(m_creature->GetEntry(),5458.01+irand(-10,10), -2340.27+irand(-10,10), 1459.60,0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
if(pUnit)
{
((hyjal_trashAI*)pUnit->AI())->faction = faction;
((hyjal_trashAI*)pUnit->AI())->IsOverrun = true;
((hyjal_trashAI*)pUnit->AI())->OverrunType = 10;//default
((hyjal_trashAI*)pUnit->AI())->SetupOverrun = false;
pUnit->setActive(true);
}
} }
} }
} }
@@ -899,19 +746,6 @@ struct mob_necromancerAI : public hyjal_trashAI
m_creature->AddThreat(target,0.0); m_creature->AddThreat(target,0.0);
} }
} }
if (i == LastOverronPos && IsOverrun)
{
Creature* pUnit = m_creature->SummonCreature(17931, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 2*60*1000);
if(pUnit)
{
pUnit->SetVisibility(VISIBILITY_OFF);
pUnit->SetMaxHealth(10000000);
pUnit->SetHealth(10000000);
pUnit->setFaction(17772);
pUnit->Attack(m_creature, true);
m_creature->AddThreat(pUnit,0);
}
}
} }
void KilledUnit(Unit* victim) void KilledUnit(Unit* victim)
@@ -1025,19 +859,6 @@ struct mob_bansheeAI : public hyjal_trashAI
m_creature->AddThreat(target,0.0); m_creature->AddThreat(target,0.0);
} }
} }
if (i == LastOverronPos && IsOverrun)
{
Creature* pUnit = m_creature->SummonCreature(17931, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 2*60*1000);
if(pUnit)
{
pUnit->SetVisibility(VISIBILITY_OFF);
pUnit->SetMaxHealth(10000000);
pUnit->SetHealth(10000000);
pUnit->setFaction(17772);
pUnit->Attack(m_creature, true);
m_creature->AddThreat(pUnit,0);
}
}
} }
void EnterCombat(Unit* who) {} void EnterCombat(Unit* who) {}
@@ -1133,19 +954,6 @@ struct mob_crypt_fiendAI : public hyjal_trashAI
m_creature->AddThreat(target,0.0); m_creature->AddThreat(target,0.0);
} }
} }
if (i == LastOverronPos && IsOverrun)
{
Creature* pUnit = m_creature->SummonCreature(17931, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 2*60*1000);
if(pUnit)
{
pUnit->SetVisibility(VISIBILITY_OFF);
pUnit->SetMaxHealth(10000000);
pUnit->SetHealth(10000000);
pUnit->setFaction(17772);
pUnit->Attack(m_creature, true);
m_creature->AddThreat(pUnit,0);
}
}
} }
void EnterCombat(Unit* who) {} void EnterCombat(Unit* who) {}
@@ -1232,19 +1040,6 @@ struct mob_fel_stalkerAI : public hyjal_trashAI
m_creature->AddThreat(target,0.0); m_creature->AddThreat(target,0.0);
} }
} }
if (i == LastOverronPos && IsOverrun)
{
Creature* pUnit = m_creature->SummonCreature(17931, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 2*60*1000);
if(pUnit)
{
pUnit->SetVisibility(VISIBILITY_OFF);
pUnit->SetMaxHealth(10000000);
pUnit->SetHealth(10000000);
pUnit->setFaction(17772);
pUnit->Attack(m_creature, true);
m_creature->AddThreat(pUnit,0);
}
}
} }
void EnterCombat(Unit* who) {} void EnterCombat(Unit* who) {}
@@ -1447,14 +1242,6 @@ struct mob_gargoyleAI : public hyjal_trashAI
DoCast(target,SPELL_GARGOYLE_STRIKE,true); DoCast(target,SPELL_GARGOYLE_STRIKE,true);
} }
} }
if (IsOverrun && i == LastOverronPos)
{
AddWaypoint(0, 5536.65+irand(-80,80), -2710.66+irand(-80,80), 1504.45+irand(-10,10));
AddWaypoint(1, 5536.65+irand(-80,80), -2710.66+irand(-80,80), 1504.45+irand(-10,10));
SetDespawnAtEnd(false);
LastOverronPos = 1;
Start(false, true, true);
}
} }
void JustDied(Unit *victim) void JustDied(Unit *victim)
@@ -16,62 +16,75 @@
/* ScriptData /* ScriptData
SDName: Boss_Brutallus SDName: Boss_Brutallus
SD%Complete: 50 SD%Complete: 80
SDComment: Intro not made. Script for Madrigosa to be added here. SDComment: Find a way to start the intro, best code for the intro
EndScriptData */ EndScriptData */
#include "precompiled.h" #include "precompiled.h"
#include "def_sunwell_plateau.h" #include "def_sunwell_plateau.h"
#define YELL_INTRO -1580017 enum Quotes
#define YELL_INTRO_BREAK_ICE -1580018 {
#define YELL_INTRO_CHARGE -1580019 YELL_INTRO = -1580017,
#define YELL_INTRO_KILL_MADRIGOSA -1580020 YELL_INTRO_BREAK_ICE = -1580018,
#define YELL_INTRO_TAUNT -1580021 YELL_INTRO_CHARGE = -1580019,
YELL_INTRO_KILL_MADRIGOSA = -1580020,
YELL_INTRO_TAUNT = -1580021,
#define YELL_MADR_ICE_BARRIER -1580031 YELL_MADR_ICE_BARRIER = -1580031,
#define YELL_MADR_INTRO -1580032 YELL_MADR_INTRO = -1580032,
#define YELL_MADR_ICE_BLOCK -1580033 YELL_MADR_ICE_BLOCK = -1580033,
#define YELL_MADR_TRAP -1580034 YELL_MADR_TRAP = -1580034,
#define YELL_MADR_DEATH -1580035 YELL_MADR_DEATH = -1580035,
#define YELL_AGGRO -1580022 YELL_AGGRO = -1580022,
#define YELL_KILL1 -1580023 YELL_KILL1 = -1580023,
#define YELL_KILL2 -1580024 YELL_KILL2 = -1580024,
#define YELL_KILL3 -1580025 YELL_KILL3 = -1580025,
#define YELL_LOVE1 -1580026 YELL_LOVE1 = -1580026,
#define YELL_LOVE2 -1580027 YELL_LOVE2 = -1580027,
#define YELL_LOVE3 -1580028 YELL_LOVE3 = -1580028,
#define YELL_BERSERK -1580029 YELL_BERSERK = -1580029,
#define YELL_DEATH -1580030 YELL_DEATH = -1580030
};
#define SPELL_METEOR_SLASH 45150 enum Spells
#define SPELL_BURN 45141 {
#define SPELL_STOMP 45185 SPELL_METEOR_SLASH = 45150,
#define SPELL_BERSERK 26662 SPELL_BURN = 46394,
#define SPELL_DUAL_WIELD 42459 SPELL_STOMP = 45185,
SPELL_BERSERK = 26662,
SPELL_DUAL_WIELD = 42459,
#define FREEZING 45203 SPELL_INTRO_FROST_BLAST = 45203,
#define FROST_BOLT 44843 SPELL_INTRO_FROSTBOLT = 44843,
#define ENCAPSULATE 45665 SPELL_INTRO_ENCAPSULATE = 45665,
#define ENCAPSULATE_CHANELLING 45661 SPELL_INTRO_ENCAPSULATE_CHANELLING = 45661
};
#define FELMYST 25038
struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
{ {
boss_brutallusAI(Creature *c) : ScriptedAI(c) boss_brutallusAI(Creature *c) : ScriptedAI(c){
{
pInstance = ((ScriptedInstance*)c->GetInstanceData()); pInstance = ((ScriptedInstance*)c->GetInstanceData());
} }
ScriptedInstance* pInstance; ScriptedInstance* pInstance;
Unit* Madrigosa;
uint32 SlashTimer; uint32 SlashTimer;
uint32 BurnTimer; uint32 BurnTimer;
uint32 StompTimer; uint32 StompTimer;
uint32 BerserkTimer; uint32 BerserkTimer;
uint32 ConversationTimer; uint32 IntroPhase;
uint32 IntroPhaseTimer;
uint32 IntroFrostBoltTimer;
bool Intro; bool Intro;
bool IsIntro;
bool Enraged;
void Reset() void Reset()
{ {
@@ -79,10 +92,31 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
StompTimer = 30000; StompTimer = 30000;
BurnTimer = 60000; BurnTimer = 60000;
BerserkTimer = 360000; BerserkTimer = 360000;
IntroPhase = 0;
IntroPhaseTimer = 0;
IntroFrostBoltTimer = 0;
IsIntro = false;
Enraged = false;
Intro = true; //for debug
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true); m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Madrigosa = Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_MADRIGOSA));
//Creature* boss = Unit::GetCreature((*m_creature),AzgalorGUID);
if(!Madrigosa) error_log("Madrigosa ist nicht zu finden");
if(Intro && Madrigosa){
if(!Madrigosa->isAlive())
EndIntro();
else error_log("Madrigosa is Tod");
}
else
EndIntro();
if(pInstance) if(pInstance)
pInstance->SetData(DATA_BRUTALLUS, NOT_STARTED); pInstance->SetData(DATA_BRUTALLUS_EVENT, NOT_STARTED);
} }
void EnterCombat(Unit *who) void EnterCombat(Unit *who)
@@ -90,16 +124,16 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
DoScriptText(YELL_AGGRO, m_creature); DoScriptText(YELL_AGGRO, m_creature);
if(pInstance) if(pInstance)
pInstance->SetData(DATA_BRUTALLUS, IN_PROGRESS); pInstance->SetData(DATA_BRUTALLUS_EVENT, IN_PROGRESS);
} }
void KilledUnit(Unit* victim) void KilledUnit(Unit* victim)
{ {
switch(rand()%3) switch(rand()%3)
{ {
case 0: DoScriptText(YELL_KILL1, m_creature); break; case 0: DoScriptText(YELL_KILL1, m_creature); break;
case 1: DoScriptText(YELL_KILL2, m_creature); break; case 1: DoScriptText(YELL_KILL2, m_creature); break;
case 2: DoScriptText(YELL_KILL3, m_creature); break; case 2: DoScriptText(YELL_KILL3, m_creature); break;
} }
} }
@@ -107,18 +141,142 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
{ {
DoScriptText(YELL_DEATH, m_creature); DoScriptText(YELL_DEATH, m_creature);
if(pInstance) if(pInstance){
pInstance->SetData(DATA_BRUTALLUS, DONE); pInstance->SetData(DATA_BRUTALLUS_EVENT, DONE);
float x,y,z;
m_creature->GetPosition(x,y,z);
m_creature->SummonCreature(FELMYST, x,y, z+30, m_creature->GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 0);
}
}
void StartIntro()
{
if(!Intro)
return;
if(Madrigosa){
Madrigosa->setDeathState(ALIVE);
Madrigosa->setActive(true);
IsIntro = true;
}
error_log("Starte das Intro");
}
void EndIntro()
{
error_log("Beende das Intro");
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Intro = false;
IsIntro = false;
}
void DoIntro()
{
if(!Madrigosa)
return;
switch(IntroPhase)
{
case 0:
DoScriptText(YELL_MADR_ICE_BARRIER, Madrigosa);
IntroPhaseTimer = 5000;
++IntroPhase;
break;
case 1:
m_creature->SetInFront(Madrigosa);
Madrigosa->SetInFront(m_creature);
DoScriptText(YELL_MADR_INTRO, Madrigosa, m_creature);
IntroPhaseTimer = 9000;
++IntroPhase;
break;
case 2:
DoScriptText(YELL_INTRO, m_creature, Madrigosa);
IntroPhaseTimer = 13000;
++IntroPhase;
break;
case 3:
DoCast(m_creature, SPELL_INTRO_FROST_BLAST);
Madrigosa->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
IntroFrostBoltTimer = 3000;
IntroPhaseTimer = 28000;
++IntroPhase;
break;
case 4:
DoScriptText(YELL_INTRO_BREAK_ICE, m_creature);
IntroPhaseTimer = 6000;
++IntroPhase;
break;
case 5:
Madrigosa->CastSpell(m_creature, SPELL_INTRO_ENCAPSULATE_CHANELLING, false);
DoScriptText(YELL_MADR_TRAP, Madrigosa);
DoCast(m_creature, SPELL_INTRO_ENCAPSULATE);
IntroPhaseTimer = 11000;
++IntroPhase;
break;
case 6:
m_creature->SetSpeed(MOVE_RUN, 4.0f, true);
DoScriptText(YELL_INTRO_CHARGE, m_creature);
IntroPhaseTimer = 3000;
++IntroPhase;
break;
case 7:
m_creature->DealDamage(Madrigosa, Madrigosa->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, true);
DoScriptText(YELL_MADR_DEATH, Madrigosa);
m_creature->SetHealth(m_creature->GetMaxHealth());
m_creature->AttackStop();
m_creature->SetSpeed(MOVE_RUN, 1.0f, true);
IntroPhaseTimer = 3000;
++IntroPhase;
break;
case 8:
DoScriptText(YELL_INTRO_KILL_MADRIGOSA, m_creature);
m_creature->SetOrientation(0.14);
Madrigosa->setDeathState(CORPSE);
IntroPhaseTimer = 5000;
++IntroPhase;
break;
case 9:
DoScriptText(YELL_INTRO_TAUNT, m_creature);
IntroPhaseTimer = 5000;
++IntroPhase;
break;
case 10:
EndIntro();
break;
}
}
void MoveInLineOfSight(Unit *who){
if(pInstance && Intro)
pInstance->SetData(DATA_BRUTALLUS_EVENT, SPECIAL);
} }
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
if (!UpdateVictim() ) if(Intro && !IsIntro)
StartIntro();
if(IsIntro)
{
if(IntroPhaseTimer < diff){
DoIntro();
}else IntroPhaseTimer -= diff;
if(IntroPhase == 3 + 1){
if(IntroFrostBoltTimer < diff){
if(Madrigosa){
Madrigosa->CastSpell(m_creature, SPELL_INTRO_FROSTBOLT, false);
IntroFrostBoltTimer = 2000;
}
}else IntroFrostBoltTimer -= diff;
}
}
if(!UpdateVictim() || IsIntro)
return; return;
if(SlashTimer < diff) if(SlashTimer < diff)
{ {
DoCast(m_creature->getVictim(),SPELL_METEOR_SLASH); DoCast(m_creature->getVictim(), SPELL_METEOR_SLASH);
SlashTimer = 11000; SlashTimer = 11000;
}else SlashTimer -= diff; }else SlashTimer -= diff;
@@ -126,36 +284,30 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI
{ {
switch(rand()%3) switch(rand()%3)
{ {
case 0: DoScriptText(YELL_LOVE1, m_creature); break; case 0: DoScriptText(YELL_LOVE1, m_creature); break;
case 1: DoScriptText(YELL_LOVE2, m_creature); break; case 1: DoScriptText(YELL_LOVE2, m_creature); break;
case 2: DoScriptText(YELL_LOVE3, m_creature); break; case 2: DoScriptText(YELL_LOVE3, m_creature); break;
} }
DoCast(m_creature->getVictim(), SPELL_STOMP);
Unit *Target = m_creature->getVictim();
DoCast(Target,SPELL_STOMP);
if(Target->HasAura(45151)) Target->RemoveAura(45151);
StompTimer = 30000; StompTimer = 30000;
}else StompTimer -= diff; }else StompTimer -= diff;
if(BurnTimer < diff) if(BurnTimer < diff)
{ {
if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0))
target->CastSpell(target,SPELL_BURN,true); DoCast(target, SPELL_BURN, true);
BurnTimer = 60000; BurnTimer = 60000;
} }else BurnTimer -= diff;
else BurnTimer -= diff;
if(BerserkTimer < diff) if(BerserkTimer < diff && !Enraged)
{ {
DoScriptText(YELL_BERSERK, m_creature); DoScriptText(YELL_BERSERK, m_creature);
DoCast(m_creature,SPELL_BERSERK); DoCast(m_creature, SPELL_BERSERK);
BerserkTimer = 20000; Enraged = true;
} }else BerserkTimer -= diff;
else BerserkTimer -= diff;
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
}; };
CreatureAI* GetAI_boss_brutallus(Creature *_Creature) CreatureAI* GetAI_boss_brutallus(Creature *_Creature)
@@ -166,9 +318,9 @@ CreatureAI* GetAI_boss_brutallus(Creature *_Creature)
void AddSC_boss_brutallus() void AddSC_boss_brutallus()
{ {
Script *newscript; Script *newscript;
newscript = new Script; newscript = new Script;
newscript->Name="boss_brutallus"; newscript->Name="boss_brutallus";
newscript->GetAI = &GetAI_boss_brutallus; newscript->GetAI = &GetAI_boss_brutallus;
newscript->RegisterSelf(); newscript->RegisterSelf();
} }
@@ -1,4 +1,4 @@
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> /* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
@@ -23,99 +23,98 @@ EndScriptData */
#include "precompiled.h" #include "precompiled.h"
#include "def_sunwell_plateau.h" #include "def_sunwell_plateau.h"
//Intro enum Quotes
#define YELL_INTRO_SAC_1 "Misery..." {
#define YELL_INTRO_ALY_2 "Depravity..." //Alytesh
#define YELL_INTRO_SAC_3 "Confusion..." YELL_CANFLAGRATION = -1580044,
#define YELL_INTRO_ALY_4 "Hatred..." YELL_SISTER_SACROLASH_DEAD = -1580045,
#define YELL_INTRO_SAC_5 "Mistrust..." YELL_ALY_KILL_1 = -1580046,
#define YELL_INTRO_ALY_6 "Chaos..." YELL_ALY_KILL_2 = -1580047,
#define YELL_INTRO_SAC_7 "These are the hallmarks..." YELL_ALY_DEAD = -1580048,
#define YELL_INTRO_ALY_8 "These are the pillars..." YELL_BERSERK = -1580049,
// Lady Sacrolash //Sacrolash
#define LADY_SACROLASH 25165 YELL_SHADOW_NOVA = -1580050,
YELL_SISTER_ALYTHESS_DEAD = -1580051,
YELL_SAC_KILL_1 = -1580052,
YELL_SAC_KILL_2 = -1580053,
SAY_SAC_DEAD = -1580054,
YELL_ENRAGE = -1580055,
#define SPELL_DARK_TOUCHED 45347 //Intro
#define SPELL_SHADOW_BLADES 45248//10 secs YELL_INTRO_SAC_1 = -1580056,
#define SPELL_DARK_STRIKE 45271 YELL_INTRO_ALY_2 = -1580057,
#define SPELL_SHADOW_NOVA 45329//30-35 secs YELL_INTRO_SAC_3 = -1580058,
#define SPELL_CONFOUNDING_BLOW 45256//25 secs YELL_INTRO_ALY_4 = -1580059,
YELL_INTRO_SAC_5 = -1580060,
YELL_INTRO_ALY_6 = -1580061,
YELL_INTRO_SAC_7 = -1580062,
YELL_INTRO_ALY_8 = -1580063,
#define MOB_SHADOW_IMAGE 25214 //Emote
#define SPELL_SHADOW_FURY 45270 EMOTE_SHADOW_NOVA = -1580064,
#define SPELL_IMAGE_VISUAL 45263 EMOTE_CONFLAGRATION = -1580065
};
#define SOUND_INTRO 12484 enum Spells
#define YELL_SHADOW_NOVA "Shadow to the aid of fire!" //only if Alythess is not dead {
#define SOUND_SHADOW_NOVA 12485 //Lady Sacrolash spells
#define YELL_SISTER_ALYTHESS_DEAD "Alythess! Your fire burns within me!" SPELL_DARK_TOUCHED = 45347,
#define SOUND_SISTER_ALYTHESS_DEAD 12488 SPELL_SHADOW_BLADES = 45248, //10 secs
#define YELL_SAC_KILL_1 "Shadow engulf." SPELL_DARK_STRIKE = 45271,
#define SOUND_SAC_KILL_1 12486 SPELL_SHADOW_NOVA = 45329, //30-35 secs
#define YELL_SAC_KILL_2 "Ee-nok Kryul!" SPELL_CONFOUNDING_BLOW = 45256, //25 secs
#define SOUND_SAC_KILL_2 12487
#define SAY_SAC_DEAD "I... fade."
#define YELL_ENRAGE "Time is a luxury you no longer possess!"
//enrage 6 minutes //Shadow Image spells
#define SPELL_ENRAGE 46587 SPELL_SHADOW_FURY = 45270,
//empower after sister is death SPELL_IMAGE_VISUAL = 45263,
#define SPELL_EMPOWER 45366
//debuff prevents touched spell for 3 secounds //Misc spells
#define SPELL_DARK_FLAME 45345 SPELL_ENRAGE = 46587,
SPELL_EMPOWER = 45366,
SPELL_DARK_FLAME = 45345,
//Grand Warlock Alythess //Grand Warlock Alythess spells
// Don't move only spamm spells ... SPELL_PYROGENICS = 45230, //15secs
#define GRAND_WARLOCK_ALYTHESS 25166 SPELL_FLAME_TOUCHED = 45348,
SPELL_CONFLAGRATION = 45342, //30-35 secs
#define SPELL_PYROGENICS 45230//15secs SPELL_BLAZE = 45235, //on main target every 3 secs
#define SPELL_FLAME_TOUCHED 45348 SPELL_FLAME_SEAR = 46771,
#define SPELL_CONFLAGRATION 45342//30-35 secs SPELL_BLAZE_SUMMON = 45236, //187366 GO
#define SPELL_BLAZE 45235//on main target every 3 secs SPELL_BLAZE_BURN = 45246
#define SPELL_FLAME_SEAR 46771 };
#define SPELL_BLAZE_SUMMON 45236 //187366 GO
#define SPELL_BLAZE_BURN 45246
#define YELL_CANFLAGRATION "Fire to the aid of shadow!" //only if Sacrolash is not dead
#define SOUND_CANFLAGRATION 12489
#define YELL_SISTER_SACROLASH_DEAD "Sacrolash!"
#define SOUND_SISTER_SACROLASH_DEAD 12492
#define YELL_ALY_KILL_1 "Fire consume."
#define SOUND_ALY_KILL_1 12490
#define YELL_ALY_KILL_2 "Ed-ir Halach!"
#define SOUND_ALY_KILL_2 12491
#define YELL_ALY_DEAD "De-ek Anur!"
#define SOUND_ALY_DEAD 12494
#define YELL_BERSERK "Your luck has run its curse!"
#define SOUND_BERSERK 12493
enum Creatures
{
GRAND_WARLOCK_ALYTHESS = 25166,
MOB_SHADOW_IMAGE = 25214,
LADY_SACROLASH = 25165
};
struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
{ {
boss_sacrolashAI(Creature *c) : ScriptedAI(c) boss_sacrolashAI(Creature *c) : ScriptedAI(c){
{
pInstance = ((ScriptedInstance*)c->GetInstanceData()); pInstance = ((ScriptedInstance*)c->GetInstanceData());
} }
ScriptedInstance *pInstance; ScriptedInstance *pInstance;
bool InCombat; bool InCombat;
bool sisterdeath; bool SisterDeath;
bool Enraged;
uint32 shadowblades_timer; uint32 ShadowbladesTimer;
uint32 shadownova_timer; uint32 ShadownovaTimer;
uint32 confoundingblow_timer; uint32 ConfoundingblowTimer;
uint32 shadowimage_timer; uint32 ShadowimageTimer;
uint32 ConflagrationTimer;
uint32 conflagration_timer; uint32 EnrageTimer;
uint32 enrage_timer;
void Reset() void Reset()
{ {
InCombat = false; InCombat = false;
Enraged = false;
if(pInstance) if(pInstance)
{ {
Unit* Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_ALYTHESS)); Unit* Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_ALYTHESS));
@@ -135,26 +134,33 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
if(!InCombat) if(!InCombat)
{ {
shadowblades_timer = 10000; ShadowbladesTimer = 10000;
shadownova_timer = 30000; ShadownovaTimer = 30000;
confoundingblow_timer = 25000; ConfoundingblowTimer = 25000;
shadowimage_timer = 20000; ShadowimageTimer = 20000;
conflagration_timer = 30000; ConflagrationTimer = 30000;
sisterdeath = false; EnrageTimer = 360000;
enrage_timer = 360000; SisterDeath = false;
} }
if(pInstance)
pInstance->SetData(DATA_EREDAR_TWINS_EVENT, NOT_STARTED);
} }
void EnterCombat(Unit *who) void EnterCombat(Unit *who)
{ {
DoZoneInCombat(); DoZoneInCombat();
if(pInstance) if(pInstance)
{ {
Unit* Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_ALYTHESS)); Unit* Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_ALYTHESS));
if (Temp && Temp->isAlive() && !(Temp->getVictim())) if (Temp && Temp->isAlive() && !(Temp->getVictim()))
((Creature*)Temp)->AI()->AttackStart(who); ((Creature*)Temp)->AI()->AttackStart(who);
} }
if(pInstance)
pInstance->SetData(DATA_EREDAR_TWINS_EVENT, IN_PROGRESS);
} }
void KilledUnit(Unit *victim) void KilledUnit(Unit *victim)
@@ -163,14 +169,8 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
{ {
switch (rand()%2) switch (rand()%2)
{ {
case 0: case 0: DoScriptText(YELL_SAC_KILL_1, m_creature); break;
DoPlaySoundToSet(m_creature,SOUND_SAC_KILL_1); case 1: DoScriptText(YELL_SAC_KILL_2, m_creature); break;
DoYell(YELL_SAC_KILL_1 ,LANG_UNIVERSAL,NULL);
break;
case 1:
DoPlaySoundToSet(m_creature,SOUND_SAC_KILL_2);
DoYell(YELL_SAC_KILL_2 ,LANG_UNIVERSAL,NULL);
break;
} }
} }
} }
@@ -178,14 +178,15 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
void JustDied(Unit* Killer) void JustDied(Unit* Killer)
{ {
// only if ALY death // only if ALY death
if (sisterdeath) if (SisterDeath)
{ {
DoYell(SAY_SAC_DEAD ,LANG_UNIVERSAL,NULL); DoScriptText(SAY_SAC_DEAD, m_creature);
if(pInstance)
pInstance->SetData(DATA_EREDAR_TWINS_EVENT, DONE);
} }
else else
{
m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
}
} }
void SpellHitTarget(Unit* target,const SpellEntry* spell) void SpellHitTarget(Unit* target,const SpellEntry* spell)
@@ -214,11 +215,8 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
if(target->HasAura(SPELL_DARK_TOUCHED)) if(target->HasAura(SPELL_DARK_TOUCHED))
{ {
target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED); target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
target->CastSpell(target,SPELL_DARK_FLAME,true); target->CastSpell(target, SPELL_DARK_FLAME, true);
}else }else target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
{
target->CastSpell(target,SPELL_FLAME_TOUCHED,true);
}
} }
break; break;
case SPELL_DARK_TOUCHED: case SPELL_DARK_TOUCHED:
@@ -227,11 +225,8 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
if(target->HasAura(SPELL_FLAME_TOUCHED)) if(target->HasAura(SPELL_FLAME_TOUCHED))
{ {
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED); target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
target->CastSpell(target,SPELL_DARK_FLAME,true); target->CastSpell(target, SPELL_DARK_FLAME, true);
}else }else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
{
target->CastSpell(target,SPELL_DARK_TOUCHED,true);
}
} }
break; break;
} }
@@ -239,7 +234,7 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
if(!sisterdeath) if(!SisterDeath)
{ {
if (pInstance) if (pInstance)
{ {
@@ -247,12 +242,10 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_ALYTHESS)); Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_ALYTHESS));
if (Temp && Temp->isDead()) if (Temp && Temp->isDead())
{ {
DoYell(YELL_SISTER_ALYTHESS_DEAD ,LANG_UNIVERSAL,NULL); DoScriptText(YELL_SISTER_ALYTHESS_DEAD, m_creature);
DoPlaySoundToSet(m_creature,SOUND_SISTER_ALYTHESS_DEAD);
sisterdeath = true;
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
DoCast(m_creature,SPELL_EMPOWER); DoCast(m_creature,SPELL_EMPOWER);
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
SisterDeath = true;
} }
} }
} }
@@ -260,54 +253,52 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
if(sisterdeath) if(SisterDeath)
{ {
if (conflagration_timer < diff) if (ConflagrationTimer < diff)
{ {
if (!m_creature->IsNonMeleeSpellCasted(false)) if (!m_creature->IsNonMeleeSpellCasted(false))
{ {
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
Unit* target = NULL; Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM, 0); target = SelectUnit(SELECT_TARGET_RANDOM, 0);
DoCast(target,SPELL_CONFLAGRATION); DoCast(target, SPELL_CONFLAGRATION);
conflagration_timer = 30000+(rand()%5000); ConflagrationTimer = 30000+(rand()%5000);
} }
}else conflagration_timer -= diff; }else ConflagrationTimer -= diff;
} }
else else
{ {
if(shadownova_timer < diff) if(ShadownovaTimer < diff)
{ {
if (!m_creature->IsNonMeleeSpellCasted(false)) if (!m_creature->IsNonMeleeSpellCasted(false))
{ {
Unit* target = NULL; Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM, 0); target = SelectUnit(SELECT_TARGET_RANDOM, 0);
DoCast(target,SPELL_SHADOW_NOVA); DoCast(target, SPELL_SHADOW_NOVA);
if(!sisterdeath) if(!SisterDeath)
{ {
m_creature->MonsterTextEmote("directs Shadow Nova at $N",target->GetGUID(),true); DoScriptText(EMOTE_SHADOW_NOVA, m_creature, target);
DoPlaySoundToSet(m_creature,SOUND_SHADOW_NOVA); DoScriptText(YELL_SHADOW_NOVA, m_creature);
DoYell(YELL_SHADOW_NOVA,LANG_UNIVERSAL,NULL);
} }
ShadownovaTimer = 30000+(rand()%5000);
shadownova_timer= 30000+(rand()%5000);
} }
}else shadownova_timer -=diff; }else ShadownovaTimer -=diff;
} }
if(confoundingblow_timer < diff) if(ConfoundingblowTimer < diff)
{ {
if (!m_creature->IsNonMeleeSpellCasted(false)) if (!m_creature->IsNonMeleeSpellCasted(false))
{ {
Unit* target = NULL; Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM, 0); target = SelectUnit(SELECT_TARGET_RANDOM, 0);
DoCast(target,SPELL_CONFOUNDING_BLOW); DoCast(target, SPELL_CONFOUNDING_BLOW);
confoundingblow_timer = 20000 + (rand()%5000); ConfoundingblowTimer = 20000 + (rand()%5000);
} }
}else confoundingblow_timer -=diff; }else ConfoundingblowTimer -=diff;
if(shadowimage_timer < diff) if(ShadowimageTimer < diff)
{ {
Unit* target = NULL; Unit* target = NULL;
Creature* temp = NULL; Creature* temp = NULL;
@@ -317,26 +308,25 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
temp = DoSpawnCreature(MOB_SHADOW_IMAGE,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN,10000); temp = DoSpawnCreature(MOB_SHADOW_IMAGE,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN,10000);
temp->AI()->AttackStart(target); temp->AI()->AttackStart(target);
} }
shadowimage_timer = 20000; ShadowimageTimer = 20000;
}else shadowimage_timer -=diff; }else ShadowimageTimer -=diff;
if(shadowblades_timer < diff) if(ShadowbladesTimer < diff)
{ {
if (!m_creature->IsNonMeleeSpellCasted(false)) if (!m_creature->IsNonMeleeSpellCasted(false))
{ {
DoCast(m_creature,SPELL_SHADOW_BLADES); DoCast(m_creature, SPELL_SHADOW_BLADES);
shadowblades_timer = 10000; ShadowbladesTimer = 10000;
} }
}else shadowblades_timer -=diff; }else ShadowbladesTimer -=diff;
if (enrage_timer < diff) if (EnrageTimer < diff && !Enraged)
{ {
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
DoYell(YELL_ENRAGE ,LANG_UNIVERSAL,NULL); DoScriptText(YELL_ENRAGE, m_creature);
DoCast(m_creature,SPELL_ENRAGE); DoCast(m_creature,SPELL_ENRAGE);
enrage_timer = 300000; Enraged = true;
}else enrage_timer -= diff; }else EnrageTimer -= diff;
if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false))
{ {
@@ -358,29 +348,32 @@ CreatureAI* GetAI_boss_sacrolash(Creature *_Creature)
struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
{ {
boss_alythessAI(Creature *c) : Scripted_NoMovementAI(c) boss_alythessAI(Creature *c) : Scripted_NoMovementAI(c){
{ pInstance = ((ScriptedInstance*)c->GetInstanceData());
pInstance = ((ScriptedInstance*)c->GetInstanceData()); IntroStepCounter = 10; IntroStepCounter = 10;
} }
ScriptedInstance *pInstance; ScriptedInstance *pInstance;
bool InCombat; bool InCombat;
bool sisterdeath; bool SisterDeath;
bool Enraged;
uint32 IntroStepCounter; uint32 IntroStepCounter;
uint32 IntroYell_Timer; uint32 IntroYellTimer;
uint32 conflagration_timer; uint32 ConflagrationTimer;
uint32 blaze_timer; uint32 BlazeTimer;
uint32 pyrogenics_timer; uint32 PyrogenicsTimer;
uint32 ShadownovaTimer;
uint32 shadownova_timer; uint32 FlamesearTimer;
uint32 flamesear_timer; uint32 EnrageTimer;
uint32 enrage_timer;
void Reset() void Reset()
{ {
InCombat = false; InCombat = false;
Enraged = false;
if(pInstance) if(pInstance)
{ {
Unit* Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SACROLASH)); Unit* Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SACROLASH));
@@ -400,25 +393,34 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
if(!InCombat) if(!InCombat)
{ {
conflagration_timer = 45000; ConflagrationTimer = 45000;
blaze_timer = 100; BlazeTimer = 100;
pyrogenics_timer = 15000; PyrogenicsTimer = 15000;
shadownova_timer = 40000; ShadownovaTimer = 40000;
sisterdeath = false; EnrageTimer = 360000;
enrage_timer = 360000; FlamesearTimer = 15000;
flamesear_timer = 15000; IntroYellTimer = 10000;
IntroYell_Timer = 10000;
SisterDeath = false;
} }
if(pInstance)
pInstance->SetData(DATA_EREDAR_TWINS_EVENT, NOT_STARTED);
} }
void EnterCombat(Unit *who) void EnterCombat(Unit *who)
{ {
DoZoneInCombat(); DoZoneInCombat();
if(pInstance) if(pInstance)
{ {
Unit* Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SACROLASH)); Unit* Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SACROLASH));
if (Temp && Temp->isAlive() && !(Temp->getVictim())) if (Temp && Temp->isAlive() && !(Temp->getVictim()))
((Creature*)Temp)->AI()->AttackStart(who); ((Creature*)Temp)->AI()->AttackStart(who);
} }
if(pInstance)
pInstance->SetData(DATA_EREDAR_TWINS_EVENT, IN_PROGRESS);
} }
void AttackStart(Unit *who) void AttackStart(Unit *who)
@@ -458,29 +460,23 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
{ {
switch (rand()%2) switch (rand()%2)
{ {
case 0: case 0: DoScriptText(YELL_ALY_KILL_1, m_creature); break;
DoPlaySoundToSet(m_creature,SOUND_ALY_KILL_1); case 1: DoScriptText(YELL_ALY_KILL_2, m_creature); break;
DoYell(YELL_ALY_KILL_1 ,LANG_UNIVERSAL,NULL);
break;
case 1:
DoPlaySoundToSet(m_creature,SOUND_ALY_KILL_2);
DoYell(YELL_ALY_KILL_2 ,LANG_UNIVERSAL,NULL);
break;
} }
} }
} }
void JustDied(Unit* Killer) void JustDied(Unit* Killer)
{ {
if (sisterdeath) if (SisterDeath)
{ {
DoYell(YELL_ALY_DEAD ,LANG_UNIVERSAL,NULL); DoScriptText(YELL_ALY_DEAD, m_creature);
DoPlaySoundToSet(m_creature,SOUND_ALY_DEAD);
if(pInstance)
pInstance->SetData(DATA_EREDAR_TWINS_EVENT, DONE);
} }
else else
{
m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
}
} }
void SpellHitTarget(Unit* target,const SpellEntry* spell) void SpellHitTarget(Unit* target,const SpellEntry* spell)
@@ -489,7 +485,7 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
{ {
case SPELL_BLAZE: case SPELL_BLAZE:
target->CastSpell(target,SPELL_BLAZE_SUMMON,true); target->CastSpell(target, SPELL_BLAZE_SUMMON, true);
case SPELL_CONFLAGRATION: case SPELL_CONFLAGRATION:
case SPELL_FLAME_SEAR: case SPELL_FLAME_SEAR:
HandleTouchedSpells(target, SPELL_FLAME_TOUCHED); HandleTouchedSpells(target, SPELL_FLAME_TOUCHED);
@@ -510,10 +506,10 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
if(target->HasAura(SPELL_DARK_TOUCHED)) if(target->HasAura(SPELL_DARK_TOUCHED))
{ {
target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED); target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
target->CastSpell(target,SPELL_DARK_FLAME,true); target->CastSpell(target, SPELL_DARK_FLAME, true);
}else }else
{ {
target->CastSpell(target,SPELL_FLAME_TOUCHED,true); target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
} }
} }
break; break;
@@ -523,11 +519,8 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
if(target->HasAura(SPELL_FLAME_TOUCHED)) if(target->HasAura(SPELL_FLAME_TOUCHED))
{ {
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED); target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
target->CastSpell(target,SPELL_DARK_FLAME,true); target->CastSpell(target, SPELL_DARK_FLAME, true);
}else }else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
{
target->CastSpell(target,SPELL_DARK_TOUCHED,true);
}
} }
break; break;
} }
@@ -535,38 +528,30 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
uint32 IntroStep(uint32 step) uint32 IntroStep(uint32 step)
{ {
Creature* Sacrolash = Unit::GetCreature((*m_creature),pInstance->GetData64(DATA_SACROLASH)); Creature* Sacrolash = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SACROLASH));
switch (step) switch (step)
{ {
case 0: DoPlaySoundToSet(m_creature,SOUND_INTRO); return 0; case 0: return 0;
case 1: case 1:
if(Sacrolash) if(Sacrolash)
Sacrolash->MonsterYell(YELL_INTRO_SAC_1, LANG_UNIVERSAL,NULL); DoScriptText(YELL_INTRO_SAC_1, Sacrolash);
return 1000;
case 2:
m_creature->MonsterYell(YELL_INTRO_ALY_2, LANG_UNIVERSAL,NULL);
return 1000; return 1000;
case 2: DoScriptText(YELL_INTRO_ALY_2, m_creature); return 1000;
case 3: case 3:
if(Sacrolash) if(Sacrolash)
Sacrolash->MonsterYell(YELL_INTRO_SAC_3, LANG_UNIVERSAL,NULL); DoScriptText(YELL_INTRO_SAC_3, Sacrolash);
return 2000; return 2000;
case 4: case 4: DoScriptText(YELL_INTRO_ALY_4, m_creature); return 1000;
m_creature->MonsterYell(YELL_INTRO_ALY_4, LANG_UNIVERSAL,NULL);
return 1000;
case 5: case 5:
if(Sacrolash) if(Sacrolash)
Sacrolash->MonsterYell(YELL_INTRO_SAC_5, LANG_UNIVERSAL,NULL); DoScriptText(YELL_INTRO_SAC_5, Sacrolash);
return 2000; return 2000;
case 6: case 6: DoScriptText(YELL_INTRO_ALY_6, m_creature); return 1000;
m_creature->MonsterYell(YELL_INTRO_ALY_6, LANG_UNIVERSAL,NULL);
return 1000;
case 7: case 7:
if(Sacrolash) if(Sacrolash)
Sacrolash->MonsterYell(YELL_INTRO_SAC_7, LANG_UNIVERSAL,NULL); DoScriptText(YELL_INTRO_SAC_7, Sacrolash);
return 3000; return 3000;
case 8: case 8: DoScriptText(YELL_INTRO_ALY_8, m_creature); return 900000;
m_creature->MonsterYell(YELL_INTRO_ALY_8, LANG_UNIVERSAL,NULL);
return 900000;
} }
return 10000; return 10000;
} }
@@ -575,13 +560,13 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
{ {
if(IntroStepCounter < 9) if(IntroStepCounter < 9)
{ {
if(IntroYell_Timer < diff) if(IntroYellTimer < diff)
{ {
IntroYell_Timer = IntroStep(IntroStepCounter++); IntroYellTimer = IntroStep(++IntroStepCounter);
}else IntroYell_Timer -= diff; }else IntroYellTimer -= diff;
} }
if(!sisterdeath) if(!SisterDeath)
{ {
if (pInstance) if (pInstance)
{ {
@@ -589,12 +574,10 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SACROLASH)); Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SACROLASH));
if (Temp && Temp->isDead()) if (Temp && Temp->isDead())
{ {
DoYell(YELL_SISTER_SACROLASH_DEAD ,LANG_UNIVERSAL,NULL); DoScriptText(YELL_SISTER_SACROLASH_DEAD, m_creature);
DoPlaySoundToSet(m_creature,SOUND_SISTER_SACROLASH_DEAD); DoCast(m_creature, SPELL_EMPOWER);
sisterdeath = true;
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
DoCast(m_creature,SPELL_EMPOWER); SisterDeath = true;
} }
} }
} }
@@ -602,78 +585,76 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
if(sisterdeath) if(SisterDeath)
{ {
if(shadownova_timer < diff) if(ShadownovaTimer < diff)
{ {
if (!m_creature->IsNonMeleeSpellCasted(false)) if (!m_creature->IsNonMeleeSpellCasted(false))
{ {
Unit* target = NULL; Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM, 0); target = SelectUnit(SELECT_TARGET_RANDOM, 0);
DoCast(target,SPELL_SHADOW_NOVA); DoCast(target, SPELL_SHADOW_NOVA);
shadownova_timer= 30000+(rand()%5000); ShadownovaTimer= 30000+(rand()%5000);
} }
}else shadownova_timer -=diff; }else ShadownovaTimer -=diff;
} }
else else
{ {
if (conflagration_timer < diff) if(ConflagrationTimer < diff)
{ {
if (!m_creature->IsNonMeleeSpellCasted(false)) if (!m_creature->IsNonMeleeSpellCasted(false))
{ {
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
Unit* target = NULL; Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM, 0); target = SelectUnit(SELECT_TARGET_RANDOM, 0);
DoCast(target,SPELL_CONFLAGRATION); DoCast(target, SPELL_CONFLAGRATION);
conflagration_timer = 30000+(rand()%5000); ConflagrationTimer = 30000+(rand()%5000);
if(!sisterdeath) if(!SisterDeath)
{ {
m_creature->MonsterTextEmote("directs Conflagration at $N",target->GetGUID(),true); DoScriptText(EMOTE_CONFLAGRATION, m_creature, target);
DoPlaySoundToSet(m_creature,SOUND_CANFLAGRATION); DoScriptText(YELL_CANFLAGRATION, m_creature);
DoYell(YELL_CANFLAGRATION,LANG_UNIVERSAL,NULL);
} }
blaze_timer = 4000; BlazeTimer = 4000;
} }
}else conflagration_timer -= diff; }else ConflagrationTimer -= diff;
} }
if (flamesear_timer < diff) if(FlamesearTimer < diff)
{ {
if (!m_creature->IsNonMeleeSpellCasted(false)) if(!m_creature->IsNonMeleeSpellCasted(false))
{ {
DoCast(m_creature,SPELL_FLAME_SEAR); DoCast(m_creature, SPELL_FLAME_SEAR);
flamesear_timer = 15000; FlamesearTimer = 15000;
} }
}else flamesear_timer -=diff; }else FlamesearTimer -=diff;
if (pyrogenics_timer < diff) if (PyrogenicsTimer < diff)
{ {
if (!m_creature->IsNonMeleeSpellCasted(false)) if(!m_creature->IsNonMeleeSpellCasted(false))
{ {
DoCast(m_creature,SPELL_PYROGENICS,true); DoCast(m_creature, SPELL_PYROGENICS,true);
pyrogenics_timer = 15000; PyrogenicsTimer = 15000;
} }
}else pyrogenics_timer -= diff; }else PyrogenicsTimer -= diff;
if (blaze_timer < diff) if (BlazeTimer < diff)
{ {
if (!m_creature->IsNonMeleeSpellCasted(false)) if(!m_creature->IsNonMeleeSpellCasted(false))
{ {
DoCast(m_creature->getVictim(),SPELL_BLAZE); DoCast(m_creature->getVictim(), SPELL_BLAZE);
blaze_timer = 3800; BlazeTimer = 3800;
} }
}else blaze_timer -= diff; }else BlazeTimer -= diff;
if (enrage_timer < diff) if (EnrageTimer < diff && !Enraged)
{ {
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
DoPlaySoundToSet(m_creature,SOUND_BERSERK); DoScriptText(YELL_BERSERK, m_creature);
DoYell(YELL_BERSERK ,LANG_UNIVERSAL,NULL); DoCast(m_creature, SPELL_ENRAGE);
DoCast(m_creature,SPELL_ENRAGE); Enraged = true;
enrage_timer = 300000; }else EnrageTimer -= diff;
}else enrage_timer -= diff;
} }
}; };
@@ -686,16 +667,15 @@ struct TRINITY_DLL_DECL mob_shadow_imageAI : public ScriptedAI
{ {
mob_shadow_imageAI(Creature *c) : ScriptedAI(c) {} mob_shadow_imageAI(Creature *c) : ScriptedAI(c) {}
uint32 shadowfury_timer; uint32 ShadowfuryTimer;
uint32 kill_timer; uint32 KillTimer;
uint32 darkstrike_timer; uint32 DarkstrikeTimer;
void Reset() void Reset()
{ {
shadowfury_timer = 5000 + (rand()%15000); ShadowfuryTimer = 5000 + (rand()%15000);
darkstrike_timer = 3000; DarkstrikeTimer = 3000;
kill_timer = 15000; KillTimer = 15000;
} }
void EnterCombat(Unit *who){} void EnterCombat(Unit *who){}
@@ -712,11 +692,8 @@ struct TRINITY_DLL_DECL mob_shadow_imageAI : public ScriptedAI
if(target->HasAura(SPELL_FLAME_TOUCHED)) if(target->HasAura(SPELL_FLAME_TOUCHED))
{ {
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED); target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
target->CastSpell(target,SPELL_DARK_FLAME,true); target->CastSpell(target, SPELL_DARK_FLAME, true);
}else }else target->CastSpell(target,SPELL_DARK_TOUCHED,true);
{
target->CastSpell(target,SPELL_DARK_TOUCHED,true);
}
} }
break; break;
} }
@@ -725,36 +702,34 @@ struct TRINITY_DLL_DECL mob_shadow_imageAI : public ScriptedAI
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
if(!m_creature->HasAura(SPELL_IMAGE_VISUAL)) if(!m_creature->HasAura(SPELL_IMAGE_VISUAL))
DoCast(m_creature,SPELL_IMAGE_VISUAL); DoCast(m_creature, SPELL_IMAGE_VISUAL);
if(kill_timer < diff) if(KillTimer < diff)
{ {
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
kill_timer = 9999999; KillTimer = 9999999;
}else kill_timer -=diff; }else KillTimer -=diff;
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
if(shadowfury_timer < diff) if(ShadowfuryTimer < diff)
{ {
DoCast(m_creature,SPELL_SHADOW_FURY); DoCast(m_creature, SPELL_SHADOW_FURY);
shadowfury_timer = 10000; ShadowfuryTimer = 10000;
}else shadowfury_timer -=diff; }else ShadowfuryTimer -=diff;
if(darkstrike_timer < diff) if(DarkstrikeTimer < diff)
{ {
if(!m_creature->IsNonMeleeSpellCasted(false)) if(!m_creature->IsNonMeleeSpellCasted(false))
{ {
//If we are within range melee the target //If we are within range melee the target
if( m_creature->IsWithinMeleeRange(m_creature->getVictim())) if( m_creature->IsWithinMeleeRange(m_creature->getVictim()))
{ DoCast(m_creature->getVictim(), SPELL_DARK_STRIKE);
DoCast(m_creature->getVictim(),SPELL_DARK_STRIKE);
}
} }
darkstrike_timer = 3000; DarkstrikeTimer = 3000;
} }
else darkstrike_timer -= diff; else DarkstrikeTimer -= diff;
} }
}; };
@@ -766,6 +741,7 @@ CreatureAI* GetAI_mob_shadow_image(Creature *_Creature)
void AddSC_boss_eredar_twins() void AddSC_boss_eredar_twins()
{ {
Script *newscript; Script *newscript;
newscript = new Script; newscript = new Script;
newscript->Name="boss_sacrolash"; newscript->Name="boss_sacrolash";
newscript->GetAI = &GetAI_boss_sacrolash; newscript->GetAI = &GetAI_boss_sacrolash;
@@ -781,4 +757,3 @@ void AddSC_boss_eredar_twins()
newscript->GetAI = &GetAI_mob_shadow_image; newscript->GetAI = &GetAI_mob_shadow_image;
newscript->RegisterSelf(); newscript->RegisterSelf();
} }
@@ -1,4 +1,4 @@
/* Copyright ?2006,2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> /* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
@@ -22,76 +22,77 @@ EndScriptData */
#include "precompiled.h" #include "precompiled.h"
#include "def_sunwell_plateau.h" #include "def_sunwell_plateau.h"
#include "Player.h"
// AURA enum Quotes
#define AURA_SUNWELL_RADIANCE 45769 {
#define AURA_NOXIOUS_FUMES 47002 YELL_BIRTH = -1580036,
// LAND PHASE SPELL YELL_KILL1 = -1580037,
#define SPELL_CLEAVE 19983 YELL_KILL2 = -1580038,
#define SPELL_CORROSION 45866 YELL_BREATH = -1580039,
#define SPELL_GAS_NOVA 45855 YELL_TAKEOFF = -1580040,
#define SPELL_ENCAPSULATE_CHANNEL 45661 YELL_BERSERK = -1580041,
#define SPELL_ENCAPSULATE_EFFECT 45665 YELL_DEATH = -1580042,
#define SPELL_ENCAPSULATE_AOE 45662 YELL_KALECGOS = -1580043 //after felmyst's death spawned and say this
// FLIGHT PHASE SPELL };
#define SPELL_VAPOR_SELECT 45391 // fel to player, force cast 45392, 50000y selete target
#define SPELL_VAPOR_SUMMON 45392 // player summon vapor, radius around caster, 5y,
#define SPELL_VAPOR_FORCE 45388 // vapor to fel, force cast 45389
#define SPELL_VAPOR_CHANNEL 45389 // fel to vapor, green beam channel
#define SPELL_VAPOR_TRIGGER 45411 // linked to 45389, vapor to self, trigger 45410 and 46931
#define SPELL_VAPOR_DAMAGE 46931 // vapor damage, 4000
#define SPELL_TRAIL_SUMMON 45410 // vapor summon trail
#define SPELL_TRAIL_TRIGGER 45399 // trail to self, trigger 45402
#define SPELL_TRAIL_DAMAGE 45402 // trail damage, 2000 + 2000 dot
#define SPELL_DEAD_SUMMON 45400 // summon blazing dead, 5min
#define SPELL_DEAD_PASSIVE 45415
#define SPELL_FOG_BREATH 45495 // fel to self, speed burst
#define SPELL_FOG_TRIGGER 45582 // fog to self, trigger 45782
#define SPELL_FOG_FORCE 45782 // fog to player, force cast 45714
#define SPELL_FOG_INFORM 45714 // player let fel cast 45717, script effect
#define SPELL_FOG_CHARM 45717 // fel to player
#define SPELL_FOG_CHARM2 45726 // link to 45717
#define SPELL_TRANSFORM_TRIGGER 44885 // madrigosa to self, trigger 46350 enum Spells
#define SPELL_TRANSFORM_VISUAL 46350 //46411stun? {
#define SPELL_TRANSFORM_FELMYST 45068 // become fel //Aura
#define SPELL_FELMYST_SUMMON 45069 AURA_SUNWELL_RADIANCE = 45769,
// OTHER AURA_NOXIOUS_FUMES = 47002,
#define SPELL_BERSERK 45078
#define SPELL_CLOUD_VISUAL 45212
#define SPELL_CLOUD_SUMMON 45884
//Creatures //Land phase
#define MOB_FELMYST 25038 SPELL_CLEAVE = 19983,
#define MOB_BRUTALLUS SPELL_CORROSION = 45866,
#define MOB_KALECGOS SPELL_GAS_NOVA = 45855,
#define MOB_DEAD 25268 SPELL_ENCAPSULATE_CHANNEL = 45661,
#define MOB_MADRIGOSA 25160 SPELL_ENCAPSULATE_EFFECT = 45665,
#define MOB_FELMYST_VISUAL 25041 SPELL_ENCAPSULATE_AOE = 45662,
#define MOB_FLIGHT_LEFT 25357
#define MOB_FLIGHT_RIGHT 25358
#define MOB_DEATH_CLOUD 25703
#define MOB_VAPOR 25265
#define MOB_VAPOR_TRAIL 25267
//Yells and Sounds //Flight phase
#define YELL_BIRTH "Glory to Kil'jaeden! Death to all who oppose!" SPELL_VAPOR_SELECT = 45391, // fel to player, force cast 45392, 50000y selete target
#define SOUND_BIRTH 12477 SPELL_VAPOR_SUMMON = 45392, // player summon vapor, radius around caster, 5y,
#define YELL_KILL1 "I kill for the master!" SPELL_VAPOR_FORCE = 45388, // vapor to fel, force cast 45389
#define SOUND_KILL1 12480 SPELL_VAPOR_CHANNEL = 45389, // fel to vapor, green beam channel
#define YELL_KILL2 "The end has come!" SPELL_VAPOR_TRIGGER = 45411, // linked to 45389, vapor to self, trigger 45410 and 46931
#define SOUND_KILL2 12481 SPELL_VAPOR_DAMAGE = 46931, // vapor damage, 4000
#define YELL_BREATH "Choke on your final breath!" SPELL_TRAIL_SUMMON = 45410, // vapor summon trail
#define SOUND_BREATH 12478 SPELL_TRAIL_TRIGGER = 45399, // trail to self, trigger 45402
#define YELL_TAKEOFF "I am stronger than ever before!" SPELL_TRAIL_DAMAGE = 45402, // trail damage, 2000 + 2000 dot
#define SOUND_TAKEOFF 12479 SPELL_DEAD_SUMMON = 45400, // summon blazing dead, 5min
#define YELL_BERSERK "No more hesitation! Your fates are written!" SPELL_DEAD_PASSIVE = 45415,
#define SOUND_BERSERK 12482 SPELL_FOG_BREATH = 45495, // fel to self, speed burst
#define YELL_DEATH "Kil'jaeden... will... prevail..." SPELL_FOG_TRIGGER = 45582, // fog to self, trigger 45782
#define SOUND_DEATH 12483 SPELL_FOG_FORCE = 45782, // fog to player, force cast 45714
SPELL_FOG_INFORM = 45714, // player let fel cast 45717, script effect
SPELL_FOG_CHARM = 45717, // fel to player
SPELL_FOG_CHARM2 = 45726, // link to 45717
#define YELL_KALECGOS "Madrigosa deserved a far better fate. You did what had to be done, but this battle is far from over." SPELL_TRANSFORM_TRIGGER = 44885, // madrigosa to self, trigger 46350
SPELL_TRANSFORM_VISUAL = 46350, //46411stun?
SPELL_TRANSFORM_FELMYST = 45068, // become fel
SPELL_FELMYST_SUMMON = 45069,
//Other
SPELL_BERSERK = 45078,
SPELL_CLOUD_VISUAL = 45212,
SPELL_CLOUD_SUMMON = 45884
};
enum Creatures
{
MOB_FELMYST = 25038,
//MOB_BRUTALLUS =
//MOB_KALECGOS =
MOB_DEAD = 25268,
MOB_MADRIGOSA = 25160,
MOB_FELMYST_VISUAL = 25041,
MOB_FLIGHT_LEFT = 25357,
MOB_FLIGHT_RIGHT = 25358,
MOB_DEATH_CLOUD = 25703,
MOB_VAPOR = 25265,
MOB_VAPOR_TRAIL = 25267
};
enum PhaseFelmyst enum PhaseFelmyst
{ {
@@ -125,10 +126,11 @@ static EventFelmyst MaxTimer[]=
struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
{ {
boss_felmystAI(Creature *c) : ScriptedAI(c) boss_felmystAI(Creature *c) : ScriptedAI(c){
{ pInstance = ((ScriptedInstance*)c->GetInstanceData());
// wait for core patch be accepted // wait for core patch be accepted
SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_ENCAPSULATE_EFFECT); /*SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_ENCAPSULATE_EFFECT);
if(TempSpell->SpellIconID == 2294) if(TempSpell->SpellIconID == 2294)
TempSpell->SpellIconID = 2295; TempSpell->SpellIconID = 2295;
TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_VAPOR_TRIGGER); TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_VAPOR_TRIGGER);
@@ -136,9 +138,10 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
TempSpell->Attributes |= SPELL_ATTR_PASSIVE; TempSpell->Attributes |= SPELL_ATTR_PASSIVE;
TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_FOG_CHARM2); TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_FOG_CHARM2);
if((TempSpell->Attributes & SPELL_ATTR_PASSIVE) == 0) if((TempSpell->Attributes & SPELL_ATTR_PASSIVE) == 0)
TempSpell->Attributes |= SPELL_ATTR_PASSIVE; TempSpell->Attributes |= SPELL_ATTR_PASSIVE;*/
} }
ScriptedInstance *pInstance;
PhaseFelmyst Phase; PhaseFelmyst Phase;
EventFelmyst Event; EventFelmyst Event;
uint32 Timer[EVENT_FLIGHT + 1]; uint32 Timer[EVENT_FLIGHT + 1];
@@ -155,21 +158,27 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
Timer[EVENT_BERSERK] = 600000; Timer[EVENT_BERSERK] = 600000;
FlightCount = 0; FlightCount = 0;
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10); m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
m_creature->SetFloatValue(UNIT_FIELD_COMBATREACH, 10); m_creature->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);
DespawnSummons(MOB_VAPOR_TRAIL); DespawnSummons(MOB_VAPOR_TRAIL);
m_creature->setActive(false); m_creature->setActive(false);
if(pInstance)
pInstance->SetData(DATA_FELMYST_EVENT, NOT_STARTED);
} }
void EnterCombat(Unit *who) void EnterCombat(Unit *who)
{ {
m_creature->setActive(true); m_creature->setActive(true);
DoZoneInCombat(); DoZoneInCombat();
m_creature->CastSpell(m_creature, AURA_SUNWELL_RADIANCE, true); m_creature->CastSpell(m_creature, AURA_SUNWELL_RADIANCE, true);
m_creature->CastSpell(m_creature, AURA_NOXIOUS_FUMES, true); m_creature->CastSpell(m_creature, AURA_NOXIOUS_FUMES, true);
EnterPhase(PHASE_GROUND); EnterPhase(PHASE_GROUND);
if(pInstance)
pInstance->SetData(DATA_FELMYST_EVENT, IN_PROGRESS);
} }
void AttackStart(Unit *who) void AttackStart(Unit *who)
@@ -188,21 +197,22 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
{ {
switch(rand()%2) switch(rand()%2)
{ {
case 0: case 0: DoScriptText(YELL_KILL1, m_creature); break;
DoYell(YELL_KILL1,LANG_UNIVERSAL, NULL); case 1: DoScriptText(YELL_KILL2, m_creature); break;
DoPlaySoundToSet(m_creature, SOUND_KILL1);
break;
case 1:
DoYell(YELL_KILL2,LANG_UNIVERSAL, NULL);
DoPlaySoundToSet(m_creature, SOUND_KILL2);
break;
} }
} }
void JustRespawned()
{
DoScriptText(YELL_BIRTH, m_creature);
}
void JustDied(Unit* Killer) void JustDied(Unit* Killer)
{ {
DoYell(YELL_DEATH, LANG_UNIVERSAL, NULL); DoScriptText(YELL_DEATH, m_creature);
DoPlaySoundToSet(m_creature, SOUND_DEATH);
if(pInstance)
pInstance->SetData(DATA_FELMYST_EVENT, DONE);
} }
void SpellHit(Unit *caster, const SpellEntry *spell) void SpellHit(Unit *caster, const SpellEntry *spell)
@@ -279,21 +289,26 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
switch(FlightCount) switch(FlightCount)
{ {
case 0: case 0:
m_creature->AttackStop(); //m_creature->AttackStop();
error_log("prevent fly phase");
m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->Clear(false);
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING); m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
m_creature->StopMoving(); m_creature->StopMoving();
DoYell(YELL_TAKEOFF, LANG_UNIVERSAL, NULL); DoScriptText(YELL_TAKEOFF, m_creature);
DoPlaySoundToSet(m_creature, SOUND_TAKEOFF);
Timer[EVENT_FLIGHT_SEQUENCE] = 2000; Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
break; break;
case 1: case 1:
error_log("Move to Fly point");
m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+1, m_creature->GetPositionY(), m_creature->GetPositionZ()+10); m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+1, m_creature->GetPositionY(), m_creature->GetPositionZ()+10);
Timer[EVENT_FLIGHT_SEQUENCE] = 0; Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break; break;
case 2: case 2:{
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true)) error_log("Summon Vapor case 2");
Unit* target;
target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
if(target)
{ {
Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000); Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
if(Vapor) if(Vapor)
@@ -305,11 +320,15 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
} }
}else EnterEvadeMode(); }else EnterEvadeMode();
Timer[EVENT_FLIGHT_SEQUENCE] = 10000; Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
break; break;}
case 3: case 3: {
DespawnSummons(MOB_VAPOR_TRAIL); DespawnSummons(MOB_VAPOR_TRAIL);
error_log("Summon Vapor case3");
//m_creature->CastSpell(m_creature, SPELL_VAPOR_SELECT); need core support //m_creature->CastSpell(m_creature, SPELL_VAPOR_SELECT); need core support
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true)) Unit* target;
target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
if(target)
{ {
//target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support //target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000); Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
@@ -322,13 +341,16 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
} }
}else EnterEvadeMode(); }else EnterEvadeMode();
Timer[EVENT_FLIGHT_SEQUENCE] = 10000; Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
break; break;}
case 4: case 4:
DespawnSummons(MOB_VAPOR_TRAIL); DespawnSummons(MOB_VAPOR_TRAIL);
Timer[EVENT_FLIGHT_SEQUENCE] = 1; Timer[EVENT_FLIGHT_SEQUENCE] = 1;
break; break;
case 5: case 5:{
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true)) Unit* target;
target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
if(target)
{ {
BreathX = target->GetPositionX(); BreathX = target->GetPositionX();
BreathY = target->GetPositionY(); BreathY = target->GetPositionY();
@@ -337,11 +359,11 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
m_creature->GetMotionMaster()->MovePoint(0, x, y, z+10); m_creature->GetMotionMaster()->MovePoint(0, x, y, z+10);
}else EnterEvadeMode(); }else EnterEvadeMode();
Timer[EVENT_FLIGHT_SEQUENCE] = 0; Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break; break;}
case 6: case 6:
m_creature->SetOrientation(m_creature->GetAngle(BreathX, BreathY)); m_creature->SetOrientation(m_creature->GetAngle(BreathX, BreathY));
m_creature->StopMoving(); m_creature->StopMoving();
DoTextEmote("takes a deep breath.", NULL); //DoTextEmote("takes a deep breath.", NULL);
Timer[EVENT_FLIGHT_SEQUENCE] = 10000; Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
break; break;
case 7: case 7:
@@ -413,10 +435,9 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
switch(Event) switch(Event)
{ {
case EVENT_BERSERK: case EVENT_BERSERK:
DoYell(YELL_BERSERK, LANG_UNIVERSAL, NULL); DoScriptText(YELL_BERSERK, m_creature);
DoPlaySoundToSet(m_creature, SOUND_BERSERK);
m_creature->CastSpell(m_creature, SPELL_BERSERK, true); m_creature->CastSpell(m_creature, SPELL_BERSERK, true);
Timer[EVENT_BERSERK] = 0; Timer[EVENT_BERSERK] = 10000;
break; break;
case EVENT_CLEAVE: case EVENT_CLEAVE:
m_creature->CastSpell(m_creature->getVictim(), SPELL_CLEAVE, false); m_creature->CastSpell(m_creature->getVictim(), SPELL_CLEAVE, false);
@@ -451,8 +472,7 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
switch(Event) switch(Event)
{ {
case EVENT_BERSERK: case EVENT_BERSERK:
DoYell(YELL_BERSERK, LANG_UNIVERSAL, NULL); DoScriptText(YELL_BERSERK, m_creature);
DoPlaySoundToSet(m_creature, SOUND_BERSERK);
m_creature->CastSpell(m_creature, SPELL_BERSERK, true); m_creature->CastSpell(m_creature, SPELL_BERSERK, true);
Timer[EVENT_BERSERK] = 0; Timer[EVENT_BERSERK] = 0;
break; break;
@@ -584,4 +604,3 @@ void AddSC_boss_felmyst()
newscript->GetAI = &GetAI_mob_felmyst_trail; newscript->GetAI = &GetAI_mob_felmyst_trail;
newscript->RegisterSelf(); newscript->RegisterSelf();
} }
@@ -24,70 +24,80 @@ EndScriptData */
#include "precompiled.h" #include "precompiled.h"
#include "def_sunwell_plateau.h" #include "def_sunwell_plateau.h"
//kalecgos dragon form enum Quotes
#define SAY_EVIL_AGGRO -1580000 {
#define SAY_EVIL_SPELL1 -1580001 //Kalecgos dragon form
#define SAY_EVIL_SPELL2 -1580002 SAY_EVIL_AGGRO = -1580000,
#define SAY_EVIL_SLAY1 -1580003 SAY_EVIL_SPELL1 = -1580001,
#define SAY_EVIL_SLAY2 -1580004 SAY_EVIL_SPELL2 = -1580002,
#define SAY_EVIL_ENRAGE -1580005 SAY_EVIL_SLAY1 = -1580003,
//kalecgos humanoid form SAY_EVIL_SLAY2 = -1580004,
#define SAY_GOOD_AGGRO -1580006 SAY_EVIL_ENRAGE = -1580005,
#define SAY_GOOD_NEAR_DEATH -1580007
#define SAY_GOOD_NEAR_DEATH2 -1580008
#define SAY_GOOD_PLRWIN -1580009
#define SAY_SATH_AGGRO -1580010 //Kalecgos humanoid form
#define SAY_SATH_DEATH -1580011 SAY_GOOD_AGGRO = -1580006,
#define SAY_SATH_SPELL1 -1580012 SAY_GOOD_NEAR_DEATH = -1580007,
#define SAY_SATH_SPELL2 -1580013 SAY_GOOD_NEAR_DEATH2 = -1580008,
#define SAY_SATH_SLAY1 -1580014 SAY_GOOD_PLRWIN = -1580009,
#define SAY_SATH_SLAY2 -1580015
#define SAY_SATH_ENRAGE -1580016
#define GO_FAILED "You are unable to use this currently." //Shattrowar
SAY_SATH_AGGRO = -1580010,
SAY_SATH_DEATH = -1580011,
SAY_SATH_SPELL1 = -1580012,
SAY_SATH_SPELL2 = -1580013,
SAY_SATH_SLAY1 = -1580014,
SAY_SATH_SLAY2 = -1580015,
SAY_SATH_ENRAGE = -1580016
};
#define FLY_X 1679 enum SpellIds
#define FLY_Y 900 {
#define FLY_Z 82 AURA_SUNWELL_RADIANCE = 45769,
AURA_SPECTRAL_EXHAUSTION = 44867,
AURA_SPECTRAL_REALM = 46021,
AURA_SPECTRAL_INVISIBILITY = 44801,
AURA_DEMONIC_VISUAL = 44800,
SPELL_SPECTRAL_BLAST = 44869,
SPELL_TELEPORT_SPECTRAL = 46019,
SPELL_ARCANE_BUFFET = 45018,
SPELL_FROST_BREATH = 44799,
SPELL_TAIL_LASH = 45122,
SPELL_BANISH = 44836,
SPELL_TRANSFORM_KALEC = 44670,
SPELL_ENRAGE = 44807,
SPELL_CORRUPTION_STRIKE = 45029,
SPELL_AGONY_CURSE = 45032,
SPELL_SHADOW_BOLT = 45031,
SPELL_HEROIC_STRIKE = 45026,
SPELL_REVITALIZE = 45027
};
enum Creatures
{
MOB_KALECGOS = 24850,
MOB_KALEC = 24891,
MOB_SATHROVARR = 24892
};
#define GO_FAILED "You are unable to use this currently."
#define FLY_X 1679
#define FLY_Y 900
#define FLY_Z 82
#define CENTER_X 1705 #define CENTER_X 1705
#define CENTER_Y 930 #define CENTER_Y 930
#define RADIUS 30 #define RADIUS 30
#define AURA_SUNWELL_RADIANCE 45769
#define AURA_SPECTRAL_EXHAUSTION 44867
#define AURA_SPECTRAL_REALM 46021
#define AURA_SPECTRAL_INVISIBILITY 44801
#define AURA_DEMONIC_VISUAL 44800
#define SPELL_SPECTRAL_BLAST 44869
#define SPELL_TELEPORT_SPECTRAL 46019
#define SPELL_ARCANE_BUFFET 45018
#define SPELL_FROST_BREATH 44799
#define SPELL_TAIL_LASH 45122
#define SPELL_BANISH 44836
#define SPELL_TRANSFORM_KALEC 44670
#define SPELL_ENRAGE 44807
#define SPELL_CORRUPTION_STRIKE 45029
#define SPELL_AGONY_CURSE 45032
#define SPELL_SHADOW_BOLT 45031
#define SPELL_HEROIC_STRIKE 45026
#define SPELL_REVITALIZE 45027
#define MOB_KALECGOS 24850
#define MOB_KALEC 24891
#define MOB_SATHROVARR 24892
#define DRAGON_REALM_Z 53.079 #define DRAGON_REALM_Z 53.079
#define DEMON_REALM_Z -74.558 #define DEMON_REALM_Z -74.558
uint32 WildMagic[]= { 44978, 45001, 45002, 45004, 45006, 45010 }; uint32 WildMagic[]= { 44978, 45001, 45002, 45004, 45006, 45010 };
struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI
{ {
boss_kalecgosAI(Creature *c) : ScriptedAI(c) boss_kalecgosAI(Creature *c) : ScriptedAI(c)
@@ -162,6 +172,9 @@ struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI
GameObject *Door = GameObject::GetGameObject(*m_creature, DoorGUID); GameObject *Door = GameObject::GetGameObject(*m_creature, DoorGUID);
if(Door) Door->SetLootState(GO_ACTIVATED); if(Door) Door->SetLootState(GO_ACTIVATED);
DoZoneInCombat(); DoZoneInCombat();
if(pInstance)
pInstance->SetData(DATA_KALECGOS_EVENT, IN_PROGRESS);
} }
void KilledUnit(Unit *victim) void KilledUnit(Unit *victim)
@@ -275,6 +288,9 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
ResetThreat = 1000; ResetThreat = 1000;
isEnraged = false; isEnraged = false;
isBanished = false; isBanished = false;
if(pInstance)
pInstance->SetData(DATA_KALECGOS_EVENT, NOT_STARTED);
} }
void EnterCombat(Unit* who) void EnterCombat(Unit* who)
@@ -325,6 +341,9 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
((boss_kalecgosAI*)((Creature*)Kalecgos)->AI())->TalkTimer = 1; ((boss_kalecgosAI*)((Creature*)Kalecgos)->AI())->TalkTimer = 1;
((boss_kalecgosAI*)((Creature*)Kalecgos)->AI())->isFriendly = true; ((boss_kalecgosAI*)((Creature*)Kalecgos)->AI())->isFriendly = true;
} }
if(pInstance)
pInstance->SetData(DATA_KALECGOS_EVENT, DONE);
} }
void TeleportAllPlayersBack() void TeleportAllPlayersBack()
@@ -437,8 +456,7 @@ struct TRINITY_DLL_DECL boss_kalecAI : public ScriptedAI
bool isEnraged; // if demon is enraged bool isEnraged; // if demon is enraged
boss_kalecAI(Creature *c) : ScriptedAI(c) boss_kalecAI(Creature *c) : ScriptedAI(c){
{
pInstance = ((ScriptedInstance*)c->GetInstanceData()); pInstance = ((ScriptedInstance*)c->GetInstanceData());
} }
@@ -671,4 +689,3 @@ void AddSC_boss_kalecgos()
newscript->pGOHello = &GOkalocegos_teleporter; newscript->pGOHello = &GOkalocegos_teleporter;
newscript->RegisterSelf(); newscript->RegisterSelf();
} }
File diff suppressed because it is too large Load Diff
@@ -1,27 +1,617 @@
/* Copyright (C) 2009 Trinity <http://www.trinitycore.org/> /* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* ScriptData /* ScriptData
SDName: Boss_Muru SDName: Boss_Muru
SD%Complete: 0 SD%Complete: 80
SDComment: Placeholer SDComment: all sounds, black hole effect triggers to often (46228)
SDCategory: Sunwell_Plateau */
EndScriptData */
#include "precompiled.h" #include "precompiled.h"
#include "def_sunwell_plateau.h"
// Muru & Entropius's spells
enum Spells
{
SPELL_ENRAGE = 26662,
// Muru's spells
SPELL_NEGATIVE_ENERGY = 46009, //(this trigger 46008)
SPELL_DARKNESS = 45999,
SPELL_OPEN_ALL_PORTALS = 46177,
SPELL_OPEN_PORTAL = 45977,
SPELL_OPEN_PORTAL_2 = 45976,
SPELL_SUMMON_BERSERKER = 46037,
SPELL_SUMNON_FURY_MAGE = 46038,
SPELL_SUMMON_VOID_SENTINEL = 45988,
SPELL_SUMMON_ENTROPIUS = 46217,
// Entropius's spells
SPELL_DARKNESS_E = 46269,
SPELL_BLACKHOLE = 46282,
SPELL_NEGATIVE_ENERGY_E = 46284,
SPELL_ENTROPIUS_SPAWN = 46223,
// Shadowsword Berserker's spells
SPELL_FLURRY = 46160,
SPELL_DUAL_WIELD = 29651,
// Shadowsword Fury Mage's spells
SPELL_FEL_FIREBALL = 46101,
SPELL_SPELL_FURY = 46102,
// Void Sentinel's spells
SPELL_SHADOW_PULSE = 46087,
SPELL_VOID_BLAST = 46161,
// Void Spawn's spells
SPELL_SHADOW_BOLT_VOLLEY = 46082,
//Dark Fiend Spells
SPELL_DARKFIEND_AOE = 45944,
SPELL_DARKFIEND_VISUAL = 45936,
SPELL_DARKFIEND_SKIN = 45934,
//Black Hole Spells
SPELL_BLACKHOLE_SPAWN = 46242,
SPELL_BLACKHOLE_GROW = 46228
};
enum Creatures
{
CREATURE_DARKNESS = 25879,
CREATURE_DARK_FIENDS = 25744,
CREATURE_BERSERKER = 25798,
CREATURE_FURY_MAGE = 25799,
CREATURE_VOID_SENTINEL = 25772,
CREATURE_VOID_SPAWN = 25824,
CREATURE_BLACK_HOLE = 25855,
BOSS_MURU = 25741,
BOSS_ENTROPIUS = 25840
};
enum BossTimers{
TIMER_DARKNESS = 0,
TIMER_HUMANOIDES = 1,
TIMER_PHASE = 2,
TIMER_SENTINEL = 3
};
float DarkFiends[8][4] =
{
{1819.9, 609.80, 69.74, 1.94},
{1829.39, 617.89, 69.73, 2.61},
{1801.98, 633.62, 69.74, 5.71},
{1830.88, 629.99, 69.73, 3.52},
{1800.38, 621.41, 69.74, 0.22},
{1808.3 , 612.45, 69.73, 1.02},
{1823.9 , 639.69, 69.74, 4.12},
{1811.85, 640.46, 69.73, 4.97}
};
float Humanoides[6][5] =
{
{CREATURE_FURY_MAGE, 1780.16, 666.83, 71.19, 5.21},
{CREATURE_FURY_MAGE, 1847.93, 600.30, 71.30, 2.57},
{CREATURE_BERSERKER, 1779.97, 660.64, 71.19, 5.28},
{CREATURE_BERSERKER, 1786.2 , 661.01, 71.19, 4.51},
{CREATURE_BERSERKER, 1845.17, 602.63, 71.28, 2.43},
{CREATURE_BERSERKER, 1842.91, 599.93, 71.23, 2.44}
};
uint32 EnrageTimer = 600000;
struct TRINITY_DLL_DECL boss_entropiusAI : public ScriptedAI
{
boss_entropiusAI(Creature *c) : ScriptedAI(c), Summons(m_creature){
pInstance = ((ScriptedInstance*)c->GetInstanceData());
Combat = false;
}
ScriptedInstance* pInstance;
SummonList Summons;
bool Combat;
uint32 BlackHoleSummonTimer;
void Reset() {
if (!Combat){
BlackHoleSummonTimer = 15000;
DoCastAOE(SPELL_NEGATIVE_ENERGY_E, false);
}else{
if(pInstance)
pInstance->SetData(DATA_MURU_EVENT, NOT_STARTED);
Summons.DespawnAll();
}
}
void Aggro(Unit *who) {
DoCastAOE(SPELL_NEGATIVE_ENERGY_E, true);
DoCast(m_creature, SPELL_ENTROPIUS_SPAWN, false);
}
void JustSummoned(Creature* summoned)
{
switch(summoned->GetEntry()){
case CREATURE_DARK_FIENDS:
summoned->CastSpell(summoned,SPELL_DARKFIEND_VISUAL,false);
break;
case CREATURE_DARKNESS:
summoned->addUnitState(UNIT_STAT_STUNNED);
float x,y,z,o;
summoned->GetHomePosition(x,y,z,o);
m_creature->SummonCreature(CREATURE_DARK_FIENDS, x,y,z,o, TEMPSUMMON_CORPSE_DESPAWN, 0);
break;
}
summoned->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM,0, 50, true));
Summons.Summon(summoned);
}
void KilledUnit(Unit* victim){
}
void JustDied(Unit* killer){
if(pInstance)pInstance->SetData(DATA_MURU_EVENT, DONE);
Summons.DespawnAll();
}
void UpdateAI(const uint32 diff)
{
if(!UpdateVictim())
return;
if(!Combat)Combat = true;
if(EnrageTimer < diff && !m_creature->HasAura(SPELL_ENRAGE, 0)){
DoCast(m_creature,SPELL_ENRAGE, false);
}else EnrageTimer -= diff;
if(BlackHoleSummonTimer < diff){
Unit* random = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
if(!random)return;
DoCast(random, SPELL_DARKNESS_E, false);
random = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true);
if(!random)return;
random->CastSpell(random, SPELL_BLACKHOLE, false);
BlackHoleSummonTimer = 15000;
}else BlackHoleSummonTimer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_boss_entropius(Creature *_Creature)
{
return new boss_entropiusAI (_Creature);
}
struct TRINITY_DLL_DECL boss_muruAI : public Scripted_NoMovementAI
{
boss_muruAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature){
pInstance = ((ScriptedInstance*)c->GetInstanceData());
}
ScriptedInstance* pInstance;
SummonList Summons;
uint8 Phase;
uint32 Timer[4];
bool DarkFiend;
void Reset()
{
DarkFiend = false;
Phase = 1;
EnrageTimer = 600000;
Timer[TIMER_DARKNESS] = 45000;
Timer[TIMER_HUMANOIDES] = 10000;
Timer[TIMER_PHASE] = 2000;
Timer[TIMER_SENTINEL] = 31500;
Summons.DespawnAll();
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->SetVisibility(VISIBILITY_ON);
if(pInstance)
pInstance->SetData(DATA_MURU_EVENT, NOT_STARTED);
}
void Aggro(Unit *who)
{
if(pInstance)
pInstance->SetData(DATA_MURU_EVENT, IN_PROGRESS);
DoCastAOE(SPELL_NEGATIVE_ENERGY,false);
}
void KilledUnit(Unit* victim){}
void DamageTaken(Unit *done_by, uint32 &damage) {
if(damage > m_creature->GetHealth() && Phase == 1){
damage = 0;
Phase = 2;
m_creature->RemoveAllAuras();
DoCast(m_creature, SPELL_OPEN_ALL_PORTALS, false);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
if(Phase > 1 && Phase < 4)damage = 0;
}
void JustSummoned(Creature* summoned)
{
switch(summoned->GetEntry()){
case BOSS_ENTROPIUS:
m_creature->SetVisibility(VISIBILITY_OFF);
break;
case CREATURE_DARK_FIENDS:
summoned->CastSpell(summoned,SPELL_DARKFIEND_VISUAL,false);
break;
}
summoned->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM,0, 50, true));
Summons.Summon(summoned);
}
void UpdateAI(const uint32 diff)
{
if(!UpdateVictim())
return;
if(Phase == 3){
if(Timer[TIMER_PHASE] <diff){
switch(pInstance->GetData(DATA_MURU_EVENT)){
case NOT_STARTED:
Reset();
break;
case DONE:
Phase = 4;
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
m_creature->RemoveCorpse();
break;
}
Timer[TIMER_PHASE] = 3000;
}else Timer[TIMER_PHASE] -= diff;
return;
}
if (EnrageTimer < diff && !m_creature->HasAura(SPELL_ENRAGE, 0))
DoCast(m_creature, SPELL_ENRAGE, false);
else EnrageTimer -= diff;
for (uint8 i = 0; i < 4; ++i){
if(Timer[i] < diff){
switch(i){
case TIMER_DARKNESS:
if(!DarkFiend){
DoCastAOE(SPELL_DARKNESS, false);
Timer[TIMER_DARKNESS] = 3000;
DarkFiend = true;
}else{
DarkFiend = false;
for(uint8 i = 0; i < 8; ++i)
m_creature->SummonCreature(CREATURE_DARK_FIENDS,DarkFiends[i][0],DarkFiends[i][1],DarkFiends[i][2], DarkFiends[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
Timer[TIMER_DARKNESS] = 42000;
}
break;
case TIMER_HUMANOIDES:
for(uint8 i = 0; i < 6; ++i)
m_creature->SummonCreature(Humanoides[i][0],Humanoides[i][1],Humanoides[i][2],Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0);
Timer[TIMER_HUMANOIDES] = 60000;
break;
case TIMER_PHASE:
m_creature->RemoveAllAuras();
DoCast(m_creature, SPELL_SUMMON_ENTROPIUS, false);
Timer[TIMER_PHASE] = 3000;
Phase = 3;
return;
case TIMER_SENTINEL:
DoCastAOE(SPELL_OPEN_PORTAL_2, false);
Timer[TIMER_SENTINEL] = 30000;
break;
}break;}
}
//Timer
for(uint8 i = 0; i < 4; ++i){
if(i != TIMER_PHASE)Timer[i] -= diff;
else if(Phase == 2) Timer[i] -= diff;
}
}
};
CreatureAI* GetAI_boss_muru(Creature *_Creature)
{
return new boss_muruAI (_Creature);
}
struct TRINITY_DLL_DECL npc_muru_portalAI : public Scripted_NoMovementAI
{
npc_muru_portalAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature){
pInstance = ((ScriptedInstance*)c->GetInstanceData());
}
ScriptedInstance* pInstance;
SummonList Summons;
Creature* Muru;
bool SummonSentinel;
bool InAction;
uint32 SummonTimer;
void Reset(){
m_creature->addUnitState(UNIT_STAT_STUNNED);
SummonTimer = 5000;
InAction = false;
SummonSentinel = false;
Summons.DespawnAll();
}
void Aggro(Unit *who) {}
void JustSummoned(Creature* summoned){
Player* Target;
Target = (Player*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID)));
if(Target)summoned->AI()->AttackStart(Target);
Summons.Summon(summoned);
}
void SpellHit(Unit* caster, const SpellEntry* Spell){
float x,y,z,o;
m_creature->GetHomePosition(x,y,z,o);
DoTeleportTo(x,y,z);
InAction = true;
switch(Spell->Id){
case SPELL_OPEN_ALL_PORTALS:
DoCastAOE(SPELL_OPEN_PORTAL, false);
break;
case SPELL_OPEN_PORTAL_2:
DoCastAOE(SPELL_OPEN_PORTAL, false);
SummonSentinel = true;
break;
}
}
void UpdateAI(const uint32 diff){
if(!SummonSentinel){
if(InAction && pInstance->GetData(DATA_MURU_EVENT) == NOT_STARTED)Reset();
return;
}
if(SummonTimer < diff){
DoCastAOE(SPELL_SUMMON_VOID_SENTINEL, false);
SummonTimer = 5000;
SummonSentinel = false;
}else SummonTimer -= diff;
}
};
CreatureAI* GetAI_npc_muru_portal(Creature *_Creature)
{
return new npc_muru_portalAI (_Creature);
}
struct TRINITY_DLL_DECL npc_dark_fiendAI : public ScriptedAI
{
npc_dark_fiendAI(Creature *c) : ScriptedAI(c){
pInstance = ((ScriptedInstance*)c->GetInstanceData());
}
ScriptedInstance* pInstance;
bool InAction;
uint32 WaitTimer;
void Reset() {
WaitTimer = 2000;
InAction = false;
m_creature->addUnitState(UNIT_STAT_STUNNED);
};
void Aggro(Unit *who) {}
void SpellHit(Unit* caster, const SpellEntry* Spell){
for(uint8 i = 0; i < 3; ++i)
if(Spell->Effect[i] == 38){
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
m_creature->RemoveCorpse();
}
}
void UpdateAI(const uint32 diff)
{
if(!UpdateVictim())
return;
if (WaitTimer < diff)
if(!InAction){
m_creature->clearUnitState(UNIT_STAT_STUNNED);
DoCastAOE(SPELL_DARKFIEND_SKIN, false);
AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true));
InAction = true;
WaitTimer = 500;
}else{
if(m_creature->GetDistance(m_creature->getVictim()) < 5){
DoCastAOE(SPELL_DARKFIEND_AOE, false);
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
m_creature->RemoveCorpse();
}
WaitTimer = 500;
}
else WaitTimer -= diff;
}
};
CreatureAI* GetAI_npc_dark_fiend(Creature *_Creature)
{
return new npc_dark_fiendAI (_Creature);
}
struct TRINITY_DLL_DECL npc_void_sentinelAI : public ScriptedAI
{
npc_void_sentinelAI(Creature *c) : ScriptedAI(c){
pInstance = ((ScriptedInstance*)c->GetInstanceData());
}
ScriptedInstance* pInstance;
uint32 PulseTimer;
uint32 VoidBlastTimer;
void Reset() {
PulseTimer = 3000;
VoidBlastTimer = 45000; //is this a correct timer?
float x,y,z,o;
m_creature->GetHomePosition(x,y,z,o);
DoTeleportTo(x,y,71);
};
void Aggro(Unit *who) {}
void JustDied(Unit* killer){
for (uint8 i = 0; i < 8; ++i){
m_creature->SummonCreature(CREATURE_VOID_SPAWN, m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(), rand()%6, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
}
}
void UpdateAI(const uint32 diff)
{
if(!UpdateVictim())
return;
if(PulseTimer < diff){
DoCastAOE(SPELL_SHADOW_PULSE, true);
PulseTimer = 3000;
}else PulseTimer -= diff;
if(VoidBlastTimer < diff){
DoCast(m_creature->getVictim(), SPELL_VOID_BLAST, false);
VoidBlastTimer = 45000;
}else VoidBlastTimer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_npc_void_sentinel(Creature *_Creature)
{
return new npc_void_sentinelAI (_Creature);
}
struct TRINITY_DLL_DECL npc_blackholeAI : public ScriptedAI
{
npc_blackholeAI(Creature *c) : ScriptedAI(c){
pInstance = ((ScriptedInstance*)c->GetInstanceData());
}
ScriptedInstance* pInstance;
uint32 DespawnTimer;
uint32 SpellTimer;
uint8 Phase;
uint8 NeedForAHack;
void Reset(){
DespawnTimer = 15000;
SpellTimer = 5000;
Phase = 0;
m_creature->addUnitState(UNIT_STAT_STUNNED);
DoCastAOE(SPELL_BLACKHOLE_SPAWN, true);
}
void Aggro(Unit *who) {}
void UpdateAI(const uint32 diff)
{
if(SpellTimer < diff){
Unit* Victim = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
switch(NeedForAHack){
case 0:
m_creature->clearUnitState(UNIT_STAT_STUNNED);
DoCastAOE(SPELL_BLACKHOLE_GROW, false);
if(Victim)AttackStart(Victim);
SpellTimer = 700;
NeedForAHack = 2;
break;
case 1:
m_creature->AddAura(SPELL_BLACKHOLE_GROW, m_creature);
NeedForAHack = 2;
SpellTimer = 600;
break;
case 2:
SpellTimer = 400;
NeedForAHack = 3;
m_creature->RemoveAura(SPELL_BLACKHOLE_GROW, 1);
break;
case 3:
SpellTimer = 400+rand()%500;
NeedForAHack = 1;
Unit* Temp = m_creature->getVictim();
if(!Temp) return;
if(Temp->GetPositionZ() > 73 && Victim)
AttackStart(Victim);
}
}else SpellTimer -= diff;
if (DespawnTimer < diff){
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
m_creature->RemoveCorpse();
}else DespawnTimer -= diff;
}
};
CreatureAI* GetAI_npc_blackhole(Creature *_Creature)
{
return new npc_blackholeAI (_Creature);
}
void AddSC_boss_muru() void AddSC_boss_muru()
{}; {
Script *newscript;
newscript = new Script;
newscript->Name="boss_muru";
newscript->GetAI = &GetAI_boss_muru;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="boss_entropius";
newscript->GetAI = &GetAI_boss_entropius;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="npc_muru_portal";
newscript->GetAI = &GetAI_npc_muru_portal;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="npc_dark_fiend";
newscript->GetAI = &GetAI_npc_dark_fiend;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="npc_void_sentinel";
newscript->GetAI = &GetAI_npc_void_sentinel;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="npc_blackhole";
newscript->GetAI = &GetAI_npc_blackhole;
newscript->RegisterSelf();
}
@@ -6,36 +6,38 @@
#define DEF_SUNWELLPLATEAU_H #define DEF_SUNWELLPLATEAU_H
/*** Encounters ***/ /*** Encounters ***/
#define DATA_KALECGOS_EVENT 0 #define DATA_KALECGOS_EVENT 1
#define DATA_BRUTALLUS_EVENT 1 #define DATA_BRUTALLUS_EVENT 2
#define DATA_FELMYST_EVENT 2 #define DATA_FELMYST_EVENT 3
#define DATA_EREDAR_TWINS_EVENT 3 #define DATA_EREDAR_TWINS_EVENT 4
#define DATA_MURU_EVENT 4 #define DATA_MURU_EVENT 5
#define DATA_KILJAEDEN_EVENT 5 #define DATA_KILJAEDEN_EVENT 6
/*** Creatures ***/ /*** Creatures ***/
#define DATA_KALECGOS_DRAGON 6 #define DATA_KALECGOS_DRAGON 7
#define DATA_KALECGOS_HUMAN 7 #define DATA_KALECGOS_HUMAN 8
#define DATA_SATHROVARR 8 #define DATA_SATHROVARR 9
#define DATA_BRUTALLUS 9 #define DATA_BRUTALLUS 10
#define DATA_MADRIGOSA 24 #define DATA_MADRIGOSA 11
#define DATA_FELMYST 10 #define DATA_FELMYST 12
#define DATA_ALYTHESS 11 #define DATA_ALYTHESS 13
#define DATA_SACROLASH 12 #define DATA_SACROLASH 14
#define DATA_MURU 13 #define DATA_MURU 15
#define DATA_KILJAEDEN 14 #define DATA_KILJAEDEN 16
#define DATA_KILJAEDEN_CONTROLLER 15 #define DATA_KILJAEDEN_CONTROLLER 17
#define DATA_ANVEENA 16 #define DATA_ANVEENA 18
#define DATA_KALECGOS_KJ 19
/*** GameObjects ***/ /*** GameObjects ***/
#define DATA_GO_FORCEFIELD 17 #define DATA_GO_FORCEFIELD 20
#define DATA_GO_FIRE_BARRIER 18 #define DATA_GO_FIRE_BARRIER 21
#define DATA_GATE_1 19 #define DATA_GATE_1 22
#define DATA_GATE_2 20 #define DATA_GATE_2 23
#define DATA_GATE_3 21 #define DATA_GATE_3 24
#define DATA_GATE_4 22 #define DATA_GATE_4 25
#define DATA_GATE_5 23 #define DATA_GATE_5 26
/*** Misc ***/ /*** Misc ***/
#define DATA_PLAYER_GUID 27
#endif #endif
@@ -4,8 +4,8 @@
/* ScriptData /* ScriptData
SDName: Instance_Sunwell_Plateau SDName: Instance_Sunwell_Plateau
SD%Complete: 0 SD%Complete: 20
SDComment: VERIFY SCRIPT SDComment: VERIFY SCRIPT, rename Gates
SDCategory: Sunwell_Plateau SDCategory: Sunwell_Plateau
EndScriptData */ EndScriptData */
@@ -14,6 +14,11 @@ EndScriptData */
#define ENCOUNTERS 6 #define ENCOUNTERS 6
enum GoState{
CLOSE = 1,
OPEN = 0
};
/* Sunwell Plateau: /* Sunwell Plateau:
0 - Kalecgos and Sathrovarr 0 - Kalecgos and Sathrovarr
1 - Brutallus 1 - Brutallus
@@ -42,6 +47,7 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
uint64 KilJaeden; uint64 KilJaeden;
uint64 KilJaedenController; uint64 KilJaedenController;
uint64 Anveena; uint64 Anveena;
uint64 KalecgosKJ;
/** GameObjects **/ /** GameObjects **/
uint64 ForceField; // Kalecgos Encounter uint64 ForceField; // Kalecgos Encounter
@@ -67,6 +73,7 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
KilJaeden = 0; KilJaeden = 0;
KilJaedenController = 0; KilJaedenController = 0;
Anveena = 0; Anveena = 0;
KalecgosKJ = 0;
/*** GameObjects ***/ /*** GameObjects ***/
ForceField = 0; ForceField = 0;
@@ -94,6 +101,38 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
return false; return false;
} }
Player* GetPlayerInMap()
{
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
{
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
Player* plr = itr->getSource();
if (plr && !plr->HasAura(45839,0))
return plr;
}
}
debug_log("TSCR: Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
void HandleGameObject(uint64 guid, uint32 state)
{
Player *player = GetPlayerInMap();
if (!player || !guid)
{
debug_log("TSCR: Sunwell Plateau: HandleGameObject fail");
return;
}
if (GameObject *go = GameObject::GetGameObject(*player,guid))
go->SetGoState(state);
}
void OnCreatureCreate(Creature* creature, uint32 entry) void OnCreatureCreate(Creature* creature, uint32 entry)
{ {
switch(entry) switch(entry)
@@ -110,6 +149,7 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
case 25315: KilJaeden = creature->GetGUID(); break; case 25315: KilJaeden = creature->GetGUID(); break;
case 25608: KilJaedenController = creature->GetGUID(); break; case 25608: KilJaedenController = creature->GetGUID(); break;
case 26046: Anveena = creature->GetGUID(); break; case 26046: Anveena = creature->GetGUID(); break;
case 25319: KalecgosKJ = creature->GetGUID(); break;
} }
} }
@@ -158,6 +198,11 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
case DATA_KILJAEDEN: return KilJaeden; break; case DATA_KILJAEDEN: return KilJaeden; break;
case DATA_KILJAEDEN_CONTROLLER: return KilJaedenController; break; case DATA_KILJAEDEN_CONTROLLER: return KilJaedenController; break;
case DATA_ANVEENA: return Anveena; break; case DATA_ANVEENA: return Anveena; break;
case DATA_KALECGOS_KJ: return KalecgosKJ; break;
case DATA_PLAYER_GUID:
Player* Target = GetPlayerInMap();
return Target->GetGUID();
break;
} }
return 0; return 0;
@@ -169,11 +214,32 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
{ {
case DATA_KALECGOS_EVENT: Encounters[0] = data; break; case DATA_KALECGOS_EVENT: Encounters[0] = data; break;
case DATA_BRUTALLUS_EVENT: Encounters[1] = data; break; case DATA_BRUTALLUS_EVENT: Encounters[1] = data; break;
case DATA_FELMYST_EVENT: Encounters[2] = data; break; case DATA_FELMYST_EVENT:
if(data == DONE)
HandleGameObject(FireBarrier, 1);
Encounters[2] = data; break;
case DATA_EREDAR_TWINS_EVENT: Encounters[3] = data; break; case DATA_EREDAR_TWINS_EVENT: Encounters[3] = data; break;
case DATA_MURU_EVENT: Encounters[4] = data; break; case DATA_MURU_EVENT:
switch(data){
case DONE:
HandleGameObject(Gate[4], OPEN);
HandleGameObject(Gate[3], OPEN);
break;
case IN_PROGRESS:
HandleGameObject(Gate[4], CLOSE);
HandleGameObject(Gate[3], CLOSE);
break;
case NOT_STARTED:
HandleGameObject(Gate[4], CLOSE);
HandleGameObject(Gate[3], OPEN);
break;
}
Encounters[4] = data; break;
case DATA_KILJAEDEN_EVENT: Encounters[5] = data; break; case DATA_KILJAEDEN_EVENT: Encounters[5] = data; break;
} }
if(data == DONE)
SaveToDB();
} }
void SetData64(uint32 id, uint64 guid) void SetData64(uint32 id, uint64 guid)
@@ -183,6 +249,41 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
void Update(uint32 diff) void Update(uint32 diff)
{ {
} }
const char* Save()
{
OUT_SAVE_INST_DATA;
std::ostringstream stream;
stream << Encounters[0] << " " << Encounters[1] << " " << Encounters[2] << " " << Encounters[3] << " "
<< Encounters[4] << " " << Encounters[5];
char* out = new char[stream.str().length() + 1];
strcpy(out, stream.str().c_str());
if(out)
{
OUT_SAVE_INST_DATA_COMPLETE;
return out;
}
return NULL;
}
void Load(const char* in)
{
if(!in)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(in);
std::istringstream stream(in);
stream >> Encounters[0] >> Encounters[1] >> Encounters[2] >> Encounters[3]
>> Encounters[4] >> Encounters[5];
for(uint8 i = 0; i < ENCOUNTERS; ++i)
if(Encounters[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
Encounters[i] = NOT_STARTED;
OUT_LOAD_INST_DATA_COMPLETE;
}
}; };
InstanceData* GetInstanceData_instance_sunwell_plateau(Map* map) InstanceData* GetInstanceData_instance_sunwell_plateau(Map* map)
@@ -15,13 +15,52 @@
*/ */
/* ScriptData /* ScriptData
SDName: sunwell_plateau SDName: Sunwell_Plateau
SD%Complete: 0 SD%Complete: 0
SDComment: Placeholer SDComment: Placeholder, Epilogue after Kil'jaeden, Captain Selana Gossips
SDCategory: Sunwell_Plateau
EndScriptData */ EndScriptData */
/* ContentData
npc_prophet_velen
npc_captain_selana
EndContentData */
#include "precompiled.h" #include "precompiled.h"
#include "def_sunwell_plateau.h"
/*######
## npc_prophet_velen
######*/
enum ProphetSpeeches
{
PROPHET_SAY1 = -1580099,
PROPHET_SAY2 = -1580100,
PROPHET_SAY3 = -1580101,
PROPHET_SAY4 = -1580102,
PROPHET_SAY5 = -1580103,
PROPHET_SAY6 = -1580104,
PROPHET_SAY7 = -1580105,
PROPHET_SAY8 = -1580106
};
enum LiadrinnSpeeches
{
LIADRIN_SAY1 = -1580107,
LIADRIN_SAY2 = -1580108,
LIADRIN_SAY3 = -1580109
};
/*######
## npc_captain_selana
######*/
#define CS_GOSSIP1 "Give me a situation report, Captain."
#define CS_GOSSIP2 "What went wrong?"
#define CS_GOSSIP3 "Why did they stop?"
#define CS_GOSSIP4 "Your insight is appreciated."
void AddSC_sunwell_plateau() void AddSC_sunwell_plateau()
{}; {
}
+3
View File
@@ -17251,6 +17251,9 @@ void Player::ProhibitSpellScholl(SpellSchoolMask idSchoolMask, uint32 unTimeMs )
if (spellInfo->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE) if (spellInfo->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
continue; continue;
if(spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE)
continue;
if((idSchoolMask & GetSpellSchoolMask(spellInfo)) && GetSpellCooldownDelay(unSpellId) < unTimeMs ) if((idSchoolMask & GetSpellSchoolMask(spellInfo)) && GetSpellCooldownDelay(unSpellId) < unTimeMs )
{ {
data << unSpellId; data << unSpellId;
+4 -3
View File
@@ -1410,9 +1410,10 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin
if(cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS) if(cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS)
break; break;
while(!cur->IsWithinLOSInMap(*next) while(m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE
|| m_spellInfo->DmgClass==SPELL_DAMAGE_CLASS_MELEE && !m_caster->isInFront(*next, max_range)
&& !m_caster->isInFront(*next, max_range)) || !m_caster->canSeeOrDetect(*next, false)
|| !cur->IsWithinLOSInMap(*next))
{ {
++next; ++next;
if(next == tempUnitMap.end() || cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS) if(next == tempUnitMap.end() || cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS)
+11
View File
@@ -4789,6 +4789,17 @@ void Spell::EffectScriptEffect(uint32 effIndex)
unitTarget->CastSpell(unitTarget, 44870, true); unitTarget->CastSpell(unitTarget, 44870, true);
break; break;
} }
// spell of Brutallus - Stomp
case 45185:
{
if(!unitTarget)
return;
if(unitTarget->HasAura(46394)) // spell of Brutallus - Burn
unitTarget->RemoveAurasDueToSpell(46394);
break;
}
// Negative Energy // Negative Energy
case 46289: case 46289:
{ {
+2 -4
View File
@@ -60,12 +60,10 @@ GM_Ticket* TicketMgr::GetGMTicketByName(const char* name)
if(!normalizePlayerName(pname)) if(!normalizePlayerName(pname))
return NULL; return NULL;
Player *plr = objmgr.GetPlayer(pname.c_str()); uint64 playerGuid = objmgr.GetPlayerGUIDByName(pname.c_str());
if(!plr) if(!playerGuid)
return NULL; return NULL;
uint64 playerGuid = plr->GetGUID();
for(GmTicketList::iterator i = GM_TicketList.begin(); i != GM_TicketList.end();) for(GmTicketList::iterator i = GM_TicketList.begin(); i != GM_TicketList.end();)
{ {
if((*i)->playerGuid == playerGuid && (*i)->closed == 0) if((*i)->playerGuid == playerGuid && (*i)->closed == 0)