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

Public Member Functions

 go_troll_cageAI (GameObject *go)
 
bool GossipHello (Player *, bool reportUse) 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, 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 OnStateChanged (uint32, Unit *)
 
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

InstanceScriptinstance
 

Private Member Functions

void initBlyCrewMember (uint32 entry, float x, float y, float z)
 

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

go_troll_cage::go_troll_cageAI::go_troll_cageAI ( GameObject go)
inline
Definition: GameObjectAI.h:34
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
InstanceScript * instance
Definition: zulfarrak.cpp:321

Member Function Documentation

◆ GossipHello()

bool go_troll_cage::go_troll_cageAI::GossipHello ( Player ,
bool  reportUse 
)
inlineoverridevirtual

Reimplemented from GameObjectAI.

324 {
325 if (reportUse)
326 {
327 return true;
328 }
329
331
332 //setting gossip option as soon as the cages open
334 {
335 bly->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
336 }
337
339 {
340 weegli->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
341 }
342
343 //set bly & co to aggressive & start moving to top of stairs
344 initBlyCrewMember(NPC_BLY, 1884.99f, 1263, 41.52f);
345 initBlyCrewMember(NPC_RAVEN, 1882.5f, 1263, 41.52f);
346 initBlyCrewMember(NPC_ORO, 1886.47f, 1270.68f, 41.68f);
347 initBlyCrewMember(NPC_WEEGLI, 1890, 1263, 41.52f);
348 initBlyCrewMember(NPC_MURTA, 1891.19f, 1272.03f, 41.60f);
349 return false;
350 }
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
@ DATA_PYRAMID
Definition: zulfarrak.h:51
@ PYRAMID_CAGES_OPEN
Definition: zulfarrak.h:58
@ NPC_WEEGLI
Definition: zulfarrak.h:40
@ NPC_ORO
Definition: zulfarrak.h:39
@ NPC_MURTA
Definition: zulfarrak.h:41
@ NPC_BLY
Definition: zulfarrak.h:37
@ NPC_RAVEN
Definition: zulfarrak.h:38
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
GameObject *const me
Definition: GameObjectAI.h:36
Definition: Creature.h:46
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:95
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53
void initBlyCrewMember(uint32 entry, float x, float y, float z)
Definition: zulfarrak.cpp:353

References DATA_PYRAMID, ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), initBlyCrewMember(), instance, GameObjectAI::me, NPC_BLY, NPC_MURTA, NPC_ORO, NPC_RAVEN, NPC_WEEGLI, PYRAMID_CAGES_OPEN, ZoneScript::SetData(), and UNIT_NPC_FLAG_GOSSIP.

◆ initBlyCrewMember()

void go_troll_cage::go_troll_cageAI::initBlyCrewMember ( uint32  entry,
float  x,
float  y,
float  z 
)
inlineprivate
354 {
356 {
357 crew->SetReactState(REACT_AGGRESSIVE);
358 crew->SetWalk(true);
359 crew->SetHomePosition(x, y, z, 4.78f);
360 crew->GetMotionMaster()->MovePoint(1, { x, y, z, 4.78f });
361 crew->SetFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE);
362
363 }
364 }
@ FACTION_ESCORT_N_NEUTRAL_ACTIVE
Definition: ScriptSystem.h:37
@ REACT_AGGRESSIVE
Definition: Unit.h:550

References FACTION_ESCORT_N_NEUTRAL_ACTIVE, ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), instance, GameObjectAI::me, and REACT_AGGRESSIVE.

Referenced by GossipHello().

Member Data Documentation

◆ instance

InstanceScript* go_troll_cage::go_troll_cageAI::instance

Referenced by GossipHello(), and initBlyCrewMember().