mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
Big re-organization of repository [W.I.P]
This commit is contained in:
@@ -1,194 +0,0 @@
|
||||
/*
|
||||
REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "vault_of_archavon.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
enum Archavon
|
||||
{
|
||||
SPELL_ROCK_SHARDS = 58678,
|
||||
SPELL_CRUSHING_LEAP_10 = 58960,
|
||||
SPELL_CRUSHING_LEAP_25 = 60894, //Instant (10-80yr range) -- Leaps at an enemy, inflicting 8000 Physical damage, knocking all nearby enemies away, and creating a cloud of choking debris.
|
||||
SPELL_STOMP_10 = 58663,
|
||||
SPELL_STOMP_25 = 60880,
|
||||
SPELL_IMPALE_10 = 58666,
|
||||
SPELL_IMPALE_25 = 60882, //Lifts an enemy off the ground with a spiked fist, inflicting 47125 to 52875 Physical damage and 9425 to 10575 additional damage each second for 8 sec.
|
||||
SPELL_BERSERK = 47008,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
EMOTE_BERSERK = 0,
|
||||
EMOTE_LEAP = 1 // Not in use
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_ROCK_SHARDS = 1,
|
||||
EVENT_CHOKING_CLOUD = 2,
|
||||
EVENT_STOMP = 3,
|
||||
EVENT_IMPALE = 4,
|
||||
EVENT_BERSERK = 5,
|
||||
};
|
||||
|
||||
class boss_archavon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_archavon() : CreatureScript("boss_archavon") { }
|
||||
|
||||
struct boss_archavonAI : public ScriptedAI
|
||||
{
|
||||
boss_archavonAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
if (pInstance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_STONED))
|
||||
{
|
||||
if (Aura* aur = me->AddAura(SPELL_STONED_AURA, me))
|
||||
{
|
||||
aur->SetMaxDuration(60 * MINUTE* IN_MILLISECONDS);
|
||||
aur->SetDuration(60 * MINUTE* IN_MILLISECONDS);
|
||||
}
|
||||
}
|
||||
pInstance->SetData(EVENT_ARCHAVON, NOT_STARTED);
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->HasAura(SPELL_STONED_AURA))
|
||||
return;
|
||||
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_ROCK_SHARDS, 15000);
|
||||
events.ScheduleEvent(EVENT_CHOKING_CLOUD, 30000);
|
||||
events.ScheduleEvent(EVENT_STOMP, 45000);
|
||||
events.ScheduleEvent(EVENT_BERSERK, 300000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_ARCHAVON, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* )
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_ARCHAVON, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_ROCK_SHARDS:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->CastSpell(target, SPELL_ROCK_SHARDS, false);
|
||||
|
||||
events.RepeatEvent(15000);
|
||||
break;
|
||||
case EVENT_CHOKING_CLOUD:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
me->CastSpell(target, RAID_MODE(SPELL_CRUSHING_LEAP_10, SPELL_CRUSHING_LEAP_25), true); //10y~80y, ignore range
|
||||
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
case EVENT_STOMP:
|
||||
{
|
||||
char buffer[100];
|
||||
sprintf(buffer, "Archavon the Stone Watcher lunges for %s!", me->GetVictim()->GetName().c_str());
|
||||
me->MonsterTextEmote(buffer, 0);
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_STOMP_10, SPELL_STOMP_25), false);
|
||||
events.RepeatEvent(45000);
|
||||
events.ScheduleEvent(EVENT_IMPALE, 3000);
|
||||
break;
|
||||
}
|
||||
case EVENT_IMPALE:
|
||||
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_IMPALE_10, SPELL_IMPALE_25), false);
|
||||
events.PopEvent();
|
||||
break;
|
||||
case EVENT_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
Talk(EMOTE_BERSERK);
|
||||
events.PopEvent();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_archavonAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_archavon_rock_shards : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_archavon_rock_shards() : SpellScriptLoader("spell_archavon_rock_shards") { }
|
||||
|
||||
class spell_archavon_rock_shards_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_archavon_rock_shards_SpellScript);
|
||||
|
||||
void HandleScript(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
Unit* target = GetHitUnit();
|
||||
Unit* caster = GetOriginalCaster();
|
||||
if (target && caster && caster->GetMap())
|
||||
{
|
||||
for (uint32 i = 0; i < 3; ++i)
|
||||
{
|
||||
caster->CastSpell(target, 58689, true);
|
||||
caster->CastSpell(target, 58692, true);
|
||||
}
|
||||
|
||||
caster->CastSpell(target, caster->GetMap()->Is25ManRaid() ? 60883 : 58695, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_archavon_rock_shards_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_archavon_rock_shards_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void AddSC_boss_archavon()
|
||||
{
|
||||
new boss_archavon();
|
||||
new spell_archavon_rock_shards();
|
||||
}
|
||||
@@ -1,267 +0,0 @@
|
||||
/*
|
||||
REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "vault_of_archavon.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_OVERCHARGED = 64217,
|
||||
SPELL_OVERCHARGED_BLAST = 64219,
|
||||
SPELL_OVERCHARGE = 64218,
|
||||
SPELL_BERSERK = 26662,
|
||||
|
||||
SPELL_CHAIN_LIGHTNING_10 = 64213,
|
||||
SPELL_CHAIN_LIGHTNING_25 = 64215,
|
||||
SPELL_LIGHTNING_NOVA_10 = 64216,
|
||||
SPELL_LIGHTNING_NOVA_25 = 65279,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_CHAIN_LIGHTNING = 1,
|
||||
EVENT_LIGHTNING_NOVA = 2,
|
||||
EVENT_OVERCHARGE = 3,
|
||||
EVENT_BERSERK = 4,
|
||||
EVENT_SUMMON_NEXT_MINION = 5,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
EMOTE_OVERCHARGE = 0,
|
||||
EMOTE_MINION_RESPAWN = 1,
|
||||
EMOTE_BERSERK = 2,
|
||||
|
||||
NPC_TEMPEST_MINION = 33998,
|
||||
MAX_TEMPEST_MINIONS = 4,
|
||||
};
|
||||
|
||||
struct Position TempestMinions[MAX_TEMPEST_MINIONS] =
|
||||
{
|
||||
{-203.980103f, -281.287720f, 91.650223f, 1.598807f},
|
||||
{-233.489410f, -281.139282f, 91.652412f, 1.598807f},
|
||||
{-233.267578f, -297.104645f, 91.681915f, 1.598807f},
|
||||
{-203.842529f, -297.097015f, 91.745163f, 1.598807f}
|
||||
};
|
||||
|
||||
/*######
|
||||
## Emalon the Storm Watcher
|
||||
######*/
|
||||
class boss_emalon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_emalon() : CreatureScript("boss_emalon") { }
|
||||
|
||||
struct boss_emalonAI : public ScriptedAI
|
||||
{
|
||||
boss_emalonAI(Creature* creature) : ScriptedAI(creature), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
|
||||
void ResetSummons()
|
||||
{
|
||||
summons.DespawnAll();
|
||||
for (uint8 i = 0; i < MAX_TEMPEST_MINIONS; ++i)
|
||||
me->SummonCreature(NPC_TEMPEST_MINION, TempestMinions[i], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
ResetSummons();
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_STONED))
|
||||
{
|
||||
if (Aura* aur = me->AddAura(SPELL_STONED_AURA, me))
|
||||
{
|
||||
aur->SetMaxDuration(60 * MINUTE* IN_MILLISECONDS);
|
||||
aur->SetDuration(60 * MINUTE* IN_MILLISECONDS);
|
||||
}
|
||||
}
|
||||
pInstance->SetData(EVENT_EMALON, NOT_STARTED);
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->HasAura(SPELL_STONED_AURA))
|
||||
return;
|
||||
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
void SummonedCreatureDies(Creature* cr, Unit*)
|
||||
{
|
||||
summons.Despawn(cr);
|
||||
events.ScheduleEvent(EVENT_SUMMON_NEXT_MINION, 4000);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo)
|
||||
{
|
||||
// restore minions health
|
||||
if (spellInfo->Id == SPELL_OVERCHARGE)
|
||||
target->SetFullHealth();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
events.Reset();
|
||||
if (summons.size() < 4)
|
||||
ResetSummons();
|
||||
|
||||
summons.DoZoneInCombat();
|
||||
|
||||
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 5000);
|
||||
events.ScheduleEvent(EVENT_LIGHTNING_NOVA, 40000);
|
||||
events.ScheduleEvent(EVENT_BERSERK, 360000);
|
||||
events.ScheduleEvent(EVENT_OVERCHARGE, 47000);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_EMALON, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* )
|
||||
{
|
||||
summons.DespawnAll();
|
||||
events.Reset();
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_EMALON, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_CHAIN_LIGHTNING:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->CastSpell(target, RAID_MODE(SPELL_CHAIN_LIGHTNING_10, SPELL_CHAIN_LIGHTNING_25), false);
|
||||
events.RepeatEvent(25000);
|
||||
break;
|
||||
case EVENT_LIGHTNING_NOVA:
|
||||
me->CastSpell(me, RAID_MODE(SPELL_LIGHTNING_NOVA_10, SPELL_LIGHTNING_NOVA_25), false);
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
case EVENT_OVERCHARGE:
|
||||
if (!summons.empty())
|
||||
me->CastCustomSpell(SPELL_OVERCHARGE, SPELLVALUE_MAX_TARGETS, 1, me, true);
|
||||
Talk(EMOTE_OVERCHARGE);
|
||||
events.RepeatEvent(40000);
|
||||
break;
|
||||
case EVENT_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
Talk(EMOTE_BERSERK);
|
||||
break;
|
||||
case EVENT_SUMMON_NEXT_MINION:
|
||||
me->SummonCreature(NPC_TEMPEST_MINION, TempestMinions[urand(0,3)], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
events.PopEvent();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_emalonAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_voa_overcharge : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_voa_overcharge() : SpellScriptLoader("spell_voa_overcharge") { }
|
||||
|
||||
class spell_voa_overcharge_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_voa_overcharge_AuraScript);
|
||||
|
||||
void HandlePeriodicDummy(AuraEffect const* aurEff)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (target->GetTypeId() == TYPEID_UNIT && GetAura()->GetStackAmount() >= 10)
|
||||
{
|
||||
target->CastSpell(target, SPELL_OVERCHARGED_BLAST, true);
|
||||
target->ToCreature()->DespawnOrUnsummon(500);
|
||||
}
|
||||
|
||||
PreventDefaultAction();
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_voa_overcharge_AuraScript::HandlePeriodicDummy, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_voa_overcharge_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_voa_lightning_nova : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_voa_lightning_nova() : SpellScriptLoader("spell_voa_lightning_nova") { }
|
||||
|
||||
class spell_voa_lightning_nova_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_voa_lightning_nova_SpellScript);
|
||||
|
||||
void HandleOnHit()
|
||||
{
|
||||
int32 damage = 0;
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
float dist = target->GetDistance(GetCaster());
|
||||
damage = int32(GetHitDamage() * (70.0f - std::min(70.0f, dist)) / 70.0f);
|
||||
}
|
||||
|
||||
SetHitDamage(damage);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnHit += SpellHitFn(spell_voa_lightning_nova_SpellScript::HandleOnHit);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_voa_lightning_nova_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_emalon()
|
||||
{
|
||||
new boss_emalon();
|
||||
|
||||
new spell_voa_overcharge();
|
||||
new spell_voa_lightning_nova();
|
||||
}
|
||||
@@ -1,254 +0,0 @@
|
||||
/*
|
||||
REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "vault_of_archavon.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
enum Events
|
||||
{
|
||||
// Koralon
|
||||
EVENT_BURNING_BREATH = 1,
|
||||
EVENT_FLAME_CINDER = 2,
|
||||
EVENT_METEOR_FISTS = 3,
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_BURNING_FURY = 68168,
|
||||
SPELL_BURNING_BREATH = 66665, // handled by spell_difficulty
|
||||
|
||||
SPELL_FLAMING_CINDER = 66681,
|
||||
SPELL_FLAMING_CINDER_DUMMY = 66690,
|
||||
SPELL_FLAMING_CINDER_MISSILE = 66682, // trigger of missile handled by spell_difficulty
|
||||
|
||||
SPELL_METEOR_FISTS = 66725, // handled by spell_difficulty
|
||||
SPELL_METEOR_FISTS_DAMAGE = 66765,
|
||||
SPELL_FW_METEOR_FISTS_DAMAGE = 66809
|
||||
};
|
||||
|
||||
class boss_koralon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_koralon() : CreatureScript("boss_koralon") { }
|
||||
|
||||
struct boss_koralonAI : public ScriptedAI
|
||||
{
|
||||
boss_koralonAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
uint32 rotateTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
rotateTimer = 0;
|
||||
events.Reset();
|
||||
if (pInstance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_STONED))
|
||||
{
|
||||
if (Aura* aur = me->AddAura(SPELL_STONED_AURA, me))
|
||||
{
|
||||
aur->SetMaxDuration(60 * MINUTE* IN_MILLISECONDS);
|
||||
aur->SetDuration(60 * MINUTE* IN_MILLISECONDS);
|
||||
}
|
||||
}
|
||||
pInstance->SetData(EVENT_KORALON, NOT_STARTED);
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->HasAura(SPELL_STONED_AURA))
|
||||
return;
|
||||
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->CastSpell(me, SPELL_BURNING_FURY, true);
|
||||
|
||||
events.ScheduleEvent(EVENT_BURNING_BREATH, 10000);
|
||||
events.ScheduleEvent(EVENT_METEOR_FISTS, 30000);
|
||||
events.ScheduleEvent(EVENT_FLAME_CINDER, 20000);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_KORALON, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* )
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_KORALON, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (rotateTimer)
|
||||
{
|
||||
rotateTimer += diff;
|
||||
if (rotateTimer >= 3000)
|
||||
{
|
||||
if (!me->HasUnitMovementFlag(MOVEMENTFLAG_LEFT))
|
||||
{
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_LEFT);
|
||||
me->SendMovementFlagUpdate();
|
||||
rotateTimer = 1;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEFT);
|
||||
me->SendMovementFlagUpdate();
|
||||
rotateTimer = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_BURNING_BREATH:
|
||||
rotateTimer = 1500;
|
||||
me->CastSpell(me, SPELL_BURNING_BREATH, false);
|
||||
events.RepeatEvent(45000);
|
||||
break;
|
||||
case EVENT_METEOR_FISTS:
|
||||
me->CastSpell(me, SPELL_METEOR_FISTS, true);
|
||||
events.RepeatEvent(45000);
|
||||
break;
|
||||
case EVENT_FLAME_CINDER:
|
||||
me->CastSpell(me, SPELL_FLAMING_CINDER, true);
|
||||
events.RepeatEvent(30000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_koralonAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_voa_flaming_cinder : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_voa_flaming_cinder() : SpellScriptLoader("spell_voa_flaming_cinder") { }
|
||||
|
||||
class spell_voa_flaming_cinder_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_voa_flaming_cinder_SpellScript);
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
GetCaster()->CastSpell(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), SPELL_FLAMING_CINDER_MISSILE, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_voa_flaming_cinder_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_voa_flaming_cinder_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_koralon_meteor_fists : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_koralon_meteor_fists() : SpellScriptLoader("spell_koralon_meteor_fists") { }
|
||||
|
||||
class spell_koralon_meteor_fists_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_koralon_meteor_fists_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_METEOR_FISTS_DAMAGE))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void TriggerFists(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_METEOR_FISTS_DAMAGE, true, NULL, aurEff);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_koralon_meteor_fists_AuraScript::TriggerFists, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_koralon_meteor_fists_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_flame_warder_meteor_fists : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_flame_warder_meteor_fists() : SpellScriptLoader("spell_flame_warder_meteor_fists") { }
|
||||
|
||||
class spell_flame_warder_meteor_fists_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_flame_warder_meteor_fists_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_FW_METEOR_FISTS_DAMAGE))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void TriggerFists(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_FW_METEOR_FISTS_DAMAGE, true, NULL, aurEff);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_flame_warder_meteor_fists_AuraScript::TriggerFists, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_flame_warder_meteor_fists_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_koralon()
|
||||
{
|
||||
new boss_koralon();
|
||||
new spell_voa_flaming_cinder();
|
||||
new spell_koralon_meteor_fists();
|
||||
new spell_flame_warder_meteor_fists();
|
||||
}
|
||||
@@ -1,243 +0,0 @@
|
||||
/*
|
||||
REWRITTEN FROM SCRATCH BY XINEF, IT OWNS NOW!
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "vault_of_archavon.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
// Toravon
|
||||
SPELL_FREEZING_GROUND = 72090,
|
||||
SPELL_FROZEN_ORB = 72091,
|
||||
SPELL_WHITEOUT = 72034,
|
||||
SPELL_FROZEN_MALLET = 71993,
|
||||
|
||||
// Frozen Orb
|
||||
SPELL_FROZEN_ORB_DMG = 72081, // priodic dmg aura
|
||||
SPELL_FROZEN_ORB_AURA = 72067, // make visible
|
||||
|
||||
// Frozen Orb Stalker
|
||||
SPELL_FROZEN_ORB_STALKER_VISUAL = 72094,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_FREEZING_GROUND = 1,
|
||||
EVENT_FROZEN_ORB_STALKER = 2,
|
||||
EVENT_CHECK_SUMMONS = 3,
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_FROZEN_ORB = 38456,
|
||||
NPC_FROZEN_ORB_STALKER = 38461,
|
||||
};
|
||||
|
||||
|
||||
class boss_toravon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_toravon() : CreatureScript("boss_toravon") { }
|
||||
|
||||
struct boss_toravonAI : public ScriptedAI
|
||||
{
|
||||
boss_toravonAI(Creature* creature) : ScriptedAI(creature), summons(me)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
if (pInstance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_STONED))
|
||||
{
|
||||
if (Aura* aur = me->AddAura(SPELL_STONED_AURA, me))
|
||||
{
|
||||
aur->SetMaxDuration(60 * MINUTE* IN_MILLISECONDS);
|
||||
aur->SetDuration(60 * MINUTE* IN_MILLISECONDS);
|
||||
}
|
||||
}
|
||||
pInstance->SetData(EVENT_TORAVON, NOT_STARTED);
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (me->HasAura(SPELL_STONED_AURA))
|
||||
return;
|
||||
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->CastSpell(me, SPELL_FROZEN_MALLET, true);
|
||||
|
||||
events.ScheduleEvent(EVENT_FROZEN_ORB_STALKER, 12000);
|
||||
events.ScheduleEvent(EVENT_FREEZING_GROUND, 7000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(EVENT_TORAVON, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* )
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(EVENT_TORAVON, DONE);
|
||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_WHITEOUT);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* cr)
|
||||
{
|
||||
summons.Summon(cr);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.GetEvent())
|
||||
{
|
||||
case EVENT_FREEZING_GROUND:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
me->CastSpell(target, SPELL_FREEZING_GROUND, false);
|
||||
events.RepeatEvent(20000);
|
||||
break;
|
||||
case EVENT_FROZEN_ORB_STALKER:
|
||||
me->CastCustomSpell(SPELL_FROZEN_ORB, SPELLVALUE_MAX_TARGETS, RAID_MODE(1, 3), me, false);
|
||||
events.RepeatEvent(35000);
|
||||
events.ScheduleEvent(EVENT_CHECK_SUMMONS, 10000);
|
||||
break;
|
||||
case EVENT_CHECK_SUMMONS:
|
||||
for (SummonList::iterator i = summons.begin(); i != summons.end();)
|
||||
{
|
||||
if (Creature* cr = ObjectAccessor::GetCreature(*me, *i))
|
||||
{
|
||||
if (!cr->IsAlive())
|
||||
summons.erase(i++);
|
||||
else
|
||||
++i;
|
||||
}
|
||||
else
|
||||
summons.erase(i++);
|
||||
}
|
||||
if (summons.empty())
|
||||
{
|
||||
events.PopEvent();
|
||||
me->CastSpell(me, SPELL_WHITEOUT, false);
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(2000);
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_toravonAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_frozen_orb : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_frozen_orb() : CreatureScript("npc_frozen_orb") { }
|
||||
|
||||
struct npc_frozen_orbAI : public ScriptedAI
|
||||
{
|
||||
npc_frozen_orbAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
uint32 switchTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
switchTimer = 9000;
|
||||
me->CastSpell(me, SPELL_FROZEN_ORB_AURA, true);
|
||||
me->CastSpell(me, SPELL_FROZEN_ORB_DMG, true);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
switchTimer += diff;
|
||||
if (switchTimer >= 10000)
|
||||
{
|
||||
switchTimer = 0;
|
||||
me->getThreatManager().resetAllAggro();
|
||||
if (Player* player = SelectTargetFromPlayerList(100.0f))
|
||||
me->AddThreat(player, 100000.0f);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_frozen_orbAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_frozen_orb_stalker : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_frozen_orb_stalker() : CreatureScript("npc_frozen_orb_stalker") { }
|
||||
|
||||
struct npc_frozen_orb_stalkerAI : public NullCreatureAI
|
||||
{
|
||||
npc_frozen_orb_stalkerAI(Creature* creature) : NullCreatureAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->CastSpell(me, SPELL_FROZEN_ORB_STALKER_VISUAL, true);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* cr)
|
||||
{
|
||||
if (InstanceScript* pInstance = me->GetInstanceScript())
|
||||
if (Creature* toravon = ObjectAccessor::GetCreature(*me, pInstance->GetData64(EVENT_TORAVON)))
|
||||
if (toravon->AI())
|
||||
toravon->AI()->JustSummoned(cr);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_frozen_orb_stalkerAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void AddSC_boss_toravon()
|
||||
{
|
||||
new boss_toravon();
|
||||
new npc_frozen_orb();
|
||||
new npc_frozen_orb_stalker();
|
||||
}
|
||||
@@ -1,292 +0,0 @@
|
||||
/*
|
||||
* Copyright (C)
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "vault_of_archavon.h"
|
||||
#include "Battlefield.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "Player.h"
|
||||
|
||||
/* Vault of Archavon encounters:
|
||||
1 - Archavon the Stone Watcher event
|
||||
2 - Emalon the Storm Watcher event
|
||||
3 - Koralon the Flame Watcher event
|
||||
4 - Toravon the Ice Watcher event
|
||||
*/
|
||||
|
||||
class instance_vault_of_archavon : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_vault_of_archavon() : InstanceMapScript("instance_vault_of_archavon", 624) { }
|
||||
|
||||
struct instance_vault_of_archavon_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_vault_of_archavon_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
memset(&bossGUIDs, 0, sizeof(bossGUIDs));
|
||||
|
||||
ArchavonDeath = 0;
|
||||
EmalonDeath = 0;
|
||||
KoralonDeath = 0;
|
||||
checkTimer = 0;
|
||||
stoned = false;
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* )
|
||||
{
|
||||
if (stoned)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (Creature* cr = instance->GetCreature(bossGUIDs[i]))
|
||||
if (!cr->IsInCombat())
|
||||
cr->RemoveAllAuras();
|
||||
|
||||
stoned = false;
|
||||
}
|
||||
}
|
||||
|
||||
void Update(uint32 diff)
|
||||
{
|
||||
checkTimer += diff;
|
||||
if (checkTimer >= 60000)
|
||||
{
|
||||
checkTimer -= 60000; // one minute
|
||||
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG))
|
||||
{
|
||||
if (!bf->IsWarTime())
|
||||
{
|
||||
if (bf->GetTimer() <= (16 * MINUTE * IN_MILLISECONDS) && bf->GetTimer() >= (15 * MINUTE * IN_MILLISECONDS))
|
||||
{
|
||||
Map::PlayerList const &PlayerList = instance->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* player = i->GetSource())
|
||||
player->MonsterTextEmote("This instance will reset in 15 minutes.", 0, true);
|
||||
}
|
||||
else if (bf->GetTimer() <= (10 * MINUTE * IN_MILLISECONDS) && bf->GetTimer() >= (9 * MINUTE * IN_MILLISECONDS))
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (Creature* cr = instance->GetCreature(bossGUIDs[i]))
|
||||
if (!cr->IsInCombat())
|
||||
{
|
||||
cr->RemoveAllAuras();
|
||||
if (Aura* aur = cr->AddAura(SPELL_STONED_AURA, cr))
|
||||
{
|
||||
aur->SetMaxDuration(60 * MINUTE* IN_MILLISECONDS);
|
||||
aur->SetDuration(60 * MINUTE* IN_MILLISECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
stoned = true;
|
||||
}
|
||||
else if (bf->GetTimer() <= (2 * MINUTE * IN_MILLISECONDS) && bf->GetTimer() > (MINUTE * IN_MILLISECONDS))
|
||||
{
|
||||
Map::PlayerList const &PlayerList = instance->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* player = i->GetSource())
|
||||
player->MonsterTextEmote("This instance is about to reset. Prepare to be removed.", 0, true);
|
||||
}
|
||||
else if (bf->GetTimer() <= MINUTE * IN_MILLISECONDS)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (Creature* cr = instance->GetCreature(bossGUIDs[i]))
|
||||
if (cr->IsInCombat() && cr->AI())
|
||||
cr->AI()->EnterEvadeMode();
|
||||
|
||||
Map::PlayerList const &PlayerList = instance->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* player = i->GetSource())
|
||||
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->GetOrientation());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
|
||||
if (!bf || bf->IsWarTime() || bf->GetTimer() <= 10 * MINUTE * IN_MILLISECONDS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case CREATURE_TORAVON:
|
||||
bossGUIDs[EVENT_TORAVON] = creature->GetGUID();
|
||||
break;
|
||||
case CREATURE_ARCHAVON:
|
||||
bossGUIDs[EVENT_ARCHAVON] = creature->GetGUID();
|
||||
break;
|
||||
case CREATURE_KORALON:
|
||||
bossGUIDs[EVENT_KORALON] = creature->GetGUID();
|
||||
break;
|
||||
case CREATURE_EMALON:
|
||||
bossGUIDs[EVENT_EMALON] = creature->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier) const
|
||||
{
|
||||
if (identifier < MAX_ENCOUNTER)
|
||||
return bossGUIDs[identifier];
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 identifier) const
|
||||
{
|
||||
if (identifier == DATA_STONED)
|
||||
return (uint32)stoned;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case EVENT_ARCHAVON:
|
||||
case EVENT_EMALON:
|
||||
case EVENT_KORALON:
|
||||
case EVENT_TORAVON:
|
||||
m_auiEncounter[type] = data;
|
||||
break;
|
||||
}
|
||||
|
||||
if (data == DONE)
|
||||
{
|
||||
SaveToDB();
|
||||
switch (type)
|
||||
{
|
||||
case EVENT_ARCHAVON:
|
||||
ArchavonDeath = time(NULL);
|
||||
break;
|
||||
case EVENT_EMALON:
|
||||
EmalonDeath = time(NULL);
|
||||
break;
|
||||
case EVENT_KORALON:
|
||||
KoralonDeath = time(NULL);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
// on every death of Archavon, Emalon and Koralon check our achievement
|
||||
DoCastSpellOnPlayers(SPELL_EARTH_WIND_FIRE_ACHIEVEMENT_CHECK);
|
||||
}
|
||||
}
|
||||
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/)
|
||||
{
|
||||
switch (criteria_id)
|
||||
{
|
||||
case CRITERIA_EARTH_WIND_FIRE_10:
|
||||
case CRITERIA_EARTH_WIND_FIRE_25:
|
||||
if (ArchavonDeath && EmalonDeath && KoralonDeath)
|
||||
{
|
||||
// instance difficulty check is already done in db (achievement_criteria_data)
|
||||
// int() for Visual Studio, compile errors with abs(time_t)
|
||||
return (abs(int(ArchavonDeath-EmalonDeath)) < MINUTE && \
|
||||
abs(int(EmalonDeath-KoralonDeath)) < MINUTE && \
|
||||
abs(int(KoralonDeath-ArchavonDeath)) < MINUTE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "V O A " << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2] << ' ' << m_auiEncounter[3];
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
char dataHead1, dataHead2, dataHead3;
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2 >> dataHead3;
|
||||
|
||||
if (dataHead1 == 'V' && dataHead2 == 'O' && dataHead3 == 'A')
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
{
|
||||
loadStream >> m_auiEncounter[i];
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
}
|
||||
|
||||
private:
|
||||
time_t ArchavonDeath;
|
||||
time_t EmalonDeath;
|
||||
time_t KoralonDeath;
|
||||
uint32 checkTimer;
|
||||
bool stoned;
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
uint64 bossGUIDs[MAX_ENCOUNTER];
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_vault_of_archavon_InstanceMapScript(map);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_instance_vault_of_archavon()
|
||||
{
|
||||
new instance_vault_of_archavon();
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Copyright (C)
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef DEF_ARCHAVON_H
|
||||
#define DEF_ARCHAVON_H
|
||||
|
||||
enum Creatures
|
||||
{
|
||||
CREATURE_ARCHAVON = 31125,
|
||||
CREATURE_EMALON = 33993,
|
||||
CREATURE_KORALON = 35013,
|
||||
CREATURE_TORAVON = 38433,
|
||||
};
|
||||
|
||||
enum Data
|
||||
{
|
||||
EVENT_ARCHAVON = 0,
|
||||
EVENT_EMALON = 1,
|
||||
EVENT_KORALON = 2,
|
||||
EVENT_TORAVON = 3,
|
||||
MAX_ENCOUNTER = 4,
|
||||
DATA_STONED = 5,
|
||||
};
|
||||
|
||||
|
||||
enum AchievementCriteriaIds
|
||||
{
|
||||
CRITERIA_EARTH_WIND_FIRE_10 = 12018,
|
||||
CRITERIA_EARTH_WIND_FIRE_25 = 12019,
|
||||
};
|
||||
|
||||
enum AchievementSpells
|
||||
{
|
||||
SPELL_EARTH_WIND_FIRE_ACHIEVEMENT_CHECK = 68308,
|
||||
SPELL_STONED_AURA = 63080,
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user