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
565: GameObjectAI(gameObject) { }
Definition GameObjectAI.h:33

Member Function Documentation

◆ OnStateChanged()

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

Reimplemented from GameObjectAI.

570 {
571 if (state == GO_ACTIVATED)
572 {
574 {
575 for (Creature* whelp : creatureList)
576 {
577 if (whelp->IsAlive() && !whelp->IsInCombat() && whelp->GetMotionMaster()->GetCurrentMovementGeneratorType() != HOME_MOTION_TYPE)
578 {
579 whelp->GetMotionMaster()->MovePoint(0, me->GetNearPosition(4.0f, whelp->GetOrientation()));
580 }
581 }
582 }
583 }
584 else if (state == GO_JUST_DEACTIVATED)
585 {
586 {
587 for (Creature* whelp : creatureList)
588 {
589 if (whelp->IsAlive() && !whelp->IsInCombat() && whelp->GetMotionMaster()->GetCurrentMovementGeneratorType() != HOME_MOTION_TYPE)
590 {
591 whelp->GetMotionMaster()->MoveTargetedHome();
592 }
593 }
594 }
595 }
596 else
597 {
598 creatureList.clear();
599 }
600 }
@ 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:2746
void GetCreaturesWithEntryInRange(std::list< Creature * > &creatureList, float radius, uint32 entry)
Definition Object.cpp:3012
std::list< Creature * > creatureList
Definition zone_hellfire_peninsula.cpp:567
@ NPC_STONESCHYE_WHELP
Definition zone_hellfire_peninsula.cpp:555

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: