aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp12
-rw-r--r--src/server/game/Spells/SpellInfo.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp142
3 files changed, 62 insertions, 94 deletions
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: