mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
noth
This commit is contained in:
@@ -15,10 +15,8 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScriptMgr.h"
|
#include "CreatureScript.h"
|
||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "SpellAuraEffects.h"
|
|
||||||
#include "SpellScript.h"
|
|
||||||
#include "naxxramas.h"
|
#include "naxxramas.h"
|
||||||
|
|
||||||
enum Says
|
enum Says
|
||||||
@@ -36,9 +34,10 @@ enum Says
|
|||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
SPELL_CURSE_OF_THE_PLAGUEBRINGER = 29213,
|
SPELL_CURSE_OF_THE_PLAGUEBRINGER_10 = 29213,
|
||||||
SPELL_REVENGE_OF_THE_PLAGUEBRINGER = 29214,
|
SPELL_CURSE_OF_THE_PLAGUEBRINGER_25 = 54835,
|
||||||
SPELL_CRIPPLE = 29212,
|
SPELL_CRIPPLE_10 = 29212,
|
||||||
|
SPELL_CRIPPLE_25 = 54814,
|
||||||
SPELL_SUMMON_PLAGUED_WARRIORS = 29237,
|
SPELL_SUMMON_PLAGUED_WARRIORS = 29237,
|
||||||
SPELL_TELEPORT = 29216,
|
SPELL_TELEPORT = 29216,
|
||||||
SPELL_TELEPORT_BACK = 29231,
|
SPELL_TELEPORT_BACK = 29231,
|
||||||
@@ -61,9 +60,9 @@ enum Events
|
|||||||
|
|
||||||
enum Misc
|
enum Misc
|
||||||
{
|
{
|
||||||
NPC_PLAGUED_WARRIOR = 351087,
|
// NPC_PLAGUED_WARRIOR = 16984,
|
||||||
NPC_PLAGUED_CHAMPION = 351086,
|
// NPC_PLAGUED_CHAMPION = 16983,
|
||||||
NPC_PLAGUED_GUARDIAN = 351085
|
// NPC_PLAGUED_GUARDIAN = 16981
|
||||||
};
|
};
|
||||||
|
|
||||||
const Position summoningPosition[5] =
|
const Position summoningPosition[5] =
|
||||||
@@ -90,11 +89,8 @@ public:
|
|||||||
struct boss_noth_40AI : public BossAI
|
struct boss_noth_40AI : public BossAI
|
||||||
{
|
{
|
||||||
explicit boss_noth_40AI(Creature* c) : BossAI(c, BOSS_NOTH), summons(me)
|
explicit boss_noth_40AI(Creature* c) : BossAI(c, BOSS_NOTH), summons(me)
|
||||||
{
|
{}
|
||||||
pInstance = me->GetInstanceScript();
|
|
||||||
}
|
|
||||||
|
|
||||||
InstanceScript* pInstance;
|
|
||||||
uint8 timesInBalcony;
|
uint8 timesInBalcony;
|
||||||
EventMap events;
|
EventMap events;
|
||||||
SummonList summons;
|
SummonList summons;
|
||||||
@@ -105,12 +101,12 @@ public:
|
|||||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_DISABLE_MOVE);
|
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_DISABLE_MOVE);
|
||||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||||
events.Reset();
|
events.Reset();
|
||||||
events.ScheduleEvent(EVENT_MOVE_TO_BALCONY, 110000);
|
events.ScheduleEvent(EVENT_MOVE_TO_BALCONY, 110s);
|
||||||
//events.ScheduleEvent(EVENT_CURSE, urand(50000, 60000)); // more curses, down from 150s to 50-60s
|
events.ScheduleEvent(EVENT_CURSE, 15s);
|
||||||
events.ScheduleEvent(EVENT_SUMMON_PLAGUED_WARRIOR_ANNOUNCE, 10000);
|
events.ScheduleEvent(EVENT_SUMMON_PLAGUED_WARRIOR_ANNOUNCE, 10s);
|
||||||
if (Is25ManRaid())
|
if (Is25ManRaid())
|
||||||
{
|
{
|
||||||
events.ScheduleEvent(EVENT_BLINK, 26000);
|
events.ScheduleEvent(EVENT_BLINK, 26s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,8 +117,8 @@ public:
|
|||||||
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_DISABLE_MOVE);
|
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_DISABLE_MOVE);
|
||||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||||
events.Reset();
|
events.Reset();
|
||||||
events.ScheduleEvent(EVENT_BALCONY_SUMMON_ANNOUNCE, 4000);
|
events.ScheduleEvent(EVENT_BALCONY_SUMMON_ANNOUNCE, 4s);
|
||||||
events.ScheduleEvent(EVENT_MOVE_TO_GROUND, 70000);
|
events.ScheduleEvent(EVENT_MOVE_TO_GROUND, 70s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummonHelper(uint32 entry, uint32 count)
|
void SummonHelper(uint32 entry, uint32 count)
|
||||||
@@ -152,13 +148,6 @@ public:
|
|||||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||||
me->SetReactState(REACT_AGGRESSIVE);
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
timesInBalcony = 0;
|
timesInBalcony = 0;
|
||||||
if (pInstance)
|
|
||||||
{
|
|
||||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_NOTH_ENTRY_GATE)))
|
|
||||||
{
|
|
||||||
go->SetGoState(GO_STATE_ACTIVE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode(EvadeReason why) override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
@@ -172,13 +161,6 @@ public:
|
|||||||
BossAI::JustEngagedWith(who);
|
BossAI::JustEngagedWith(who);
|
||||||
Talk(SAY_AGGRO);
|
Talk(SAY_AGGRO);
|
||||||
StartGroundPhase();
|
StartGroundPhase();
|
||||||
if (pInstance)
|
|
||||||
{
|
|
||||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_NOTH_ENTRY_GATE)))
|
|
||||||
{
|
|
||||||
go->SetGoState(GO_STATE_READY);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
@@ -196,25 +178,15 @@ public:
|
|||||||
}
|
}
|
||||||
BossAI::JustDied(killer);
|
BossAI::JustDied(killer);
|
||||||
Talk(SAY_DEATH);
|
Talk(SAY_DEATH);
|
||||||
if (pInstance)
|
|
||||||
{
|
|
||||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_NOTH_ENTRY_GATE)))
|
|
||||||
{
|
|
||||||
go->SetGoState(GO_STATE_ACTIVE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* who) override
|
void KilledUnit(Unit* who) override
|
||||||
{
|
{
|
||||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
if (!who->IsPlayer())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Talk(SAY_SLAY);
|
Talk(SAY_SLAY);
|
||||||
if (pInstance)
|
instance->StorePersistentData(PERSISTENT_DATA_IMMORTAL_FAIL, 1);
|
||||||
{
|
|
||||||
pInstance->SetData(DATA_IMMORTAL_FAIL, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
@@ -235,19 +207,19 @@ public:
|
|||||||
case EVENT_CURSE:
|
case EVENT_CURSE:
|
||||||
if (events.GetPhaseMask() == 0)
|
if (events.GetPhaseMask() == 0)
|
||||||
{
|
{
|
||||||
me->CastCustomSpell(SPELL_CURSE_OF_THE_PLAGUEBRINGER, SPELLVALUE_MAX_TARGETS, 10, me, false); // TODO: Increase to 20 on 40man
|
me->CastCustomSpell(SPELL_CURSE_OF_THE_PLAGUEBRINGER_10, SPELLVALUE_MAX_TARGETS, 10, me, false); // TODO: Increase to 20 on 40man
|
||||||
}
|
}
|
||||||
events.RepeatEvent(25000); // 50-60 seconds in 40man
|
events.Repeat(25s); // 50-60 seconds in 40man
|
||||||
break;
|
break;
|
||||||
case EVENT_SUMMON_PLAGUED_WARRIOR_ANNOUNCE:
|
case EVENT_SUMMON_PLAGUED_WARRIOR_ANNOUNCE:
|
||||||
Talk(SAY_SUMMON);
|
Talk(SAY_SUMMON);
|
||||||
Talk(EMOTE_SUMMON);
|
Talk(EMOTE_SUMMON);
|
||||||
events.RepeatEvent(30000);
|
events.Repeat(30s);
|
||||||
events.ScheduleEvent(EVENT_SUMMON_PLAGUED_WARRIOR_REAL, 4000);
|
events.ScheduleEvent(EVENT_SUMMON_PLAGUED_WARRIOR_REAL, 4s);
|
||||||
break;
|
break;
|
||||||
case EVENT_SUMMON_PLAGUED_WARRIOR_REAL:
|
case EVENT_SUMMON_PLAGUED_WARRIOR_REAL:
|
||||||
me->CastSpell(me, SPELL_SUMMON_PLAGUED_WARRIORS, true);
|
me->CastSpell(me, SPELL_SUMMON_PLAGUED_WARRIORS, true);
|
||||||
SummonHelper(NPC_PLAGUED_WARRIOR, 3);
|
SummonHelper(NPC_PLAGUED_WARRIOR, RAID_MODE(2, 3, 3, 3));
|
||||||
break;
|
break;
|
||||||
case EVENT_MOVE_TO_BALCONY:
|
case EVENT_MOVE_TO_BALCONY:
|
||||||
Talk(EMOTE_TELEPORT_BALCONY);
|
Talk(EMOTE_TELEPORT_BALCONY);
|
||||||
@@ -256,30 +228,30 @@ public:
|
|||||||
break;
|
break;
|
||||||
case EVENT_BLINK:
|
case EVENT_BLINK:
|
||||||
DoResetThreatList();
|
DoResetThreatList();
|
||||||
me->CastSpell(me, SPELL_CRIPPLE, false);
|
me->CastSpell(me, RAID_MODE(SPELL_CRIPPLE_10, SPELL_CRIPPLE_25, SPELL_CRIPPLE_10, SPELL_CRIPPLE_25), false);
|
||||||
me->CastSpell(me, SPELL_BLINK, true);
|
me->CastSpell(me, SPELL_BLINK, true);
|
||||||
Talk(EMOTE_BLINK);
|
Talk(EMOTE_BLINK);
|
||||||
events.RepeatEvent(30000);
|
events.Repeat(30s);
|
||||||
break;
|
break;
|
||||||
// BALCONY
|
// BALCONY
|
||||||
case EVENT_BALCONY_SUMMON_ANNOUNCE:
|
case EVENT_BALCONY_SUMMON_ANNOUNCE:
|
||||||
Talk(EMOTE_SUMMON_WAVE);
|
Talk(EMOTE_SUMMON_WAVE);
|
||||||
events.RepeatEvent(30000);
|
events.Repeat(30s);
|
||||||
events.ScheduleEvent(EVENT_BALCONY_SUMMON_REAL, 4000);
|
events.ScheduleEvent(EVENT_BALCONY_SUMMON_REAL, 4s);
|
||||||
break;
|
break;
|
||||||
case EVENT_BALCONY_SUMMON_REAL:
|
case EVENT_BALCONY_SUMMON_REAL:
|
||||||
me->CastSpell(me, SPELL_SUMMON_PLAGUED_WARRIORS, true); // visual
|
me->CastSpell(me, SPELL_SUMMON_PLAGUED_WARRIORS, true); // visual
|
||||||
switch (timesInBalcony)
|
switch (timesInBalcony)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
SummonHelper(NPC_PLAGUED_CHAMPION, 4);
|
SummonHelper(NPC_PLAGUED_CHAMPION, RAID_MODE(2, 4, 4, 4));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
SummonHelper(NPC_PLAGUED_CHAMPION, 2);
|
SummonHelper(NPC_PLAGUED_CHAMPION, RAID_MODE(1, 2, 2, 2));
|
||||||
SummonHelper(NPC_PLAGUED_GUARDIAN, 2);
|
SummonHelper(NPC_PLAGUED_GUARDIAN, RAID_MODE(1, 2, 2, 2));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SummonHelper(NPC_PLAGUED_GUARDIAN, 4);
|
SummonHelper(NPC_PLAGUED_GUARDIAN, RAID_MODE(2, 4, 4, 4));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user