AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_anachronos_the_ancient::npc_anachronos_the_ancientAI Struct Reference
Inheritance diagram for npc_anachronos_the_ancient::npc_anachronos_the_ancientAI:
ScriptedAI CreatureAI UnitAI

Public Member Functions

 npc_anachronos_the_ancientAI (Creature *creature)
 
void Reset () override
 
void HandleAnimation ()
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply) More...
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table. More...
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged. More...
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed. More...
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following: More...
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast. More...
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list. More...
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim. More...
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished. More...
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

uint32 AnimationTimer
 
uint8 AnimationCount
 
ObjectGuid AnachronosQuestTriggerGUID
 
ObjectGuid MerithraGUID
 
ObjectGuid ArygosGUID
 
ObjectGuid CaelestraszGUID
 
ObjectGuid FandralGUID
 
ObjectGuid PlayerGUID
 
bool eventEnd
 
- Public Attributes inherited from ScriptedAI
Creatureme
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_anachronos_the_ancientAI()

npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::npc_anachronos_the_ancientAI ( Creature creature)
inline
310: ScriptedAI(creature) { }
Definition: ScriptedCreature.h:190

Member Function Documentation

◆ HandleAnimation()

void npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::HandleAnimation ( )
inline
339 {
341
342 if (!player)
343 {
344 return;
345 }
346
347 Creature* Fandral = player->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f);
348 Creature* Arygos = player->FindNearestCreature(C_ARYGOS, 100.0f);
349 Creature* Caelestrasz = player->FindNearestCreature(C_CAELESTRASZ, 100.0f);
350 Creature* Merithra = player->FindNearestCreature(C_MERITHRA, 100.0f);
351
352 if (!Fandral || !Arygos || !Caelestrasz || !Merithra)
353 return;
354
356 if (!eventEnd)
357 {
358 switch (AnimationCount)
359 {
360 case 0:
361 Talk(ANACHRONOS_SAY_1, Fandral);
362 break;
363 case 1:
364 Fandral->SetTarget(me->GetGUID());
365 Fandral->AI()->Talk(FANDRAL_SAY_1, me);
366 break;
367 case 2:
368 Fandral->SetTarget();
369 Merithra->AI()->Talk(MERITHRA_EMOTE_1);
370 break;
371 case 3:
372 Merithra->AI()->Talk(MERITHRA_SAY_1);
373 break;
374 case 4:
375 Arygos->AI()->Talk(ARYGOS_EMOTE_1);
376 break;
377 case 5:
378 Caelestrasz->SetTarget(Fandral->GetGUID());
379 Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_1);
380 break;
381 case 6:
382 Merithra->AI()->Talk(MERITHRA_SAY_2);
383 break;
384 case 7:
385 Caelestrasz->SetTarget();
386 Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
387 break;
388 case 8:
389 Merithra->AI()->Talk(MERITHRA_YELL_1);
390 break;
391 case 9:
392 Merithra->CastSpell(Merithra, 25105, true);
393 break;
394 case 10:
396 Merithra->SetDisableGravity(true);
397 Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 3);
398 break;
399 case 11:
400 Merithra->CastSpell(Merithra, 24818, false);
401 break;
402 case 12:
403 Merithra->GetMotionMaster()->MoveCharge(-8100, 1530, 50, 42);
404 break;
405 case 13:
406 break;
407 case 14:
408 Arygos->AI()->Talk(ARYGOS_SAY_1);
409 Merithra->SetVisible(false);
410 break;
411 case 15:
412 Arygos->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
413 Merithra->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 42);
414 break;
415 case 16:
416 Arygos->AI()->Talk(ARYGOS_YELL_1);
417 break;
418 case 17:
419 Arygos->CastSpell(Arygos, 25107, true);
420 break;
421 case 18:
423 Arygos->SetDisableGravity(true);
424 Arygos->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 42);
425 break;
426 case 19:
427 Arygos->CastSpell(Arygos, 50505, false);
428 break;
429 case 20:
430 Arygos->GetMotionMaster()->MoveCharge(-8095, 1530, 50, 42);
431 break;
432 case 21:
433 break;
434 case 22:
435 Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_2, Fandral);
436 break;
437 case 23:
438 Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
439 Arygos->SetVisible(false);
440 Arygos->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 10);
441 break;
442 case 24:
443 Caelestrasz->AI()->Talk(CAELESTRASZ_YELL_1);
444 break;
445 case 25:
446 Caelestrasz->CastSpell(Caelestrasz, 25106, true);
447 break;
448 case 26:
449 Caelestrasz->HandleEmoteCommand(254);
450 Caelestrasz->SetDisableGravity(true);
451 Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 7.61f, 4);
452 break;
453 case 27:
454 Caelestrasz->CastSpell(Caelestrasz, 54293, false);
455 break;
456 case 28:
457 Talk(ANACHRONOS_SAY_2, Fandral);
458 break;
459 case 29:
460 Caelestrasz->GetMotionMaster()->MoveCharge(-8095, 1530, 50, 42);
461 Fandral->AI()->Talk(FANDRAL_SAY_2);
462 break;
463 case 30:
464 break;
465 case 31:
466 Talk(ANACHRONOS_SAY_3, Fandral);
467 break;
468 case 32:
469 Caelestrasz->SetVisible(false);
470 Caelestrasz->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 42);
471 Fandral->GetMotionMaster()->MoveCharge(-8108, 1529, 2.77f, 8);
472 me->GetMotionMaster()->MoveCharge(-8113, 1525, 2.77f, 8);
473 break;//both run to the gate
474 case 33:
476 Caelestrasz->GetMotionMaster()->MoveCharge(-8050, 1473, 65, 15);
477 break; //Text: sands will stop
478 case 34:
479 DoCast(player, 23017, true);//Arcane Channeling
480 break;
481 case 35:
482 me->CastSpell(-8088, 1520.43f, 2.67f, 25158, true);
483 break;
484 case 36:
485 DoCast(player, 25159, true);
486 break;
487 case 37:
488 me->SummonGameObject(GO_GATE_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
489 break;
490 case 38:
491 DoCast(player, 25166, true);
492 me->SummonGameObject(GO_GLYPH_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
493 break;
494 case 39:
495 Talk(ANACHRONOS_SAY_5, Fandral);
496 break;
497 case 40:
498 Fandral->CastSpell(me, 25167, true);
499 break;
500 case 41:
501 Fandral->SummonGameObject(GO_ROOTS_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
502 Fandral->AI()->Talk(FANDRAL_SAY_3);
503 break;
504 case 42:
505 me->CastStop();
506 Fandral->AI()->Talk(FANDRAL_EMOTE_1);
507 break;
508 case 43:
509 Fandral->CastStop();
510 break;
511 case 44:
513 break;
514 case 45:
516 break;
517 case 46:
519 me->GetMotionMaster()->MoveCharge(-8110, 1527, 2.77f, 4);
520 break;
521 case 47:
523 break;
524 case 48:
525 Fandral->AI()->Talk(FANDRAL_SAY_4, me);
526 break;
527 case 49:
528 Fandral->AI()->Talk(FANDRAL_SAY_5, me);
529 break;
530 case 50:
531 Fandral->AI()->Talk(FANDRAL_EMOTE_2);
532 Fandral->CastSpell(-8127, 1525, 17.5f, 33806, true);
533 break;
534 case 51:
535 {
536 std::list<Creature*> constructList;
537
538 me->GetCreatureListWithEntryInGrid(constructList, 15423, 100.0f);
539 me->GetCreatureListWithEntryInGrid(constructList, 15424, 100.0f);
540 me->GetCreatureListWithEntryInGrid(constructList, 15414, 100.0f);
541 me->GetCreatureListWithEntryInGrid(constructList, 15422, 100.0f);
542
543 if (!constructList.empty())
544 {
545 for (std::list<Creature*>::const_iterator itr = constructList.begin(); itr != constructList.end(); ++itr)
546 {
547 (*itr)->RemoveFromWorld();
548 }
549 }
550
551 break;
552 }
553 case 52:
554 Fandral->GetMotionMaster()->MoveCharge(-8028.75f, 1538.795f, 2.61f, 4);
556 break;
557 case 53:
558 Fandral->AI()->Talk(FANDRAL_SAY_6);
559 break;
560 case 54:
562 break;
563 case 55:
564 //Fandral should not dispear atm.
565 //Fandral->SetVisible(false);
566 break;
567 case 56:
569 me->GetMotionMaster()->MoveCharge(-8116, 1522, 3.65f, 4);
570 break;
571 case 57:
572 me->GetMotionMaster()->MoveCharge(-8116.7f, 1527, 3.7f, 4);
573 break;
574 case 58:
575 me->GetMotionMaster()->MoveCharge(-8112.67f, 1529.9f, 2.86f, 4);
576 break;
577 case 59:
578 me->GetMotionMaster()->MoveCharge(-8117.99f, 1532.24f, 3.94f, 4);
579 break;
580 case 60:
581 Talk(ANACHRONOS_SAY_10, player);
582 me->GetMotionMaster()->MoveCharge(-8113.46f, 1524.16f, 2.89f, 4);
583 break;
584 case 61:
585 me->GetMotionMaster()->MoveCharge(-8057.1f, 1470.32f, 2.61f, 6);
586 if (player->IsInRange(me, 0, 15))
588 break;
589 case 62:
590 me->SetDisplayId(15500);
591 break;
592 case 63:
594 me->SetDisableGravity(true);
595 break;
596 case 64:
597 me->GetMotionMaster()->MoveCharge(-8000, 1400, 150, 9);
598 break;
599 case 65:
600 me->SetVisible(false);
601 if (Creature* AnachronosQuestTrigger = (ObjectAccessor::GetCreature(*me, AnachronosQuestTriggerGUID)))
602 {
604 AnachronosQuestTrigger->AI()->EnterEvadeMode();
605 eventEnd = true;
606 }
607 break;
608 }
609 }
611 }
static QuestCinematic EventAnim[]
Definition: zone_silithus.cpp:120
@ ANACHRONOS_EMOTE_3
Definition: zone_silithus.cpp:68
@ ANACHRONOS_SAY_3
Definition: zone_silithus.cpp:58
@ GO_GATE_OF_AHN_QIRAJ
Definition: zone_silithus.cpp:92
@ FANDRAL_SAY_6
Definition: zone_silithus.cpp:75
@ ANACHRONOS_EMOTE_2
Definition: zone_silithus.cpp:67
@ ANACHRONOS_SAY_6
Definition: zone_silithus.cpp:61
@ ANACHRONOS_SAY_9
Definition: zone_silithus.cpp:64
@ ANACHRONOS_SAY_7
Definition: zone_silithus.cpp:62
@ CAELESTRASZ_YELL_1
Definition: zone_silithus.cpp:81
@ ANACHRONOS_SAY_5
Definition: zone_silithus.cpp:60
@ MERITHRA_SAY_2
Definition: zone_silithus.cpp:88
@ ANACHRONOS_EMOTE_1
Definition: zone_silithus.cpp:66
@ ANACHRONOS_SAY_8
Definition: zone_silithus.cpp:63
@ FANDRAL_EMOTE_2
Definition: zone_silithus.cpp:77
@ C_ARYGOS
Definition: zone_silithus.cpp:52
@ ARYGOS_YELL_1
Definition: zone_silithus.cpp:84
@ FANDRAL_SAY_3
Definition: zone_silithus.cpp:72
@ ARYGOS_SAY_1
Definition: zone_silithus.cpp:83
@ FANDRAL_SAY_1
Definition: zone_silithus.cpp:70
@ C_CAELESTRASZ
Definition: zone_silithus.cpp:54
@ MERITHRA_SAY_1
Definition: zone_silithus.cpp:87
@ GO_ROOTS_OF_AHN_QIRAJ
Definition: zone_silithus.cpp:94
@ ANACHRONOS_SAY_1
Definition: zone_silithus.cpp:56
@ QUEST_A_PAWN_ON_THE_ETERNAL_BOARD
Definition: zone_silithus.cpp:48
@ ANACHRONOS_SAY_4
Definition: zone_silithus.cpp:59
@ C_FANDRAL_STAGHELM
Definition: zone_silithus.cpp:51
@ FANDRAL_SAY_5
Definition: zone_silithus.cpp:74
@ FANDRAL_SAY_2
Definition: zone_silithus.cpp:71
@ ANACHRONOS_SAY_2
Definition: zone_silithus.cpp:57
@ ARYGOS_EMOTE_1
Definition: zone_silithus.cpp:85
@ CAELESTRASZ_SAY_1
Definition: zone_silithus.cpp:79
@ FANDRAL_SAY_4
Definition: zone_silithus.cpp:73
@ C_MERITHRA
Definition: zone_silithus.cpp:53
@ FANDRAL_EMOTE_1
Definition: zone_silithus.cpp:76
@ GO_GLYPH_OF_AHN_QIRAJ
Definition: zone_silithus.cpp:93
@ MERITHRA_EMOTE_1
Definition: zone_silithus.cpp:90
@ ANACHRONOS_SAY_10
Definition: zone_silithus.cpp:65
@ CAELESTRASZ_SAY_2
Definition: zone_silithus.cpp:80
@ MERITHRA_YELL_1
Definition: zone_silithus.cpp:89
Talk
Definition: hyjal.cpp:82
@ EMOTE_ONESHOT_LIFTOFF
Definition: SharedDefines.h:1960
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
Player * GetPlayer(Map const *, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:223
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:177
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
Definition: CreatureAI.cpp:50
Creature * me
Definition: ScriptedCreature.h:280
Definition: Creature.h:46
bool SetDisableGravity(bool disable, bool packetOnly=false, bool updateAnimationTier=true) override
Enable or disable the creature's fly mode by adding or removing: MOVEMENTFLAG_FLYING....
Definition: Creature.cpp:3192
void SetTarget(ObjectGuid guid=ObjectGuid::Empty) override
Definition: Creature.cpp:3532
void SetDisplayId(uint32 displayId, float displayScale=1.f) override
Definition: Creature.cpp:3505
CreatureAI * AI() const
Definition: Creature.h:143
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
void GetCreatureListWithEntryInGrid(std::list< Creature * > &lList, uint32 uiEntry, float fMaxSearchRange) const
Definition: Object.cpp:2500
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446
bool IsInRange(WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const
Definition: Object.cpp:1404
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport=true, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition: Object.cpp:2369
Definition: Player.h:1064
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Definition: PlayerQuest.cpp:1812
void SetVisible(bool x)
Definition: Unit.cpp:14189
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
void CastStop(uint32 except_spellid=0, bool withInstant=true)
Interrupt the unit cast for all the current spells.
Definition: Unit.cpp:1161
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1168
void HandleEmoteCommand(uint32 emoteId)
Definition: Unit.cpp:1984
void MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, const Movement::PointsArray *path=nullptr, bool generatePath=false, float orientation=0.0f, ObjectGuid targetGUID=ObjectGuid::Empty)
The unit will charge the target. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:667
uint32 Timer
Definition: zone_silithus.cpp:116
uint32 AnimationTimer
Definition: zone_silithus.cpp:312
uint8 AnimationCount
Definition: zone_silithus.cpp:313
ObjectGuid PlayerGUID
Definition: zone_silithus.cpp:320
ObjectGuid AnachronosQuestTriggerGUID
Definition: zone_silithus.cpp:315
bool eventEnd
Definition: zone_silithus.cpp:321

References Creature::AI(), ANACHRONOS_EMOTE_1, ANACHRONOS_EMOTE_2, ANACHRONOS_EMOTE_3, ANACHRONOS_SAY_1, ANACHRONOS_SAY_10, ANACHRONOS_SAY_2, ANACHRONOS_SAY_3, ANACHRONOS_SAY_4, ANACHRONOS_SAY_5, ANACHRONOS_SAY_6, ANACHRONOS_SAY_7, ANACHRONOS_SAY_8, ANACHRONOS_SAY_9, AnachronosQuestTriggerGUID, AnimationCount, AnimationTimer, ARYGOS_EMOTE_1, ARYGOS_SAY_1, ARYGOS_YELL_1, C_ARYGOS, C_CAELESTRASZ, C_FANDRAL_STAGHELM, C_MERITHRA, CAELESTRASZ_SAY_1, CAELESTRASZ_SAY_2, CAELESTRASZ_YELL_1, Unit::CastSpell(), Unit::CastStop(), UnitAI::DoCast(), EMOTE_ONESHOT_LIFTOFF, EventAnim, eventEnd, FANDRAL_EMOTE_1, FANDRAL_EMOTE_2, FANDRAL_SAY_1, FANDRAL_SAY_2, FANDRAL_SAY_3, FANDRAL_SAY_4, FANDRAL_SAY_5, FANDRAL_SAY_6, WorldObject::FindNearestCreature(), ObjectAccessor::GetCreature(), WorldObject::GetCreatureListWithEntryInGrid(), Object::GetGUID(), Unit::GetMotionMaster(), ObjectAccessor::GetPlayer(), GO_GATE_OF_AHN_QIRAJ, GO_GLYPH_OF_AHN_QIRAJ, GO_ROOTS_OF_AHN_QIRAJ, Player::GroupEventHappens(), Unit::HandleEmoteCommand(), WorldObject::IsInRange(), ScriptedAI::me, MERITHRA_EMOTE_1, MERITHRA_SAY_1, MERITHRA_SAY_2, MERITHRA_YELL_1, MotionMaster::MoveCharge(), PlayerGUID, QUEST_A_PAWN_ON_THE_ETERNAL_BOARD, Creature::SetDisableGravity(), Creature::SetDisplayId(), Creature::SetTarget(), Unit::SetVisible(), WorldObject::SummonGameObject(), CreatureAI::Talk(), and QuestCinematic::Timer.

Referenced by UpdateAI().

◆ Reset()

void npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

324 {
325 AnimationTimer = 1500;
326 AnimationCount = 0;
333 eventEnd = false;
334
336 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
void Clear()
Definition: ObjectGuid.h:138
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:683
ObjectGuid FandralGUID
Definition: zone_silithus.cpp:319
ObjectGuid ArygosGUID
Definition: zone_silithus.cpp:317
ObjectGuid CaelestraszGUID
Definition: zone_silithus.cpp:318
ObjectGuid MerithraGUID
Definition: zone_silithus.cpp:316

References AnachronosQuestTriggerGUID, AnimationCount, AnimationTimer, ArygosGUID, CaelestraszGUID, ObjectGuid::Clear(), eventEnd, FandralGUID, ScriptedAI::me, MerithraGUID, PlayerGUID, Unit::SetUnitFlag(), and UNIT_FLAG_NON_ATTACKABLE.

◆ UpdateAI()

void npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::UpdateAI ( uint32  )
inlineoverridevirtual

Use to start attacking a target. Called just before JustEngagedWith()

Reimplemented from ScriptedAI.

613 {
614 if (AnimationTimer)
615 {
616 if (AnimationTimer <= diff)
618 else AnimationTimer -= diff;
619 }
620 if (AnimationCount < 65)
621 me->CombatStop();
622 if (AnimationCount == 65 || eventEnd)
624 }
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:197
void CombatStop(bool includingCast=false)
Definition: Unit.cpp:10398
void HandleAnimation()
Definition: zone_silithus.cpp:338

References AnimationCount, AnimationTimer, Unit::CombatStop(), CreatureAI::EnterEvadeMode(), eventEnd, HandleAnimation(), and ScriptedAI::me.

Member Data Documentation

◆ AnachronosQuestTriggerGUID

ObjectGuid npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::AnachronosQuestTriggerGUID

Referenced by HandleAnimation(), and Reset().

◆ AnimationCount

uint8 npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::AnimationCount

Referenced by HandleAnimation(), Reset(), and UpdateAI().

◆ AnimationTimer

uint32 npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::AnimationTimer

Referenced by HandleAnimation(), Reset(), and UpdateAI().

◆ ArygosGUID

ObjectGuid npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::ArygosGUID

Referenced by Reset().

◆ CaelestraszGUID

ObjectGuid npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::CaelestraszGUID

Referenced by Reset().

◆ eventEnd

bool npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::eventEnd

Referenced by HandleAnimation(), Reset(), and UpdateAI().

◆ FandralGUID

ObjectGuid npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::FandralGUID

Referenced by Reset().

◆ MerithraGUID

ObjectGuid npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::MerithraGUID

Referenced by Reset().

◆ PlayerGUID

ObjectGuid npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::PlayerGUID

Referenced by HandleAnimation(), and Reset().