342 { 514.231f, 105.569f, 418.234f, 0 },
343 { 508.334f, 115.377f, 418.234f, 0 },
344 { 506.454f, 126.291f, 418.234f, 0 },
345 { 506.243f, 106.596f, 421.592f, 0 },
346 { 499.885f, 117.717f, 421.557f, 0 },
348 { 613.127f, 100.443f, 419.74f, 0 },
349 { 621.126f, 128.042f, 418.231f, 0 },
350 { 618.829f, 113.606f, 418.232f, 0 },
351 { 625.845f, 112.914f, 421.575f, 0 },
352 { 615.566f, 109.653f, 418.234f, 0 },
354 { 535.469f, 113.012f, 394.66f, 0 },
355 { 526.417f, 137.465f, 394.749f, 0 },
356 { 528.108f, 111.057f, 395.289f, 0 },
357 { 519.92f, 134.285f, 395.289f, 0 },
358 { 533.648f, 119.148f, 394.646f, 0 },
359 { 531.399f, 125.63f, 394.708f, 0 },
360 { 528.958f, 131.47f, 394.73f, 0 },
361 { 526.309f, 116.667f, 394.833f, 0 },
362 { 524.238f, 122.411f, 394.819f, 0 },
363 { 521.901f, 128.488f, 394.832f, 0 }
390 std::vector<uint32> vHealersEntries;
391 vHealersEntries.clear();
397 std::vector<uint32> vOtherEntries;
398 vOtherEntries.clear();
406 uint8 healersSubtracted = 2;
408 healersSubtracted = 1;
409 for (
uint8 i = 0; i < healersSubtracted; ++i)
411 uint8 pos =
urand(0, vHealersEntries.size() - 1);
412 switch (vHealersEntries[pos])
441 vHealersEntries.erase(vHealersEntries.begin() + pos);
445 for (
uint8 i = 0; i < 4; ++i)
446 vOtherEntries.erase(vOtherEntries.begin() +
urand(0, vOtherEntries.size() - 1));
448 std::vector<uint32> vChampionEntries;
449 vChampionEntries.clear();
450 for (
uint8 i = 0; i < vHealersEntries.size(); ++i)
451 vChampionEntries.push_back(vHealersEntries[i]);
452 for (
uint8 i = 0; i < vOtherEntries.size(); ++i)
453 vChampionEntries.push_back(vOtherEntries[i]);
455 return vChampionEntries;
460 std::vector<Position> vChampionJumpOrigin;
462 for (
uint8 i = 0; i < 5; i++)
465 for (
uint8 i = 5; i < 10; i++)
468 std::vector<Position> vChampionJumpTarget;
469 for (
uint8 i = 10; i < 20; i++)
473 for (
uint8 i = 0; i < vChampionEntries.size(); ++i)
475 uint8 pos =
urand(0, vChampionJumpTarget.size()-1);
481 champion->SetImmuneToPC(
false);
484 champion->SetHomePosition(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 0);
485 champion->GetMotionMaster()->MoveJump(vChampionJumpTarget[pos], 20.0f, 20.0f);
486 champion->SetOrientation(0);
490 champion->SetHomePosition((
ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 3);
491 champion->GetMotionMaster()->MoveJump((
ToCCommonLoc[1].GetPositionX() * 2) - vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), vChampionJumpTarget[pos].GetOrientation(), 20.0f, 20.0f);
492 champion->SetOrientation(3);
495 vChampionJumpTarget.erase(vChampionJumpTarget.begin()+pos);
513 summon->SetImmuneToPC(
false);
587 pChampionController->AI()->SetData(2,
FAIL);
595 float eh = (health + 1) * (1.0f + armor_mod);
596 return dist_mod * 30000.0f / eh;
604 ref->ScaleThreat(0.0f);
629 pChampionController->AI()->SetData(2,
DONE);
639 pChampionController->AI()->SetData(2,
IN_PROGRESS);
659 std::list<Creature*>::const_iterator itr = lst.begin();
662 advance(itr,
rand32() % lst.size());
@ TEMPSUMMON_MANUAL_DESPAWN
uint32 urand(uint32 min, uint32 max)
#define RegisterSpellScript(spell_script)
@ TARGET_UNIT_SRC_AREA_ALLY
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
@ UNIT_FLAG_NON_ATTACKABLE
void AddSC_boss_faction_champions()
Position const FactionChampionLoc[]
@ 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
std::unordered_map< ObjectGuid, CombatReference * > const & GetPvECombatRefs() const
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
void SetCombatPulseDelay(uint32 delay)
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
WorldObject * GetDispeller() const
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
virtual bool SetBossState(uint32 id, EncounterState state)
Creature * GetCreature(uint32 type)
CreatureBoundary const * GetBossBoundary(uint32 id) const
static Player * ToPlayer(Object *o)
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
HookList< HitHandler > AfterHit
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void Summon(Creature const *summon)
void DoZoneInCombat(uint32 entry=0)
StorageType::iterator iterator
Trinity::IteratorPair< ThreatListIterator, std::nullptr_t > GetUnsortedThreatList() const
std::vector< ThreatReference * > GetModifiableThreatList()
bool DoSpellAttackIfReady(uint32 spellId)
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
int32 ModifyPower(Powers power, int32 val, bool withPowerUpdate=true)
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
ThreatManager & GetThreatManager()
bool HasBreakableByDamageCrowdControlAura(Unit *excludeCasterChannel=nullptr) const
Powers GetPowerType() const
int32 GetMaxPower(Powers power) const
bool Attack(Unit *victim, bool meleeAttack)
uint32 GetFaction() const override
void SetFullPower(Powers power)
void SetPowerType(Powers power, bool sendUpdate=true)
bool HasUnitState(const uint32 f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
CombatManager & GetCombatManager()
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
void setActive(bool isActiveObject)
float GetDistance2d(WorldObject const *obj) const
bool IsInRange(WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const
virtual uint32 GetData(uint32) const
virtual void SetData(uint32, uint32)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void HandleDispel(DispelInfo *dispelInfo)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void RemoveInvalidTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void RemoveInvalidTargets(std::list< WorldObject * > &targets)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
constexpr float GetPositionX() const
constexpr float GetPositionY() const
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)
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
void JustReachedHome() override
Creature * SelectRandomFriendlyMissingBuff(uint32 spell)
void JustEngagedWith(Unit *) override
void AttackStart(Unit *who) override
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) override
void KilledUnit(Unit *who) override
Unit * SelectEnemyCaster(bool)
void JustDied(Unit *) override
float CalculateThreat(float distance, float armor, uint32 health)
uint32 EnemiesInRange(float distance)
boss_faction_championsAI(Creature *creature, uint32 aitype)
std::vector< uint32 > SelectChampions(Team playerTeam)
void JustSummoned(Creature *) override
boss_toc_champion_controller(Creature *creature)
uint32 _championsNotStarted
void SummonChampions(Team playerTeam)
void SetData(uint32 uiType, uint32 uiData) override
npc_toc_boomkin(Creature *creature)
void UpdateAI(uint32 diff) override
void UpdateAI(uint32 diff) override
npc_toc_dk(Creature *creature)
void UpdateAI(uint32 diff) override
npc_toc_druid(Creature *creature)
void JustSummoned(Creature *summoned) override
void SummonedCreatureDespawn(Creature *) override
npc_toc_enh_shaman(Creature *creature)
void JustDied(Unit *killer) override
void UpdateAI(uint32 diff) override
npc_toc_hunter(Creature *creature)
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *who) override
npc_toc_mage(Creature *creature)
void UpdateAI(uint32 diff) override
void UpdateAI(uint32 diff) override
npc_toc_paladin(Creature *creature)
void UpdateAI(uint32 diff) override
npc_toc_pet_hunter(Creature *creature)
npc_toc_pet_warlock(Creature *creature)
void UpdateAI(uint32 diff) override
npc_toc_priest(Creature *creature)
void UpdateAI(uint32 diff) override
void UpdateAI(uint32 diff) override
npc_toc_retro_paladin(Creature *creature)
void JustEngagedWith(Unit *who) override
npc_toc_rogue(Creature *creature)
void UpdateAI(uint32 diff) override
void UpdateAI(uint32 diff) override
npc_toc_shadow_priest(Creature *creature)
npc_toc_shaman(Creature *creature)
void UpdateAI(uint32 diff) override
npc_toc_warlock(Creature *creature)
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
npc_toc_warrior(Creature *creature)
void UpdateAI(uint32 diff) override
constexpr Position ToCCommonLoc[]
@ NPC_ALLIANCE_SHAMAN_RESTORATION
@ NPC_ALLIANCE_PALADIN_HOLY
@ 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
@ ACTION_SAY_KILLED_PLAYER
#define RegisterTrialOfTheCrusaderCreatureAI(ai_name)