AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
go_beacon::go_beaconAI Struct Reference
Inheritance diagram for go_beacon::go_beaconAI:
GameObjectAI

Public Member Functions

 go_beaconAI (GameObject *gameObject)
 
void OnStateChanged (uint32 state, Unit *) override
 
- Public Member Functions inherited from GameObjectAI
 GameObjectAI (GameObject *go)
 
virtual ~GameObjectAI ()
 
virtual void UpdateAI (uint32)
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void DoAction (int32)
 
virtual void SetGUID (ObjectGuid const &, int32)
 
virtual ObjectGuid GetGUID (int32) const
 
virtual bool GossipHello (Player *, bool)
 
virtual bool GossipSelect (Player *, uint32, uint32)
 
virtual bool GossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual bool QuestAccept (Player *, Quest const *)
 
virtual bool QuestReward (Player *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *)
 
virtual void Destroyed (Player *, uint32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void OnGameEvent (bool, uint16)
 
virtual void EventInform (uint32)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual void JustSummoned (Creature *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureEvade (Creature *)
 

Public Attributes

std::list< Creature * > creatureList
 

Additional Inherited Members

- Static Public Member Functions inherited from GameObjectAI
static int32 Permissible (GameObject const *go)
 
- Protected Attributes inherited from GameObjectAI
GameObject *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ go_beaconAI()

go_beacon::go_beaconAI::go_beaconAI ( GameObject gameObject)
inline
561: GameObjectAI(gameObject) { }
Definition GameObjectAI.h:33

Member Function Documentation

◆ OnStateChanged()

void go_beacon::go_beaconAI::OnStateChanged ( uint32  state,
Unit  
)
inlineoverridevirtual

Reimplemented from GameObjectAI.

566 {
567 if (state == GO_ACTIVATED)
568 {
570 {
571 for (Creature* whelp : creatureList)
572 {
573 if (whelp->IsAlive() && !whelp->IsInCombat() && whelp->GetMotionMaster()->GetCurrentMovementGeneratorType() != HOME_MOTION_TYPE)
574 {
575 whelp->GetMotionMaster()->MovePoint(0, me->GetNearPosition(4.0f, whelp->GetOrientation()));
576 }
577 }
578 }
579 }
580 else if (state == GO_JUST_DEACTIVATED)
581 {
582 {
583 for (Creature* whelp : creatureList)
584 {
585 if (whelp->IsAlive() && !whelp->IsInCombat() && whelp->GetMotionMaster()->GetCurrentMovementGeneratorType() != HOME_MOTION_TYPE)
586 {
587 whelp->GetMotionMaster()->MoveTargetedHome();
588 }
589 }
590 }
591 }
592 else
593 {
594 creatureList.clear();
595 }
596 }
@ GO_ACTIVATED
Definition GameObject.h:112
@ GO_JUST_DEACTIVATED
Definition GameObject.h:113
@ HOME_MOTION_TYPE
Definition MotionMaster.h:46
Definition Creature.h:47
GameObject *const me
Definition GameObjectAI.h:35
Position GetNearPosition(float dist, float angle)
Definition Object.cpp:2745
void GetCreaturesWithEntryInRange(std::list< Creature * > &creatureList, float radius, uint32 entry)
Definition Object.cpp:3011
std::list< Creature * > creatureList
Definition zone_hellfire_peninsula.cpp:563
@ NPC_STONESCHYE_WHELP
Definition zone_hellfire_peninsula.cpp:551

References creatureList, WorldObject::GetCreaturesWithEntryInRange(), WorldObject::GetNearPosition(), GO_ACTIVATED, GO_JUST_DEACTIVATED, HOME_MOTION_TYPE, GameObjectAI::me, and NPC_STONESCHYE_WHELP.

Member Data Documentation

◆ creatureList

std::list<Creature*> go_beacon::go_beaconAI::creatureList

Referenced by OnStateChanged().


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