AzeorthCore 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 SummonedCreatureDies (Creature *, Unit *)
 

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:33
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1194
InstanceScript * instance
Definition: zulfarrak.cpp:253

Member Function Documentation

◆ GossipHello()

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

Reimplemented from GameObjectAI.

256 {
257 if (reportUse)
258 {
259 return true;
260 }
261
263
264 //set bly & co to aggressive & start moving to top of stairs
265 initBlyCrewMember(NPC_BLY, 1884.99f, 1263, 41.52f);
266 initBlyCrewMember(NPC_RAVEN, 1882.5f, 1263, 41.52f);
267 initBlyCrewMember(NPC_ORO, 1886.47f, 1270.68f, 41.68f);
268 initBlyCrewMember(NPC_WEEGLI, 1890, 1263, 41.52f);
269 initBlyCrewMember(NPC_MURTA, 1891.19f, 1272.03f, 41.60f);
270 return false;
271 }
@ 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
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53
void initBlyCrewMember(uint32 entry, float x, float y, float z)
Definition: zulfarrak.cpp:274

References DATA_PYRAMID, initBlyCrewMember(), instance, NPC_BLY, NPC_MURTA, NPC_ORO, NPC_RAVEN, NPC_WEEGLI, PYRAMID_CAGES_OPEN, and ZoneScript::SetData().

◆ initBlyCrewMember()

void go_troll_cage::go_troll_cageAI::initBlyCrewMember ( uint32  entry,
float  x,
float  y,
float  z 
)
inlineprivate
275 {
277 {
278 crew->SetReactState(REACT_AGGRESSIVE);
279 crew->SetWalk(true);
280 crew->SetHomePosition(x, y, z, 4.78f);
281 crew->GetMotionMaster()->MovePoint(1, { x, y, z, 4.78f });
282 crew->SetFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE);
283
284 switch (entry)
285 {
286 case NPC_BLY:
287 case NPC_WEEGLI:
288 crew->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
289 break;
290 default:
291 break;
292 }
293 }
294 }
@ REACT_AGGRESSIVE
Definition: Unit.h:1025
@ UNIT_NPC_FLAG_GOSSIP
Definition: Unit.h:516
@ FACTION_ESCORT_N_NEUTRAL_ACTIVE
Definition: ScriptSystem.h:37
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
GameObject *const me
Definition: GameObjectAI.h:35
Definition: Creature.h:46
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93

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

Referenced by GossipHello().

Member Data Documentation

◆ instance

InstanceScript* go_troll_cage::go_troll_cageAI::instance

Referenced by GossipHello(), and initBlyCrewMember().