mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
converted all tabs to 4 spaces
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@ enum ScriptTexts
|
||||
SAY_FRENZY = 11,
|
||||
SAY_BERSERK = 12,
|
||||
SAY_DEATH = 13,
|
||||
EMOTE_SCENT_OF_BLOOD = 14,
|
||||
EMOTE_SCENT_OF_BLOOD = 14,
|
||||
|
||||
// High Overlord Saurfang
|
||||
SAY_INTRO_HORDE_1 = 0,
|
||||
@@ -129,7 +129,7 @@ enum EventTypes
|
||||
|
||||
EVENT_BERSERK = 18,
|
||||
EVENT_SUMMON_BLOOD_BEAST = 19,
|
||||
EVENT_BLOOD_BEAST_SCENT_OF_BLOOD = 100,
|
||||
EVENT_BLOOD_BEAST_SCENT_OF_BLOOD = 100,
|
||||
EVENT_BOILING_BLOOD = 20,
|
||||
EVENT_BLOOD_NOVA = 21,
|
||||
EVENT_RUNE_OF_BLOOD = 22,
|
||||
@@ -179,9 +179,9 @@ enum Actions
|
||||
ACTION_CHARGE = -3781302,
|
||||
ACTION_START_OUTRO = -3781303,
|
||||
ACTION_DESPAWN = -3781304,
|
||||
ACTION_INTRO_DONE = -3781305,
|
||||
ACTION_EVADE = -3781306,
|
||||
ACTION_GAIN_SCENT_OF_BLOOD = -3781307,
|
||||
ACTION_INTRO_DONE = -3781305,
|
||||
ACTION_EVADE = -3781306,
|
||||
ACTION_GAIN_SCENT_OF_BLOOD = -3781307,
|
||||
ACTION_MARK_OF_THE_FALLEN_CHAMPION = -72293,
|
||||
};
|
||||
|
||||
@@ -241,10 +241,10 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
events.Reset();
|
||||
_introDone = false;
|
||||
_introDone = false;
|
||||
_frenzied = false;
|
||||
_fallenChampionCastCount = 0;
|
||||
_transportCheckTimer = 1000;
|
||||
_fallenChampionCastCount = 0;
|
||||
_transportCheckTimer = 1000;
|
||||
me->SetPower(POWER_ENERGY, 0);
|
||||
DoCast(me, SPELL_ZERO_POWER, true);
|
||||
DoCast(me, SPELL_BLOOD_LINK, true);
|
||||
@@ -258,11 +258,11 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (!_introDone)
|
||||
{
|
||||
me->CombatStop();
|
||||
return;
|
||||
}
|
||||
if (!_introDone)
|
||||
{
|
||||
me->CombatStop();
|
||||
return;
|
||||
}
|
||||
|
||||
// pussywizard: without this, the aura is not recalculated the first time
|
||||
me->RemoveAurasDueToSpell(SPELL_BLOOD_POWER);
|
||||
@@ -282,7 +282,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_SUMMON_BLOOD_BEAST, 30000);
|
||||
events.ScheduleEvent(EVENT_BERSERK, (IsHeroic() ? 360000 : 480000));
|
||||
events.ScheduleEvent(EVENT_BERSERK, (IsHeroic() ? 360000 : 480000));
|
||||
events.ScheduleEvent(EVENT_BOILING_BLOOD, 15500, 0);
|
||||
events.ScheduleEvent(EVENT_BLOOD_NOVA, 17000, 0);
|
||||
events.ScheduleEvent(EVENT_RUNE_OF_BLOOD, 20000, 0);
|
||||
@@ -303,10 +303,10 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
creature->AI()->DoAction(ACTION_START_OUTRO);
|
||||
}
|
||||
|
||||
bool CanAIAttack(const Unit* target) const
|
||||
{
|
||||
return _introDone;
|
||||
}
|
||||
bool CanAIAttack(const Unit* target) const
|
||||
{
|
||||
return _introDone;
|
||||
}
|
||||
|
||||
void AttackStart(Unit* victim)
|
||||
{
|
||||
@@ -316,7 +316,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
ScriptedAI::AttackStart(victim);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
@@ -384,20 +384,20 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (_transportCheckTimer <= diff)
|
||||
{
|
||||
_transportCheckTimer = 1000;
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
if (Player* p = itr->GetSource())
|
||||
if (p->GetTransport())
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
_transportCheckTimer -= diff;
|
||||
if (_transportCheckTimer <= diff)
|
||||
{
|
||||
_transportCheckTimer = 1000;
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
if (Player* p = itr->GetSource())
|
||||
if (p->GetTransport())
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
_transportCheckTimer -= diff;
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
@@ -414,13 +414,13 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
DoCast(me, SPELL_SUMMON_BLOOD_BEAST_25_MAN+i25);
|
||||
Talk(SAY_BLOOD_BEASTS);
|
||||
events.ScheduleEvent(EVENT_SUMMON_BLOOD_BEAST, 40000);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_BLOOD_BEAST_SCENT_OF_BLOOD, 10000);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_BLOOD_BEAST_SCENT_OF_BLOOD, 10000);
|
||||
break;
|
||||
case EVENT_BLOOD_BEAST_SCENT_OF_BLOOD:
|
||||
Talk(EMOTE_SCENT_OF_BLOOD);
|
||||
summons.DoAction(ACTION_GAIN_SCENT_OF_BLOOD);
|
||||
break;
|
||||
case EVENT_BLOOD_BEAST_SCENT_OF_BLOOD:
|
||||
Talk(EMOTE_SCENT_OF_BLOOD);
|
||||
summons.DoAction(ACTION_GAIN_SCENT_OF_BLOOD);
|
||||
break;
|
||||
case EVENT_BLOOD_NOVA:
|
||||
{
|
||||
me->CastSpell((Unit*)NULL, SPELL_BLOOD_NOVA_TRIGGER, false);
|
||||
@@ -447,9 +447,9 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void DoAction(int32 action)
|
||||
{
|
||||
switch (action)
|
||||
void DoAction(int32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case ACTION_MARK_OF_THE_FALLEN_CHAMPION:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_MARK_OF_THE_FALLEN_CHAMPION))
|
||||
@@ -461,39 +461,39 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
bloodPower->RecalculateAmountOfEffects();
|
||||
}
|
||||
break;
|
||||
case ACTION_INTRO_DONE:
|
||||
_introDone = true;
|
||||
break;
|
||||
case ACTION_INTRO_DONE:
|
||||
_introDone = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_MADE_A_MESS)
|
||||
{
|
||||
{
|
||||
if (_fallenChampionCastCount < RAID_MODE<uint32>(3, 5, 3, 5))
|
||||
return 1;
|
||||
}
|
||||
else if (type == FALLEN_CHAMPION_CAST_COUNT)
|
||||
return _fallenChampionCastCount;
|
||||
}
|
||||
else if (type == FALLEN_CHAMPION_CAST_COUNT)
|
||||
return _fallenChampionCastCount;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
BossAI::EnterEvadeMode();
|
||||
if (Creature* creature = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SAURFANG_EVENT_NPC)))
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
BossAI::EnterEvadeMode();
|
||||
if (Creature* creature = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SAURFANG_EVENT_NPC)))
|
||||
creature->AI()->DoAction(ACTION_EVADE);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _fallenChampionCastCount;
|
||||
bool _introDone;
|
||||
bool _frenzied; // faster than iterating all auras to find Frenzy
|
||||
uint16 _transportCheckTimer;
|
||||
uint16 _transportCheckTimer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -518,8 +518,8 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
void Reset()
|
||||
{
|
||||
_events.Reset();
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void DoAction(int32 action)
|
||||
@@ -527,77 +527,77 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
switch (action)
|
||||
{
|
||||
case ACTION_START_EVENT:
|
||||
{
|
||||
// Prevent crashes
|
||||
if (_events.GetPhaseMask() & PHASE_INTRO_MASK)
|
||||
return;
|
||||
{
|
||||
// Prevent crashes
|
||||
if (_events.GetPhaseMask() & PHASE_INTRO_MASK)
|
||||
return;
|
||||
|
||||
Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG));
|
||||
if (!deathbringer || deathbringer->IsInEvadeMode())
|
||||
return;
|
||||
Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG));
|
||||
if (!deathbringer || deathbringer->IsInEvadeMode())
|
||||
return;
|
||||
|
||||
if (_guardList.empty())
|
||||
{
|
||||
GetCreatureListWithEntryInGrid(_guardList, me, NPC_SE_KOR_KRON_REAVER, 20.0f);
|
||||
_guardList.sort(Trinity::ObjectDistanceOrderPred(me));
|
||||
}
|
||||
uint32 x = 1;
|
||||
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
|
||||
(*itr)->AI()->SetData(0, x++);
|
||||
if (_guardList.empty())
|
||||
{
|
||||
GetCreatureListWithEntryInGrid(_guardList, me, NPC_SE_KOR_KRON_REAVER, 20.0f);
|
||||
_guardList.sort(Trinity::ObjectDistanceOrderPred(me));
|
||||
}
|
||||
uint32 x = 1;
|
||||
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
|
||||
(*itr)->AI()->SetData(0, x++);
|
||||
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
Talk(SAY_INTRO_HORDE_1);
|
||||
_events.SetPhase(PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_2, 5000, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_3, 18500, 0, PHASE_INTRO_H);
|
||||
_instance->HandleGameObject(_instance->GetData64(GO_SAURFANG_S_DOOR), true);
|
||||
|
||||
if (GameObject* teleporter = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SCOURGE_TRANSPORTER_SAURFANG)))
|
||||
{
|
||||
_instance->HandleGameObject(0, false, teleporter);
|
||||
teleporter->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
}
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
Talk(SAY_INTRO_HORDE_1);
|
||||
_events.SetPhase(PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_2, 5000, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_3, 18500, 0, PHASE_INTRO_H);
|
||||
_instance->HandleGameObject(_instance->GetData64(GO_SAURFANG_S_DOOR), true);
|
||||
|
||||
if (GameObject* teleporter = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SCOURGE_TRANSPORTER_SAURFANG)))
|
||||
{
|
||||
_instance->HandleGameObject(0, false, teleporter);
|
||||
teleporter->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
}
|
||||
|
||||
deathbringer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
deathbringer->SetWalk(false);
|
||||
deathbringer->GetMotionMaster()->MovePoint(POINT_SAURFANG, deathbringerPos.GetPositionX(), deathbringerPos.GetPositionY(), deathbringerPos.GetPositionZ());
|
||||
}
|
||||
deathbringer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
deathbringer->SetWalk(false);
|
||||
deathbringer->GetMotionMaster()->MovePoint(POINT_SAURFANG, deathbringerPos.GetPositionX(), deathbringerPos.GetPositionY(), deathbringerPos.GetPositionZ());
|
||||
}
|
||||
break;
|
||||
case ACTION_START_OUTRO:
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
|
||||
me->SetDisableGravity(false);
|
||||
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 539.2917f, 10.0f);
|
||||
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
|
||||
(*itr)->AI()->DoAction(ACTION_DESPAWN);
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
|
||||
me->SetDisableGravity(false);
|
||||
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 539.2917f, 10.0f);
|
||||
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
|
||||
(*itr)->AI()->DoAction(ACTION_DESPAWN);
|
||||
|
||||
/*Talk(SAY_OUTRO_HORDE_1);
|
||||
_events.ScheduleEvent(EVENT_OUTRO_HORDE_1, 10000);
|
||||
_events.ScheduleEvent(EVENT_OUTRO_HORDE_2, 18000);
|
||||
_events.ScheduleEvent(EVENT_OUTRO_HORDE_3, 24000);*/
|
||||
|
||||
}
|
||||
break;
|
||||
case ACTION_EVADE:
|
||||
{
|
||||
float x, y, z, o;
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
me->SetPosition(x, y, z, o);
|
||||
me->StopMovingOnCurrentPos();
|
||||
me->SetDisableGravity(false);
|
||||
EnterEvadeMode();
|
||||
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
|
||||
{
|
||||
(*itr)->GetMotionMaster()->Clear();
|
||||
(*itr)->GetHomePosition(x, y, z, o);
|
||||
(*itr)->SetPosition(x, y, z, o);
|
||||
(*itr)->StopMovingOnCurrentPos();
|
||||
(*itr)->SetDisableGravity(false);
|
||||
(*itr)->AI()->EnterEvadeMode();
|
||||
}
|
||||
}
|
||||
break;
|
||||
/*Talk(SAY_OUTRO_HORDE_1);
|
||||
_events.ScheduleEvent(EVENT_OUTRO_HORDE_1, 10000);
|
||||
_events.ScheduleEvent(EVENT_OUTRO_HORDE_2, 18000);
|
||||
_events.ScheduleEvent(EVENT_OUTRO_HORDE_3, 24000);*/
|
||||
|
||||
}
|
||||
break;
|
||||
case ACTION_EVADE:
|
||||
{
|
||||
float x, y, z, o;
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
me->SetPosition(x, y, z, o);
|
||||
me->StopMovingOnCurrentPos();
|
||||
me->SetDisableGravity(false);
|
||||
EnterEvadeMode();
|
||||
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
|
||||
{
|
||||
(*itr)->GetMotionMaster()->Clear();
|
||||
(*itr)->GetHomePosition(x, y, z, o);
|
||||
(*itr)->SetPosition(x, y, z, o);
|
||||
(*itr)->StopMovingOnCurrentPos();
|
||||
(*itr)->SetDisableGravity(false);
|
||||
(*itr)->AI()->EnterEvadeMode();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -621,13 +621,13 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
case POINT_FIRST_STEP:
|
||||
me->SetWalk(false);
|
||||
Talk(SAY_INTRO_HORDE_3);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_4, 6500, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_4, 6500, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_5, 15500, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_6, 29500, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_7, 43800, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_8, 47000, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_9, 46700+1000+500, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_FINISH, 46700+1000+9000, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_HORDE_9, 46700+1000+500, 0, PHASE_INTRO_H);
|
||||
_events.ScheduleEvent(EVENT_INTRO_FINISH, 46700+1000+9000, 0, PHASE_INTRO_H);
|
||||
break;
|
||||
/*case POINT_CORPSE:
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
@@ -655,19 +655,19 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
_events.Update(diff);
|
||||
switch (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_2:
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
deathbringer->AI()->Talk(SAY_INTRO_HORDE_2);
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
deathbringer->AI()->Talk(SAY_INTRO_HORDE_2);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_3:
|
||||
me->SetWalk(true);
|
||||
me->GetMotionMaster()->MovePoint(POINT_FIRST_STEP, firstStepPos.GetPositionX(), firstStepPos.GetPositionY(), firstStepPos.GetPositionZ());
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_4:
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
deathbringer->AI()->Talk(SAY_INTRO_HORDE_4);
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
deathbringer->AI()->Talk(SAY_INTRO_HORDE_4);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_5:
|
||||
Talk(SAY_INTRO_HORDE_5);
|
||||
@@ -685,20 +685,20 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
me->GetMotionMaster()->MoveCharge(chargePos[0].GetPositionX(), chargePos[0].GetPositionY(), chargePos[0].GetPositionZ(), 8.5f, POINT_CHARGE);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_9:
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
deathbringer->AI()->DoCast(me, SPELL_GRIP_OF_AGONY);
|
||||
deathbringer->AI()->Talk(SAY_INTRO_HORDE_9);
|
||||
}
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
deathbringer->AI()->DoCast(me, SPELL_GRIP_OF_AGONY);
|
||||
deathbringer->AI()->Talk(SAY_INTRO_HORDE_9);
|
||||
}
|
||||
break;
|
||||
case EVENT_INTRO_FINISH:
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
deathbringer->AI()->DoAction(ACTION_INTRO_DONE);
|
||||
deathbringer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
if (Player* target = deathbringer->SelectNearestPlayer(100.0f))
|
||||
deathbringer->AI()->AttackStart(target);
|
||||
}
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
deathbringer->AI()->DoAction(ACTION_INTRO_DONE);
|
||||
deathbringer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
if (Player* target = deathbringer->SelectNearestPlayer(100.0f))
|
||||
deathbringer->AI()->AttackStart(target);
|
||||
}
|
||||
break;
|
||||
|
||||
/*case EVENT_OUTRO_HORDE_1:
|
||||
@@ -747,14 +747,14 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != IN_PROGRESS)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (action == -ACTION_START_EVENT)
|
||||
creature->AI()->DoAction(ACTION_START_EVENT);
|
||||
}
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (action == -ACTION_START_EVENT)
|
||||
creature->AI()->DoAction(ACTION_START_EVENT);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -780,8 +780,8 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
void Reset()
|
||||
{
|
||||
_events.Reset();
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void DoAction(int32 action)
|
||||
@@ -789,43 +789,43 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
switch (action)
|
||||
{
|
||||
case ACTION_START_EVENT:
|
||||
{
|
||||
// Prevent crashes
|
||||
if (_events.GetPhaseMask() & PHASE_INTRO_MASK)
|
||||
return;
|
||||
{
|
||||
// Prevent crashes
|
||||
if (_events.GetPhaseMask() & PHASE_INTRO_MASK)
|
||||
return;
|
||||
|
||||
Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG));
|
||||
if (!deathbringer || deathbringer->IsInEvadeMode())
|
||||
return;
|
||||
Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG));
|
||||
if (!deathbringer || deathbringer->IsInEvadeMode())
|
||||
return;
|
||||
|
||||
if (_guardList.empty())
|
||||
{
|
||||
GetCreatureListWithEntryInGrid(_guardList, me, NPC_SE_SKYBREAKER_MARINE, 20.0f);
|
||||
_guardList.sort(Trinity::ObjectDistanceOrderPred(me));
|
||||
}
|
||||
uint32 x = 1;
|
||||
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
|
||||
(*itr)->AI()->SetData(0, x++);
|
||||
if (_guardList.empty())
|
||||
{
|
||||
GetCreatureListWithEntryInGrid(_guardList, me, NPC_SE_SKYBREAKER_MARINE, 20.0f);
|
||||
_guardList.sort(Trinity::ObjectDistanceOrderPred(me));
|
||||
}
|
||||
uint32 x = 1;
|
||||
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
|
||||
(*itr)->AI()->SetData(0, x++);
|
||||
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
Talk(SAY_INTRO_ALLIANCE_1);
|
||||
_events.SetPhase(PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_2, 2500, 0, PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_3, 20000, 0, PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_4, 2500+17500+9500, 0, PHASE_INTRO_A);
|
||||
_instance->HandleGameObject(_instance->GetData64(GO_SAURFANG_S_DOOR), true);
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
Talk(SAY_INTRO_ALLIANCE_1);
|
||||
_events.SetPhase(PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_2, 2500, 0, PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_3, 20000, 0, PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_4, 2500+17500+9500, 0, PHASE_INTRO_A);
|
||||
_instance->HandleGameObject(_instance->GetData64(GO_SAURFANG_S_DOOR), true);
|
||||
|
||||
if (GameObject* teleporter = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SCOURGE_TRANSPORTER_SAURFANG)))
|
||||
{
|
||||
_instance->HandleGameObject(0, false, teleporter);
|
||||
teleporter->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
}
|
||||
if (GameObject* teleporter = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SCOURGE_TRANSPORTER_SAURFANG)))
|
||||
{
|
||||
_instance->HandleGameObject(0, false, teleporter);
|
||||
teleporter->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
}
|
||||
|
||||
deathbringer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
deathbringer->SetWalk(false);
|
||||
deathbringer->GetMotionMaster()->MovePoint(POINT_SAURFANG, deathbringerPos.GetPositionX(), deathbringerPos.GetPositionY(), deathbringerPos.GetPositionZ());
|
||||
}
|
||||
break;
|
||||
deathbringer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
deathbringer->SetWalk(false);
|
||||
deathbringer->GetMotionMaster()->MovePoint(POINT_SAURFANG, deathbringerPos.GetPositionX(), deathbringerPos.GetPositionY(), deathbringerPos.GetPositionZ());
|
||||
}
|
||||
break;
|
||||
case ACTION_START_OUTRO:
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
|
||||
@@ -837,28 +837,28 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
//Talk(SAY_OUTRO_ALLIANCE_1);
|
||||
break;
|
||||
}
|
||||
case ACTION_EVADE:
|
||||
{
|
||||
float x, y, z, o;
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
me->SetPosition(x, y, z, o);
|
||||
me->StopMovingOnCurrentPos();
|
||||
me->SetDisableGravity(false);
|
||||
EnterEvadeMode();
|
||||
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
|
||||
{
|
||||
(*itr)->GetMotionMaster()->Clear();
|
||||
(*itr)->GetHomePosition(x, y, z, o);
|
||||
(*itr)->SetPosition(x, y, z, o);
|
||||
(*itr)->StopMovingOnCurrentPos();
|
||||
(*itr)->SetDisableGravity(false);
|
||||
(*itr)->AI()->EnterEvadeMode();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case ACTION_EVADE:
|
||||
{
|
||||
float x, y, z, o;
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
me->SetPosition(x, y, z, o);
|
||||
me->StopMovingOnCurrentPos();
|
||||
me->SetDisableGravity(false);
|
||||
EnterEvadeMode();
|
||||
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
|
||||
{
|
||||
(*itr)->GetMotionMaster()->Clear();
|
||||
(*itr)->GetHomePosition(x, y, z, o);
|
||||
(*itr)->SetPosition(x, y, z, o);
|
||||
(*itr)->StopMovingOnCurrentPos();
|
||||
(*itr)->SetDisableGravity(false);
|
||||
(*itr)->AI()->EnterEvadeMode();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -878,16 +878,16 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
switch (id)
|
||||
{
|
||||
case POINT_FIRST_STEP:
|
||||
me->SetWalk(false);
|
||||
Talk(SAY_INTRO_ALLIANCE_4);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_5, 5000, 0, PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_6, 6500+500, 0, PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_7, 6500+500+2000, 0, PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_FINISH, 6500+500+2000+5000, 0, PHASE_INTRO_A);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
me->SetWalk(false);
|
||||
Talk(SAY_INTRO_ALLIANCE_4);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_5, 5000, 0, PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_6, 6500+500, 0, PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_ALLIANCE_7, 6500+500+2000, 0, PHASE_INTRO_A);
|
||||
_events.ScheduleEvent(EVENT_INTRO_FINISH, 6500+500+2000+5000, 0, PHASE_INTRO_A);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -896,15 +896,15 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
_events.Update(diff);
|
||||
switch (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_INTRO_ALLIANCE_2:
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
deathbringer->AI()->Talk(SAY_INTRO_ALLIANCE_2);
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
deathbringer->AI()->Talk(SAY_INTRO_ALLIANCE_2);
|
||||
break;
|
||||
case EVENT_INTRO_ALLIANCE_3:
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
deathbringer->AI()->Talk(SAY_INTRO_ALLIANCE_3);
|
||||
deathbringer->AI()->Talk(SAY_INTRO_ALLIANCE_3);
|
||||
break;
|
||||
case EVENT_INTRO_ALLIANCE_4:
|
||||
me->SetWalk(true);
|
||||
@@ -917,26 +917,26 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
me->GetMotionMaster()->MoveCharge(chargePos[0].GetPositionX(), chargePos[0].GetPositionY(), chargePos[0].GetPositionZ(), 8.5f, POINT_CHARGE);
|
||||
break;
|
||||
case EVENT_INTRO_ALLIANCE_6:
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
deathbringer->AI()->Talk(SAY_INTRO_ALLIANCE_7);
|
||||
deathbringer->AI()->DoCast(me, SPELL_GRIP_OF_AGONY);
|
||||
}
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
deathbringer->AI()->Talk(SAY_INTRO_ALLIANCE_7);
|
||||
deathbringer->AI()->DoCast(me, SPELL_GRIP_OF_AGONY);
|
||||
}
|
||||
break;
|
||||
case EVENT_INTRO_ALLIANCE_7:
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
deathbringer->AI()->Talk(SAY_INTRO_ALLIANCE_6);
|
||||
}
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
deathbringer->AI()->Talk(SAY_INTRO_ALLIANCE_6);
|
||||
}
|
||||
break;
|
||||
case EVENT_INTRO_FINISH:
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
deathbringer->AI()->DoAction(ACTION_INTRO_DONE);
|
||||
deathbringer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
if (Player* target = deathbringer->SelectNearestPlayer(100.0f))
|
||||
deathbringer->AI()->AttackStart(target);
|
||||
}
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
deathbringer->AI()->DoAction(ACTION_INTRO_DONE);
|
||||
deathbringer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
if (Player* target = deathbringer->SelectNearestPlayer(100.0f))
|
||||
deathbringer->AI()->AttackStart(target);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -949,7 +949,7 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != IN_PROGRESS)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(0, "Let it begin...", 631, -ACTION_START_EVENT + 1);
|
||||
@@ -961,14 +961,14 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != IN_PROGRESS)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (action == -ACTION_START_EVENT + 1)
|
||||
creature->AI()->DoAction(ACTION_START_EVENT);
|
||||
}
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (action == -ACTION_START_EVENT + 1)
|
||||
creature->AI()->DoAction(ACTION_START_EVENT);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -989,7 +989,7 @@ class npc_saurfang_event : public CreatureScript
|
||||
npc_saurfang_eventAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_index = 0;
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
@@ -1010,10 +1010,10 @@ class npc_saurfang_event : public CreatureScript
|
||||
void DoAction(int32 action)
|
||||
{
|
||||
if (action == ACTION_CHARGE && _index)
|
||||
{
|
||||
me->SetWalk(false);
|
||||
{
|
||||
me->SetWalk(false);
|
||||
me->GetMotionMaster()->MoveCharge(chargePos[_index].GetPositionX(), chargePos[_index].GetPositionY(), chargePos[_index].GetPositionZ(), 13.0f, POINT_CHARGE);
|
||||
}
|
||||
}
|
||||
else if (action == ACTION_DESPAWN)
|
||||
me->DespawnOrUnsummon(1);
|
||||
}
|
||||
@@ -1045,31 +1045,31 @@ class spell_deathbringer_blood_link_aura : public SpellScriptLoader
|
||||
saurfang->AI()->DoAction(ACTION_MARK_OF_THE_FALLEN_CHAMPION);
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo();
|
||||
return eventInfo.GetActor() && eventInfo.GetActionTarget() && (eventInfo.GetDamageInfo()->GetDamage() || eventInfo.GetHitMask() & PROC_EX_ABSORB) && procSpell && procSpell->SpellIconID != 2731; // Xinef: Mark of the Fallen Champion
|
||||
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo();
|
||||
return eventInfo.GetActor() && eventInfo.GetActionTarget() && (eventInfo.GetDamageInfo()->GetDamage() || eventInfo.GetHitMask() & PROC_EX_ABSORB) && procSpell && procSpell->SpellIconID != 2731; // Xinef: Mark of the Fallen Champion
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* victim = eventInfo.GetActionTarget();
|
||||
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo();
|
||||
Unit* victim = eventInfo.GetActionTarget();
|
||||
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo();
|
||||
|
||||
uint32 markCount = 0;
|
||||
if (Creature* saurfang = eventInfo.GetActor()->ToCreature())
|
||||
markCount = saurfang->IsAIEnabled ? saurfang->AI()->GetData(123456 /*FALLEN_CHAMPION_CAST_COUNT*/) : 0;
|
||||
int32 basepoints = int32(1.0f /*+ 0.5f + 0.5f*markCount*/);
|
||||
switch (procSpell->Id) // some spells give more Blood Power
|
||||
{
|
||||
case 72380: case 72438: case 72439: case 72440: // Blood Nova
|
||||
basepoints = int32(2.0f /*+ 0.5f + 0.75f*markCount*/);
|
||||
break;
|
||||
}
|
||||
uint32 markCount = 0;
|
||||
if (Creature* saurfang = eventInfo.GetActor()->ToCreature())
|
||||
markCount = saurfang->IsAIEnabled ? saurfang->AI()->GetData(123456 /*FALLEN_CHAMPION_CAST_COUNT*/) : 0;
|
||||
int32 basepoints = int32(1.0f /*+ 0.5f + 0.5f*markCount*/);
|
||||
switch (procSpell->Id) // some spells give more Blood Power
|
||||
{
|
||||
case 72380: case 72438: case 72439: case 72440: // Blood Nova
|
||||
basepoints = int32(2.0f /*+ 0.5f + 0.75f*markCount*/);
|
||||
break;
|
||||
}
|
||||
|
||||
victim->CastCustomSpell(SPELL_BLOOD_LINK_DUMMY, SPELLVALUE_BASE_POINT0, basepoints, eventInfo.GetActor(), true);
|
||||
return;
|
||||
victim->CastCustomSpell(SPELL_BLOOD_LINK_DUMMY, SPELLVALUE_BASE_POINT0, basepoints, eventInfo.GetActor(), true);
|
||||
return;
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -1096,27 +1096,27 @@ class spell_deathbringer_blood_link_blood_beast_aura : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_deathbringer_blood_link_blood_beast_aura_AuraScript);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo();
|
||||
return eventInfo.GetActor() && eventInfo.GetActionTarget() && (eventInfo.GetDamageInfo()->GetDamage() || eventInfo.GetHitMask() & PROC_EX_ABSORB) && (!procSpell || procSpell->SpellIconID != 2731); // Xinef: Mark of the Fallen Champion
|
||||
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo();
|
||||
return eventInfo.GetActor() && eventInfo.GetActionTarget() && (eventInfo.GetDamageInfo()->GetDamage() || eventInfo.GetHitMask() & PROC_EX_ABSORB) && (!procSpell || procSpell->SpellIconID != 2731); // Xinef: Mark of the Fallen Champion
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
uint32 markCount = 0;
|
||||
if (Map* map = eventInfo.GetActor()->FindMap())
|
||||
if (InstanceMap* imap = map->ToInstanceMap())
|
||||
if (InstanceScript* isc = imap->GetInstanceScript())
|
||||
if (uint64 sguid = isc->GetData64(3 /*DATA_DEATHBRINGER_SAURFANG*/))
|
||||
if (Creature* saurfang = ObjectAccessor::GetCreature(*eventInfo.GetActor(), sguid))
|
||||
markCount = saurfang->IsAIEnabled ? saurfang->AI()->GetData(123456 /*FALLEN_CHAMPION_CAST_COUNT*/) : 0;
|
||||
int32 basepoints = int32(3.0f /*+ 0.5f + 0.5f*markCount*/);
|
||||
uint32 markCount = 0;
|
||||
if (Map* map = eventInfo.GetActor()->FindMap())
|
||||
if (InstanceMap* imap = map->ToInstanceMap())
|
||||
if (InstanceScript* isc = imap->GetInstanceScript())
|
||||
if (uint64 sguid = isc->GetData64(3 /*DATA_DEATHBRINGER_SAURFANG*/))
|
||||
if (Creature* saurfang = ObjectAccessor::GetCreature(*eventInfo.GetActor(), sguid))
|
||||
markCount = saurfang->IsAIEnabled ? saurfang->AI()->GetData(123456 /*FALLEN_CHAMPION_CAST_COUNT*/) : 0;
|
||||
int32 basepoints = int32(3.0f /*+ 0.5f + 0.5f*markCount*/);
|
||||
|
||||
eventInfo.GetActor()->CastCustomSpell(SPELL_BLOOD_LINK_DUMMY, SPELLVALUE_BASE_POINT0, basepoints, eventInfo.GetActionTarget(), true);
|
||||
return;
|
||||
eventInfo.GetActor()->CastCustomSpell(SPELL_BLOOD_LINK_DUMMY, SPELLVALUE_BASE_POINT0, basepoints, eventInfo.GetActionTarget(), true);
|
||||
return;
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -1249,12 +1249,12 @@ class spell_deathbringer_blood_nova_targeting : public SpellScriptLoader
|
||||
if (targetsAtRange < minTargets)
|
||||
targetsAtRange = std::min<uint32>(targets.size(), minTargets);
|
||||
|
||||
if (!targetsAtRange)
|
||||
return;
|
||||
if (!targetsAtRange)
|
||||
return;
|
||||
|
||||
std::list<WorldObject*>::iterator itrTarget = targets.begin();
|
||||
std::advance(itrTarget, urand(0,targetsAtRange-1));
|
||||
target = *itrTarget;
|
||||
std::list<WorldObject*>::iterator itrTarget = targets.begin();
|
||||
std::advance(itrTarget, urand(0,targetsAtRange-1));
|
||||
target = *itrTarget;
|
||||
targets.clear();
|
||||
targets.push_back(target);
|
||||
}
|
||||
@@ -1304,14 +1304,14 @@ class spell_deathbringer_boiling_blood : public SpellScriptLoader
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
if (GetSpellInfo()->Id == 72385 || GetSpellInfo()->Id == 72442) // 10n, 10h
|
||||
{
|
||||
WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets);
|
||||
targets.clear();
|
||||
targets.push_back(target);
|
||||
}
|
||||
else
|
||||
Trinity::Containers::RandomResizeList(targets, 3);
|
||||
if (GetSpellInfo()->Id == 72385 || GetSpellInfo()->Id == 72442) // 10n, 10h
|
||||
{
|
||||
WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets);
|
||||
targets.clear();
|
||||
targets.push_back(target);
|
||||
}
|
||||
else
|
||||
Trinity::Containers::RandomResizeList(targets, 3);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -1345,45 +1345,45 @@ class achievement_ive_gone_and_made_a_mess : public AchievementCriteriaScript
|
||||
class npc_icc_blood_beast : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_icc_blood_beast() : CreatureScript("npc_icc_blood_beast") { }
|
||||
npc_icc_blood_beast() : CreatureScript("npc_icc_blood_beast") { }
|
||||
|
||||
struct npc_icc_blood_beastAI : public ScriptedAI
|
||||
{
|
||||
npc_icc_blood_beastAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
timer1 = 1500;
|
||||
}
|
||||
struct npc_icc_blood_beastAI : public ScriptedAI
|
||||
{
|
||||
npc_icc_blood_beastAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
timer1 = 1500;
|
||||
}
|
||||
|
||||
uint16 timer1;
|
||||
uint16 timer1;
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_GAIN_SCENT_OF_BLOOD)
|
||||
me->CastSpell(me, SPELL_SCENT_OF_BLOOD, false);
|
||||
}
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
if (param == ACTION_GAIN_SCENT_OF_BLOOD)
|
||||
me->CastSpell(me, SPELL_SCENT_OF_BLOOD, false);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (timer1)
|
||||
{
|
||||
if (timer1 <= diff)
|
||||
{
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
timer1 = 0;
|
||||
}
|
||||
else
|
||||
timer1 -= diff;
|
||||
}
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (timer1)
|
||||
{
|
||||
if (timer1 <= diff)
|
||||
{
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
timer1 = 0;
|
||||
}
|
||||
else
|
||||
timer1 -= diff;
|
||||
}
|
||||
|
||||
ScriptedAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
ScriptedAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_icc_blood_beastAI(creature);
|
||||
}
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_icc_blood_beastAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_deathbringer_saurfang()
|
||||
@@ -1392,12 +1392,12 @@ void AddSC_boss_deathbringer_saurfang()
|
||||
new npc_high_overlord_saurfang_icc();
|
||||
new npc_muradin_bronzebeard_icc();
|
||||
new npc_saurfang_event();
|
||||
new spell_deathbringer_blood_link_aura();
|
||||
new spell_deathbringer_blood_link_blood_beast_aura();
|
||||
new spell_deathbringer_blood_link_aura();
|
||||
new spell_deathbringer_blood_link_blood_beast_aura();
|
||||
new spell_deathbringer_blood_link();
|
||||
new spell_deathbringer_blood_power();
|
||||
new spell_deathbringer_blood_nova_targeting();
|
||||
new spell_deathbringer_boiling_blood();
|
||||
new achievement_ive_gone_and_made_a_mess();
|
||||
new npc_icc_blood_beast();
|
||||
new npc_icc_blood_beast();
|
||||
}
|
||||
|
||||
@@ -10,34 +10,34 @@ REWRITTEN FROM SCRATCH BY PUSSYWIZARD, IT OWNS NOW!
|
||||
|
||||
enum ScriptTexts
|
||||
{
|
||||
SAY_STINKY_DEAD = 0,
|
||||
SAY_AGGRO = 1,
|
||||
EMOTE_GAS_SPORE = 2,
|
||||
EMOTE_WARN_GAS_SPORE = 3,
|
||||
SAY_PUNGENT_BLIGHT = 4,
|
||||
EMOTE_WARN_PUNGENT_BLIGHT = 5,
|
||||
EMOTE_PUNGENT_BLIGHT = 6,
|
||||
SAY_KILL = 7,
|
||||
SAY_BERSERK = 8,
|
||||
SAY_DEATH = 9,
|
||||
SAY_STINKY_DEAD = 0,
|
||||
SAY_AGGRO = 1,
|
||||
EMOTE_GAS_SPORE = 2,
|
||||
EMOTE_WARN_GAS_SPORE = 3,
|
||||
SAY_PUNGENT_BLIGHT = 4,
|
||||
EMOTE_WARN_PUNGENT_BLIGHT = 5,
|
||||
EMOTE_PUNGENT_BLIGHT = 6,
|
||||
SAY_KILL = 7,
|
||||
SAY_BERSERK = 8,
|
||||
SAY_DEATH = 9,
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
// Festergut
|
||||
SPELL_INHALE_BLIGHT = 69165,
|
||||
SPELL_PUNGENT_BLIGHT = 69195,
|
||||
SPELL_GASTRIC_BLOAT = 72219, // 72214 is the proper way (with proc) but atm procs can't have cooldown for creatures
|
||||
SPELL_GASTRIC_EXPLOSION = 72227,
|
||||
SPELL_GAS_SPORE = 69278,
|
||||
SPELL_VILE_GAS = 69240,
|
||||
SPELL_INOCULATED = 69291,
|
||||
SPELL_MALLABLE_GOO_H = 72296,
|
||||
// Festergut
|
||||
SPELL_INHALE_BLIGHT = 69165,
|
||||
SPELL_PUNGENT_BLIGHT = 69195,
|
||||
SPELL_GASTRIC_BLOAT = 72219, // 72214 is the proper way (with proc) but atm procs can't have cooldown for creatures
|
||||
SPELL_GASTRIC_EXPLOSION = 72227,
|
||||
SPELL_GAS_SPORE = 69278,
|
||||
SPELL_VILE_GAS = 69240,
|
||||
SPELL_INOCULATED = 69291,
|
||||
SPELL_MALLABLE_GOO_H = 72296,
|
||||
|
||||
// Stinky
|
||||
SPELL_MORTAL_WOUND = 71127,
|
||||
SPELL_DECIMATE = 71123,
|
||||
SPELL_PLAGUE_STENCH = 71805,
|
||||
// Stinky
|
||||
SPELL_MORTAL_WOUND = 71127,
|
||||
SPELL_DECIMATE = 71123,
|
||||
SPELL_PLAGUE_STENCH = 71805,
|
||||
};
|
||||
|
||||
// Used for HasAura checks
|
||||
@@ -51,444 +51,444 @@ uint32 const gaseousBlightVisual[3] = {69126, 69152, 69154};
|
||||
|
||||
enum Events
|
||||
{
|
||||
// Festergut
|
||||
EVENT_NONE,
|
||||
EVENT_BERSERK,
|
||||
EVENT_INHALE_BLIGHT,
|
||||
EVENT_VILE_GAS,
|
||||
EVENT_GAS_SPORE,
|
||||
EVENT_GASTRIC_BLOAT,
|
||||
EVENT_FESTERGUT_GOO,
|
||||
// Festergut
|
||||
EVENT_NONE,
|
||||
EVENT_BERSERK,
|
||||
EVENT_INHALE_BLIGHT,
|
||||
EVENT_VILE_GAS,
|
||||
EVENT_GAS_SPORE,
|
||||
EVENT_GASTRIC_BLOAT,
|
||||
EVENT_FESTERGUT_GOO,
|
||||
|
||||
// Stinky
|
||||
EVENT_DECIMATE,
|
||||
EVENT_MORTAL_WOUND,
|
||||
// Stinky
|
||||
EVENT_DECIMATE,
|
||||
EVENT_MORTAL_WOUND,
|
||||
};
|
||||
|
||||
class boss_festergut : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_festergut() : CreatureScript("boss_festergut") { }
|
||||
public:
|
||||
boss_festergut() : CreatureScript("boss_festergut") { }
|
||||
|
||||
struct boss_festergutAI : public BossAI
|
||||
{
|
||||
boss_festergutAI(Creature* creature) : BossAI(creature, DATA_FESTERGUT)
|
||||
{
|
||||
_gasDummyGUID = 0;
|
||||
}
|
||||
struct boss_festergutAI : public BossAI
|
||||
{
|
||||
boss_festergutAI(Creature* creature) : BossAI(creature, DATA_FESTERGUT)
|
||||
{
|
||||
_gasDummyGUID = 0;
|
||||
}
|
||||
|
||||
uint64 _gasDummyGUID;
|
||||
uint32 _maxInoculatedStack;
|
||||
uint32 _inhaleCounter;
|
||||
uint64 _gasDummyGUID;
|
||||
uint32 _maxInoculatedStack;
|
||||
uint32 _inhaleCounter;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_maxInoculatedStack = 0;
|
||||
_inhaleCounter = 0;
|
||||
_Reset();
|
||||
events.Reset();
|
||||
if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
|
||||
{
|
||||
_gasDummyGUID = gasDummy->GetGUID();
|
||||
for (uint8 i=0; i<3; ++i)
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
|
||||
}
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
_maxInoculatedStack = 0;
|
||||
_inhaleCounter = 0;
|
||||
_Reset();
|
||||
events.Reset();
|
||||
if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
|
||||
{
|
||||
_gasDummyGUID = gasDummy->GetGUID();
|
||||
for (uint8 i=0; i<3; ++i)
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (!instance->CheckRequiredBosses(DATA_FESTERGUT, who->ToPlayer()))
|
||||
{
|
||||
EnterEvadeMode();
|
||||
instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT);
|
||||
return;
|
||||
}
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (!instance->CheckRequiredBosses(DATA_FESTERGUT, who->ToPlayer()))
|
||||
{
|
||||
EnterEvadeMode();
|
||||
instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT);
|
||||
return;
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_BERSERK, 300000);
|
||||
events.ScheduleEvent(EVENT_INHALE_BLIGHT, urand(25000, 30000));
|
||||
events.ScheduleEvent(EVENT_GAS_SPORE, urand(20000, 25000));
|
||||
events.ScheduleEvent(EVENT_VILE_GAS, urand(30000, 40000), 1);
|
||||
events.ScheduleEvent(EVENT_GASTRIC_BLOAT, urand(12500, 15000));
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_FESTERGUT_GOO, urand(15000, 20000));
|
||||
events.ScheduleEvent(EVENT_BERSERK, 300000);
|
||||
events.ScheduleEvent(EVENT_INHALE_BLIGHT, urand(25000, 30000));
|
||||
events.ScheduleEvent(EVENT_GAS_SPORE, urand(20000, 25000));
|
||||
events.ScheduleEvent(EVENT_VILE_GAS, urand(30000, 40000), 1);
|
||||
events.ScheduleEvent(EVENT_GASTRIC_BLOAT, urand(12500, 15000));
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_FESTERGUT_GOO, urand(15000, 20000));
|
||||
|
||||
me->setActive(true);
|
||||
Talk(SAY_AGGRO);
|
||||
DoZoneInCombat();
|
||||
me->setActive(true);
|
||||
Talk(SAY_AGGRO);
|
||||
DoZoneInCombat();
|
||||
|
||||
if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
|
||||
_gasDummyGUID = gasDummy->GetGUID();
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_FESTERGUT_COMBAT);
|
||||
}
|
||||
if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
|
||||
_gasDummyGUID = gasDummy->GetGUID();
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_FESTERGUT_COMBAT);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_FESTERGUT_DEATH);
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_FESTERGUT_DEATH);
|
||||
|
||||
RemoveBlight();
|
||||
}
|
||||
RemoveBlight();
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
_JustReachedHome();
|
||||
instance->SetBossState(DATA_FESTERGUT, FAIL);
|
||||
}
|
||||
void JustReachedHome()
|
||||
{
|
||||
_JustReachedHome();
|
||||
instance->SetBossState(DATA_FESTERGUT, FAIL);
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->EnterEvadeMode();
|
||||
}
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->EnterEvadeMode();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell)
|
||||
{
|
||||
if (spell->Id == PUNGENT_BLIGHT_HELPER)
|
||||
target->RemoveAurasDueToSpell(INOCULATED_HELPER);
|
||||
else if (Player* p = target->ToPlayer())
|
||||
{
|
||||
// Gaseous Blight damage
|
||||
if ((spell->Id == 69159 || spell->Id == 70136 || spell->Id == 69161 || spell->Id == 70139 || spell->Id == 69163 || spell->Id == 70469) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) == QUEST_STATUS_INCOMPLETE ||
|
||||
(spell->Id == 70135 || spell->Id == 70138 || spell->Id == 70468 || spell->Id == 70137 || spell->Id == 70140 || spell->Id == 70470) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) == QUEST_STATUS_INCOMPLETE)
|
||||
p->CastSpell(p, SPELL_ORANGE_BLIGHT_RESIDUE, true);
|
||||
}
|
||||
}
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell)
|
||||
{
|
||||
if (spell->Id == PUNGENT_BLIGHT_HELPER)
|
||||
target->RemoveAurasDueToSpell(INOCULATED_HELPER);
|
||||
else if (Player* p = target->ToPlayer())
|
||||
{
|
||||
// Gaseous Blight damage
|
||||
if ((spell->Id == 69159 || spell->Id == 70136 || spell->Id == 69161 || spell->Id == 70139 || spell->Id == 69163 || spell->Id == 70469) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) == QUEST_STATUS_INCOMPLETE ||
|
||||
(spell->Id == 70135 || spell->Id == 70138 || spell->Id == 70468 || spell->Id == 70137 || spell->Id == 70140 || spell->Id == 70470) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) == QUEST_STATUS_INCOMPLETE)
|
||||
p->CastSpell(p, SPELL_ORANGE_BLIGHT_RESIDUE, true);
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveBlight()
|
||||
{
|
||||
if (Creature* gasDummy = ObjectAccessor::GetCreature(*me, _gasDummyGUID))
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
me->RemoveAurasDueToSpell(gaseousBlight[i]);
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
|
||||
}
|
||||
}
|
||||
void RemoveBlight()
|
||||
{
|
||||
if (Creature* gasDummy = ObjectAccessor::GetCreature(*me, _gasDummyGUID))
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
me->RemoveAurasDueToSpell(gaseousBlight[i]);
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() || !CheckInRoom())
|
||||
return;
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() || !CheckInRoom())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK2, true);
|
||||
Talk(SAY_BERSERK);
|
||||
break;
|
||||
case EVENT_INHALE_BLIGHT:
|
||||
RemoveBlight();
|
||||
if (_inhaleCounter == 3)
|
||||
{
|
||||
Talk(EMOTE_WARN_PUNGENT_BLIGHT);
|
||||
Talk(SAY_PUNGENT_BLIGHT);
|
||||
me->CastSpell(me, SPELL_PUNGENT_BLIGHT, false);
|
||||
_inhaleCounter = 0;
|
||||
events.RescheduleEvent(EVENT_GAS_SPORE, urand(20000, 25000));
|
||||
}
|
||||
else
|
||||
{
|
||||
me->CastSpell(me, SPELL_INHALE_BLIGHT, false);
|
||||
// just cast and dont bother with target, conditions will handle it
|
||||
++_inhaleCounter;
|
||||
if (_inhaleCounter < 3)
|
||||
me->CastSpell(me, gaseousBlight[_inhaleCounter], true, NULL, NULL, me->GetGUID());
|
||||
}
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK2, true);
|
||||
Talk(SAY_BERSERK);
|
||||
break;
|
||||
case EVENT_INHALE_BLIGHT:
|
||||
RemoveBlight();
|
||||
if (_inhaleCounter == 3)
|
||||
{
|
||||
Talk(EMOTE_WARN_PUNGENT_BLIGHT);
|
||||
Talk(SAY_PUNGENT_BLIGHT);
|
||||
me->CastSpell(me, SPELL_PUNGENT_BLIGHT, false);
|
||||
_inhaleCounter = 0;
|
||||
events.RescheduleEvent(EVENT_GAS_SPORE, urand(20000, 25000));
|
||||
}
|
||||
else
|
||||
{
|
||||
me->CastSpell(me, SPELL_INHALE_BLIGHT, false);
|
||||
// just cast and dont bother with target, conditions will handle it
|
||||
++_inhaleCounter;
|
||||
if (_inhaleCounter < 3)
|
||||
me->CastSpell(me, gaseousBlight[_inhaleCounter], true, NULL, NULL, me->GetGUID());
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_INHALE_BLIGHT, 34000);
|
||||
break;
|
||||
case EVENT_GAS_SPORE:
|
||||
Talk(EMOTE_WARN_GAS_SPORE);
|
||||
Talk(EMOTE_GAS_SPORE);
|
||||
me->CastCustomSpell(SPELL_GAS_SPORE, SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 3, 2, 3), me);
|
||||
events.ScheduleEvent(EVENT_GAS_SPORE, urand(40000, 45000));
|
||||
events.DelayEventsToMax(20000, 1); // delay EVENT_VILE_GAS
|
||||
break;
|
||||
case EVENT_VILE_GAS:
|
||||
{
|
||||
std::list<Unit*> targets;
|
||||
uint32 minTargets = RAID_MODE<uint32>(3, 8, 3, 8);
|
||||
SelectTargetList(targets, minTargets, SELECT_TARGET_RANDOM, -5.0f, true);
|
||||
float minDist = 0.0f;
|
||||
if (targets.size() >= minTargets)
|
||||
minDist = -5.0f;
|
||||
events.ScheduleEvent(EVENT_INHALE_BLIGHT, 34000);
|
||||
break;
|
||||
case EVENT_GAS_SPORE:
|
||||
Talk(EMOTE_WARN_GAS_SPORE);
|
||||
Talk(EMOTE_GAS_SPORE);
|
||||
me->CastCustomSpell(SPELL_GAS_SPORE, SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 3, 2, 3), me);
|
||||
events.ScheduleEvent(EVENT_GAS_SPORE, urand(40000, 45000));
|
||||
events.DelayEventsToMax(20000, 1); // delay EVENT_VILE_GAS
|
||||
break;
|
||||
case EVENT_VILE_GAS:
|
||||
{
|
||||
std::list<Unit*> targets;
|
||||
uint32 minTargets = RAID_MODE<uint32>(3, 8, 3, 8);
|
||||
SelectTargetList(targets, minTargets, SELECT_TARGET_RANDOM, -5.0f, true);
|
||||
float minDist = 0.0f;
|
||||
if (targets.size() >= minTargets)
|
||||
minDist = -5.0f;
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, minDist, true))
|
||||
me->CastSpell(target, SPELL_VILE_GAS, false);
|
||||
events.ScheduleEvent(EVENT_VILE_GAS, urand(28000, 35000), 1);
|
||||
break;
|
||||
}
|
||||
case EVENT_GASTRIC_BLOAT:
|
||||
me->CastSpell(me->GetVictim(), SPELL_GASTRIC_BLOAT, false);
|
||||
events.ScheduleEvent(EVENT_GASTRIC_BLOAT, urand(15000, 17500));
|
||||
break;
|
||||
case EVENT_FESTERGUT_GOO:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->CastSpell(target, SPELL_MALLABLE_GOO_H, true);
|
||||
events.ScheduleEvent(EVENT_FESTERGUT_GOO, urand(15000, 20000));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, minDist, true))
|
||||
me->CastSpell(target, SPELL_VILE_GAS, false);
|
||||
events.ScheduleEvent(EVENT_VILE_GAS, urand(28000, 35000), 1);
|
||||
break;
|
||||
}
|
||||
case EVENT_GASTRIC_BLOAT:
|
||||
me->CastSpell(me->GetVictim(), SPELL_GASTRIC_BLOAT, false);
|
||||
events.ScheduleEvent(EVENT_GASTRIC_BLOAT, urand(15000, 17500));
|
||||
break;
|
||||
case EVENT_FESTERGUT_GOO:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->CastSpell(target, SPELL_MALLABLE_GOO_H, true);
|
||||
events.ScheduleEvent(EVENT_FESTERGUT_GOO, urand(15000, 20000));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
if (type == DATA_INOCULATED_STACK && data > _maxInoculatedStack)
|
||||
_maxInoculatedStack = data;
|
||||
}
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
if (type == DATA_INOCULATED_STACK && data > _maxInoculatedStack)
|
||||
_maxInoculatedStack = data;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_INOCULATED_STACK)
|
||||
return _maxInoculatedStack;
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
if (type == DATA_INOCULATED_STACK)
|
||||
return _maxInoculatedStack;
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return GetIcecrownCitadelAI<boss_festergutAI>(creature);
|
||||
}
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return GetIcecrownCitadelAI<boss_festergutAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_festergut_pungent_blight : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_festergut_pungent_blight() : SpellScriptLoader("spell_festergut_pungent_blight") { }
|
||||
public:
|
||||
spell_festergut_pungent_blight() : SpellScriptLoader("spell_festergut_pungent_blight") { }
|
||||
|
||||
class spell_festergut_pungent_blight_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_festergut_pungent_blight_SpellScript);
|
||||
class spell_festergut_pungent_blight_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_festergut_pungent_blight_SpellScript);
|
||||
|
||||
bool Load()
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
bool Load()
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (caster->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (caster->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
// Get Inhaled Blight id for our difficulty
|
||||
uint32 blightId = sSpellMgr->GetSpellIdForDifficulty(uint32(GetEffectValue()), caster);
|
||||
// Get Inhaled Blight id for our difficulty
|
||||
uint32 blightId = sSpellMgr->GetSpellIdForDifficulty(uint32(GetEffectValue()), caster);
|
||||
|
||||
// ...and remove it
|
||||
caster->RemoveAurasDueToSpell(blightId);
|
||||
caster->ToCreature()->AI()->Talk(EMOTE_PUNGENT_BLIGHT);
|
||||
// ...and remove it
|
||||
caster->RemoveAurasDueToSpell(blightId);
|
||||
caster->ToCreature()->AI()->Talk(EMOTE_PUNGENT_BLIGHT);
|
||||
|
||||
if (InstanceScript* inst = caster->GetInstanceScript())
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*caster, inst->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_FESTERGUT_GAS);
|
||||
}
|
||||
if (InstanceScript* inst = caster->GetInstanceScript())
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*caster, inst->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_FESTERGUT_GAS);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_festergut_pungent_blight_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_festergut_pungent_blight_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_festergut_pungent_blight_SpellScript();
|
||||
}
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_festergut_pungent_blight_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_festergut_blighted_spores : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_festergut_blighted_spores() : SpellScriptLoader("spell_festergut_blighted_spores") { }
|
||||
public:
|
||||
spell_festergut_blighted_spores() : SpellScriptLoader("spell_festergut_blighted_spores") { }
|
||||
|
||||
class spell_festergut_blighted_spores_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_festergut_blighted_spores_AuraScript);
|
||||
class spell_festergut_blighted_spores_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_festergut_blighted_spores_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_INOCULATED))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
bool Validate(SpellInfo const* /*spell*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_INOCULATED))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void ExtraEffect(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Aura* a = aurEff->GetBase())
|
||||
if (a->GetDuration() > a->GetMaxDuration()-1000) // this does not stack for different casters and previous is removed by new DoT, prevent it from giving inoculation in such case
|
||||
return;
|
||||
uint32 inoculatedId = sSpellMgr->GetSpellIdForDifficulty(SPELL_INOCULATED, GetTarget());
|
||||
uint8 inoculatedStack = 1;
|
||||
if (Aura* a = GetTarget()->GetAura(inoculatedId))
|
||||
{
|
||||
inoculatedStack += a->GetStackAmount();
|
||||
if (a->GetDuration() > a->GetMaxDuration()-10000) // player may gain only one stack at a time, no matter how many spores explode near him
|
||||
return;
|
||||
}
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_INOCULATED, true);
|
||||
if (InstanceScript* instance = GetTarget()->GetInstanceScript())
|
||||
if (Creature* festergut = ObjectAccessor::GetCreature(*GetTarget(), instance->GetData64(DATA_FESTERGUT)))
|
||||
festergut->AI()->SetData(DATA_INOCULATED_STACK, inoculatedStack);
|
||||
}
|
||||
void ExtraEffect(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Aura* a = aurEff->GetBase())
|
||||
if (a->GetDuration() > a->GetMaxDuration()-1000) // this does not stack for different casters and previous is removed by new DoT, prevent it from giving inoculation in such case
|
||||
return;
|
||||
uint32 inoculatedId = sSpellMgr->GetSpellIdForDifficulty(SPELL_INOCULATED, GetTarget());
|
||||
uint8 inoculatedStack = 1;
|
||||
if (Aura* a = GetTarget()->GetAura(inoculatedId))
|
||||
{
|
||||
inoculatedStack += a->GetStackAmount();
|
||||
if (a->GetDuration() > a->GetMaxDuration()-10000) // player may gain only one stack at a time, no matter how many spores explode near him
|
||||
return;
|
||||
}
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_INOCULATED, true);
|
||||
if (InstanceScript* instance = GetTarget()->GetInstanceScript())
|
||||
if (Creature* festergut = ObjectAccessor::GetCreature(*GetTarget(), instance->GetData64(DATA_FESTERGUT)))
|
||||
festergut->AI()->SetData(DATA_INOCULATED_STACK, inoculatedStack);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_festergut_blighted_spores_AuraScript::ExtraEffect, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
void Register()
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_festergut_blighted_spores_AuraScript::ExtraEffect, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_festergut_blighted_spores_AuraScript();
|
||||
}
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_festergut_blighted_spores_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_festergut_gastric_bloat : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_festergut_gastric_bloat() : SpellScriptLoader("spell_festergut_gastric_bloat") { }
|
||||
public:
|
||||
spell_festergut_gastric_bloat() : SpellScriptLoader("spell_festergut_gastric_bloat") { }
|
||||
|
||||
class spell_festergut_gastric_bloat_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_festergut_gastric_bloat_SpellScript);
|
||||
class spell_festergut_gastric_bloat_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_festergut_gastric_bloat_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_GASTRIC_EXPLOSION))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
bool Validate(SpellInfo const* /*spell*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_GASTRIC_EXPLOSION))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Aura const* aura = GetHitUnit()->GetAura(GetSpellInfo()->Id);
|
||||
if (!(aura && aura->GetStackAmount() == 10))
|
||||
return;
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Aura const* aura = GetHitUnit()->GetAura(GetSpellInfo()->Id);
|
||||
if (!(aura && aura->GetStackAmount() == 10))
|
||||
return;
|
||||
|
||||
GetHitUnit()->RemoveAurasDueToSpell(GetSpellInfo()->Id);
|
||||
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_GASTRIC_EXPLOSION, true);
|
||||
}
|
||||
GetHitUnit()->RemoveAurasDueToSpell(GetSpellInfo()->Id);
|
||||
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_GASTRIC_EXPLOSION, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_festergut_gastric_bloat_SpellScript::HandleScript, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_festergut_gastric_bloat_SpellScript::HandleScript, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_festergut_gastric_bloat_SpellScript();
|
||||
}
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_festergut_gastric_bloat_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class achievement_flu_shot_shortage : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_flu_shot_shortage() : AchievementCriteriaScript("achievement_flu_shot_shortage") { }
|
||||
public:
|
||||
achievement_flu_shot_shortage() : AchievementCriteriaScript("achievement_flu_shot_shortage") { }
|
||||
|
||||
bool OnCheck(Player* /*source*/, Unit* target)
|
||||
{
|
||||
if (target && target->GetTypeId() == TYPEID_UNIT)
|
||||
return target->ToCreature()->AI()->GetData(DATA_INOCULATED_STACK) < 3;
|
||||
bool OnCheck(Player* /*source*/, Unit* target)
|
||||
{
|
||||
if (target && target->GetTypeId() == TYPEID_UNIT)
|
||||
return target->ToCreature()->AI()->GetData(DATA_INOCULATED_STACK) < 3;
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class npc_stinky_icc : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_stinky_icc() : CreatureScript("npc_stinky_icc") { }
|
||||
public:
|
||||
npc_stinky_icc() : CreatureScript("npc_stinky_icc") { }
|
||||
|
||||
struct npc_stinky_iccAI : public ScriptedAI
|
||||
{
|
||||
npc_stinky_iccAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
struct npc_stinky_iccAI : public ScriptedAI
|
||||
{
|
||||
npc_stinky_iccAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*target*/)
|
||||
{
|
||||
me->setActive(true);
|
||||
me->CastSpell(me, SPELL_PLAGUE_STENCH, true);
|
||||
events.ScheduleEvent(EVENT_DECIMATE, urand(20000, 25000));
|
||||
events.ScheduleEvent(EVENT_MORTAL_WOUND, urand(1500, 2500));
|
||||
}
|
||||
void EnterCombat(Unit* /*target*/)
|
||||
{
|
||||
me->setActive(true);
|
||||
me->CastSpell(me, SPELL_PLAGUE_STENCH, true);
|
||||
events.ScheduleEvent(EVENT_DECIMATE, urand(20000, 25000));
|
||||
events.ScheduleEvent(EVENT_MORTAL_WOUND, urand(1500, 2500));
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_DECIMATE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_DECIMATE, false);
|
||||
events.ScheduleEvent(EVENT_DECIMATE, urand(20000, 25000));
|
||||
break;
|
||||
case EVENT_MORTAL_WOUND:
|
||||
me->CastSpell(me->GetVictim(), SPELL_MORTAL_WOUND, false);
|
||||
events.ScheduleEvent(EVENT_MORTAL_WOUND, urand(1500, 2500));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_DECIMATE:
|
||||
me->CastSpell(me->GetVictim(), SPELL_DECIMATE, false);
|
||||
events.ScheduleEvent(EVENT_DECIMATE, urand(20000, 25000));
|
||||
break;
|
||||
case EVENT_MORTAL_WOUND:
|
||||
me->CastSpell(me->GetVictim(), SPELL_MORTAL_WOUND, false);
|
||||
events.ScheduleEvent(EVENT_MORTAL_WOUND, urand(1500, 2500));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (InstanceScript* _instance = me->GetInstanceScript())
|
||||
if (Creature* festergut = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_FESTERGUT)))
|
||||
if (festergut->IsAlive())
|
||||
festergut->AI()->Talk(SAY_STINKY_DEAD);
|
||||
}
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (InstanceScript* _instance = me->GetInstanceScript())
|
||||
if (Creature* festergut = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_FESTERGUT)))
|
||||
if (festergut->IsAlive())
|
||||
festergut->AI()->Talk(SAY_STINKY_DEAD);
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
};
|
||||
private:
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return GetIcecrownCitadelAI<npc_stinky_iccAI>(creature);
|
||||
}
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return GetIcecrownCitadelAI<npc_stinky_iccAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_festergut()
|
||||
{
|
||||
new boss_festergut();
|
||||
new spell_festergut_pungent_blight();
|
||||
new spell_festergut_blighted_spores();
|
||||
new spell_festergut_gastric_bloat();
|
||||
new achievement_flu_shot_shortage();
|
||||
new boss_festergut();
|
||||
new spell_festergut_pungent_blight();
|
||||
new spell_festergut_blighted_spores();
|
||||
new spell_festergut_gastric_bloat();
|
||||
new achievement_flu_shot_shortage();
|
||||
|
||||
new npc_stinky_icc();
|
||||
new npc_stinky_icc();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -42,14 +42,14 @@ enum SharedSpells
|
||||
SPELL_FROSTMOURNE_TELEPORT_VISUAL = 73078,
|
||||
|
||||
// Shadowmourne questline
|
||||
SPELL_UNSATED_CRAVING = 71168,
|
||||
SPELL_UNSATED_CRAVING = 71168,
|
||||
SPELL_SHADOWS_FATE = 71169,
|
||||
|
||||
// Misc
|
||||
SPELL_WEB_BEAM = 69887,
|
||||
SPELL_WEB_BEAM2 = 69986,
|
||||
SPELL_GIANT_INSECT_SWARM = 70475,
|
||||
SPELL_LEAP_TO_A_RANDOM_LOCATION = 70485
|
||||
// Misc
|
||||
SPELL_WEB_BEAM = 69887,
|
||||
SPELL_WEB_BEAM2 = 69986,
|
||||
SPELL_GIANT_INSECT_SWARM = 70475,
|
||||
SPELL_LEAP_TO_A_RANDOM_LOCATION = 70485
|
||||
};
|
||||
|
||||
enum TeleporterSpells
|
||||
@@ -79,9 +79,9 @@ enum DataTypes
|
||||
DATA_VALITHRIA_DREAMWALKER = 10,
|
||||
DATA_SINDRAGOSA = 11,
|
||||
DATA_THE_LICH_KING = 12,
|
||||
DATA_SINDRAGOSA_GAUNTLET = 13,
|
||||
DATA_BLOOD_PRINCE_TRASH = 14,
|
||||
MAX_ENCOUNTERS = 15,
|
||||
DATA_SINDRAGOSA_GAUNTLET = 13,
|
||||
DATA_BLOOD_PRINCE_TRASH = 14,
|
||||
MAX_ENCOUNTERS = 15,
|
||||
|
||||
// Additional data
|
||||
DATA_SAURFANG_EVENT_NPC = 13,
|
||||
@@ -113,15 +113,15 @@ enum DataTypes
|
||||
DATA_TERENAS_MENETHIL = 39,
|
||||
DATA_ENEMY_GUNSHIP = 40,
|
||||
|
||||
// pussywizard:
|
||||
DATA_BUFF_AVAILABLE = 251,
|
||||
DATA_WEEKLY_QUEST_ID = 252,
|
||||
// NONE = 253,
|
||||
DATA_PUTRICIDE_TRAP_STATE = 254,
|
||||
DATA_HAS_LIMITED_ATTEMPTS = 255,
|
||||
DATA_LK_HC_AVAILABLE = 256,
|
||||
// pussywizard:
|
||||
DATA_BUFF_AVAILABLE = 251,
|
||||
DATA_WEEKLY_QUEST_ID = 252,
|
||||
// NONE = 253,
|
||||
DATA_PUTRICIDE_TRAP_STATE = 254,
|
||||
DATA_HAS_LIMITED_ATTEMPTS = 255,
|
||||
DATA_LK_HC_AVAILABLE = 256,
|
||||
|
||||
DATA_BPC_TRASH_DIED = 300,
|
||||
DATA_BPC_TRASH_DIED = 300,
|
||||
};
|
||||
|
||||
enum CreaturesIds
|
||||
@@ -147,8 +147,8 @@ enum CreaturesIds
|
||||
NPC_GARROSH_HELLSCREAM = 39372,
|
||||
NPC_KING_VARIAN_WRYNN = 39371,
|
||||
NPC_DEATHBOUND_WARD = 37007,
|
||||
NPC_HIGH_OVERLORD_SAURFANG_DUMMY = 32315,
|
||||
NPC_MURADIN_BRONZEBEARD_DUMMY = 38607,
|
||||
NPC_HIGH_OVERLORD_SAURFANG_DUMMY = 32315,
|
||||
NPC_MURADIN_BRONZEBEARD_DUMMY = 38607,
|
||||
NPC_LADY_JAINA_PROUDMOORE_QUEST = 38606,
|
||||
NPC_MURADIN_BRONZEBEARD_QUEST = 38607,
|
||||
NPC_UTHER_THE_LIGHTBRINGER_QUEST = 38608,
|
||||
@@ -183,7 +183,7 @@ enum CreaturesIds
|
||||
NPC_VENGEFUL_SHADE = 38222,
|
||||
|
||||
NPC_DEATHSPEAKER_SERVANT = 36805,
|
||||
NPC_RISEN_DEATHSPEAKER_SERVANT = 36844,
|
||||
NPC_RISEN_DEATHSPEAKER_SERVANT = 36844,
|
||||
|
||||
// Icecrown Gunship Battle
|
||||
NPC_MARTYR_STALKER_IGB_SAURFANG = 38569,
|
||||
@@ -305,17 +305,17 @@ enum CreaturesIds
|
||||
NPC_FROST_BOMB = 37186,
|
||||
NPC_ICE_TOMB = 36980,
|
||||
|
||||
// Sindragosa Gauntlet
|
||||
NPC_SINDRAGOSA_GAUNTLET = 37503,
|
||||
NPC_NERUBAR_CHAMPION = 37501,
|
||||
NPC_NERUBAR_WEBWEAVER = 37502,
|
||||
NPC_NERUBAR_BROODLING = 37232,
|
||||
NPC_FROSTWARDEN_SORCERESS = 37229,
|
||||
NPC_FROSTWARDEN_WARRIOR = 37228,
|
||||
// Sindragosa Gauntlet
|
||||
NPC_SINDRAGOSA_GAUNTLET = 37503,
|
||||
NPC_NERUBAR_CHAMPION = 37501,
|
||||
NPC_NERUBAR_WEBWEAVER = 37502,
|
||||
NPC_NERUBAR_BROODLING = 37232,
|
||||
NPC_FROSTWARDEN_SORCERESS = 37229,
|
||||
NPC_FROSTWARDEN_WARRIOR = 37228,
|
||||
|
||||
// Putricade Trap
|
||||
NPC_PUTRICADES_TRAP = 38879,
|
||||
NPC_FLASH_EATING_INSECT = 37782,
|
||||
// Putricade Trap
|
||||
NPC_PUTRICADES_TRAP = 38879,
|
||||
NPC_FLASH_EATING_INSECT = 37782,
|
||||
|
||||
// The Lich King
|
||||
NPC_THE_LICH_KING = 36597,
|
||||
@@ -338,7 +338,7 @@ enum CreaturesIds
|
||||
NPC_SPIRIT_BOMB = 39189,
|
||||
NPC_FROSTMOURNE_TRIGGER = 38584,
|
||||
NPC_TERENAS_MENETHIL_OUTRO = 38579,
|
||||
|
||||
|
||||
// Generic
|
||||
NPC_INVISIBLE_STALKER = 30298,
|
||||
NPC_SPIRE_FROSTWYRM = 37230,
|
||||
@@ -528,7 +528,7 @@ enum WeekliesICC
|
||||
|
||||
enum QuestsICC
|
||||
{
|
||||
QUEST_A_FEAST_OF_SOULS = 24547
|
||||
QUEST_A_FEAST_OF_SOULS = 24547
|
||||
};
|
||||
|
||||
enum WorldStatesICC
|
||||
@@ -542,10 +542,10 @@ enum WorldStatesICC
|
||||
|
||||
enum PutricideEventFlags
|
||||
{
|
||||
PUTRICIDE_EVENT_FLAG_FESTERGUT_VALVE = 1,
|
||||
PUTRICIDE_EVENT_FLAG_ROTFACE_VALVE = 2,
|
||||
PUTRICIDE_EVENT_FLAG_TRAP_INPROGRESS = 4,
|
||||
PUTRICIDE_EVENT_FLAG_TRAP_FINISHED = 8,
|
||||
PUTRICIDE_EVENT_FLAG_FESTERGUT_VALVE = 1,
|
||||
PUTRICIDE_EVENT_FLAG_ROTFACE_VALVE = 2,
|
||||
PUTRICIDE_EVENT_FLAG_TRAP_INPROGRESS = 4,
|
||||
PUTRICIDE_EVENT_FLAG_TRAP_FINISHED = 8,
|
||||
};
|
||||
|
||||
enum AreaIds
|
||||
|
||||
@@ -30,7 +30,7 @@ class icecrown_citadel_teleport : public GameObjectScript
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Deathbringer's Rise.", GOSSIP_SENDER_ICC_PORT, DEATHBRINGER_S_RISE_TELEPORT); // M_PI/6
|
||||
if (instance->GetData(DATA_COLDFLAME_JETS) == DONE && go->GetEntry() != 202235)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Upper Spire.", GOSSIP_SENDER_ICC_PORT, UPPER_SPIRE_TELEPORT); // M_PI/6
|
||||
if (instance->GetBossState(DATA_VALITHRIA_DREAMWALKER) == DONE && instance->GetBossState(DATA_SINDRAGOSA_GAUNTLET) == DONE && go->GetEntry() != 202246)
|
||||
if (instance->GetBossState(DATA_VALITHRIA_DREAMWALKER) == DONE && instance->GetBossState(DATA_SINDRAGOSA_GAUNTLET) == DONE && go->GetEntry() != 202246)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to Sindragosa's Lair", GOSSIP_SENDER_ICC_PORT, SINDRAGOSA_S_LAIR_TELEPORT); // M_PI*3/2 + M_PI/6
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user