All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI Struct Reference

Public Member Functions

 npc_valkyr_battle_maidenAI (Creature *creature)
void Initialize ()
void Reset () override
void UpdateAI (uint32 diff) override
- Public Member Functions inherited from PassiveAI
 PassiveAI (Creature *c)
void MoveInLineOfSight (Unit *) override
void AttackStart (Unit *) override
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 CreatureAI (Creature *creature)
virtual ~CreatureAI ()
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 EnterCombat (Unit *)
virtual void JustDied (Unit *)
virtual void KilledUnit (Unit *)
virtual void JustSummoned (Creature *)
virtual void IsSummonedBy (Unit *)
virtual void SummonedCreatureDespawn (Creature *)
virtual void SummonedCreatureDies (Creature *, Unit *)
virtual void SpellHit (Unit *, SpellInfo const *)
virtual void SpellHitTarget (Unit *, SpellInfo const *)
virtual void AttackedBy (Unit *)
virtual bool IsEscorted () const
virtual void JustRespawned ()
virtual void MovementInform (uint32, uint32)
void OnCharmed (bool apply) override
virtual void JustReachedHome ()
void DoZoneInCombat (Creature *creature=NULL, float maxRangeToNearestTarget=50.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 void OnSpellClick (Unit *, bool &)
virtual bool CanSeeAlways (WorldObject const *)
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false) const
virtual bool CheckInRoom ()
CreatureBoundary constGetBoundary () const
- 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 (SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
template<class PREDICATE >
UnitSelectTarget (SelectAggroTarget targetType, uint32 position, PREDICATE const &predicate)
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectAggroTarget targetType)
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
virtual void DamageTaken (Unit *, uint32 &)
virtual void HealReceived (Unit *, uint32 &)
virtual void HealDone (Unit *, uint32 &)
virtual void SpellInterrupted (uint32, uint32)
void AttackStartCaster (Unit *victim, float dist)
void DoCast (uint32 spellId)
void DoCast (Unit *victim, uint32 spellId, bool triggered=false)
void DoCastVictim (uint32 spellId, bool triggered=false)
void DoCastAOE (uint32 spellId, bool triggered=false)
void DoMeleeAttackIfReady ()
bool DoSpellAttackIfReady (uint32 spellId)
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 sQuestReward (Player *, Quest const *, uint32)
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
virtual void sOnGameEvent (bool, uint16)

Public Attributes

uint32 FlyBackTimer
float x
float y
float z
uint32 phase

Additional Inherited Members

- Public Types inherited from CreatureAI
- Static Public Member Functions inherited from PassiveAI
static int Permissible (const Creature *)
- 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)
bool CheckBoundary (Position const *who=nullptr) const
void SetBoundary (CreatureBoundary const *boundary)
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
- Protected Attributes inherited from CreatureAI
Creature *const me
CreatureBoundary const_boundary
- Protected Attributes inherited from UnitAI
Unit *const me

Constructor & Destructor Documentation

npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::npc_valkyr_battle_maidenAI ( Creature creature)
49  : PassiveAI(creature)
50  {
51  Initialize();
52  }
PassiveAI(Creature *c)
Definition: PassiveAI.cpp:22
void Initialize()
Definition: zone_the_scarlet_enclave.cpp:54

+ Here is the call graph for this function:

Member Function Documentation

void npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::Initialize ( void  )
55  {
56  FlyBackTimer = 500;
57  phase = 0;
58  x = 0.f;
59  y = 0.f;
60  z = 0.f;
61  }
uint32 phase
Definition: zone_the_scarlet_enclave.cpp:65
uint32 FlyBackTimer
Definition: zone_the_scarlet_enclave.cpp:63
float z
Definition: zone_the_scarlet_enclave.cpp:64
float x
Definition: zone_the_scarlet_enclave.cpp:64
float y
Definition: zone_the_scarlet_enclave.cpp:64

+ Here is the caller graph for this function:

void npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::Reset ( )

Reimplemented from UnitAI.

