23#include "G3DPosition.hpp"
199 TC_LOG_ERROR(
"scripts",
"npc_unworthy_initiateAI: unable to find anchor!");
204 for (
uint8 i = 0; i < 12; ++i)
211 prison = temp_prison;
219 TC_LOG_ERROR(
"scripts",
"npc_unworthy_initiateAI: unable to find prison!");
340 ObjectGuid prisonerGUID = anchor->AI()->GetGUID();
368 case 25369: spellId = 51552;
break;
369 case 25373: spellId = 51551;
break;
370 case 25363: spellId = 51542;
break;
371 case 25357: spellId = 51541;
break;
372 case 25361: spellId = 51537;
break;
373 case 25356: spellId = 51538;
break;
374 case 25372: spellId = 51550;
break;
375 case 25367: spellId = 51549;
break;
376 case 25362: spellId = 51540;
break;
377 case 25359: spellId = 51539;
break;
378 case 25355: spellId = 51534;
break;
379 case 25354: spellId = 51520;
break;
380 case 25360: spellId = 51536;
break;
381 case 25358: spellId = 51535;
break;
382 case 25368: spellId = 51544;
break;
383 case 25364: spellId = 51543;
break;
384 case 25371: spellId = 51548;
break;
385 case 25366: spellId = 51547;
break;
386 case 25370: spellId = 51545;
break;
387 case 25365: spellId = 51546;
break;
427 { 2361.21f, -5660.45f, 496.744f },
428 { 2341.571f, -5672.797f, 538.3942f },
429 { 1957.4f, -5844.1f, 273.867f },
430 { 1758.01f, -5876.79f, 166.867f }
482 init.MovebyPath(path);
485 init.SetVelocity(owner->GetSpeed(
MOVE_RUN));
799 creature->DespawnOrUnsummon(2s);
848 creature->DespawnOrUnsummon();
959 if (!deathcharger || !killer)
1009 creature->
CastSpell(owner, 52517,
true);
1044 std::list<TempSummon*> MinionList;
1047 if (!MinionList.empty())
1049 for (
Creature* creature : MinionList)
1053 if (creature->IsInCombat() && creature->getAttackerForHelper())
1113 if (originalCaster && target)
First const & RAND(First const &first, Second const &second, Rest const &... rest)
#define TC_LOG_ERROR(filterType__,...)
@ QUEST_STATUS_INCOMPLETE
uint32 urand(uint32 min, uint32 max)
#define RegisterCreatureAI(ai_name)
#define RegisterSpellScript(spell_script)
void AddGossipItemFor(Player *player, GossipOptionNpc optionNpc, std::string text, uint32 sender, uint32 action)
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const &guid)
void ClearGossipMenuFor(Player *player)
void InitGossipMenuFor(Player *player, uint32 menuId)
void CloseGossipMenuFor(Player *player)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_KILL_CREDIT2
@ FACTION_SCARLET_CRUSADE_2
@ FACTION_UNDEAD_SCOURGE_2
@ AURA_EFFECT_HANDLE_REAL
#define SpellEffectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
@ UNIT_NPC_FLAG_SPELLCLICK
static constexpr uint8 const EyeOfAcherusPathSize
void AddSC_the_scarlet_enclave_c1()
@ PATH_DEATH_KNIGHT_INITIATE3
@ PATH_DEATH_KNIGHT_INITIATE8
@ PATH_DEATH_KNIGHT_INITIATE4
@ PATH_DEATH_KNIGHT_INITIATE7
@ PATH_DEATH_KNIGHT_INITIATE5
@ PATH_DEATH_KNIGHT_INITIATE6
@ PATH_DEATH_KNIGHT_INITIATE2
@ PATH_DEATH_KNIGHT_INITIATE
@ SPELL_RUNEFORGING_CREDIT
@ SPELL_EFFECT_STOLEN_HORSE
@ QUEST_INTO_REALM_OF_SHADOWS
@ SPELL_DELIVER_STOLEN_HORSE
@ SPELL_EYE_OF_ACHERUS_VISUAL
@ SAY_LAUNCH_TOWARDS_DESTINATION
@ SPELL_THE_EYE_OF_ACHERUS
@ EVENT_LAUNCH_TOWARDS_DESTINATION
@ EVENT_ANNOUNCE_LAUNCH_TO_DESTINATION
@ SPELL_EYE_OF_ACHERUS_FLIGHT_BOOST
@ SPELL_EYE_OF_ACHERUS_FLIGHT
G3D::Vector3 const EyeOfAcherusPath[EyeOfAcherusPathSize]
uint32 acherus_soul_prison[12]
uint32 acherus_unworthy_initiate[5]
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN12
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN3
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN16
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN26
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN15
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN28
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN29
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN17
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN24
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN6
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN8
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN34
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN22
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN30
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN7
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN31
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN25
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN5
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN11
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN10
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN41
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN14
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN33
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN20
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN19
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN4
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN18
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN37
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN21
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN9
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN39
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN36
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN27
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN40
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN32
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN13
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN38
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN2
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN23
@ PATH_HEARTHGLEN_CRUSADER_DESPAWN35
@ SPELL_DK_INITIATE_VISUAL
@ SPELL_SOUL_PRISON_CHAIN
HookList< EffectApplyHandler > AfterEffectApply
void UpdateAI(uint32 diff) override
virtual void MoveInLineOfSight(Unit *)
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
virtual void JustAppeared()
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
int8 GetOriginalEquipmentId() const
void SetImmuneToPC(bool apply) override
uint32 m_spells[MAX_CREATURE_SPELLS]
void LoadEquipment(int8 id=1, bool force=false)
void SetDisplayFromModel(uint32 modelIdx)
void SetReactState(ReactStates st)
void SetCurrentEquipmentId(uint8 id)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetTarget(ObjectGuid const &guid) override
void ExitVehicle(Position const *exitPosition=nullptr) override
uint8 GetCurrentEquipmentId() const
void DelayEvents(Milliseconds delay)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Difficulty GetDifficultyID() const
void LaunchMoveSpline(std::function< void(Movement::MoveSplineInit &init)> &&initializer, uint32 id=0, MovementGeneratorPriority priority=MOTION_PRIORITY_NORMAL, MovementGeneratorType type=EFFECT_MOTION_TYPE)
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
static Creature * ToCreature(Object *o)
static ObjectGuid GetGUID(Object const *o)
static Player * ToPlayer(Object *o)
QuestStatus GetQuestStatus(uint32 quest_id) const
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
std::unique_ptr< PlayerMenu > PlayerTalkClass
uint32 GetGossipMenuForSource(WorldObject const *source) const
float GetMaxRange(bool positive=false, WorldObject *caster=nullptr, Spell *spell=nullptr) const
float GetMinRange(bool positive=false) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Creature * GetHitCreature() const
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Unit * GetOriginalCaster() const
bool DoSpellAttackIfReady(uint32 spellId)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
void EnterVehicle(Unit *base, int8 seatId=-1)
Vehicle * GetVehicle() const
void RemoveGameObject(GameObject *gameObj, bool del)
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
bool IsWithinCombatRange(Unit const *obj, float dist2compare) const
void SetFaction(uint32 faction) override
ObjectGuid GetOwnerGUID() const override
Unit * GetCharmer() const
Unit * getAttackerForHelper() const
MotionMaster * GetMotionMaster()
bool IsFullHealth() const
void RemoveNpcFlag(NPCFlags flags)
TempSummon * ToTempSummon()
CharmInfo * GetCharmInfo()
void SetUninteractible(bool apply)
Unit * EnsureVictim() const
Unit * GetCharmerOrOwner() const
uint32 GetDisplayId() const
bool HealthBelowPct(int32 pct) const
bool Attack(Unit *victim, bool meleeAttack)
void SetNpcFlag(NPCFlags flags)
void EngageWithTarget(Unit *who)
void GetAllMinionsByEntry(std::list< TempSummon * > &Minions, uint32 entry)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
bool IsControlledByPlayer() const
void SetUnitFlag(UnitFlags flags)
Vehicle * GetVehicleKit() const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void RemoveUnitFlag(UnitFlags flags)
bool HasEmptySeat(int8 seatId) const
Checks if vehicle's seat specified by 'seatId' is empty.
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
float GetDistance2d(WorldObject const *obj) const
void GetContactPoint(WorldObject const *obj, float &x, float &y, float &z, float distance2d=CONTACT_DISTANCE) const
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
GameObjectAI * GetAI(GameObject *go) const override
npc_death_knight_initiate()
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
npc_salanar_the_horseman()
npc_unworthy_initiate_anchor()
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void HandleScriptEffect(SpellEffIndex)
void HandleScriptEffect(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScriptEffect(SpellEffIndex)
bool Validate(SpellInfo const *) override
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
std::vector< Vector3 > PointsArray
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
void InitPossessCreateSpells()
constexpr float GetPositionZ() const
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
go_acherus_soul_prisonAI(GameObject *go)
bool OnGossipHello(Player *player) override
void UpdateAI(uint32 diff) override
npc_dark_rider_of_acherus(Creature *creature)
void JustAppeared() override
void SpellHitTarget(WorldObject *target, SpellInfo const *spellInfo) override
void DamageTaken(Unit *pDoneBy, uint32 &uiDamage, DamageEffectType, SpellInfo const *) override
void UpdateAI(uint32 uiDiff) override
bool OnGossipSelect(Player *player, uint32, uint32 gossipListId) override
ObjectGuid m_uiDuelerGUID
bool OnGossipHello(Player *player) override
npc_death_knight_initiateAI(Creature *creature)
void SpellHit(WorldObject *caster, SpellInfo const *spellInfo) override
void WaypointPathEnded(uint32, uint32 pathId) override
npc_dkc1_gothikAI(Creature *creature)
void MoveInLineOfSight(Unit *who) override
void UpdateAI(uint32 diff) override
npc_eye_of_acherus(Creature *creature)
void MovementInform(uint32 movementType, uint32 pointId) override
void OnCharmed(bool apply) override
void InitializeAI() override
void WaypointPathEnded(uint32, uint32 pathId) override
npc_hearthglen_crusader(Creature *creature)
void UpdateAI(uint32) override
void AttackStart(Unit *who) override
== Triggered Actions Requested ==================
void JustEngagedWith(Unit *) override
npc_ros_dark_riderAI(Creature *creature)
void JustDied(Unit *killer) override
npc_salanar_the_horsemanAI(Creature *creature)
void MoveInLineOfSight(Unit *who) override
bool CanAIAttack(Unit const *target) const override
void UpdateAI(uint32) override
npc_scarlet_ghoul(Creature *creature)
void JustAppeared() override
void FindMinions(Unit *owner)
void EventStart(Creature *anchor, Player *target)
UnworthyInitiatePhase phase
void UpdateAI(uint32 diff) override
npc_unworthy_initiateAI(Creature *creature)
void JustEngagedWith(Unit *) override
void MovementInform(uint32 type, uint32 id) override
npc_unworthy_initiate_anchorAI(Creature *creature)
ObjectGuid GetGUID(int32) const override
void SetGUID(ObjectGuid const &guid, int32) override