mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 13:47:23 +01:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
@@ -15,10 +15,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Comment: @todo spawn troll waves
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
@@ -37,10 +33,9 @@ enum Spells
|
||||
|
||||
SPELL_SUMMON_INVADER_A = 49456,
|
||||
SPELL_SUMMON_INVADER_B = 49457,
|
||||
//SPELL_SUMMON_INVADER_C = 49458, // can't find any sniffs
|
||||
SPELL_SUMMON_INVADER_C = 49458, // can't find any sniffs
|
||||
|
||||
H_SPELL_CORPSE_EXPLODE = 59807,
|
||||
H_SPELL_CONSUME = 59803,
|
||||
SPELL_INVADER_TAUNT = 49405
|
||||
};
|
||||
|
||||
#define SPELL_CONSUME_BUFF_HELPER DUNGEON_MODE<uint32>(SPELL_CONSUME_BUFF, SPELL_CONSUME_BUFF_H)
|
||||
@@ -56,147 +51,164 @@ enum Yells
|
||||
|
||||
enum Misc
|
||||
{
|
||||
DATA_CONSUMPTION_JUNCTION = 1
|
||||
DATA_CONSUMPTION_JUNCTION = 1,
|
||||
POINT_LANDING = 1
|
||||
};
|
||||
|
||||
Position AddSpawnPoint = { -260.493011f, -622.968018f, 26.605301f, 3.036870f };
|
||||
enum Events
|
||||
{
|
||||
EVENT_CONSUME = 1,
|
||||
EVENT_CRUSH,
|
||||
EVENT_INFECTED_WOUND,
|
||||
EVENT_CORPSE_EXPLODE,
|
||||
EVENT_SPAWN
|
||||
};
|
||||
|
||||
Position const Landing = { -263.0534f, -660.8658f, 26.50903f, 0.0f };
|
||||
|
||||
class boss_trollgore : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_trollgore() : CreatureScript("boss_trollgore") { }
|
||||
public:
|
||||
boss_trollgore() : CreatureScript("boss_trollgore") { }
|
||||
|
||||
struct boss_trollgoreAI : public ScriptedAI
|
||||
{
|
||||
boss_trollgoreAI(Creature* creature) : ScriptedAI(creature), lSummons(me)
|
||||
struct boss_trollgoreAI : public BossAI
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
boss_trollgoreAI(Creature* creature) : BossAI(creature, DATA_TROLLGORE) { }
|
||||
|
||||
uint32 uiConsumeTimer;
|
||||
uint32 uiAuraCountTimer;
|
||||
uint32 uiCrushTimer;
|
||||
uint32 uiInfectedWoundTimer;
|
||||
uint32 uiExplodeCorpseTimer;
|
||||
uint32 uiSpawnTimer;
|
||||
|
||||
bool consumptionJunction;
|
||||
|
||||
SummonList lSummons;
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
uiConsumeTimer = 15*IN_MILLISECONDS;
|
||||
uiAuraCountTimer = 15500;
|
||||
uiCrushTimer = urand(1*IN_MILLISECONDS, 5*IN_MILLISECONDS);
|
||||
uiInfectedWoundTimer = urand(10*IN_MILLISECONDS, 60*IN_MILLISECONDS);
|
||||
uiExplodeCorpseTimer = 3*IN_MILLISECONDS;
|
||||
uiSpawnTimer = urand(30*IN_MILLISECONDS, 40*IN_MILLISECONDS);
|
||||
|
||||
consumptionJunction = true;
|
||||
|
||||
lSummons.DespawnAll();
|
||||
|
||||
me->RemoveAura(SPELL_CONSUME_BUFF_HELPER);
|
||||
|
||||
instance->SetBossState(DATA_TROLLGORE, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
instance->SetBossState(DATA_TROLLGORE, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiSpawnTimer <= diff)
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
uint32 spawnNumber = urand(2, DUNGEON_MODE(3, 5));
|
||||
for (uint8 i = 0; i < spawnNumber; ++i)
|
||||
DoSummon(RAND(NPC_DRAKKARI_INVADER_A, NPC_DRAKKARI_INVADER_B), AddSpawnPoint, 0, TEMPSUMMON_DEAD_DESPAWN);
|
||||
uiSpawnTimer = urand(30*IN_MILLISECONDS, 40*IN_MILLISECONDS);
|
||||
} else uiSpawnTimer -= diff;
|
||||
|
||||
if (uiConsumeTimer <= diff)
|
||||
{
|
||||
Talk(SAY_CONSUME);
|
||||
DoCast(SPELL_CONSUME);
|
||||
uiConsumeTimer = 15*IN_MILLISECONDS;
|
||||
} else uiConsumeTimer -= diff;
|
||||
|
||||
if (consumptionJunction)
|
||||
{
|
||||
Aura* ConsumeAura = me->GetAura(SPELL_CONSUME_BUFF_HELPER);
|
||||
if (ConsumeAura && ConsumeAura->GetStackAmount() > 9)
|
||||
consumptionJunction = false;
|
||||
_Reset();
|
||||
_consumptionJunction = true;
|
||||
}
|
||||
|
||||
if (uiCrushTimer <= diff)
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
DoCastVictim(SPELL_CRUSH);
|
||||
uiCrushTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
} else uiCrushTimer -= diff;
|
||||
_EnterCombat();
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (uiInfectedWoundTimer <= diff)
|
||||
events.ScheduleEvent(EVENT_CONSUME, 15000);
|
||||
events.ScheduleEvent(EVENT_CRUSH, urand(1000, 5000));
|
||||
events.ScheduleEvent(EVENT_INFECTED_WOUND, urand(10000, 60000));
|
||||
events.ScheduleEvent(EVENT_CORPSE_EXPLODE, 3000);
|
||||
events.ScheduleEvent(EVENT_SPAWN, urand(30000, 40000));
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
DoCastVictim(SPELL_INFECTED_WOUND);
|
||||
uiInfectedWoundTimer = urand(25*IN_MILLISECONDS, 35*IN_MILLISECONDS);
|
||||
} else uiInfectedWoundTimer -= diff;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiExplodeCorpseTimer <= diff)
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_CONSUME:
|
||||
Talk(SAY_CONSUME);
|
||||
DoCastAOE(SPELL_CONSUME);
|
||||
events.ScheduleEvent(EVENT_CONSUME, 15000);
|
||||
break;
|
||||
case EVENT_CRUSH:
|
||||
DoCastVictim(SPELL_CRUSH);
|
||||
events.ScheduleEvent(EVENT_CRUSH, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_INFECTED_WOUND:
|
||||
DoCastVictim(SPELL_INFECTED_WOUND);
|
||||
events.ScheduleEvent(EVENT_INFECTED_WOUND, urand(25000, 35000));
|
||||
break;
|
||||
case EVENT_CORPSE_EXPLODE:
|
||||
Talk(SAY_EXPLODE);
|
||||
DoCastAOE(SPELL_CORPSE_EXPLODE);
|
||||
events.ScheduleEvent(EVENT_CORPSE_EXPLODE, urand(15000, 19000));
|
||||
break;
|
||||
case EVENT_SPAWN:
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
if (Creature* trigger = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_TROLLGORE_INVADER_SUMMONER_1 + i)))
|
||||
trigger->CastSpell(trigger, RAND(SPELL_SUMMON_INVADER_A, SPELL_SUMMON_INVADER_B, SPELL_SUMMON_INVADER_C), true, NULL, NULL, me->GetGUID());
|
||||
|
||||
events.ScheduleEvent(EVENT_SPAWN, urand(30000, 40000));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (_consumptionJunction)
|
||||
{
|
||||
Aura* ConsumeAura = me->GetAura(SPELL_CONSUME_BUFF_HELPER);
|
||||
if (ConsumeAura && ConsumeAura->GetStackAmount() > 9)
|
||||
_consumptionJunction = false;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
DoCast(SPELL_CORPSE_EXPLODE);
|
||||
Talk(SAY_EXPLODE);
|
||||
uiExplodeCorpseTimer = urand(15*IN_MILLISECONDS, 19*IN_MILLISECONDS);
|
||||
} else uiExplodeCorpseTimer -= diff;
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
uint32 GetData(uint32 type) const OVERRIDE
|
||||
{
|
||||
if (type == DATA_CONSUMPTION_JUNCTION)
|
||||
return _consumptionJunction ? 1 : 0;
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
return 0;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) OVERRIDE
|
||||
{
|
||||
summon->GetMotionMaster()->MovePoint(POINT_LANDING, Landing);
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
private:
|
||||
bool _consumptionJunction;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
lSummons.DespawnAll();
|
||||
|
||||
instance->SetBossState(DATA_TROLLGORE, DONE);
|
||||
return GetDrakTharonKeepAI<boss_trollgoreAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
uint32 GetData(uint32 type) const OVERRIDE
|
||||
class npc_drakkari_invader : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_drakkari_invader() : CreatureScript("npc_drakkari_invader") { }
|
||||
|
||||
struct npc_drakkari_invaderAI : public ScriptedAI
|
||||
{
|
||||
if (type == DATA_CONSUMPTION_JUNCTION)
|
||||
return consumptionJunction ? 1 : 0;
|
||||
npc_drakkari_invaderAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
return 0;
|
||||
}
|
||||
void MovementInform(uint32 type, uint32 pointId) OVERRIDE
|
||||
{
|
||||
if (type == POINT_MOTION_TYPE && pointId == POINT_LANDING)
|
||||
{
|
||||
me->Dismount();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
DoCastAOE(SPELL_INVADER_TAUNT);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Talk(SAY_KILL);
|
||||
return GetDrakTharonKeepAI<npc_drakkari_invaderAI>(creature);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) OVERRIDE
|
||||
{
|
||||
lSummons.Summon(summon);
|
||||
if (summon->AI())
|
||||
summon->AI()->AttackStart(me);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetDrakTharonKeepAI<boss_trollgoreAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
// 49380, 59803 - Consume
|
||||
@@ -335,6 +347,7 @@ class achievement_consumption_junction : public AchievementCriteriaScript
|
||||
void AddSC_boss_trollgore()
|
||||
{
|
||||
new boss_trollgore();
|
||||
new npc_drakkari_invader();
|
||||
new spell_trollgore_consume();
|
||||
new spell_trollgore_corpse_explode();
|
||||
new spell_trollgore_invader_taunt();
|
||||
|
||||
172
src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp
Normal file
172
src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 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 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
Name: Boss_Anzu
|
||||
%Complete: 80%
|
||||
Comment:
|
||||
Category: Auchindoun, Sethekk Halls
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "sethekk_halls.h"
|
||||
|
||||
enum Says
|
||||
{
|
||||
SAY_SUMMON_BROOD = 0,
|
||||
SAY_SPELL_BOMB = 1
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_PARALYZING_SCREECH = 40184,
|
||||
SPELL_SPELL_BOMB = 40303,
|
||||
SPELL_CYCLONE_OF_FEATHERS = 40321,
|
||||
SPELL_BANISH_SELF = 42354,
|
||||
SPELL_FLESH_RIP = 40199
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_PARALYZING_SCREECH = 1,
|
||||
EVENT_SPELL_BOMB = 2,
|
||||
EVENT_CYCLONE_OF_FEATHERS = 3,
|
||||
EVENT_SUMMON = 4
|
||||
};
|
||||
|
||||
Position const PosSummonBrood[7] =
|
||||
{
|
||||
{ -118.1717f, 284.5299f, 121.2287f, 2.775074f },
|
||||
{ -98.15528f, 293.4469f, 109.2385f, 0.174533f },
|
||||
{ -99.70160f, 270.1699f, 98.27389f, 6.178465f },
|
||||
{ -69.25543f, 303.0768f, 97.84479f, 5.532694f },
|
||||
{ -87.59662f, 263.5181f, 92.70478f, 1.658063f },
|
||||
{ -73.54323f, 276.6267f, 94.25807f, 2.802979f },
|
||||
{ -81.70527f, 280.8776f, 44.58830f, 0.526849f },
|
||||
};
|
||||
|
||||
class boss_anzu : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_anzu() : CreatureScript("boss_anzu") { }
|
||||
|
||||
struct boss_anzuAI : public BossAI
|
||||
{
|
||||
boss_anzuAI(Creature* creature) : BossAI(creature, DATA_ANZU) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
summon66 = false;
|
||||
summon33 = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
events.ScheduleEvent(EVENT_PARALYZING_SCREECH, 14000);
|
||||
events.ScheduleEvent(EVENT_CYCLONE_OF_FEATHERS, 5000);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_ANZU, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE {}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_PARALYZING_SCREECH:
|
||||
DoCastVictim(SPELL_PARALYZING_SCREECH);
|
||||
events.ScheduleEvent(EVENT_PARALYZING_SCREECH, 26000);
|
||||
break;
|
||||
|
||||
case EVENT_CYCLONE_OF_FEATHERS:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CYCLONE_OF_FEATHERS);
|
||||
events.ScheduleEvent(EVENT_CYCLONE_OF_FEATHERS, 21000);
|
||||
break;
|
||||
case EVENT_SUMMON:
|
||||
// TODO: Add pathing for Brood of Anzu
|
||||
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[0], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
|
||||
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[1], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
|
||||
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[2], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
|
||||
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
|
||||
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
|
||||
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[5], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
|
||||
me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[6], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
|
||||
DoCast(me, SPELL_BANISH_SELF);
|
||||
events.ScheduleEvent(EVENT_SPELL_BOMB, 12000);
|
||||
break;
|
||||
case EVENT_SPELL_BOMB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (target->getPowerType() == POWER_MANA)
|
||||
{
|
||||
DoCast(target, SPELL_SPELL_BOMB);
|
||||
Talk(SAY_SPELL_BOMB, target->GetGUID());
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (HealthBelowPct(66) && !summon66)
|
||||
{
|
||||
summon66 = true;
|
||||
Talk(SAY_SUMMON_BROOD);
|
||||
events.ScheduleEvent(EVENT_SUMMON, 3000);
|
||||
}
|
||||
|
||||
if (HealthBelowPct(33) && !summon33)
|
||||
{
|
||||
summon33 = true;
|
||||
Talk(SAY_SUMMON_BROOD);
|
||||
events.ScheduleEvent(EVENT_SUMMON, 3000);
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool summon66;
|
||||
bool summon33;
|
||||
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_anzuAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_anzu()
|
||||
{
|
||||
new boss_anzu();
|
||||
}
|
||||
@@ -25,14 +25,18 @@ EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "sethekk_halls.h"
|
||||
|
||||
enum DarkweaverSyth
|
||||
enum Says
|
||||
{
|
||||
SAY_SUMMON = 0,
|
||||
SAY_AGGRO = 1,
|
||||
SAY_SLAY = 2,
|
||||
SAY_DEATH = 3,
|
||||
SAY_DEATH = 3
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_FROST_SHOCK = 21401, //37865
|
||||
SPELL_FLAME_SHOCK = 34354,
|
||||
SPELL_SHADOW_SHOCK = 30138,
|
||||
@@ -51,40 +55,26 @@ enum DarkweaverSyth
|
||||
SPELL_SHADOW_BUFFET = 33529
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_FLAME_SHOCK = 1,
|
||||
EVENT_ARCANE_SHOCK = 2,
|
||||
EVENT_FROST_SHOCK = 3,
|
||||
EVENT_SHADOW_SHOCK = 4,
|
||||
EVENT_CHAIN_LIGHTNING = 5
|
||||
};
|
||||
|
||||
class boss_darkweaver_syth : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_darkweaver_syth() : CreatureScript("boss_darkweaver_syth") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
struct boss_darkweaver_sythAI : public BossAI
|
||||
{
|
||||
return new boss_darkweaver_sythAI(creature);
|
||||
}
|
||||
|
||||
struct boss_darkweaver_sythAI : public ScriptedAI
|
||||
{
|
||||
boss_darkweaver_sythAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
uint32 flameshock_timer;
|
||||
uint32 arcaneshock_timer;
|
||||
uint32 frostshock_timer;
|
||||
uint32 shadowshock_timer;
|
||||
uint32 chainlightning_timer;
|
||||
|
||||
bool summon90;
|
||||
bool summon50;
|
||||
bool summon10;
|
||||
boss_darkweaver_sythAI(Creature* creature) : BossAI(creature, DATA_DARKWEAVER_SYTH) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
flameshock_timer = 2000;
|
||||
arcaneshock_timer = 4000;
|
||||
frostshock_timer = 6000;
|
||||
shadowshock_timer = 8000;
|
||||
chainlightning_timer = 15000;
|
||||
|
||||
summon90 = false;
|
||||
summon50 = false;
|
||||
summon10 = false;
|
||||
@@ -92,12 +82,21 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
events.ScheduleEvent(EVENT_FLAME_SHOCK, 2000);
|
||||
events.ScheduleEvent(EVENT_ARCANE_SHOCK, 4000);
|
||||
events.ScheduleEvent(EVENT_FROST_SHOCK, 6000);
|
||||
events.ScheduleEvent(EVENT_SHADOW_SHOCK, 8000);
|
||||
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 15000);
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_DARKWEAVER_SYTH, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -132,6 +131,42 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FLAME_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_FLAME_SHOCK);
|
||||
events.ScheduleEvent(EVENT_FLAME_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_ARCANE_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_ARCANE_SHOCK);
|
||||
events.ScheduleEvent(EVENT_ARCANE_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_FROST_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_FROST_SHOCK);
|
||||
events.ScheduleEvent(EVENT_FROST_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_SHADOW_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_SHADOW_SHOCK);
|
||||
events.ScheduleEvent(EVENT_SHADOW_SHOCK, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_CHAIN_LIGHTNING:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CHAIN_LIGHTNING);
|
||||
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 25000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (HealthBelowPct(90) && !summon90)
|
||||
{
|
||||
SythSummoning();
|
||||
@@ -150,50 +185,19 @@ public:
|
||||
summon10 = true;
|
||||
}
|
||||
|
||||
if (flameshock_timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_FLAME_SHOCK);
|
||||
|
||||
flameshock_timer = urand(10000, 15000);
|
||||
} else flameshock_timer -= diff;
|
||||
|
||||
if (arcaneshock_timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_ARCANE_SHOCK);
|
||||
|
||||
arcaneshock_timer = urand(10000, 15000);
|
||||
} else arcaneshock_timer -= diff;
|
||||
|
||||
if (frostshock_timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_FROST_SHOCK);
|
||||
|
||||
frostshock_timer = urand(10000, 15000);
|
||||
} else frostshock_timer -= diff;
|
||||
|
||||
if (shadowshock_timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_SHADOW_SHOCK);
|
||||
|
||||
shadowshock_timer = urand(10000, 15000);
|
||||
} else shadowshock_timer -= diff;
|
||||
|
||||
if (chainlightning_timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CHAIN_LIGHTNING);
|
||||
|
||||
chainlightning_timer = 25000;
|
||||
} else chainlightning_timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool summon90;
|
||||
bool summon50;
|
||||
bool summon10;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_darkweaver_sythAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/* ELEMENTALS */
|
||||
|
||||
@@ -27,14 +27,17 @@ EndScriptData */
|
||||
#include "ScriptedCreature.h"
|
||||
#include "sethekk_halls.h"
|
||||
|
||||
enum TailonkingIkiss
|
||||
enum Says
|
||||
{
|
||||
SAY_INTRO = 0,
|
||||
SAY_AGGRO = 1,
|
||||
SAY_SLAY = 2,
|
||||
SAY_DEATH = 3,
|
||||
EMOTE_ARCANE_EXP = 4,
|
||||
EMOTE_ARCANE_EXP = 4
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_BLINK = 38194,
|
||||
SPELL_BLINK_TELEPORT = 38203,
|
||||
SPELL_MANA_SHIELD = 38151,
|
||||
@@ -53,28 +56,9 @@ class boss_talon_king_ikiss : public CreatureScript
|
||||
public:
|
||||
boss_talon_king_ikiss() : CreatureScript("boss_talon_king_ikiss") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
struct boss_talon_king_ikissAI : public BossAI
|
||||
{
|
||||
return new boss_talon_king_ikissAI(creature);
|
||||
}
|
||||
|
||||
struct boss_talon_king_ikissAI : public ScriptedAI
|
||||
{
|
||||
boss_talon_king_ikissAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 ArcaneVolley_Timer;
|
||||
uint32 Sheep_Timer;
|
||||
uint32 Blink_Timer;
|
||||
uint32 Slow_Timer;
|
||||
|
||||
bool ManaShield;
|
||||
bool Blink;
|
||||
bool Intro;
|
||||
boss_talon_king_ikissAI(Creature* creature) : BossAI(creature, DATA_TALON_KING_IKISS) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
@@ -120,7 +104,7 @@ public:
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_IKISSDOOREVENT, DONE);
|
||||
instance->SetData(DATA_TALON_KING_IKISS, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -204,8 +188,22 @@ public:
|
||||
if (!Blink)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 ArcaneVolley_Timer;
|
||||
uint32 Sheep_Timer;
|
||||
uint32 Blink_Timer;
|
||||
uint32 Slow_Timer;
|
||||
|
||||
bool ManaShield;
|
||||
bool Blink;
|
||||
bool Intro;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_talon_king_ikissAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_talon_king_ikiss()
|
||||
|
||||
@@ -27,16 +27,6 @@ EndScriptData */
|
||||
#include "InstanceScript.h"
|
||||
#include "sethekk_halls.h"
|
||||
|
||||
enum Creatures
|
||||
{
|
||||
NPC_ANZU = 23035
|
||||
};
|
||||
|
||||
enum GameObjects
|
||||
{
|
||||
GO_IKISS_DOOR = 177203
|
||||
};
|
||||
|
||||
class instance_sethekk_halls : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
@@ -49,49 +39,102 @@ public:
|
||||
|
||||
struct instance_sethekk_halls_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_sethekk_halls_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint32 AnzuEncounter;
|
||||
uint64 m_uiIkissDoorGUID;
|
||||
instance_sethekk_halls_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetBossNumber(EncounterCount);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
AnzuEncounter = NOT_STARTED;
|
||||
m_uiIkissDoorGUID = 0;
|
||||
SetBossState(DATA_ANZU, NOT_STARTED);
|
||||
iIkissDoorGUID = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
if (creature->GetEntry() == NPC_ANZU)
|
||||
{
|
||||
if (AnzuEncounter >= IN_PROGRESS)
|
||||
if (GetBossState(DATA_ANZU) == DONE)
|
||||
creature->DisappearAndDie();
|
||||
else
|
||||
AnzuEncounter = IN_PROGRESS;
|
||||
SetBossState(DATA_ANZU, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
if (go->GetEntry() == GO_IKISS_DOOR)
|
||||
m_uiIkissDoorGUID = go->GetGUID();
|
||||
iIkissDoorGUID = go->GetGUID();
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) OVERRIDE
|
||||
bool SetBossState(uint32 type, EncounterState state)
|
||||
{
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
return false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DATA_IKISSDOOREVENT:
|
||||
if (data == DONE)
|
||||
DoUseDoorOrButton(m_uiIkissDoorGUID, DAY*IN_MILLISECONDS);
|
||||
case DATA_DARKWEAVER_SYTH:
|
||||
break;
|
||||
case TYPE_ANZU_ENCOUNTER:
|
||||
AnzuEncounter = data;
|
||||
case DATA_TALON_KING_IKISS:
|
||||
if (state == DONE)
|
||||
DoUseDoorOrButton(iIkissDoorGUID, DAY*IN_MILLISECONDS);
|
||||
break;
|
||||
case DATA_ANZU:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "S H " << GetBossSaveData();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(const char* str)
|
||||
{
|
||||
if (!str)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(str);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
|
||||
std::istringstream loadStream(str);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
|
||||
if (dataHead1 == 'S' && dataHead2 == 'H')
|
||||
{
|
||||
for (uint32 i = 0; i < EncounterCount; ++i)
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 iIkissDoorGUID;
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_instance_sethekk_halls()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -19,10 +18,24 @@
|
||||
#ifndef DEF_SETHEKK_HALLS_H
|
||||
#define DEF_SETHEKK_HALLS_H
|
||||
|
||||
uint32 const EncounterCount = 3;
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
DATA_IKISSDOOREVENT = 1,
|
||||
TYPE_ANZU_ENCOUNTER = 2,
|
||||
DATA_DARKWEAVER_SYTH = 0,
|
||||
DATA_TALON_KING_IKISS = 1,
|
||||
DATA_ANZU = 2
|
||||
};
|
||||
#endif
|
||||
|
||||
enum CreatureIds
|
||||
{
|
||||
NPC_ANZU = 23035,
|
||||
NPC_BROOD_OF_ANZU = 23132
|
||||
};
|
||||
|
||||
enum GameObjectIds
|
||||
{
|
||||
GO_IKISS_DOOR = 177203
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -76,6 +76,7 @@ set(scripts_STAT_SRCS
|
||||
Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
|
||||
Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
|
||||
Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
|
||||
Outland/Auchindoun/SethekkHalls/boss_anzu.cpp
|
||||
Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
|
||||
Outland/Auchindoun/SethekkHalls/sethekk_halls.h
|
||||
Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
|
||||
|
||||
Reference in New Issue
Block a user