68  {
69  me->setActive(true);
70  me->SetVisible(false);
72  me->SetCanFly(true);
74  me->GetPosition(x, y, z);
75  z += 4.0f;
76  x -= 3.5f;
77  y -= 5.0f;
78  me->GetMotionMaster()->Clear(false);
79  me->SetPosition(x, y, z, 0.0f);
80  }
Definition: Unit.h:674
void Clear(bool reset=true)
Definition: MotionMaster.h:138
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
void SetPosition(float x, float y, float z, float o)
Definition: Creature.cpp:2537
Creature *const me
Definition: CreatureAI.h:71
void GetPosition(float &x, float &y) const
Definition: Position.h:109
bool SetCanFly(bool enable)
Definition: Unit.cpp:15899
void SetVisible(bool x)
Definition: Unit.cpp:10368
float z
Definition: zone_the_scarlet_enclave.cpp:64
Definition: UpdateFields.h:109
float x
Definition: zone_the_scarlet_enclave.cpp:64
float y
Definition: zone_the_scarlet_enclave.cpp:64

+ Here is the call graph for this function:

void npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::UpdateAI ( uint32  diff)

Reimplemented from PassiveAI.

83  {
84  if (FlyBackTimer <= diff)
85  {
86  Player* player = NULL;
87  if (me->IsSummon())
88  if (Unit* summoner = me->ToTempSummon()->GetSummoner())
89  player = summoner->ToPlayer();
91  if (!player)
92  phase = 3;
94  switch (phase)
95  {
96  case 0:
97  me->SetWalk(false);
99  FlyBackTimer = 500;
100  break;
101  case 1:
102  player->GetClosePoint(x, y, z, me->GetObjectSize());
103  z += 2.5f;
104  x -= 2.0f;
105  y -= 1.5f;
106  me->GetMotionMaster()->MovePoint(0, x, y, z);
107  me->SetTarget(player->GetGUID());
108  me->SetVisible(true);
109  FlyBackTimer = 4500;
110  break;
111  case 2:
112  if (!player->IsResurrectRequested())
113  {
115  DoCast(player, SPELL_REVIVE, true);
116  Talk(WHISPER_REVIVE, player);
117  }
118  FlyBackTimer = 5000;
119  break;
120  case 3:
121  me->SetVisible(false);
122  FlyBackTimer = 3000;
123  break;
124  case 4:
125  me->DisappearAndDie();
126  break;
127  default:
128  //Nothing To DO
129  break;
130  }
131  ++phase;
132  } else FlyBackTimer-=diff;
133  }
Definition: SharedDefines.h:2515
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
uint32 phase
Definition: zone_the_scarlet_enclave.cpp:65
Definition: zone_the_scarlet_enclave.cpp:29
arena_t NULL
Definition: jemalloc_internal.h:624
uint32 FlyBackTimer
Definition: zone_the_scarlet_enclave.cpp:63
Definition: SharedDefines.h:2565
Unit * GetSummoner() const
Definition: TemporarySummon.cpp:37
TempSummon * ToTempSummon()
Definition: Unit.h:2206
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
void SetVisible(bool x)
Definition: Unit.cpp:10368
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
float z
Definition: zone_the_scarlet_enclave.cpp:64
bool SetWalk(bool enable)
Definition: Unit.cpp:15800
void HandleEmoteCommand(uint32 anim_id)
Definition: Unit.cpp:1444
float x
Definition: zone_the_scarlet_enclave.cpp:64
float y
Definition: zone_the_scarlet_enclave.cpp:64
bool IsSummon() const
Definition: Unit.h:1401
Definition: zone_the_scarlet_enclave.cpp:34
Definition: Unit.h:1305
float GetObjectSize() const
Definition: Object.cpp:2656
void DisappearAndDie()
Definition: Creature.cpp:256
void SetTarget(ObjectGuid const &guid) override
Definition: Creature.cpp:2675

+ Here is the call graph for this function:

Member Data Documentation

uint32 npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::FlyBackTimer
uint32 npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::phase
float npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::x
float npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::y
float npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::z

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