mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
init
This commit is contained in:
@@ -38,8 +38,6 @@ enum Spells
|
||||
SPELL_IMPALE = 28783,
|
||||
SPELL_LOCUST_SWARM = 28785,
|
||||
SPELL_LOCUST_SWARM_TRIGGER = 28786, // periodic effect
|
||||
SPELL_SUMMON_CORPSE_SCRABS_5 = 90001, // Changed from 29105 to Level 60 Mob ID for summon
|
||||
SPELL_SUMMON_CORPSE_SCRABS_10 = 90002, // Changed from 29105 to Level 60 Mob ID for summon
|
||||
SPELL_BERSERK = 26662
|
||||
};
|
||||
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
*/
|
||||
|
||||
#include "CombatAI.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
enum Yells
|
||||
@@ -40,20 +41,22 @@ enum Spells
|
||||
{
|
||||
// Gothik
|
||||
SPELL_HARVEST_SOUL = 28679,
|
||||
SPELL_SHADOW_BOLT = 29317,
|
||||
SPELL_SHADOW_BOLT = 29317,
|
||||
// SPELL_SHADOW_BOLT_10 = 29317,
|
||||
// SPELL_SHADOW_BOLT_25 = 56405,
|
||||
// Teleport spells
|
||||
SPELL_TELEPORT_DEAD = 28025,
|
||||
SPELL_TELEPORT_LIVE = 28026,
|
||||
// Visual spells
|
||||
SPELL_INFORM_LIVING_TRAINEE = 27892,
|
||||
SPELL_INFORM_LIVING_KNIGHT = 27928,
|
||||
SPELL_INFORM_LIVING_RIDER = 27935,
|
||||
SPELL_INFORM_DEAD_TRAINEE = 27915,
|
||||
SPELL_INFORM_DEAD_KNIGHT = 27931,
|
||||
SPELL_INFORM_DEAD_RIDER = 27937,
|
||||
/*SPELL_ANCHOR_2_TRAINEE = 27893,
|
||||
SPELL_ANCHOR_1_TRAINEE = 27892,
|
||||
SPELL_ANCHOR_1_DK = 27928,
|
||||
SPELL_ANCHOR_1_RIDER = 27935,
|
||||
SPELL_ANCHOR_2_TRAINEE = 27893,
|
||||
SPELL_ANCHOR_2_DK = 27929,
|
||||
SPELL_ANCHOR_2_RIDER = 27936, fix me */
|
||||
SPELL_ANCHOR_2_RIDER = 27936,
|
||||
SPELL_SKULLS_TRAINEE = 27915,
|
||||
SPELL_SKULLS_DK = 27931,
|
||||
SPELL_SKULLS_RIDER = 27937,
|
||||
// Living trainee
|
||||
SPELL_DEATH_PLAGUE = 55604,
|
||||
// Dead trainee
|
||||
@@ -80,7 +83,7 @@ enum Misc
|
||||
NPC_DEAD_KNIGHT = 351050,
|
||||
NPC_DEAD_HORSE = 351051,
|
||||
NPC_DEAD_RIDER = 351052,
|
||||
//NPC_TRIGGER = 16137, fix me
|
||||
NPC_TRIGGER = 351047
|
||||
};
|
||||
|
||||
enum Events
|
||||
@@ -253,12 +256,12 @@ public:
|
||||
BossAI::JustEngagedWith(who);
|
||||
me->SetInCombatWithZone();
|
||||
Talk(SAY_INTRO_1);
|
||||
events.ScheduleEvent(EVENT_INTRO_2, 4000);
|
||||
events.ScheduleEvent(EVENT_INTRO_3, 9000);
|
||||
events.ScheduleEvent(EVENT_INTRO_4, 14000);
|
||||
events.ScheduleEvent(EVENT_INTRO_2, 4s);
|
||||
events.ScheduleEvent(EVENT_INTRO_3, 9s);
|
||||
events.ScheduleEvent(EVENT_INTRO_4, 14s);
|
||||
me->SetUnitFlag(UNIT_FLAG_DISABLE_MOVE);
|
||||
events.ScheduleEvent(EVENT_SUMMON_ADDS, 30000);
|
||||
events.ScheduleEvent(EVENT_CHECK_PLAYERS, 120000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_ADDS, 30s);
|
||||
events.ScheduleEvent(EVENT_CHECK_PLAYERS, 2min);
|
||||
if (pInstance)
|
||||
{
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_GOTHIK_ENTER_GATE)))
|
||||
@@ -275,14 +278,42 @@ public:
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
// If central gate is open, attack any one
|
||||
if (gateOpened)
|
||||
{
|
||||
summons.DoZoneInCombat();
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0, 200.0f))
|
||||
{
|
||||
summon->AI()->AttackStart(target);
|
||||
summon->SetInCombatWithZone();
|
||||
summon->SetReactState(REACT_AGGRESSIVE);
|
||||
summon->CallForHelp(150.0f);
|
||||
}
|
||||
}
|
||||
else if (Unit* target = me->SelectNearestTarget(50.0f))
|
||||
// Else look for a random target on the side the summoned NPC is
|
||||
else
|
||||
{
|
||||
AttackStart(target);
|
||||
DoZoneInCombat();
|
||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||
std::vector<Player*> tList;
|
||||
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
|
||||
{
|
||||
if (!me->IsWithinDistInMap(itr->GetSource(), 200.0f, true, false) || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (IN_LIVE_SIDE(itr->GetSource()) != IN_LIVE_SIDE(summon))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
tList.push_back(itr->GetSource());
|
||||
}
|
||||
if (!tList.empty())
|
||||
{
|
||||
Player* target = tList[urand(0, tList.size() - 1)];
|
||||
summon->AI()->AttackStart(target);
|
||||
summon->SetInCombatWithZone();
|
||||
summon->SetReactState(REACT_AGGRESSIVE);
|
||||
summon->CallForHelp(150.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,17 +363,17 @@ public:
|
||||
case NPC_LIVING_TRAINEE:
|
||||
me->SummonCreature(NPC_LIVING_TRAINEE, PosSummonLiving[0].GetPositionX(), PosSummonLiving[0].GetPositionY(), PosSummonLiving[0].GetPositionZ(), PosSummonLiving[0].GetOrientation());
|
||||
me->SummonCreature(NPC_LIVING_TRAINEE, PosSummonLiving[1].GetPositionX(), PosSummonLiving[1].GetPositionY(), PosSummonLiving[1].GetPositionZ(), PosSummonLiving[1].GetOrientation());
|
||||
if (Is25ManRaid())
|
||||
{
|
||||
me->SummonCreature(NPC_LIVING_TRAINEE, PosSummonLiving[2].GetPositionX(), PosSummonLiving[2].GetPositionY(), PosSummonLiving[2].GetPositionZ(), PosSummonLiving[2].GetOrientation());
|
||||
}
|
||||
// if (Is25ManRaid())
|
||||
// {
|
||||
me->SummonCreature(NPC_LIVING_TRAINEE, PosSummonLiving[2].GetPositionX(), PosSummonLiving[2].GetPositionY(), PosSummonLiving[2].GetPositionZ(), PosSummonLiving[2].GetOrientation());
|
||||
// }
|
||||
break;
|
||||
case NPC_LIVING_KNIGHT:
|
||||
me->SummonCreature(NPC_LIVING_KNIGHT, PosSummonLiving[3].GetPositionX(), PosSummonLiving[3].GetPositionY(), PosSummonLiving[3].GetPositionZ(), PosSummonLiving[3].GetOrientation());
|
||||
if (Is25ManRaid())
|
||||
{
|
||||
me->SummonCreature(NPC_LIVING_KNIGHT, PosSummonLiving[5].GetPositionX(), PosSummonLiving[5].GetPositionY(), PosSummonLiving[5].GetPositionZ(), PosSummonLiving[5].GetOrientation());
|
||||
}
|
||||
// if (Is25ManRaid())
|
||||
// {
|
||||
me->SummonCreature(NPC_LIVING_KNIGHT, PosSummonLiving[5].GetPositionX(), PosSummonLiving[5].GetPositionY(), PosSummonLiving[5].GetPositionZ(), PosSummonLiving[5].GetOrientation());
|
||||
// }
|
||||
break;
|
||||
case NPC_LIVING_RIDER:
|
||||
me->SummonCreature(NPC_LIVING_RIDER, PosSummonLiving[4].GetPositionX(), PosSummonLiving[4].GetPositionY(), PosSummonLiving[4].GetPositionZ(), PosSummonLiving[4].GetOrientation());
|
||||
@@ -384,25 +415,6 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
|
||||
{
|
||||
uint8 pos = urand(0, 4);
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case SPELL_INFORM_LIVING_TRAINEE:
|
||||
me->SummonCreature(NPC_DEAD_TRAINEE, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
case SPELL_INFORM_LIVING_KNIGHT:
|
||||
me->SummonCreature(NPC_DEAD_KNIGHT, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
case SPELL_INFORM_LIVING_RIDER:
|
||||
me->SummonCreature(NPC_DEAD_RIDER, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
me->SummonCreature(NPC_DEAD_HORSE, PosSummonDead[pos].GetPositionX(), PosSummonDead[pos].GetPositionY(), PosSummonDead[pos].GetPositionZ(), PosSummonDead[pos].GetOrientation());
|
||||
break;
|
||||
}
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if (!secondPhase)
|
||||
@@ -436,11 +448,11 @@ public:
|
||||
break;
|
||||
case EVENT_SHADOW_BOLT:
|
||||
me->CastSpell(me->GetVictim(), SPELL_SHADOW_BOLT, false);
|
||||
events.RepeatEvent(1010);
|
||||
events.Repeat(1s);
|
||||
break;
|
||||
case EVENT_HARVEST_SOUL:
|
||||
me->CastSpell(me, SPELL_HARVEST_SOUL, false);
|
||||
events.RepeatEvent(15000);
|
||||
events.Repeat(15s);
|
||||
break;
|
||||
case EVENT_TELEPORT:
|
||||
me->AttackStop();
|
||||
@@ -458,7 +470,7 @@ public:
|
||||
me->GetThreatMgr().AddThreat(pTarget, 100.0f);
|
||||
AttackStart(pTarget);
|
||||
}
|
||||
events.RepeatEvent(20000);
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
case EVENT_CHECK_HEALTH:
|
||||
if (me->HealthBelowPct(30) && pInstance)
|
||||
@@ -470,7 +482,7 @@ public:
|
||||
events.CancelEvent(EVENT_TELEPORT);
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(1000);
|
||||
events.Repeat(1s);
|
||||
break;
|
||||
case EVENT_SUMMON_ADDS:
|
||||
if (gothikWaves[waveCount][0])
|
||||
@@ -488,11 +500,10 @@ public:
|
||||
me->RemoveUnitFlag(UNIT_FLAG_DISABLE_MOVE);
|
||||
me->SetImmuneToPC(false);
|
||||
me->RemoveAllAuras();
|
||||
summons.DoZoneInCombat();
|
||||
events.ScheduleEvent(EVENT_SHADOW_BOLT, 1000);
|
||||
events.ScheduleEvent(EVENT_HARVEST_SOUL, urand(5000, 15000));
|
||||
events.ScheduleEvent(EVENT_TELEPORT, 20000);
|
||||
events.ScheduleEvent(EVENT_CHECK_HEALTH, 1000);
|
||||
events.ScheduleEvent(EVENT_SHADOW_BOLT, 1s);
|
||||
events.ScheduleEvent(EVENT_HARVEST_SOUL, 5s, 15s);
|
||||
events.ScheduleEvent(EVENT_TELEPORT, 20s);
|
||||
events.ScheduleEvent(EVENT_CHECK_HEALTH, 1s);
|
||||
}
|
||||
waveCount++;
|
||||
break;
|
||||
@@ -503,12 +514,12 @@ public:
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
summons.DoZoneInCombat();
|
||||
gateOpened = true;
|
||||
Talk(EMOTE_GATE_OPENED);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
@@ -546,56 +557,42 @@ public:
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_LIVING_TRAINEE:
|
||||
events.ScheduleEvent(EVENT_DEATH_PLAGUE, 3000);
|
||||
events.ScheduleEvent(EVENT_DEATH_PLAGUE, 3s);
|
||||
break;
|
||||
case NPC_DEAD_TRAINEE:
|
||||
events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 2500);
|
||||
events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 2500ms);
|
||||
break;
|
||||
case NPC_LIVING_KNIGHT:
|
||||
events.ScheduleEvent(EVENT_SHADOW_MARK, 3000);
|
||||
events.ScheduleEvent(EVENT_SHADOW_MARK, 3s);
|
||||
break;
|
||||
case NPC_DEAD_KNIGHT:
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, 2000);
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, 2s);
|
||||
break;
|
||||
case NPC_LIVING_RIDER:
|
||||
events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, 3000);
|
||||
events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, 3s);
|
||||
break;
|
||||
case NPC_DEAD_RIDER:
|
||||
events.ScheduleEvent(EVENT_DRAIN_LIFE, urand(2000, 3500));
|
||||
events.ScheduleEvent(EVENT_UNHOLY_FRENZY, urand(5000, 9000));
|
||||
events.ScheduleEvent(EVENT_DRAIN_LIFE, 2000ms, 3500ms);
|
||||
events.ScheduleEvent(EVENT_UNHOLY_FRENZY, 5s, 9s);
|
||||
break;
|
||||
case NPC_DEAD_HORSE:
|
||||
events.ScheduleEvent(EVENT_STOMP, urand(2000, 5000));
|
||||
events.ScheduleEvent(EVENT_STOMP, 2s, 5s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if (!attacker || !IsOnSameSide(attacker))
|
||||
{
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
if (!me->IsInCombat())
|
||||
{
|
||||
me->CallForHelp(25.0f);
|
||||
AttackStart(attacker);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit*) override
|
||||
{
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_LIVING_TRAINEE:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_TRAINEE, true);
|
||||
DoCastAOE(SPELL_ANCHOR_1_TRAINEE, true);
|
||||
break;
|
||||
case NPC_LIVING_KNIGHT:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_KNIGHT, true);
|
||||
DoCastAOE(SPELL_ANCHOR_1_DK, true);
|
||||
break;
|
||||
case NPC_LIVING_RIDER:
|
||||
me->CastSpell(me, SPELL_INFORM_LIVING_RIDER, true);
|
||||
DoCastAOE(SPELL_ANCHOR_1_RIDER, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -618,7 +615,7 @@ public:
|
||||
{
|
||||
case EVENT_DEATH_PLAGUE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_DEATH_PLAGUE, false);
|
||||
events.RepeatEvent(urand(4000, 7000));
|
||||
events.Repeat(4s, 7s);
|
||||
break;
|
||||
case EVENT_ARCANE_EXPLOSION:
|
||||
if (Unit* victim = me->GetVictim())
|
||||
@@ -628,17 +625,17 @@ public:
|
||||
me->CastSpell(victim, SPELL_ARCANE_EXPLOSION, false);
|
||||
}
|
||||
}
|
||||
events.RepeatEvent(2500);
|
||||
events.Repeat(2500ms);
|
||||
break;
|
||||
case EVENT_SHADOW_MARK:
|
||||
if (Unit* victim = me->GetVictim())
|
||||
{
|
||||
if (!victim->HasAura(SPELL_SHADOW_MARK))
|
||||
if (victim->IsWithinDist(me, 10))
|
||||
{
|
||||
me->CastSpell(me->GetVictim(), SPELL_SHADOW_MARK, false);
|
||||
me->CastSpell(victim, SPELL_SHADOW_MARK, false);
|
||||
}
|
||||
}
|
||||
events.RepeatEvent(urand(5000, 7000));
|
||||
events.Repeat(5s, 7s);
|
||||
break;
|
||||
case EVENT_WHIRLWIND:
|
||||
if (Unit* victim = me->GetVictim())
|
||||
@@ -648,11 +645,11 @@ public:
|
||||
me->CastSpell(victim, SPELL_WHIRLWIND, false);
|
||||
}
|
||||
}
|
||||
events.RepeatEvent(urand(4000, 6000));
|
||||
events.Repeat(4s, 6s);
|
||||
break;
|
||||
case EVENT_SHADOW_BOLT_VOLLEY:
|
||||
me->CastSpell(me->GetVictim(), SPELL_SHADOW_BOLT_VOLLEY, false);
|
||||
events.RepeatEvent(5000);
|
||||
events.Repeat(5s);
|
||||
break;
|
||||
case EVENT_DRAIN_LIFE:
|
||||
if (Unit* victim = me->GetVictim())
|
||||
@@ -662,11 +659,11 @@ public:
|
||||
me->CastSpell(victim, SPELL_DRAIN_LIFE, false);
|
||||
}
|
||||
}
|
||||
events.RepeatEvent(urand(8000, 12000));
|
||||
events.Repeat(8s, 12s);
|
||||
break;
|
||||
case EVENT_UNHOLY_FRENZY:
|
||||
me->AddAura(SPELL_UNHOLY_FRENZY, me);
|
||||
events.RepeatEvent(urand(15000, 17000));
|
||||
events.Repeat(15s, 17s);
|
||||
break;
|
||||
case EVENT_STOMP:
|
||||
if (Unit* victim = me->GetVictim())
|
||||
@@ -676,7 +673,7 @@ public:
|
||||
me->CastSpell(victim, SPELL_STOMP, false);
|
||||
}
|
||||
}
|
||||
events.RepeatEvent(urand(4000, 9000));
|
||||
events.Repeat(4s, 9s);
|
||||
break;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -684,6 +681,109 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class npc_gothik_trigger_40 : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_gothik_trigger_40() : CreatureScript("npc_gothik_trigger_40") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_gothik_trigger_40AI(creature);
|
||||
}
|
||||
|
||||
struct npc_gothik_trigger_40AI : public ScriptedAI
|
||||
{
|
||||
npc_gothik_trigger_40AI(Creature* creature) : ScriptedAI(creature) { creature->SetDisableGravity(true); }
|
||||
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override {}
|
||||
void UpdateAI(uint32 /*diff*/) override {}
|
||||
void JustEngagedWith(Unit* /*who*/) override {}
|
||||
void DamageTaken(Unit* /*who*/, uint32& damage, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override { damage = 0; }
|
||||
|
||||
Creature* SelectRandomSkullPile()
|
||||
{
|
||||
std::list<Creature*> triggers;
|
||||
me->GetCreatureListWithEntryInGrid(triggers, NPC_TRIGGER, 150.0f);
|
||||
// Remove triggers that are on live side or soul triggers on the platform
|
||||
triggers.remove_if([](Creature* trigger){
|
||||
return ((trigger->GetPositionY() < POS_Y_GATE) || (trigger->GetPositionZ() > 280.0f));
|
||||
});
|
||||
if (!triggers.empty())
|
||||
{
|
||||
std::list<Creature*>::iterator itr = triggers.begin();
|
||||
std::advance(itr, urand(0, triggers.size() - 1));
|
||||
return *itr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (!spell)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_ANCHOR_1_TRAINEE:
|
||||
DoCastAOE(SPELL_ANCHOR_2_TRAINEE, true);
|
||||
break;
|
||||
case SPELL_ANCHOR_1_DK:
|
||||
DoCastAOE(SPELL_ANCHOR_2_DK, true);
|
||||
break;
|
||||
case SPELL_ANCHOR_1_RIDER:
|
||||
DoCastAOE(SPELL_ANCHOR_2_RIDER, true);
|
||||
break;
|
||||
case SPELL_ANCHOR_2_TRAINEE:
|
||||
if (Creature* target = SelectRandomSkullPile())
|
||||
{
|
||||
DoCast(target, SPELL_SKULLS_TRAINEE, true);
|
||||
}
|
||||
break;
|
||||
case SPELL_ANCHOR_2_DK:
|
||||
if (Creature* target = SelectRandomSkullPile())
|
||||
{
|
||||
DoCast(target, SPELL_SKULLS_DK, true);
|
||||
}
|
||||
break;
|
||||
case SPELL_ANCHOR_2_RIDER:
|
||||
if (Creature* target = SelectRandomSkullPile())
|
||||
{
|
||||
DoCast(target, SPELL_SKULLS_RIDER, true);
|
||||
}
|
||||
break;
|
||||
case SPELL_SKULLS_TRAINEE:
|
||||
DoSummon(NPC_DEAD_TRAINEE, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
break;
|
||||
case SPELL_SKULLS_DK:
|
||||
DoSummon(NPC_DEAD_KNIGHT, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
break;
|
||||
case SPELL_SKULLS_RIDER:
|
||||
DoSummon(NPC_DEAD_RIDER, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
DoSummon(NPC_DEAD_HORSE, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// dead side summons are "owned" by gothik
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if (Creature* gothik = ObjectAccessor::GetCreature(*me, me->GetInstanceScript()->GetGuidData(DATA_GOTHIK_BOSS)))
|
||||
{
|
||||
gothik->AI()->JustSummoned(summon);
|
||||
}
|
||||
}
|
||||
void SummonedCreatureDespawn(Creature* summon) override
|
||||
{
|
||||
if (Creature* gothik = ObjectAccessor::GetCreature(*me, me->GetInstanceScript()->GetGuidData(DATA_GOTHIK_BOSS)))
|
||||
{
|
||||
gothik->AI()->SummonedCreatureDespawn(summon);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_gothik_shadow_bolt_volley : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gothik_shadow_bolt_volley);
|
||||
@@ -703,5 +803,6 @@ void AddSC_boss_gothik_40()
|
||||
{
|
||||
new boss_gothik_40();
|
||||
new npc_boss_gothik_minion_40();
|
||||
new npc_gothik_trigger_40();
|
||||
// RegisterSpellScript(spell_gothik_shadow_bolt_volley);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ enum Spells
|
||||
SPELL_SLIME_SPRAY = 28157,
|
||||
SPELL_POISON_CLOUD_DAMAGE_AURA = 28158,
|
||||
SPELL_BERSERK = 26662,
|
||||
SPELL_BOMBARD_SLIME = 90003 // update summon entry
|
||||
};
|
||||
|
||||
enum Emotes
|
||||
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
// Close tunnel door
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HEIGAN_EXIT_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HEIGAN_EXIT_GATE_40)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
@@ -164,12 +164,12 @@ public:
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
// Open tunnel door
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HEIGAN_EXIT_GATE)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HEIGAN_EXIT_GATE_40)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
// Close loatheb door
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HEIGAN_EXIT_GATE_OLD)))
|
||||
if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetGuidData(DATA_HEIGAN_EXIT_GATE_OLD_40)))
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
enum Spells
|
||||
{
|
||||
SPELL_NECROTIC_AURA = 55593,
|
||||
SPELL_SUMMON_SPORE = 90006,
|
||||
SPELL_DEATHBLOOM = 29865,
|
||||
SPELL_INEVITABLE_DOOM = 29204,
|
||||
SPELL_BERSERK = 26662
|
||||
|
||||
@@ -32,7 +32,6 @@ enum Spells
|
||||
SPELL_FRENZY = 54123,
|
||||
SPELL_WEB_WRAP_STUN = 28622,
|
||||
SPELL_WEB_WRAP_SUMMON = 28627,
|
||||
SPELL_WEB_WRAP_SUMMON_40 = 90007, // custom summon entry: 16486 -> 351075
|
||||
SPELL_WEB_WRAP_PACIFY_5 = 28618
|
||||
};
|
||||
|
||||
|
||||
@@ -15,10 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
enum Says
|
||||
@@ -26,7 +24,10 @@ enum Says
|
||||
SAY_AGGRO = 0,
|
||||
SAY_SLAY = 1,
|
||||
SAY_TAUNTED = 2,
|
||||
SAY_DEATH = 3
|
||||
SAY_DEATH = 3,
|
||||
SAY_PATHETIC = 4,
|
||||
SAY_TARGET_DUMMY = 5,
|
||||
SAY_DEATH_KNIGHT_UNDERSTUDY = 0,
|
||||
};
|
||||
|
||||
enum Spells
|
||||
@@ -35,7 +36,6 @@ enum Spells
|
||||
SPELL_DISRUPTING_SHOUT = 29107,
|
||||
SPELL_JAGGED_KNIFE = 55550,
|
||||
SPELL_HOPELESS = 29125,
|
||||
|
||||
SPELL_TAUNT = 29060
|
||||
};
|
||||
|
||||
@@ -46,10 +46,25 @@ enum Events
|
||||
EVENT_JAGGED_KNIFE = 3
|
||||
};
|
||||
|
||||
enum Misc
|
||||
enum NPCs
|
||||
{
|
||||
NPC_DEATH_KNIGHT_UNDERSTUDY = 351084,
|
||||
NPC_RAZUVIOUS = 351036
|
||||
NPC_TARGET_DUMMY = 16211,
|
||||
};
|
||||
|
||||
enum Actions
|
||||
{
|
||||
ACTION_FACE_ME = 0,
|
||||
ACTION_TALK = 1,
|
||||
ACTION_EMOTE = 2,
|
||||
ACTION_SALUTE = 3,
|
||||
ACTION_BACK_TO_TRAINING = 4,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
GROUP_OOC_RP = 0,
|
||||
POINT_DEATH_KNIGHT = 0,
|
||||
};
|
||||
|
||||
class boss_razuvious_40 : public CreatureScript
|
||||
@@ -94,6 +109,99 @@ public:
|
||||
summons.DespawnAll();
|
||||
events.Reset();
|
||||
SpawnHelpers();
|
||||
ScheduleRP();
|
||||
}
|
||||
|
||||
void ScheduleInteractWithDeathKnight()
|
||||
{
|
||||
if (_rpBuddyGUID)
|
||||
if (Creature* understudy = ObjectAccessor::GetCreature(*me, _rpBuddyGUID))
|
||||
me->SetFacingToObject(understudy);
|
||||
|
||||
scheduler.Schedule(2s, GROUP_OOC_RP, [this](TaskContext /*context*/)
|
||||
{
|
||||
if (roll_chance_i(75))
|
||||
{
|
||||
bool longText = roll_chance_i(50);
|
||||
Talk(longText ? SAY_TARGET_DUMMY : SAY_PATHETIC);
|
||||
scheduler.Schedule(4s, GROUP_OOC_RP, [this](TaskContext /*context*/)
|
||||
{
|
||||
if (_rpBuddyGUID)
|
||||
if (Creature* understudy = ObjectAccessor::GetCreature(*me, _rpBuddyGUID))
|
||||
understudy->AI()->DoAction(ACTION_TALK);
|
||||
});
|
||||
if (longText)
|
||||
scheduler.DelayGroup(GROUP_OOC_RP, 5s);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
scheduler.Schedule(4s, GROUP_OOC_RP, [this](TaskContext /*context*/)
|
||||
{
|
||||
if (_rpBuddyGUID)
|
||||
if (Creature* understudy = ObjectAccessor::GetCreature(*me, _rpBuddyGUID))
|
||||
{
|
||||
if (roll_chance_i(25))
|
||||
understudy->AI()->DoAction(ACTION_EMOTE);
|
||||
else
|
||||
understudy->AI()->DoAction(ACTION_TALK);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).Schedule(4s, GROUP_OOC_RP, [this](TaskContext /*context*/)
|
||||
{
|
||||
if (_rpBuddyGUID)
|
||||
if (Creature* understudy = ObjectAccessor::GetCreature(*me, _rpBuddyGUID))
|
||||
understudy->AI()->DoAction(ACTION_FACE_ME);
|
||||
}).Schedule(10s, GROUP_OOC_RP, [this](TaskContext /*context*/)
|
||||
{
|
||||
if (_rpBuddyGUID)
|
||||
if (Creature* understudy = ObjectAccessor::GetCreature(*me, _rpBuddyGUID))
|
||||
understudy->AI()->DoAction(ACTION_SALUTE);
|
||||
}).Schedule(13s, GROUP_OOC_RP, [this](TaskContext /*context*/)
|
||||
{
|
||||
me->ResumeMovement();
|
||||
}).Schedule(16s, GROUP_OOC_RP, [this](TaskContext /*context*/)
|
||||
{
|
||||
if (_rpBuddyGUID)
|
||||
if (Creature* understudy = ObjectAccessor::GetCreature(*me, _rpBuddyGUID))
|
||||
understudy->AI()->DoAction(ACTION_BACK_TO_TRAINING);
|
||||
ScheduleRP();
|
||||
});
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if (type == POINT_MOTION_TYPE && id == POINT_DEATH_KNIGHT)
|
||||
{
|
||||
ScheduleInteractWithDeathKnight();
|
||||
}
|
||||
}
|
||||
|
||||
void ScheduleRP()
|
||||
{
|
||||
_rpBuddyGUID = Acore::Containers::SelectRandomContainerElement(summons);
|
||||
scheduler.Schedule(60s, 80s, GROUP_OOC_RP, [this](TaskContext context)
|
||||
{
|
||||
if (_rpBuddyGUID)
|
||||
{
|
||||
if (Creature* understudy = ObjectAccessor::GetCreature(*me, _rpBuddyGUID))
|
||||
{
|
||||
if (me->GetDistance2d(understudy) <= 6.0f)
|
||||
{
|
||||
me->PauseMovement();
|
||||
scheduler.Schedule(500ms, GROUP_OOC_RP, [this](TaskContext /*context*/)
|
||||
{
|
||||
if (_rpBuddyGUID)
|
||||
if (Creature* understudy = ObjectAccessor::GetCreature(*me, _rpBuddyGUID))
|
||||
me->GetMotionMaster()->MovePoint(POINT_DEATH_KNIGHT, understudy->GetNearPosition(3.2f, understudy->GetRelativeAngle(me)));
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
context.Repeat(2s);
|
||||
});
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
@@ -135,16 +243,19 @@ public:
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
scheduler.CancelGroup(GROUP_OOC_RP);
|
||||
Talk(SAY_AGGRO);
|
||||
events.ScheduleEvent(EVENT_UNBALANCING_STRIKE, 20000); // TODO: This can be 30 seconds to match vanilla
|
||||
events.ScheduleEvent(EVENT_DISRUPTING_SHOUT, 5s);
|
||||
// events.ScheduleEvent(EVENT_DISRUPTING_SHOUT, 15s);
|
||||
//events.ScheduleEvent(EVENT_JAGGED_KNIFE, 10000); // New wrath mechanic
|
||||
events.ScheduleEvent(EVENT_UNBALANCING_STRIKE, 20s); // TODO: This can be 30 seconds to match vanilla
|
||||
events.ScheduleEvent(EVENT_DISRUPTING_SHOUT, 15s);
|
||||
// events.ScheduleEvent(EVENT_JAGGED_KNIFE, 10s); // wrath only
|
||||
summons.DoZoneInCombat();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!me->IsInCombat())
|
||||
scheduler.Update(diff);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
@@ -156,22 +267,25 @@ public:
|
||||
{
|
||||
case EVENT_UNBALANCING_STRIKE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_UNBALANCING_STRIKE, false);
|
||||
events.RepeatEvent(20000);
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
case EVENT_DISRUPTING_SHOUT:
|
||||
me->CastSpell(me, SPELL_DISRUPTING_SHOUT, false);
|
||||
events.RepeatEvent(10000);
|
||||
events.Repeat(10s);
|
||||
break;
|
||||
case EVENT_JAGGED_KNIFE:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 45.0f))
|
||||
{
|
||||
me->CastSpell(target, SPELL_JAGGED_KNIFE, false);
|
||||
}
|
||||
events.RepeatEvent(10000);
|
||||
events.Repeat(10s);
|
||||
break;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
ObjectGuid _rpBuddyGUID;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -180,20 +294,65 @@ class boss_razuvious_minion_40 : public CreatureScript
|
||||
public:
|
||||
boss_razuvious_minion_40() : CreatureScript("boss_razuvious_minion_40") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const override
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetNaxxramasAI<boss_razuvious_minion_40AI>(pCreature);
|
||||
return GetNaxxramasAI<boss_razuvious_minion_40AI>(creature);
|
||||
}
|
||||
|
||||
struct boss_razuvious_minion_40AI : public ScriptedAI
|
||||
{
|
||||
explicit boss_razuvious_minion_40AI(Creature* c) : ScriptedAI(c) { }
|
||||
|
||||
EventMap events;
|
||||
explicit boss_razuvious_minion_40AI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
scheduler.CancelAll();
|
||||
ScheduleAttackDummy();
|
||||
}
|
||||
|
||||
void ScheduleAttackDummy()
|
||||
{
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H);
|
||||
if (Creature* targetDummy = me->FindNearestCreature(NPC_TARGET_DUMMY, 10.0f))
|
||||
{
|
||||
me->SetFacingToObject(targetDummy);
|
||||
}
|
||||
scheduler.Schedule(6s, 9s, GROUP_OOC_RP, [this](TaskContext context)
|
||||
{
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK1H);
|
||||
context.Repeat(6s, 9s);
|
||||
});
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case ACTION_FACE_ME:
|
||||
scheduler.CancelGroup(GROUP_OOC_RP);
|
||||
me->SetSheath(SHEATH_STATE_UNARMED);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
{
|
||||
if (Creature* creature = instance->GetCreature(DATA_RAZUVIOUS_40))
|
||||
{
|
||||
me->SetFacingToObject(creature);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ACTION_TALK:
|
||||
Talk(SAY_DEATH_KNIGHT_UNDERSTUDY);
|
||||
break;
|
||||
case ACTION_EMOTE:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
|
||||
break;
|
||||
case ACTION_SALUTE:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
|
||||
break;
|
||||
case ACTION_BACK_TO_TRAINING:
|
||||
me->SetSheath(SHEATH_STATE_MELEE);
|
||||
ScheduleAttackDummy();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
@@ -206,18 +365,23 @@ public:
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
if (Creature* cr = me->FindNearestCreature(NPC_RAZUVIOUS, 100.0f))
|
||||
scheduler.CancelGroup(GROUP_OOC_RP);
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
{
|
||||
cr->SetInCombatWithZone();
|
||||
cr->AI()->AttackStart(who);
|
||||
if (Creature* creature = instance->GetCreature(DATA_RAZUVIOUS_40))
|
||||
{
|
||||
creature->SetInCombatWithZone();
|
||||
creature->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
scheduler.Update(diff);
|
||||
|
||||
if (UpdateVictim())
|
||||
{
|
||||
events.Update(diff);
|
||||
if (!me->HasUnitState(UNIT_STATE_CASTING) || !me->IsCharmed())
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -753,31 +753,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class spell_feugen_static_field : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_feugen_static_field);
|
||||
|
||||
void HandleDamageCalc(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || (caster->GetMap()->GetDifficulty() != RAID_DIFFICULTY_10MAN_HEROIC))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
Powers PowerType = POWER_MANA;
|
||||
int32 drainedAmount = -target->ModifyPower(PowerType, -500);
|
||||
SetEffectValue(drainedAmount);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectLaunchTarget += SpellEffectFn(spell_feugen_static_field::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_thaddius_40()
|
||||
{
|
||||
new boss_thaddius_40();
|
||||
@@ -786,5 +761,4 @@ void AddSC_boss_thaddius_40()
|
||||
RegisterSpellScript(spell_thaddius_pos_neg_charge);
|
||||
// RegisterSpellScript(spell_thaddius_polarity_shift);
|
||||
// new at_thaddius_entrance();
|
||||
RegisterSpellScript(spell_feugen_static_field);
|
||||
}
|
||||
|
||||
@@ -331,6 +331,31 @@ class spell_disease_cloud_damage_40 : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_feugen_static_field_40 : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_feugen_static_field_40);
|
||||
|
||||
void HandleDamageCalc(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || (caster->GetMap()->GetDifficulty() != RAID_DIFFICULTY_10MAN_HEROIC))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
Powers PowerType = POWER_MANA;
|
||||
int32 drainedAmount = -target->ModifyPower(PowerType, -500);
|
||||
SetEffectValue(drainedAmount);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectLaunchTarget += SpellEffectFn(spell_feugen_static_field_40::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_custom_spells_40()
|
||||
{
|
||||
RegisterSpellScript(spell_anub_locust_swarm_aura_40);
|
||||
@@ -344,4 +369,5 @@ void AddSC_custom_spells_40()
|
||||
RegisterSpellScript(spell_razuvious_disrupting_shout_40);
|
||||
RegisterSpellScript(spell_unholy_staff_arcane_explosion_40);
|
||||
RegisterSpellScript(spell_disease_cloud_damage_40);
|
||||
RegisterSpellScript(spell_feugen_static_field_40);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "DBCEnums.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
const float HeiganPos[2] = {2796, -3707};
|
||||
@@ -53,6 +52,18 @@ inline uint8 GetEruptionSection(float x, float y)
|
||||
return 3;
|
||||
}
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
{
|
||||
{ NPC_RAZUVIOUS, DATA_RAZUVIOUS },
|
||||
{ NPC_RAZUVIOUS_40, DATA_RAZUVIOUS_40 },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
ObjectData const gameObjectData[] =
|
||||
{
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
class instance_naxxramas_combined : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
@@ -67,7 +78,9 @@ public:
|
||||
{
|
||||
explicit instance_naxxramas_combined_InstanceMapScript(Map* pMap) : InstanceScript(pMap)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(MAX_ENCOUNTERS);
|
||||
LoadObjectData(creatureData, gameObjectData);
|
||||
for (auto& i : HeiganEruption)
|
||||
i.clear();
|
||||
|
||||
@@ -141,6 +154,7 @@ public:
|
||||
GuidList HeiganBackRoomAdds;
|
||||
ObjectGuid _patchwerkGUID;
|
||||
ObjectGuid _thaddiusGUID;
|
||||
ObjectGuid _gothikGUID;
|
||||
ObjectGuid _stalaggGUID;
|
||||
ObjectGuid _feugenGUID;
|
||||
ObjectGuid _zeliekGUID;
|
||||
@@ -252,6 +266,9 @@ public:
|
||||
case NPC_FEUGEN:
|
||||
_feugenGUID = creature->GetGUID();
|
||||
return;
|
||||
case NPC_GOTHIK:
|
||||
_gothikGUID = creature->GetGUID();
|
||||
return;
|
||||
case NPC_LADY_BLAUMEUX:
|
||||
_blaumeuxGUID = creature->GetGUID();
|
||||
return;
|
||||
@@ -274,6 +291,9 @@ public:
|
||||
_lichkingGUID = creature->GetGUID();
|
||||
return;
|
||||
// Naxx 40 NPCs
|
||||
case NPC_GOTHIK_40:
|
||||
_gothikGUID = creature->GetGUID();
|
||||
return;
|
||||
case NPC_PATCHWERK_40:
|
||||
_patchwerkGUID = creature->GetGUID();
|
||||
return;
|
||||
@@ -328,6 +348,8 @@ public:
|
||||
creature->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
return;
|
||||
}
|
||||
|
||||
InstanceScript::OnCreatureCreate(creature);
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo) override
|
||||
@@ -585,6 +607,8 @@ public:
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
InstanceScript::OnGameObjectCreate(pGo);
|
||||
}
|
||||
|
||||
void OnGameObjectRemove(GameObject* pGo) override
|
||||
@@ -723,7 +747,7 @@ public:
|
||||
case DATA_HEIGAN_ERUPTION:
|
||||
HeiganEruptSections(data);
|
||||
return;
|
||||
case DATA_HEIGAN_ERUPTION_TUNNEL:
|
||||
case DATA_HEIGAN_ERUPTION_TUNNEL_40:
|
||||
HeiganEruptSectionsTunnel();
|
||||
return;
|
||||
case DATA_HAD_THADDIUS_GREET:
|
||||
@@ -1192,9 +1216,9 @@ public:
|
||||
// GameObjects
|
||||
case DATA_HEIGAN_ENTER_GATE:
|
||||
return _heiganGateGUID;
|
||||
case DATA_HEIGAN_EXIT_GATE_OLD:
|
||||
case DATA_HEIGAN_EXIT_GATE_OLD_40:
|
||||
return _heiganGateExitOldGUID;
|
||||
case DATA_HEIGAN_EXIT_GATE:
|
||||
case DATA_HEIGAN_EXIT_GATE_40:
|
||||
return _heiganGateExitGUID;
|
||||
case DATA_LOATHEB_GATE:
|
||||
return _loathebGateGUID;
|
||||
@@ -1236,6 +1260,8 @@ public:
|
||||
return _stalaggGUID;
|
||||
case DATA_FEUGEN_BOSS:
|
||||
return _feugenGUID;
|
||||
case DATA_GOTHIK_BOSS:
|
||||
return _gothikGUID;
|
||||
case DATA_LICH_KING_BOSS:
|
||||
return _lichkingGUID;
|
||||
default:
|
||||
@@ -1328,6 +1354,39 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
const Position sapphironEntryTP = { 3498.300049f, -5349.490234f, 144.968002f, 1.3698910f };
|
||||
|
||||
class at_naxxramas_hub_portal : public AreaTriggerScript
|
||||
{
|
||||
public:
|
||||
at_naxxramas_hub_portal() : AreaTriggerScript("at_naxxramas_hub_portal") { }
|
||||
|
||||
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/) override
|
||||
{
|
||||
if (player->GetMap()->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
|
||||
{
|
||||
InstanceScript* instance = player->GetInstanceScript();
|
||||
for (int i = 0; i < BOSS_SAPPHIRON; ++i)
|
||||
{
|
||||
if (instance->GetBossState(i) != DONE)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (player->IsAlive() && !player->IsInCombat())
|
||||
{
|
||||
if (InstanceScript *instance = player->GetInstanceScript())
|
||||
{
|
||||
if (instance->CheckRequiredBosses(BOSS_SAPPHIRON))
|
||||
{
|
||||
player->TeleportTo(533, sapphironEntryTP.m_positionX, sapphironEntryTP.m_positionY, sapphironEntryTP.m_positionZ, sapphironEntryTP.m_orientation);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class NaxxPlayerScript : public PlayerScript
|
||||
{
|
||||
public:
|
||||
@@ -1408,39 +1467,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
const Position sapphironEntryTP = { 3498.300049f, -5349.490234f, 144.968002f, 1.3698910f };
|
||||
|
||||
class at_naxxramas_hub_portal : public AreaTriggerScript
|
||||
{
|
||||
public:
|
||||
at_naxxramas_hub_portal() : AreaTriggerScript("at_naxxramas_hub_portal") { }
|
||||
|
||||
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/) override
|
||||
{
|
||||
if (player->GetMap()->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
|
||||
{
|
||||
InstanceScript* instance = player->GetInstanceScript();
|
||||
for (int i = 0; i < BOSS_SAPPHIRON; ++i)
|
||||
{
|
||||
if (instance->GetBossState(i) != DONE)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (player->IsAlive() && !player->IsInCombat())
|
||||
{
|
||||
if (InstanceScript *instance = player->GetInstanceScript())
|
||||
{
|
||||
if (instance->CheckRequiredBosses(BOSS_SAPPHIRON))
|
||||
{
|
||||
player->TeleportTo(533, sapphironEntryTP.m_positionX, sapphironEntryTP.m_positionY, sapphironEntryTP.m_positionZ, sapphironEntryTP.m_orientation);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class NaxxEntryFlag_AllMapScript : public AllMapScript
|
||||
{
|
||||
public:
|
||||
@@ -1471,10 +1497,10 @@ public:
|
||||
void AddSC_instance_naxxramas_combined()
|
||||
{
|
||||
new instance_naxxramas_combined();
|
||||
// new boss_naxxramas_misc();
|
||||
new at_naxxramas_hub_portal();
|
||||
new NaxxPlayerScript();
|
||||
new naxx_exit_trigger();
|
||||
new naxx_northrend_entrance();
|
||||
new at_naxxramas_hub_portal();
|
||||
new NaxxEntryFlag_AllMapScript();
|
||||
// new boss_naxxramas_misc();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "CreatureAIImpl.h"
|
||||
#include "SpellScript.h"
|
||||
#include "naxxramas_40.h"
|
||||
|
||||
#define DataHeader "NAX"
|
||||
|
||||
#define NaxxramasScriptName "instance_naxxramas"
|
||||
|
||||
@@ -56,28 +59,27 @@ enum NXData
|
||||
DATA_STALAGG_BOSS = 108,
|
||||
DATA_FEUGEN_BOSS = 109,
|
||||
DATA_THADDIUS_GATE = 110,
|
||||
DATA_GOTHIK_ENTER_GATE = 111,
|
||||
DATA_GOTHIK_INNER_GATE = 112,
|
||||
DATA_GOTHIK_EXIT_GATE = 113,
|
||||
DATA_HORSEMEN_GATE = 114,
|
||||
DATA_LICH_KING_BOSS = 115,
|
||||
DATA_KELTHUZAD_FLOOR = 116,
|
||||
DATA_ABOMINATION_KILLED = 117,
|
||||
DATA_FRENZY_REMOVED = 118,
|
||||
DATA_CHARGES_CROSSED = 119,
|
||||
DATA_SPORE_KILLED = 120,
|
||||
DATA_HUNDRED_CLUB = 121,
|
||||
DATA_DANCE_FAIL = 122,
|
||||
DATA_IMMORTAL_FAIL = 123,
|
||||
DATA_KELTHUZAD_GATE = 124,
|
||||
DATA_HAD_THADDIUS_GREET = 125,
|
||||
DATA_KELTHUZAD_PORTAL_1 = 126,
|
||||
DATA_KELTHUZAD_PORTAL_2 = 127,
|
||||
DATA_KELTHUZAD_PORTAL_3 = 128,
|
||||
DATA_KELTHUZAD_PORTAL_4 = 129,
|
||||
DATA_HEIGAN_EXIT_GATE_OLD = 130,
|
||||
DATA_HEIGAN_EXIT_GATE = 131,
|
||||
DATA_HEIGAN_ERUPTION_TUNNEL = 130
|
||||
DATA_RAZUVIOUS = 111, //
|
||||
DATA_GOTHIK_BOSS = 112, //
|
||||
DATA_GOTHIK_ENTER_GATE = 113,
|
||||
DATA_GOTHIK_INNER_GATE = 114,
|
||||
DATA_GOTHIK_EXIT_GATE = 115,
|
||||
DATA_HORSEMEN_GATE = 116,
|
||||
DATA_LICH_KING_BOSS = 117,
|
||||
DATA_KELTHUZAD_FLOOR = 118,
|
||||
DATA_ABOMINATION_KILLED = 119,
|
||||
DATA_FRENZY_REMOVED = 120,
|
||||
DATA_CHARGES_CROSSED = 121,
|
||||
DATA_SPORE_KILLED = 122,
|
||||
DATA_HUNDRED_CLUB = 123,
|
||||
DATA_DANCE_FAIL = 124,
|
||||
DATA_IMMORTAL_FAIL = 125,
|
||||
DATA_KELTHUZAD_GATE = 126,
|
||||
DATA_HAD_THADDIUS_GREET = 127,
|
||||
DATA_KELTHUZAD_PORTAL_1 = 128,
|
||||
DATA_KELTHUZAD_PORTAL_2 = 129,
|
||||
DATA_KELTHUZAD_PORTAL_3 = 130,
|
||||
DATA_KELTHUZAD_PORTAL_4 = 131
|
||||
};
|
||||
|
||||
enum NXGOs
|
||||
@@ -104,7 +106,6 @@ enum NXGOs
|
||||
|
||||
GO_HORSEMEN_CHEST_10 = 181366,
|
||||
GO_HORSEMEN_CHEST_25 = 193426,
|
||||
GO_HORSEMEN_CHEST_40 = 361000,
|
||||
|
||||
GO_SAPPHIRON_BIRTH = 181356,
|
||||
GO_KELTHUZAD_FLOOR = 181444,
|
||||
@@ -130,9 +131,6 @@ enum NXGOs
|
||||
GO_PLAG_EYE_RAMP_BOSS = 181231,
|
||||
GO_MILI_EYE_RAMP_BOSS = 181230,
|
||||
GO_CONS_EYE_RAMP_BOSS = 181232,
|
||||
|
||||
// Gate to enter Naxx 40 from Strath
|
||||
NAXX_STRATH_GATE = 176424
|
||||
};
|
||||
|
||||
enum NXNPCs
|
||||
@@ -142,6 +140,9 @@ enum NXNPCs
|
||||
NPC_STALAGG = 15929,
|
||||
NPC_FEUGEN = 15930,
|
||||
|
||||
// Razuvious
|
||||
NPC_RAZUVIOUS = 16061,
|
||||
|
||||
// Four horseman
|
||||
NPC_BARON_RIVENDARE = 30549,
|
||||
NPC_SIR_ZELIEK = 16063,
|
||||
@@ -168,48 +169,9 @@ enum NXNPCs
|
||||
NPC_LIVING_MONSTROSITY = 16021,
|
||||
NPC_SURGICAL_ASSIST = 16022,
|
||||
NPC_SLUDGE_BELCHER = 16029,
|
||||
};
|
||||
|
||||
enum NX40NPCs
|
||||
{
|
||||
// Thaddius
|
||||
NPC_THADDIUS_40 = 351000,
|
||||
NPC_STALAGG_40 = 351001,
|
||||
NPC_FEUGEN_40 = 351002,
|
||||
|
||||
// Four horseman
|
||||
NPC_HIGHLORD_MOGRAINE_40 = 351037,
|
||||
NPC_SIR_ZELIEK_40 = 351038,
|
||||
NPC_LADY_BLAUMEUX_40 = 351040,
|
||||
NPC_THANE_KORTHAZZ_40 = 351039,
|
||||
|
||||
// Sapphiron
|
||||
NPC_SAPPHIRON_40 = 351018,
|
||||
|
||||
// Kel'Thuzad
|
||||
NPC_KELTHUZAD_40 = 351019,
|
||||
NPC_LICH_KING_40 = 16980,
|
||||
|
||||
// Frogger
|
||||
NPC_LIVING_POISON_40 = 16027,
|
||||
NPC_NAXXRAMAS_TRIGGER_40 = 16082,
|
||||
NPC_MR_BIGGLESWORTH_40 = 16998,
|
||||
|
||||
// Patchwerk
|
||||
NPC_PATCHWERK_40 = 351028,
|
||||
NPC_PATCHWORK_GOLEM_40 = 351021,
|
||||
NPC_BILE_RETCHER_40 = 351022,
|
||||
NPC_MAD_SCIENTIST_40 = 351023,
|
||||
NPC_LIVING_MONSTROSITY_40 = 351024,
|
||||
NPC_SURGICAL_ASSIST_40 = 351025,
|
||||
NPC_SLUDGE_BELCHER_40 = 351029,
|
||||
|
||||
// Heigan
|
||||
NPC_ROTTING_MAGGOT_40 = 351034,
|
||||
NPC_DISEASED_MAGGOT_40 = 351033,
|
||||
NPC_EYE_STALK_40 = 351090,
|
||||
|
||||
NPC_ARCHMAGE_TARSIS = 16381,
|
||||
// Gothik
|
||||
NPC_GOTHIK = 16060
|
||||
};
|
||||
|
||||
enum NXMisc
|
||||
@@ -242,24 +204,6 @@ enum NXEvents
|
||||
EVENT_FROSTWYRM_WATERFALL_DOOR = 2
|
||||
};
|
||||
|
||||
enum NXMaps
|
||||
{
|
||||
MAP_NAXX = 533,
|
||||
};
|
||||
|
||||
enum NXGraveyards
|
||||
{
|
||||
NAXX40_GRAVEYARD = 909
|
||||
};
|
||||
|
||||
enum NXAttunementQuests
|
||||
{
|
||||
NAXX40_ATTUNEMENT_1 = 9121,
|
||||
NAXX40_ATTUNEMENT_2 = 9122,
|
||||
NAXX40_ATTUNEMENT_3 = 9123,
|
||||
NAXX40_ENTRANCE_FLAG = 9378
|
||||
};
|
||||
|
||||
template <class AI, class T>
|
||||
inline AI* GetNaxxramasAI(T* obj)
|
||||
{
|
||||
|
||||
114
src/naxx40Scripts/naxxramas_40.h
Normal file
114
src/naxx40Scripts/naxxramas_40.h
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by the
|
||||
* Free Software Foundation; either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DEF_NAXXRAMAS_40_H
|
||||
#define DEF_NAXXRAMAS_40_H
|
||||
|
||||
enum NX40Spells
|
||||
{
|
||||
SPELL_SUMMON_CORPSE_SCRABS_5 = 90001, // Changed from 29105 to Level 60 Mob ID for summon
|
||||
SPELL_SUMMON_CORPSE_SCRABS_10 = 90002, // Changed from 29105 to Level 60 Mob ID for summon
|
||||
SPELL_BOMBARD_SLIME = 90003, // update summon entry
|
||||
SPELL_SUMMON_SPORE = 90006,
|
||||
SPELL_WEB_WRAP_SUMMON_40 = 90007 // custom summon entry: 16486 -> 351075
|
||||
};
|
||||
|
||||
enum NX40Data
|
||||
{
|
||||
DATA_HEIGAN_EXIT_GATE_OLD_40 = 4130,
|
||||
DATA_HEIGAN_EXIT_GATE_40 = 4131,
|
||||
DATA_HEIGAN_ERUPTION_TUNNEL_40 = 4132,
|
||||
DATA_RAZUVIOUS_40 = 4133
|
||||
};
|
||||
|
||||
enum NX40GOs
|
||||
{
|
||||
GO_HEIGAN_ENTRY_GATE_40 = 181202,
|
||||
GO_HEIGAN_EXIT_GATE_40 = 181203,
|
||||
GO_HEIGAN_EXIT_GATE_OLD_40 = 181496,
|
||||
GO_HORSEMEN_CHEST_40 = 361000,
|
||||
// Gate to enter Naxx 40 from Strath
|
||||
GO_STRATH_GATE_40 = 176424
|
||||
};
|
||||
|
||||
enum NX40NPCs
|
||||
{
|
||||
// Thaddius
|
||||
NPC_THADDIUS_40 = 351000,
|
||||
NPC_STALAGG_40 = 351001,
|
||||
NPC_FEUGEN_40 = 351002,
|
||||
|
||||
// Razuvious
|
||||
NPC_RAZUVIOUS_40 = 351036,
|
||||
|
||||
// Gothik
|
||||
NPC_GOTHIK_40 = 351035,
|
||||
|
||||
// Four horseman
|
||||
NPC_HIGHLORD_MOGRAINE_40 = 351037,
|
||||
NPC_SIR_ZELIEK_40 = 351038,
|
||||
NPC_LADY_BLAUMEUX_40 = 351040,
|
||||
NPC_THANE_KORTHAZZ_40 = 351039,
|
||||
|
||||
// Sapphiron
|
||||
NPC_SAPPHIRON_40 = 351018,
|
||||
|
||||
// Kel'Thuzad
|
||||
NPC_KELTHUZAD_40 = 351019,
|
||||
// NPC_LICH_KING_40 = 16980,
|
||||
|
||||
// Frogger
|
||||
// NPC_LIVING_POISON_40 = 16027,
|
||||
// NPC_NAXXRAMAS_TRIGGER_40 = 16082,
|
||||
// NPC_MR_BIGGLESWORTH_40 = 16998,
|
||||
|
||||
// Patchwerk
|
||||
NPC_PATCHWERK_40 = 351028,
|
||||
NPC_PATCHWORK_GOLEM_40 = 351021,
|
||||
NPC_BILE_RETCHER_40 = 351022,
|
||||
NPC_MAD_SCIENTIST_40 = 351023,
|
||||
NPC_LIVING_MONSTROSITY_40 = 351024,
|
||||
NPC_SURGICAL_ASSIST_40 = 351025,
|
||||
NPC_SLUDGE_BELCHER_40 = 351029,
|
||||
|
||||
// Heigan
|
||||
NPC_ROTTING_MAGGOT_40 = 351034,
|
||||
NPC_DISEASED_MAGGOT_40 = 351033,
|
||||
NPC_EYE_STALK_40 = 351090,
|
||||
|
||||
NPC_ARCHMAGE_TARSIS = 16381,
|
||||
};
|
||||
|
||||
enum NX40Maps
|
||||
{
|
||||
MAP_NAXX = 533,
|
||||
};
|
||||
|
||||
enum NX40Graveyards
|
||||
{
|
||||
NAXX40_GRAVEYARD = 909
|
||||
};
|
||||
|
||||
enum NX40AttunementQuests
|
||||
{
|
||||
NAXX40_ATTUNEMENT_1 = 9121,
|
||||
NAXX40_ATTUNEMENT_2 = 9122,
|
||||
NAXX40_ATTUNEMENT_3 = 9123,
|
||||
NAXX40_ENTRANCE_FLAG = 9378
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user