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()
 
- 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)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
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.
 
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
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () 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.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
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 ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
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 InitializeAI ()
 
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:
 
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.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
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.
 
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.
 
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.
 
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.
 
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
311: ScriptedAI(creature) { }
Definition ScriptedCreature.h:190

Member Function Documentation

◆ HandleAnimation()

void npc_anachronos_the_ancient::npc_anachronos_the_ancientAI::HandleAnimation ( )
inline
340 {
342
343 if (!player)
344 {
345 return;
346 }
347
348 Creature* Fandral = player->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f);
349 Creature* Arygos = player->FindNearestCreature(C_ARYGOS, 100.0f);
350 Creature* Caelestrasz = player->FindNearestCreature(C_CAELESTRASZ, 100.0f);
351 Creature* Merithra = player->FindNearestCreature(C_MERITHRA, 100.0f);
352
353 if (!Fandral || !Arygos || !Caelestrasz || !Merithra)
354 return;
355
357 if (!eventEnd)
358 {
359 switch (AnimationCount)
360 {
361 case 0:
362 Talk(ANACHRONOS_SAY_1, Fandral);
363 break;
364 case 1:
365 Fandral->SetTarget(me->GetGUID());
366 Fandral->AI()->Talk(FANDRAL_SAY_1, me);
367 break;
368 case 2:
369 Fandral->SetTarget();
370 Merithra->AI()->Talk(MERITHRA_EMOTE_1);
371 break;
372 case 3:
373 Merithra->AI()->Talk(MERITHRA_SAY_1);
374 break;
375 case 4:
376 Arygos->AI()->Talk(ARYGOS_EMOTE_1);
377 break;
378 case 5:
379 Caelestrasz->SetTarget(Fandral->GetGUID());
380 Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_1);
381 break;
382 case 6:
383 Merithra->AI()->Talk(MERITHRA_SAY_2);
384 break;
385 case 7:
386 Caelestrasz->SetTarget();
387 Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
388 break;
389 case 8:
390 Merithra->AI()->Talk(MERITHRA_YELL_1);
391 break;
392 case 9:
393 Merithra->CastSpell(Merithra, 25105, true);
394 break;
395 case 10:
397 Merithra->SetDisableGravity(true);
398 Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 3);
399 break;
400 case 11:
401 Merithra->CastSpell(Merithra, 24818, false);
402 break;
403 case 12:
404 Merithra->GetMotionMaster()->MoveCharge(-8100, 1530, 50, 42);
405 break;
406 case 13:
407 break;
408 case 14:
409 Arygos->AI()->Talk(ARYGOS_SAY_1);
410 Merithra->SetVisible(false);
411 break;
412 case 15:
413 Arygos->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
414 Merithra->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 42);
415 break;
416 case 16:
417 Arygos->AI()->Talk(ARYGOS_YELL_1);
418 break;
419 case 17:
420 Arygos->CastSpell(Arygos, 25107, true);
421 break;
422 case 18:
424 Arygos->SetDisableGravity(true);
425 Arygos->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 42);
426 break;
427 case 19:
428 Arygos->CastSpell(Arygos, 50505, false);
429 break;
430 case 20:
431 Arygos->GetMotionMaster()->MoveCharge(-8095, 1530, 50, 42);
432 break;
433 case 21:
434 break;
435 case 22:
436 Caelestrasz->AI()->Talk(CAELESTRASZ_SAY_2, Fandral);
437 break;
438 case 23:
439 Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 2.61f, 10);
440 Arygos->SetVisible(false);
441 Arygos->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 10);
442 break;
443 case 24:
444 Caelestrasz->AI()->Talk(CAELESTRASZ_YELL_1);
445 break;
446 case 25:
447 Caelestrasz->CastSpell(Caelestrasz, 25106, true);
448 break;
449 case 26:
450 Caelestrasz->HandleEmoteCommand(254);
451 Caelestrasz->SetDisableGravity(true);
452 Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 7.61f, 4);
453 break;
454 case 27:
455 Caelestrasz->CastSpell(Caelestrasz, 54293, false);
456 break;
457 case 28:
458 Talk(ANACHRONOS_SAY_2, Fandral);
459 break;
460 case 29:
461 Caelestrasz->GetMotionMaster()->MoveCharge(-8095, 1530, 50, 42);
462 Fandral->AI()->Talk(FANDRAL_SAY_2);
463 break;
464 case 30:
465 break;
466 case 31:
467 Talk(ANACHRONOS_SAY_3, Fandral);
468 break;
469 case 32:
470 Caelestrasz->SetVisible(false);
471 Caelestrasz->GetMotionMaster()->MoveCharge(-8034.535f, 1535.14f, 2.61f, 42);
472 Fandral->GetMotionMaster()->MoveCharge(-8108, 1529, 2.77f, 8);
473 me->GetMotionMaster()->MoveCharge(-8113, 1525, 2.77f, 8);
474 break;//both run to the gate
475 case 33:
477 Caelestrasz->GetMotionMaster()->MoveCharge(-8050, 1473, 65, 15);
478 break; //Text: sands will stop
479 case 34:
480 DoCast(player, 23017, true);//Arcane Channeling
481 break;
482 case 35:
483 me->CastSpell(-8088, 1520.43f, 2.67f, 25158, true);
484 break;
485 case 36:
486 DoCast(player, 25159, true);
487 break;
488 case 37:
489 me->SummonGameObject(GO_GATE_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
490 break;
491 case 38:
492 DoCast(player, 25166, true);
493 me->SummonGameObject(GO_GLYPH_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
494 break;
495 case 39:
496 Talk(ANACHRONOS_SAY_5, Fandral);
497 break;
498 case 40:
499 Fandral->CastSpell(me, 25167, true);
500 break;
501 case 41:
502 Fandral->SummonGameObject(GO_ROOTS_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0);
503 Fandral->AI()->Talk(FANDRAL_SAY_3);
504 break;
505 case 42:
506 me->CastStop();
507 Fandral->AI()->Talk(FANDRAL_EMOTE_1);
508 break;
509 case 43:
510 Fandral->CastStop();
511 break;
512 case 44:
514 break;
515 case 45:
517 break;
518 case 46:
520 me->GetMotionMaster()->MoveCharge(-8110, 1527, 2.77f, 4);
521 break;
522 case 47:
524 break;
525 case 48:
526 Fandral->AI()->Talk(FANDRAL_SAY_4, me);
527 break;
528 case 49:
529 Fandral->AI()->Talk(FANDRAL_SAY_5, me);
530 break;
531 case 50:
532 Fandral->AI()->Talk(FANDRAL_EMOTE_2);
533 Fandral->CastSpell(-8127, 1525, 17.5f, 33806, true);
534 break;
535 case 51:
536 {
537 std::list<Creature*> constructList;
538
539 me->GetCreatureListWithEntryInGrid(constructList, 15423, 100.0f);
540 me->GetCreatureListWithEntryInGrid(constructList, 15424, 100.0f);
541 me->GetCreatureListWithEntryInGrid(constructList, 15414, 100.0f);
542 me->GetCreatureListWithEntryInGrid(constructList, 15422, 100.0f);
543
544 if (!constructList.empty())
545 {
546 for (std::list<Creature*>::const_iterator itr = constructList.begin(); itr != constructList.end(); ++itr)
547 {
548 (*itr)->RemoveFromWorld();
549 }
550 }
551
552 break;
553 }
554 case 52:
555 Fandral->GetMotionMaster()->MoveCharge(-8028.75f, 1538.795f, 2.61f, 4);
557 break;
558 case 53:
559 Fandral->AI()->Talk(FANDRAL_SAY_6);
560 break;
561 case 54:
563 break;
564 case 55:
565 //Fandral should not dispear atm.
566 //Fandral->SetVisible(false);
567 break;
568 case 56:
570 me->GetMotionMaster()->MoveCharge(-8116, 1522, 3.65f, 4);
571 break;
572 case 57:
573 me->GetMotionMaster()->MoveCharge(-8116.7f, 1527, 3.7f, 4);
574 break;
575 case 58:
576 me->GetMotionMaster()->MoveCharge(-8112.67f, 1529.9f, 2.86f, 4);
577 break;
578 case 59:
579 me->GetMotionMaster()->MoveCharge(-8117.99f, 1532.24f, 3.94f, 4);
580 break;
581 case 60:
582 Talk(ANACHRONOS_SAY_10, player);
583 me->GetMotionMaster()->MoveCharge(-8113.46f, 1524.16f, 2.89f, 4);
584 break;
585 case 61:
586 me->GetMotionMaster()->MoveCharge(-8057.1f, 1470.32f, 2.61f, 6);
587 if (player->IsInRange(me, 0, 15))
589 break;
590 case 62:
591 me->SetDisplayId(15500);
592 break;
593 case 63:
595 me->SetDisableGravity(true);
596 break;
597 case 64:
598 me->GetMotionMaster()->MoveCharge(-8000, 1400, 150, 9);
599 break;
600 case 65:
601 me->SetVisible(false);
602 if (Creature* AnachronosQuestTrigger = (ObjectAccessor::GetCreature(*me, AnachronosQuestTriggerGUID)))
603 {
605 AnachronosQuestTrigger->AI()->EnterEvadeMode();
606 eventEnd = true;
607 }
608 break;
609 }
610 }
612 }
@ EMOTE_ONESHOT_LIFTOFF
Definition SharedDefines.h:1960
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
Definition Creature.h:43
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:3222
void SetTarget(ObjectGuid guid=ObjectGuid::Empty) override
Definition Creature.cpp:3562
void SetDisplayId(uint32 displayId, float displayScale=1.f) override
Definition Creature.cpp:3535
CreatureAI * AI() const
Definition Creature.h:141
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:670
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:112
Definition Player.h:1081
void GroupEventHappens(uint32 questId, WorldObject const *pEventObject)
Definition PlayerQuest.cpp:1818
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:177
void SetVisible(bool x)
Definition Unit.cpp:14284
MotionMaster * GetMotionMaster()
Definition Unit.h:1673
void CastStop(uint32 except_spellid=0, bool withInstant=true)
Interrupt the unit cast for all the current spells.
Definition Unit.cpp:1171
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:1178
void HandleEmoteCommand(uint32 emoteId)
Definition Unit.cpp:2011
void GetCreatureListWithEntryInGrid(std::list< Creature * > &lList, uint32 uiEntry, float fMaxSearchRange) const
Definition Object.cpp:2513
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2459
bool IsInRange(WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const
Definition Object.cpp:1415
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:2382
Talk
Definition hyjal.cpp:82
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition ObjectAccessor.cpp:210
Player * GetPlayer(Map const *, ObjectGuid const guid)
Definition ObjectAccessor.cpp:220
uint32 Timer
Definition zone_silithus.cpp:117
Creature * me
Definition ScriptedCreature.h:280
uint32 AnimationTimer
Definition zone_silithus.cpp:313
uint8 AnimationCount
Definition zone_silithus.cpp:314
ObjectGuid PlayerGUID
Definition zone_silithus.cpp:321
ObjectGuid AnachronosQuestTriggerGUID
Definition zone_silithus.cpp:316
bool eventEnd
Definition zone_silithus.cpp:322
static QuestCinematic EventAnim[]
Definition zone_silithus.cpp:121
@ ANACHRONOS_EMOTE_3
Definition zone_silithus.cpp:69
@ ANACHRONOS_SAY_3
Definition zone_silithus.cpp:59
@ GO_GATE_OF_AHN_QIRAJ
Definition zone_silithus.cpp:93
@ FANDRAL_SAY_6
Definition zone_silithus.cpp:76
@ ANACHRONOS_EMOTE_2
Definition zone_silithus.cpp:68
@ ANACHRONOS_SAY_6
Definition zone_silithus.cpp:62
@ ANACHRONOS_SAY_9
Definition zone_silithus.cpp:65
@ ANACHRONOS_SAY_7
Definition zone_silithus.cpp:63
@ CAELESTRASZ_YELL_1
Definition zone_silithus.cpp:82
@ ANACHRONOS_SAY_5
Definition zone_silithus.cpp:61
@ MERITHRA_SAY_2
Definition zone_silithus.cpp:89
@ ANACHRONOS_EMOTE_1
Definition zone_silithus.cpp:67
@ ANACHRONOS_SAY_8
Definition zone_silithus.cpp:64
@ FANDRAL_EMOTE_2
Definition zone_silithus.cpp:78
@ C_ARYGOS
Definition zone_silithus.cpp:53
@ ARYGOS_YELL_1
Definition zone_silithus.cpp:85
@ FANDRAL_SAY_3
Definition zone_silithus.cpp:73
@ ARYGOS_SAY_1
Definition zone_silithus.cpp:84
@ FANDRAL_SAY_1
Definition zone_silithus.cpp:71
@ C_CAELESTRASZ
Definition zone_silithus.cpp:55
@ MERITHRA_SAY_1
Definition zone_silithus.cpp:88
@ GO_ROOTS_OF_AHN_QIRAJ
Definition zone_silithus.cpp:95
@ ANACHRONOS_SAY_1
Definition zone_silithus.cpp:57
@ QUEST_A_PAWN_ON_THE_ETERNAL_BOARD
Definition zone_silithus.cpp:49
@ ANACHRONOS_SAY_4
Definition zone_silithus.cpp:60
@ C_FANDRAL_STAGHELM
Definition zone_silithus.cpp:52
@ FANDRAL_SAY_5
Definition zone_silithus.cpp:75
@ FANDRAL_SAY_2
Definition zone_silithus.cpp:72
@ ANACHRONOS_SAY_2
Definition zone_silithus.cpp:58
@ ARYGOS_EMOTE_1
Definition zone_silithus.cpp:86
@ CAELESTRASZ_SAY_1
Definition zone_silithus.cpp:80
@ FANDRAL_SAY_4
Definition zone_silithus.cpp:74
@ C_MERITHRA
Definition zone_silithus.cpp:54
@ FANDRAL_EMOTE_1
Definition zone_silithus.cpp:77
@ GO_GLYPH_OF_AHN_QIRAJ
Definition zone_silithus.cpp:94
@ MERITHRA_EMOTE_1
Definition zone_silithus.cpp:91
@ ANACHRONOS_SAY_10
Definition zone_silithus.cpp:66
@ CAELESTRASZ_SAY_2
Definition zone_silithus.cpp:81
@ MERITHRA_YELL_1
Definition zone_silithus.cpp:90

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 UnitAI.

325 {
326 AnimationTimer = 1500;
327 AnimationCount = 0;
334 eventEnd = false;
335
337 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:251
void Clear()
Definition ObjectGuid.h:138
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:719
ObjectGuid FandralGUID
Definition zone_silithus.cpp:320
ObjectGuid ArygosGUID
Definition zone_silithus.cpp:318
ObjectGuid CaelestraszGUID
Definition zone_silithus.cpp:319
ObjectGuid MerithraGUID
Definition zone_silithus.cpp:317

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()

Implements UnitAI.

614 {
615 if (AnimationTimer)
616 {
617 if (AnimationTimer <= diff)
619 else AnimationTimer -= diff;
620 }
621 if (AnimationCount < 65)
622 me->CombatStop();
623 if (AnimationCount == 65 || eventEnd)
625 }
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:208
void CombatStop(bool includingCast=false)
Definition Unit.cpp:10481
void HandleAnimation()
Definition zone_silithus.cpp:339

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().


The documentation for this struct was generated from the following file: