mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 15:38:19 +08:00
Compare commits
2 Commits
c6d3f5277a
...
2981f49332
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2981f49332 | ||
|
|
c9a841d4df |
@@ -183,3 +183,67 @@ INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (29371, 'spel
|
|||||||
-- Wrath of the Plaguebringer, damage if failed to decurse
|
-- Wrath of the Plaguebringer, damage if failed to decurse
|
||||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 29213;
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 29213;
|
||||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (29213, 'spell_noth_curse_of_the_plaguebringer_aura_40');
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (29213, 'spell_noth_curse_of_the_plaguebringer_aura_40');
|
||||||
|
|
||||||
|
-- Loatheb
|
||||||
|
-- Corrupted Mind
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 29201;
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (29201, 'spell_loatheb_corrupted_mind_40');
|
||||||
|
|
||||||
|
-- Corrupted Mind check - Druid
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'isAllowedToCastSpell' AND `spell_id` IN
|
||||||
|
(740, 774, 1058, 1430, 2090, 2091, 2782, 2893, 3627, 5185, 5186, 5187, 5188, 5189, 6778, 8903, 8910, 8918, 8936, 8938, 8939, 8940, 8941, 8946,
|
||||||
|
9750, 9758, 9839, 9840, 9841, 9856, 9857, 9858, 9862, 9863, 9888, 9889, 18562, 25297, 25299, 26978, 26979, 26980, 26981, 26982, 26983, 33763);
|
||||||
|
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(740, 'isAllowedToCastSpell'), (774, 'isAllowedToCastSpell'), (1058, 'isAllowedToCastSpell'), (1430, 'isAllowedToCastSpell'), (2090, 'isAllowedToCastSpell'), (2091, 'isAllowedToCastSpell'),
|
||||||
|
(2782, 'isAllowedToCastSpell'), (2893, 'isAllowedToCastSpell'), (3627, 'isAllowedToCastSpell'), (5185, 'isAllowedToCastSpell'), (5186, 'isAllowedToCastSpell'), (5187, 'isAllowedToCastSpell'),
|
||||||
|
(5188, 'isAllowedToCastSpell'), (5189, 'isAllowedToCastSpell'), (6778, 'isAllowedToCastSpell'), (8903, 'isAllowedToCastSpell'), (8910, 'isAllowedToCastSpell'), (8918, 'isAllowedToCastSpell'),
|
||||||
|
(8936, 'isAllowedToCastSpell'), (8938, 'isAllowedToCastSpell'), (8939, 'isAllowedToCastSpell'), (8940, 'isAllowedToCastSpell'), (8941, 'isAllowedToCastSpell'), (8946, 'isAllowedToCastSpell'),
|
||||||
|
(9750, 'isAllowedToCastSpell'), (9758, 'isAllowedToCastSpell'), (9839, 'isAllowedToCastSpell'), (9840, 'isAllowedToCastSpell'), (9841, 'isAllowedToCastSpell'), (9856, 'isAllowedToCastSpell'),
|
||||||
|
(9857, 'isAllowedToCastSpell'), (9858, 'isAllowedToCastSpell'), (9862, 'isAllowedToCastSpell'), (9863, 'isAllowedToCastSpell'), (9888, 'isAllowedToCastSpell'), (9889, 'isAllowedToCastSpell'),
|
||||||
|
(18562, 'isAllowedToCastSpell'), (25297, 'isAllowedToCastSpell'), (25299, 'isAllowedToCastSpell'), (26978, 'isAllowedToCastSpell'), (26979, 'isAllowedToCastSpell'),
|
||||||
|
(26980, 'isAllowedToCastSpell'), (26981, 'isAllowedToCastSpell'), (26982, 'isAllowedToCastSpell'), (26983, 'isAllowedToCastSpell'), (33763, 'isAllowedToCastSpell');
|
||||||
|
|
||||||
|
-- Corrupted Mind check - Priest
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'isAllowedToCastSpell' AND `spell_id` IN
|
||||||
|
(17, 139, 527, 528, 552, 592, 596, 600, 988, 996, 2050, 2052, 2053, 2054, 2055, 2060, 2061, 3747, 6063, 6064, 6065, 6066, 6074, 6075, 6076, 6077, 6078, 9472, 9473, 9474,
|
||||||
|
10898, 10899, 10900, 10901, 10915, 10916, 10917, 10927, 10928, 10929, 10960, 10961, 10963, 10964, 10965, 15229, 15237, 15286, 15430, 15431, 19236, 19238, 19240, 19241, 19242, 19243,
|
||||||
|
25210, 25213, 25217, 25218, 25221, 25222, 25233, 25235, 25308, 25314, 25315, 25316, 25331, 25437, 27799, 27800, 27801, 32546, 33076, 34865, 34866);
|
||||||
|
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(17, 'isAllowedToCastSpell'), (139, 'isAllowedToCastSpell'), (527, 'isAllowedToCastSpell'), (528, 'isAllowedToCastSpell'), (552, 'isAllowedToCastSpell'), (592, 'isAllowedToCastSpell'),
|
||||||
|
(596, 'isAllowedToCastSpell'), (600, 'isAllowedToCastSpell'), (988, 'isAllowedToCastSpell'), (996, 'isAllowedToCastSpell'), (2050, 'isAllowedToCastSpell'), (2052, 'isAllowedToCastSpell'),
|
||||||
|
(2053, 'isAllowedToCastSpell'), (2054, 'isAllowedToCastSpell'), (2055, 'isAllowedToCastSpell'), (2060, 'isAllowedToCastSpell'), (2061, 'isAllowedToCastSpell'), (3747, 'isAllowedToCastSpell'),
|
||||||
|
(6063, 'isAllowedToCastSpell'), (6064, 'isAllowedToCastSpell'), (6065, 'isAllowedToCastSpell'), (6066, 'isAllowedToCastSpell'), (6074, 'isAllowedToCastSpell'), (6075, 'isAllowedToCastSpell'),
|
||||||
|
(6076, 'isAllowedToCastSpell'), (6077, 'isAllowedToCastSpell'), (6078, 'isAllowedToCastSpell'), (9472, 'isAllowedToCastSpell'), (9473, 'isAllowedToCastSpell'), (9474, 'isAllowedToCastSpell'),
|
||||||
|
(10898, 'isAllowedToCastSpell'), (10899, 'isAllowedToCastSpell'), (10900, 'isAllowedToCastSpell'), (10901, 'isAllowedToCastSpell'), (10915, 'isAllowedToCastSpell'), (10916, 'isAllowedToCastSpell'),
|
||||||
|
(10917, 'isAllowedToCastSpell'), (10927, 'isAllowedToCastSpell'), (10928, 'isAllowedToCastSpell'), (10929, 'isAllowedToCastSpell'), (10960, 'isAllowedToCastSpell'), (10961, 'isAllowedToCastSpell'),
|
||||||
|
(10963, 'isAllowedToCastSpell'), (10964, 'isAllowedToCastSpell'), (10965, 'isAllowedToCastSpell'), (15229, 'isAllowedToCastSpell'), (15237, 'isAllowedToCastSpell'), (15286, 'isAllowedToCastSpell'),
|
||||||
|
(15430, 'isAllowedToCastSpell'), (15431, 'isAllowedToCastSpell'), (19236, 'isAllowedToCastSpell'), (19238, 'isAllowedToCastSpell'), (19240, 'isAllowedToCastSpell'), (19241, 'isAllowedToCastSpell'),
|
||||||
|
(19242, 'isAllowedToCastSpell'), (19243, 'isAllowedToCastSpell'), (25210, 'isAllowedToCastSpell'), (25213, 'isAllowedToCastSpell'), (25217, 'isAllowedToCastSpell'), (25218, 'isAllowedToCastSpell'),
|
||||||
|
(25221, 'isAllowedToCastSpell'), (25222, 'isAllowedToCastSpell'), (25233, 'isAllowedToCastSpell'), (25235, 'isAllowedToCastSpell'), (25308, 'isAllowedToCastSpell'),
|
||||||
|
(25314, 'isAllowedToCastSpell'), (25315, 'isAllowedToCastSpell'), (25316, 'isAllowedToCastSpell'), (25331, 'isAllowedToCastSpell'), (25437, 'isAllowedToCastSpell'), (27799, 'isAllowedToCastSpell'),
|
||||||
|
(27800, 'isAllowedToCastSpell'), (27801, 'isAllowedToCastSpell'), (32546, 'isAllowedToCastSpell'), (33076, 'isAllowedToCastSpell'), (34865, 'isAllowedToCastSpell'), (34866, 'isAllowedToCastSpell');
|
||||||
|
|
||||||
|
-- Corrupted Mind check - Paladin
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'isAllowedToCastSpell' AND `spell_id` IN
|
||||||
|
(633, 635, 639, 647, 1026, 1042, 1152, 2800, 3472, 4987, 10310, 10328, 10329, 19750, 19939, 19940, 19941, 19942, 19943, 20473, 20929, 20930, 25292, 27135, 27136, 27137, 27154, 27174, 33072);
|
||||||
|
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(633, 'isAllowedToCastSpell'), (635, 'isAllowedToCastSpell'), (639, 'isAllowedToCastSpell'), (647, 'isAllowedToCastSpell'), (1026, 'isAllowedToCastSpell'), (1042, 'isAllowedToCastSpell'),
|
||||||
|
(1152, 'isAllowedToCastSpell'), (2800, 'isAllowedToCastSpell'), (3472, 'isAllowedToCastSpell'), (4987, 'isAllowedToCastSpell'), (10310, 'isAllowedToCastSpell'), (10328, 'isAllowedToCastSpell'),
|
||||||
|
(10329, 'isAllowedToCastSpell'), (19750, 'isAllowedToCastSpell'), (19939, 'isAllowedToCastSpell'), (19940, 'isAllowedToCastSpell'), (19941, 'isAllowedToCastSpell'), (19942, 'isAllowedToCastSpell'),
|
||||||
|
(19943, 'isAllowedToCastSpell'), (20473, 'isAllowedToCastSpell'), (20929, 'isAllowedToCastSpell'), (20930, 'isAllowedToCastSpell'), (25292, 'isAllowedToCastSpell'), (27135, 'isAllowedToCastSpell'),
|
||||||
|
(27136, 'isAllowedToCastSpell'), (27137, 'isAllowedToCastSpell'), (27154, 'isAllowedToCastSpell'), (27174, 'isAllowedToCastSpell'), (33072, 'isAllowedToCastSpell');
|
||||||
|
|
||||||
|
-- Corrupted Mind check - Shaman
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'isAllowedToCastSpell' AND `spell_id` IN
|
||||||
|
(331, 332, 526, 547, 913, 939, 959, 974, 1064, 8004, 8005, 8008, 8010, 10395, 10396, 10466, 10467, 10468, 10622, 10623, 25357, 25391, 25396, 25420, 25422, 25423, 32593, 32594, 51886);
|
||||||
|
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(331, 'isAllowedToCastSpell'), (332, 'isAllowedToCastSpell'), (526, 'isAllowedToCastSpell'), (547, 'isAllowedToCastSpell'),
|
||||||
|
(913, 'isAllowedToCastSpell'), (939, 'isAllowedToCastSpell'), (959, 'isAllowedToCastSpell'), (974, 'isAllowedToCastSpell'),
|
||||||
|
(1064, 'isAllowedToCastSpell'), (8004, 'isAllowedToCastSpell'), (8005, 'isAllowedToCastSpell'), (8008, 'isAllowedToCastSpell'), (8010, 'isAllowedToCastSpell'),
|
||||||
|
(10395, 'isAllowedToCastSpell'), (10396, 'isAllowedToCastSpell'), (10466, 'isAllowedToCastSpell'), (10467, 'isAllowedToCastSpell'), (10468, 'isAllowedToCastSpell'),
|
||||||
|
(10622, 'isAllowedToCastSpell'), (10623, 'isAllowedToCastSpell'), (25357, 'isAllowedToCastSpell'), (25391, 'isAllowedToCastSpell'), (25396, 'isAllowedToCastSpell'),
|
||||||
|
(25420, 'isAllowedToCastSpell'), (25422, 'isAllowedToCastSpell'), (25423, 'isAllowedToCastSpell'), (32593, 'isAllowedToCastSpell'), (32594, 'isAllowedToCastSpell'), (51886, 'isAllowedToCastSpell');
|
||||||
|
|||||||
@@ -21,26 +21,20 @@
|
|||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
// SPELL_CORRUPTED_MIND = 29201, // this triggers the following spells on targets (based on class): 29185, 29194, 29196, 29198
|
|
||||||
SPELL_NECROTIC_AURA = 55593,
|
|
||||||
// SPELL_SUMMON_SPORE = 29234,
|
|
||||||
// SPELL_DEATHBLOOM_10 = 29865, // does 200 dmg every second for 6 seconds with 1200 extra damage at the end. should do 196 dmg every 6 seconds. no extra damage at the end.
|
// SPELL_DEATHBLOOM_10 = 29865, // does 200 dmg every second for 6 seconds with 1200 extra damage at the end. should do 196 dmg every 6 seconds. no extra damage at the end.
|
||||||
SPELL_POISON_SHOCK = 22595, // does 180-220 aoe poison damage. if Loatheb recasts this every 6 seconds it's a possible fix for poison aura.
|
SPELL_POISON_SHOCK = 22595, // does 180-220 aoe poison damage. if Loatheb recasts this every 6 seconds it's a fix for poison aura.
|
||||||
// SPELL_DEATHBLOOM_25 = 55053,
|
SPELL_CORRUPTED_MIND = 29201, // this triggers the following spells on targets (based on class): 29185, 29194, 29196, 29198
|
||||||
SPELL_INEVITABLE_DOOM = 29204,
|
SPELL_INEVITABLE_DOOM = 29204,
|
||||||
//SPELL_INEVITABLE_DOOM_25 = 55052,
|
|
||||||
// SPELL_BERSERK = 26662, // he doesn't cast berserk in Naxx40
|
|
||||||
SPELL_REMOVE_CURSE = 30281 // He periodically removes all curses on himself
|
SPELL_REMOVE_CURSE = 30281 // He periodically removes all curses on himself
|
||||||
|
// SPELL_SUMMON_SPORE = 90006, // already defined in naxxramas_40.h
|
||||||
|
// SPELL_BERSERK = 26662, // he doesn't cast berserk in Naxx40
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Events
|
enum Events
|
||||||
{
|
{
|
||||||
// EVENT_CORRUPTED_MIND = 1, // Loatheb should cast Corrupted Mind instead of Necrotic Aura
|
EVENT_CORRUPTED_MIND = 1, // Loatheb should cast Corrupted Mind instead of Necrotic Aura
|
||||||
EVENT_NECROTIC_AURA = 1,
|
|
||||||
// EVENT_DEATHBLOOM = 2,
|
|
||||||
EVENT_POISON_SHOCK = 2,
|
EVENT_POISON_SHOCK = 2,
|
||||||
EVENT_INEVITABLE_DOOM = 3,
|
EVENT_INEVITABLE_DOOM = 3,
|
||||||
// EVENT_BERSERK = 4,
|
|
||||||
EVENT_REMOVE_CURSE = 4,
|
EVENT_REMOVE_CURSE = 4,
|
||||||
EVENT_SUMMON_SPORE = 5,
|
EVENT_SUMMON_SPORE = 5,
|
||||||
EVENT_NECROTIC_AURA_FADING = 6,
|
EVENT_NECROTIC_AURA_FADING = 6,
|
||||||
@@ -104,13 +98,10 @@ public:
|
|||||||
{
|
{
|
||||||
BossAI::JustEngagedWith(who);
|
BossAI::JustEngagedWith(who);
|
||||||
me->SetInCombatWithZone();
|
me->SetInCombatWithZone();
|
||||||
// events.ScheduleEvent(EVENT_CORRUPTED_MIND, 5s);
|
events.ScheduleEvent(EVENT_CORRUPTED_MIND, 5s);
|
||||||
events.ScheduleEvent(EVENT_NECROTIC_AURA, 10s);
|
|
||||||
// events.ScheduleEvent(EVENT_DEATHBLOOM, 5s);
|
|
||||||
events.ScheduleEvent(EVENT_POISON_SHOCK, 5s);
|
events.ScheduleEvent(EVENT_POISON_SHOCK, 5s);
|
||||||
events.ScheduleEvent(EVENT_INEVITABLE_DOOM, 2min);
|
events.ScheduleEvent(EVENT_INEVITABLE_DOOM, 2min);
|
||||||
events.ScheduleEvent(EVENT_SUMMON_SPORE, 15s);
|
events.ScheduleEvent(EVENT_SUMMON_SPORE, 15s);
|
||||||
// events.ScheduleEvent(EVENT_BERSERK, 12min);
|
|
||||||
events.ScheduleEvent(EVENT_REMOVE_CURSE, 5s);
|
events.ScheduleEvent(EVENT_REMOVE_CURSE, 5s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,36 +126,18 @@ public:
|
|||||||
me->CastSpell(me, SPELL_SUMMON_SPORE, true);
|
me->CastSpell(me, SPELL_SUMMON_SPORE, true);
|
||||||
events.Repeat(13s);
|
events.Repeat(13s);
|
||||||
break;
|
break;
|
||||||
/*
|
|
||||||
case EVENT_CORRUPTED_MIND:
|
case EVENT_CORRUPTED_MIND:
|
||||||
{
|
{
|
||||||
if (me->CastSpell(me, SPELL_CORRUPTED_MIND, true) == SPELL_CAST_OK)
|
if (me->CastSpell(me, SPELL_CORRUPTED_MIND, true) == SPELL_CAST_OK)
|
||||||
{
|
{
|
||||||
events.RepeatEvent(10000);
|
events.Repeat(10s);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
events.RepeatEvent(100);
|
events.Repeat(100ms);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
case EVENT_NECROTIC_AURA:
|
|
||||||
me->CastSpell(me, SPELL_NECROTIC_AURA, true);
|
|
||||||
Talk(SAY_NECROTIC_AURA_APPLIED);
|
|
||||||
events.ScheduleEvent(EVENT_NECROTIC_AURA_FADING, 14s);
|
|
||||||
events.ScheduleEvent(EVENT_NECROTIC_AURA_REMOVED, 17s);
|
|
||||||
events.Repeat(20s);
|
|
||||||
break;
|
|
||||||
/*
|
|
||||||
case EVENT_DEATHBLOOM:
|
|
||||||
{
|
|
||||||
int32 bp0 = 33; // TODO: Amplitude should be 6k, but is 1k. 200 dmg after 6 seconds
|
|
||||||
me->CastCustomSpell(me, SPELL_DEATHBLOOM_10, &bp0, 0, 0, false);
|
|
||||||
events.Repeat(30s);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
case EVENT_POISON_SHOCK:
|
case EVENT_POISON_SHOCK:
|
||||||
if (me->CastSpell(me, SPELL_POISON_SHOCK, true) == SPELL_CAST_OK)
|
if (me->CastSpell(me, SPELL_POISON_SHOCK, true) == SPELL_CAST_OK)
|
||||||
events.Repeat(6s);
|
events.Repeat(6s);
|
||||||
@@ -184,11 +157,6 @@ public:
|
|||||||
events.Repeat(100ms);
|
events.Repeat(100ms);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
case EVENT_BERSERK:
|
|
||||||
me->CastSpell(me, SPELL_BERSERK, true);
|
|
||||||
break;
|
|
||||||
*/
|
|
||||||
case EVENT_REMOVE_CURSE:
|
case EVENT_REMOVE_CURSE:
|
||||||
me->CastSpell(me, SPELL_REMOVE_CURSE, true);
|
me->CastSpell(me, SPELL_REMOVE_CURSE, true);
|
||||||
events.Repeat(30s);
|
events.Repeat(30s);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "SpellAuraEffects.h"
|
#include "SpellAuraEffects.h"
|
||||||
#include "SpellScript.h"
|
#include "SpellScript.h"
|
||||||
#include "naxxramas.h"
|
#include "naxxramas.h"
|
||||||
|
#include "Player.h"
|
||||||
|
|
||||||
// 28785 - Locust Swarm
|
// 28785 - Locust Swarm
|
||||||
// Locust Swarm: Reduce damage ~1500 to ~1000, increase radius 25yd to 30yd
|
// Locust Swarm: Reduce damage ~1500 to ~1000, increase radius 25yd to 30yd
|
||||||
@@ -428,6 +429,89 @@ class spell_feugen_static_field_40 : public SpellScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class spell_loatheb_corrupted_mind_40 : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_loatheb_corrupted_mind_40);
|
||||||
|
|
||||||
|
void HandleEffect(SpellEffIndex effIndex)
|
||||||
|
{
|
||||||
|
if (Unit* caster = GetCaster())
|
||||||
|
{
|
||||||
|
if (Unit* unitTarget = GetHitUnit())
|
||||||
|
{
|
||||||
|
if (!unitTarget->IsPlayer())
|
||||||
|
return;
|
||||||
|
|
||||||
|
Player* playerTarget = unitTarget->ToPlayer();
|
||||||
|
if (!playerTarget)
|
||||||
|
return;
|
||||||
|
|
||||||
|
uint32 spell_id = 0;
|
||||||
|
|
||||||
|
switch (playerTarget->getClass())
|
||||||
|
{
|
||||||
|
case CLASS_PRIEST:
|
||||||
|
spell_id = 29185;
|
||||||
|
break;
|
||||||
|
case CLASS_DRUID:
|
||||||
|
spell_id = 29194;
|
||||||
|
break;
|
||||||
|
case CLASS_PALADIN:
|
||||||
|
spell_id = 29196;
|
||||||
|
break;
|
||||||
|
case CLASS_SHAMAN:
|
||||||
|
spell_id = 29198;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return; // ignore for non-healing classes
|
||||||
|
}
|
||||||
|
|
||||||
|
caster->CastSpell(playerTarget, spell_id, TRIGGERED_FULL_MASK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectLaunchTarget += SpellEffectFn(spell_loatheb_corrupted_mind_40::HandleEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class isAllowedToCastSpell : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(isAllowedToCastSpell);
|
||||||
|
|
||||||
|
SpellCastResult CheckCorruptedMind()
|
||||||
|
{
|
||||||
|
if (Unit* caster = GetCaster())
|
||||||
|
{
|
||||||
|
Player* player = caster->ToPlayer();
|
||||||
|
int mapId = player->GetMapId();
|
||||||
|
if ((player->GetRaidDifficulty() != RAID_DIFFICULTY_10MAN_HEROIC) || (mapId != 533))
|
||||||
|
{
|
||||||
|
return SPELL_CAST_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
Unit::AuraEffectList const& auraClassScripts = caster->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||||
|
|
||||||
|
for (auto itr = auraClassScripts.begin(); itr != auraClassScripts.end(); ++itr)
|
||||||
|
{
|
||||||
|
if ((*itr)->GetSpellInfo()->Effects[0].MiscValue == 4327)
|
||||||
|
{
|
||||||
|
return SPELL_FAILED_FIZZLE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return SPELL_CAST_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnCheckCast += SpellCheckCastFn(isAllowedToCastSpell::CheckCorruptedMind);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
void AddSC_custom_spells_40()
|
void AddSC_custom_spells_40()
|
||||||
{
|
{
|
||||||
RegisterSpellScript(spell_anub_locust_swarm_aura_40);
|
RegisterSpellScript(spell_anub_locust_swarm_aura_40);
|
||||||
@@ -446,4 +530,6 @@ void AddSC_custom_spells_40()
|
|||||||
RegisterSpellScript(spell_unholy_staff_arcane_explosion_40);
|
RegisterSpellScript(spell_unholy_staff_arcane_explosion_40);
|
||||||
RegisterSpellScript(spell_disease_cloud_damage_40);
|
RegisterSpellScript(spell_disease_cloud_damage_40);
|
||||||
RegisterSpellScript(spell_feugen_static_field_40);
|
RegisterSpellScript(spell_feugen_static_field_40);
|
||||||
|
RegisterSpellScript(spell_loatheb_corrupted_mind_40);
|
||||||
|
RegisterSpellScript(isAllowedToCastSpell);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ enum SSCMisc
|
|||||||
{
|
{
|
||||||
GO_LADY_VASHJ_BRIDGE_CONSOLE = 184568,
|
GO_LADY_VASHJ_BRIDGE_CONSOLE = 184568,
|
||||||
MAP_SSC = 548,
|
MAP_SSC = 548,
|
||||||
DATA_LURKER = 1,
|
DATA_VASHJ = 5
|
||||||
DATA_VASHJ = 6
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class GlobalSerpentshrineScript : public GlobalScript
|
class GlobalSerpentshrineScript : public GlobalScript
|
||||||
@@ -27,19 +26,13 @@ public:
|
|||||||
{
|
{
|
||||||
if (InstanceScript* instance = instanceMap->GetInstanceScript())
|
if (InstanceScript* instance = instanceMap->GetInstanceScript())
|
||||||
{
|
{
|
||||||
uint32 bossCount = instance->GetEncounterCount() - 3;
|
for (uint8 id = 0; id <= 4; ++id) // check boss data id 0-4
|
||||||
for (uint8 id = 0; id <= bossCount; ++id)
|
|
||||||
{
|
{
|
||||||
if (id == bossId && newState == DONE)
|
if (id == bossId && newState == DONE)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id == DATA_LURKER)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (instance->GetBossState(id) != DONE)
|
if (instance->GetBossState(id) != DONE)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@@ -65,16 +58,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnLoadSpellCustomAttr(SpellInfo* spellInfo) override
|
|
||||||
{
|
|
||||||
switch (spellInfo->Id)
|
|
||||||
{
|
|
||||||
case 38236: // Tidalvess - Spawn Spitfire Totem
|
|
||||||
spellInfo->Effects[EFFECT_0].BasePoints = 25000;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnBeforeSetBossState(uint32 bossId, EncounterState newState, EncounterState /*oldState*/, Map* map) override
|
void OnBeforeSetBossState(uint32 bossId, EncounterState newState, EncounterState /*oldState*/, Map* map) override
|
||||||
{
|
{
|
||||||
if (sConfigMgr->GetOption<int>("IndividualProgression.SerpentshrineCavern.RequireAllBosses", 1))
|
if (sConfigMgr->GetOption<int>("IndividualProgression.SerpentshrineCavern.RequireAllBosses", 1))
|
||||||
|
|||||||
Reference in New Issue
Block a user