diff options
| -rw-r--r-- | sql/updates/world/2013_01_02_05_eye_of_eternity.sql | 27 | ||||
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | 142 |
4 files changed, 89 insertions, 94 deletions
diff --git a/sql/updates/world/2013_01_02_05_eye_of_eternity.sql b/sql/updates/world/2013_01_02_05_eye_of_eternity.sql new file mode 100644 index 00000000000..89cc8f08cce --- /dev/null +++ b/sql/updates/world/2013_01_02_05_eye_of_eternity.sql @@ -0,0 +1,27 @@ +-- Add missing text and update old one +-- Malygos +UPDATE `creature_text` SET `probability`=100 WHERE `entry`=28859; -- Was at 0 for some reason +UPDATE `creature_text` SET `text`='Unthinkable! The mortals will destroy... everything! My sister, what have you...',`sound`=14540 WHERE `entry`=28859 AND `groupid`=14 AND `id`=0; +DELETE FROM `creature_text` WHERE `entry`=28859 AND `groupid` IN (15,16); +DELETE FROM `creature_text` WHERE `entry`=30084; +INSERT INTO `creature_text` (`entry`,`groupid`,`text`,`type`,`probability`,`sound`,`comment`) VALUES +(28859,15, '%s fixes his eyes on you!', 42,100,0, 'Malygos'), +(28859,16, 'I am without limits here. The rules of your cherished reality do not apply. In this realm, I am in control!',14,100,14515, 'Malygos'), +(30084,0, 'A Power Spark forms from a nearby rift!',41,100,14522, 'Power spark to portal'); +-- Alexstrasza, add missing sounds +UPDATE `creature_text` SET `probability`=100,`sound`=14406 WHERE `entry`=32295 AND `groupid`=0 AND `id`=0; +UPDATE `creature_text` SET `probability`=100,`sound`=14407 WHERE `entry`=32295 AND `groupid`=1 AND `id`=0; +UPDATE `creature_text` SET `probability`=100,`sound`=14408 WHERE `entry`=32295 AND `groupid`=2 AND `id`=0; +UPDATE `creature_text` SET `probability`=100,`sound`=14409 WHERE `entry`=32295 AND `groupid`=3 AND `id`=0; + +-- Update portal InhabitType, otherwise it falls on summon +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=30118; + +-- Update drakes templates +UPDATE `creature_template` SET `unit_flags`=8,`InhabitType`=4 WHERE `entry`=30161; -- no fly aura present only enabled gravity in sniffs + +-- Addon data +DELETE FROM `creature_template_addon` WHERE `entry` IN (30084,30161); +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(30084,0,0,50331648,1,0,'55845'), -- Power Spark +(30161,0,0,50331648,1,0,'60534'); -- Wyrmrest Skytalon (uses no fly aura) diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index b5cabba8929..d018747aa71 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -910,8 +910,16 @@ bool Aura::CanBeSaved() const // Incanter's Absorbtion - considering the minimal duration and problems with aura stacking // we skip saving this aura - if (GetId() == 44413) - return false; + // Also for some reason other auras put as MultiSlot crash core on keeping them after restart, + // so put here only these for which you are sure they get removed + switch (GetId()) + { + case 44413: // Incanter's Absorption + case 40075: // Fel Flak Fire + case 55849: // Power Spark + return false; + break; + } // don't save auras removed by proc system if (IsUsingCharges() && !GetCharges()) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 06c861bd388..a8c0ca06efe 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1027,7 +1027,7 @@ bool SpellInfo::IsPassiveStackableWithRanks() const bool SpellInfo::IsMultiSlotAura() const { - return IsPassive() || Id == 40075 || Id == 44413; // No other way to make 40075 have more than 1 copy of aura + return IsPassive() || Id == 55849 || Id == 40075 || Id == 44413; // Power Spark, Fel Flak Fire, Incanter's Absorption } bool SpellInfo::IsDeathPersistent() const diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index 85414e3808c..fcbc87ad47d 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -35,10 +35,13 @@ Script Data End */ #include "eye_of_eternity.h" #include "ScriptedEscortAI.h" #include "Player.h" +#include "Vehicle.h" +#include "CombatAI.h" +#include "CreatureTextMgr.h" enum Achievements { - ACHIEV_TIMED_START_EVENT = 20387, + ACHIEV_TIMED_START_EVENT = 20387, }; enum Events @@ -132,25 +135,36 @@ enum MalygosEvents #define TEN_MINUTES 600000 -enum MalygosSays +enum Texts { - SAY_AGGRO_P_ONE, - SAY_KILLED_PLAYER_P_ONE, - SAY_END_P_ONE, - SAY_AGGRO_P_TWO, - SAY_ANTI_MAGIC_SHELL, // not sure when execute it - SAY_MAGIC_BLAST, // not sure when execute it - SAY_KILLED_PLAYER_P_TWO, - SAY_END_P_TWO, - SAY_INTRO_P_THREE, - SAY_AGGRO_P_THREE, - SAY_SURGE_POWER, // not sure when execute it - SAY_BUFF_SPARK, - SAY_KILLED_PLAYER_P_THREE, - SAY_SPELL_CASTING_P_THREE, - SAY_DEATH + // Malygos + SAY_AGGRO_P_ONE = 0, + SAY_KILLED_PLAYER_P_ONE = 1, + SAY_END_P_ONE = 2, + SAY_AGGRO_P_TWO = 3, + SAY_ANTI_MAGIC_SHELL = 4, // not sure when execute it + SAY_MAGIC_BLAST = 5, // not sure when execute it + SAY_KILLED_PLAYER_P_TWO = 6, + SAY_END_P_TWO = 7, + SAY_INTRO_P_THREE = 8, + SAY_AGGRO_P_THREE = 9, + SAY_SURGE_POWER = 10, // not sure when execute it + SAY_BUFF_SPARK = 11, + SAY_KILLED_PLAYER_P_THREE = 12, + SAY_SPELL_CASTING_P_THREE = 13, + SAY_DEATH, + + // Alexstrasza + SAY_ONE = 0, + SAY_TWO = 1, + SAY_THREE = 2, + SAY_FOUR = 3, + + // Power Sparks + EMOTE_POWER_SPARK_SUMMONED = 0 }; + #define MAX_HOVER_DISK_WAYPOINTS 18 // Sniffed data (x, y,z) @@ -178,7 +192,7 @@ const Position HoverDiskWaypoints[MAX_HOVER_DISK_WAYPOINTS] = #define GROUND_Z 268 -// Source: Sniffs (x, y,z) +// Source: Sniffs (x,y,z) #define MALYGOS_MAX_WAYPOINTS 16 const Position MalygosPhaseTwoWaypoints[MALYGOS_MAX_WAYPOINTS] = { @@ -316,6 +330,7 @@ public: // The rest is handled in the AI of the vehicle. target->CastSpell(target, SPELL_SUMMOM_RED_DRAGON, true); + me->Attack(target, false); } } @@ -748,13 +763,18 @@ public: _instance = creature->GetInstanceScript(); } - void Reset() + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { - _summonTimer = urand(5, 7)*IN_MILLISECONDS; + if (spell->Id == SPELL_PORTAL_OPENED) + { + DoCast(me, SPELL_SUMMON_POWER_PARK, true); + } } void UpdateAI(uint32 const diff) { + // When duration of oppened riff visual ends, + // closed one should be cast if (!me->HasAura(SPELL_PORTAL_VISUAL_CLOSED) && !me->HasAura(SPELL_PORTAL_OPENED)) DoCast(me, SPELL_PORTAL_VISUAL_CLOSED, true); @@ -770,16 +790,6 @@ public: } } } - - if (!me->HasAura(SPELL_PORTAL_OPENED)) - return; - - if (_summonTimer <= diff) - { - DoCast(SPELL_SUMMON_POWER_PARK); - _summonTimer = urand(5, 7)*IN_MILLISECONDS; - } else - _summonTimer -= diff; } void JustSummoned(Creature* summon) @@ -811,6 +821,8 @@ public: _instance = creature->GetInstanceScript(); MoveToMalygos(); + // Talk range was not enough for this encounter + sCreatureTextMgr->SendChat(me, EMOTE_POWER_SPARK_SUMMONED, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_MAP); } void EnterEvadeMode() @@ -853,14 +865,9 @@ public: } } - void DamageTaken(Unit* /*done_by*/, uint32& damage) + void JustDied(Unit* /*killer*/) { - if (damage > me->GetMaxHealth()) - { - damage = 0; - DoCast(me, SPELL_POWER_SPARK_DEATH, true); - me->DespawnOrUnsummon(1000); - } + me->CastSpell(me, SPELL_POWER_SPARK_DEATH, true); // not supposed to hide the fact it's there by not selectable } private: @@ -903,8 +910,7 @@ public: else { // Error found: This is not called if the passenger is a player - - if (unit->GetTypeId() == TYPEID_UNIT) + if (unit->GetTypeId() == TYPEID_UNIT || unit->GetTypeId() == TYPEID_PLAYER) { // This will only be called if the passenger dies if (_instance) @@ -1012,7 +1018,7 @@ public: }; }; -// SmartAI does not work correctly for this (vehicles) +// SmartAI does not work correctly for vehicles class npc_wyrmrest_skytalon : public CreatureScript { public: @@ -1023,14 +1029,13 @@ public: return new npc_wyrmrest_skytalonAI (creature); } - struct npc_wyrmrest_skytalonAI : public NullCreatureAI + struct npc_wyrmrest_skytalonAI : public VehicleAI { - npc_wyrmrest_skytalonAI(Creature* creature) : NullCreatureAI(creature) - { - _instance = creature->GetInstanceScript(); + npc_wyrmrest_skytalonAI(Creature* creature) : VehicleAI(creature) { } - _timer = 1000; - _entered = false; + void IsSummonedBy(Unit* summoner) + { + summoner->CastSpell(me, SPELL_RIDE_RED_DRAGON, true); } void PassengerBoarded(Unit* /*unit*/, int8 /*seat*/, bool apply) @@ -1038,54 +1043,9 @@ public: if (!apply) me->DespawnOrUnsummon(); } - - // we can't call this in reset function, it fails. - void MakePlayerEnter() - { - if (!_instance) - return; - - if (Unit* summoner = me->ToTempSummon()->GetSummoner()) - { - if (Creature* malygos = Unit::GetCreature(*me, _instance->GetData64(DATA_MALYGOS))) - { - summoner->CastSpell(me, SPELL_RIDE_RED_DRAGON, true); - float victimThreat = malygos->getThreatManager().getThreat(summoner); - malygos->getThreatManager().resetAllAggro(); - malygos->AI()->AttackStart(me); - malygos->AddThreat(me, victimThreat); - } - } - } - - void UpdateAI(const uint32 diff) - { - if (!_entered) - { - if (_timer <= diff) - { - MakePlayerEnter(); - _entered = true; - } else - _timer -= diff; - } - } - - private: - InstanceScript* _instance; - uint32 _timer; - bool _entered; }; }; -enum AlexstraszaYells -{ - SAY_ONE, - SAY_TWO, - SAY_THREE, - SAY_FOUR -}; - class npc_alexstrasza_eoe : public CreatureScript { public: |
