TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
go_troll_cage Class Reference

Public Member Functions

 go_troll_cage ()
 
bool OnGossipHello (Player *, GameObject *go) override
 
- Public Member Functions inherited from GameObjectScript
virtual bool OnDummyEffect (Unit *, uint32, SpellEffIndex, GameObject *)
 
virtual bool OnGossipSelect (Player *, GameObject *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, GameObject *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, GameObject *, Quest const *)
 
virtual bool OnQuestReward (Player *, GameObject *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, GameObject *)
 
virtual void OnDestroyed (GameObject *, Player *)
 
virtual void OnDamaged (GameObject *, Player *)
 
virtual void OnLootStateChanged (GameObject *, uint32, Unit *)
 
virtual void OnGameObjectStateChanged (GameObject *, uint32)
 
virtual GameObjectAIGetAI (GameObject *) const
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 
- Public Member Functions inherited from UpdatableScript< GameObject >
virtual void OnUpdate (GameObject *, uint32)
 

Private Member Functions

void initBlyCrewMember (InstanceScript *instance, uint32 entry, float x, float y, float z)
 

Additional Inherited Members

- Protected Member Functions inherited from GameObjectScript
 GameObjectScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 
- Protected Member Functions inherited from UpdatableScript< GameObject >
 UpdatableScript ()
 
virtual ~UpdatableScript ()
 

Constructor & Destructor Documentation

go_troll_cage::go_troll_cage ( )
inline
212 : GameObjectScript("go_troll_cage") { }
GameObjectScript(const char *name)
Definition: ScriptMgr.cpp:1592

Member Function Documentation

void go_troll_cage::initBlyCrewMember ( InstanceScript instance,
uint32  entry,
float  x,
float  y,
float  z 
)
inlineprivate
231  {
232  if (Creature* crew = instance->instance->GetCreature(instance->GetGuidData(entry)))
233  {
234  crew->SetReactState(REACT_AGGRESSIVE);
235  crew->SetWalk(true);
236  crew->SetHomePosition(x, y, z, 0);
237  crew->GetMotionMaster()->MovePoint(1, x, y, z);
238  crew->setFaction(FACTION_FREED);
239  }
240  }
Definition: zulfarrak.cpp:45
Definition: Unit.h:1131
Definition: Creature.h:467
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
G3D::int16 z
Definition: Vector3int16.h:46
G3D::int16 y
Definition: Vector2int16.h:38
Map * instance
Definition: InstanceScript.h:148
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
G3D::int16 x
Definition: Vector2int16.h:37

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool go_troll_cage::OnGossipHello ( Player ,
GameObject go 
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

215  {
216  if (InstanceScript* instance = go->GetInstanceScript())
217  {
218  instance->SetData(EVENT_PYRAMID, PYRAMID_CAGES_OPEN);
219  //set bly & co to aggressive & start moving to top of stairs
220  initBlyCrewMember(instance, ENTRY_BLY, 1884.99f, 1263, 41.52f);
221  initBlyCrewMember(instance, ENTRY_RAVEN, 1882.5f, 1263, 41.52f);
222  initBlyCrewMember(instance, ENTRY_ORO, 1886.47f, 1270.68f, 41.68f);
223  initBlyCrewMember(instance, ENTRY_WEEGLI, 1890, 1263, 41.52f);
224  initBlyCrewMember(instance, ENTRY_MURTA, 1891.19f, 1272.03f, 41.60f);
225  }
226  return false;
227  }
void initBlyCrewMember(InstanceScript *instance, uint32 entry, float x, float y, float z)
Definition: zulfarrak.cpp:230
Definition: zulfarrak.h:27
Definition: zulfarrak.h:29
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
Definition: zulfarrak.h:47
Definition: zulfarrak.h:35
Definition: zulfarrak.h:30
Definition: zulfarrak.h:31
Definition: zulfarrak.h:28
Definition: InstanceScript.h:141

+ Here is the call graph for this function:


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