351 std::vector<uint32> vHealersEntries;
352 vHealersEntries.clear();
358 std::vector<uint32> vOtherEntries;
359 vOtherEntries.clear();
367 uint8 healersSubtracted = 2;
369 healersSubtracted = 1;
370 for (
uint8 i = 0; i < healersSubtracted; ++i)
372 uint8 pos = std::rand() % (vHealersEntries.size() - 1);
373 switch (vHealersEntries[pos])
402 vHealersEntries.erase(vHealersEntries.begin() + pos);
406 for (
uint8 i = 0; i < 4; ++i)
407 vOtherEntries.erase(vOtherEntries.begin() + std::rand() % (vOtherEntries.size() - 1));
409 std::vector<uint32> vChampionEntries;
410 vChampionEntries.clear();
411 for (
uint8 i = 0; i < vHealersEntries.size(); ++i)
412 vChampionEntries.push_back(vHealersEntries[i]);
413 for (
uint8 i = 0; i < vOtherEntries.size(); ++i)
414 vChampionEntries.push_back(vOtherEntries[i]);
416 return vChampionEntries;
421 std::vector<Position> vChampionJumpOrigin;
423 for (
uint8 i = 0; i < 5; i++)
426 for (
uint8 i = 5; i < 10; i++)
429 std::vector<Position> vChampionJumpTarget;
430 for (
uint8 i = 10; i < 20; i++)
434 for (
uint8 i = 0; i < vChampionEntries.size(); ++i)
436 uint8 pos = std::rand() % (vChampionJumpTarget.size()-1);
444 temp->SetHomePosition(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 0);
445 temp->GetMotionMaster()->MoveJump(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 20.0f, 20.0f);
446 temp->SetOrientation(0);
450 temp->SetHomePosition((
ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 3);
451 temp->GetMotionMaster()->MoveJump((
ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 20.0f, 20.0f);
452 temp->SetOrientation(3);
455 vChampionJumpTarget.erase(vChampionJumpTarget.begin()+pos);
467 for (std::list<uint64>::iterator i =
_summons.begin(); i !=
_summons.end(); ++i)
485 me->DespawnOrUnsummon();
507 me->DespawnOrUnsummon();
551 pChampionController->AI()->SetData(2,
FAIL);
552 me->DespawnOrUnsummon();
559 float eh = (health + 1) * (1.0f + armor_mod);
560 return dist_mod * 30000.0f / eh;
565 std::list<HostileReference*>
const& tList =
me->getThreatManager().getThreatList();
566 for (std::list<HostileReference*>::const_iterator itr = tList.begin(); itr != tList.end(); ++itr)
569 if (unit &&
me->getThreatManager().getThreat(unit))
574 me->getThreatManager().modifyThreatPercent(unit, -100);
575 me->AddThreat(unit, 1000000.0f * threat);
602 pChampionController->AI()->SetData(2,
DONE);
611 pChampionController->AI()->SetData(2,
IN_PROGRESS);
619 uint32 TeamInInstance = 0;
623 TeamInInstance = player->GetTeam();
645 std::list<Creature*>::const_iterator itr = lst.begin();
648 advance(itr, rand() % lst.size());
654 std::list<HostileReference*>
const& tList =
me->getThreatManager().getThreatList();
655 std::list<HostileReference*>::const_iterator iter;
657 for (iter = tList.begin(); iter!=tList.end(); ++iter)
668 std::list<HostileReference*>
const& tList =
me->getThreatManager().getThreatList();
669 std::list<HostileReference*>::const_iterator iter;
672 for (iter = tList.begin(); iter != tList.end(); ++iter)
675 if (target &&
me->GetDistance2d(target) < distance)
686 if (
me->Attack(who,
true))
688 me->AddThreat(who, 10.0f);
689 me->SetInCombatWith(who);
690 who->SetInCombatWith(
me);
714 if (
me->HasBreakableByDamageCrowdControlAura())
886 if (
me->getFaction())
1474 if (
Unit* target =
me->GetVictim())
1476 if (
me->GetDistance2d(target) < 6.0f)
1663 if (
Unit* target =
me->GetVictim())
1742 if (
Unit* target =
me->GetVictim())
1744 if (
me->IsInRange(target, 5.0f, 30.0f,
false))
1861 if (
Unit* target =
me->GetVictim())
1863 if (
me->IsInRange(target, 10.0f, 40.0f,
false))
1986 if (
me->getFaction())
@ DIFFICULTY_10MAN_HEROIC
@ DIFFICULTY_25MAN_NORMAL
@ DIFFICULTY_10MAN_NORMAL
@ DIFFICULTY_25MAN_HEROIC
@ TEMPSUMMON_MANUAL_DESPAWN
@ TARGET_UNIT_SRC_AREA_ALLY
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
@ UNIT_FLAG_NON_ATTACKABLE
@ SPELL_HAMMER_OF_JUSTICE
void AddSC_boss_faction_champions()
@ SPELL_HAMMER_OF_JUSTICE
@ SPELL_ICEBOUND_FORTITUDE
@ SPELL_JUDGEMENT_OF_COMMAND
@ SPELL_UNSTABLE_AFFLICTION
@ SPELL_HAMMER_OF_JUSTICE_RET
@ SPELL_CURSE_OF_EXHAUSTION
@ SPELL_UNSTABLE_AFFLICTION_DISPEL
@ SPELL_INTIMIDATING_SHOUT
@ SPELL_HAND_OF_PROTECTION
@ EVENT_DPS_DIVINE_SHIELD
@ EVENT_CURSE_OF_EXHAUSTION
@ EVENT_HEAL_HAND_OF_PROTECTION
@ EVENT_DPS_PSYCHIC_SCREAM
@ EVENT_HAMMER_OF_JUSTICE
@ EVENT_DPS_HAND_OF_PROTECTION
@ EVENT_HAMMER_OF_JUSTICE_RET
@ EVENT_INTIMIDATING_SHOUT
@ EVENT_HEAL_BLOODLUST_HEROISM
@ EVENT_HEAL_PSYCHIC_SCREAM
@ EVENT_ICEBOUND_FORTITUDE
@ EVENT_JUDGEMENT_OF_COMMAND
@ EVENT_HEAL_DIVINE_SHIELD
@ EVENT_UNSTABLE_AFFLICTION
@ EVENT_DPS_BLOODLUST_HEROISM
AuraEffect * GetEffect(uint8 effIndex) const
HookList< AuraDispelHandler > AfterDispel
InstanceScript *const instance
BossAI(Creature *creature, uint32 bossId)
CreatureScript(const char *name)
Unit * GetDispeller() const
HookList< HitHandler > AfterHit
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
SpellScriptLoader(const char *name)
void DoMeleeAttackIfReady()
void DoCast(uint32 spellId)
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
bool DoSpellAttackIfReady(uint32 spell)
void DoCastVictim(uint32 spellId, bool triggered=false)
void DoCastAOE(uint32 spellId, bool triggered=false)
static Creature * GetCreature(WorldObject &object, uint64 guid)
static Unit * GetUnit(WorldObject &object, uint64 guid)
Powers getPowerType() const
InstanceScript * GetInstanceScript()
CreatureAI * GetAI(Creature *creature) const OVERRIDE
boss_toc_champion_controller()
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_faction_champion_death_grip_SpellScript)
bool Validate(SpellInfo const *) OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
spell_faction_champion_death_grip()
PrepareAuraScript(spell_faction_champion_warl_unstable_affliction_AuraScript)
bool Validate(SpellInfo const *) OVERRIDE
void HandleDispel(DispelInfo *dispelInfo)
AuraScript * GetAuraScript() const OVERRIDE
spell_faction_champion_warl_unstable_affliction()
void RemoveInvalidTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) OVERRIDE
PrepareSpellScript(spell_toc_bloodlust_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
bool Validate(SpellInfo const *) OVERRIDE
PrepareSpellScript(spell_toc_heroism_SpellScript)
void RemoveInvalidTargets(std::list< WorldObject * > &targets)
SpellScript * GetSpellScript() const OVERRIDE
void SetEquipmentSlots(bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
void SetCombatMovement(bool allowMovement)
Unit * DoSelectLowestHpFriendly(float range, uint32 minHPDiff=1)
bool HealthBelowPct(uint32 pct) const
std::list< Creature * > DoFindFriendlyMissingBuff(float range, uint32 spellId)
ScriptedAI(Creature *creature)
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
void JustDied(Unit *) OVERRIDE
void EnterCombat(Unit *) OVERRIDE
Creature * SelectRandomFriendlyMissingBuff(uint32 spell)
void JustReachedHome() OVERRIDE
Unit * SelectEnemyCaster(bool)
void AttackStart(Unit *who) OVERRIDE
float CalculateThreat(float distance, float armor, uint32 health)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
uint32 EnemiesInRange(float distance)
void KilledUnit(Unit *who) OVERRIDE
boss_faction_championsAI(Creature *creature, uint32 aitype)
boss_toc_champion_controllerAI(Creature *creature)
void SummonChampions(Team playerTeam)
InstanceScript * _instance
std::vector< uint32 > SelectChampions(Team playerTeam)
uint32 _championsNotStarted
void SetData(uint32 uiType, uint32 uiData) OVERRIDE
npc_toc_boomkinAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_toc_dkAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_toc_druidAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void JustSummoned(Creature *summoned) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void SummonedCreatureDespawn(Creature *) OVERRIDE
void JustDied(Unit *killer) OVERRIDE
npc_toc_enh_shamanAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_toc_hunterAI(Creature *creature)
void EnterCombat(Unit *who) OVERRIDE
npc_toc_mageAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_toc_paladinAI(Creature *creature)
npc_toc_pet_hunterAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_toc_pet_warlockAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_toc_priestAI(Creature *creature)
void EnterCombat(Unit *who) OVERRIDE
npc_toc_retro_paladinAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_toc_rogueAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_toc_shadow_priestAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_toc_shamanAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_toc_warlockAI(Creature *creature)
void EnterCombat(Unit *who) OVERRIDE
npc_toc_warriorAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
@ NPC_ALLIANCE_SHAMAN_RESTORATION
@ NPC_ALLIANCE_PALADIN_HOLY
@ NPC_CHAMPIONS_CONTROLLER
@ NPC_HORDE_SHAMAN_RESTORATION
@ NPC_ALLIANCE_DRUID_RESTORATION
@ NPC_ALLIANCE_DRUID_BALANCE
@ NPC_HORDE_PRIEST_SHADOW
@ NPC_HORDE_PALADIN_RETRIBUTION
@ NPC_HORDE_DRUID_RESTORATION
@ NPC_ALLIANCE_PALADIN_RETRIBUTION
@ NPC_HORDE_DRUID_BALANCE
@ NPC_HORDE_SHAMAN_ENHANCEMENT
@ NPC_ALLIANCE_PRIEST_DISCIPLINE
@ NPC_HORDE_PRIEST_DISCIPLINE
@ NPC_ALLIANCE_DEATH_KNIGHT
@ NPC_ALLIANCE_SHAMAN_ENHANCEMENT
@ NPC_ALLIANCE_PRIEST_SHADOW
const Position ToCCommonLoc[]
const Position FactionChampionLoc[]
@ DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE