AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
go_warmaul_prison Class Reference
Inheritance diagram for go_warmaul_prison:
GameObjectScript ScriptObject UpdatableScript< GameObject >

Public Member Functions

 go_warmaul_prison ()
 
bool OnGossipHello (Player *player, GameObject *go) override
 
- Public Member Functions inherited from GameObjectScript
bool IsDatabaseBound () const override
 
virtual bool OnGossipHello (Player *, 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
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
- Public Member Functions inherited from UpdatableScript< GameObject >
virtual void OnUpdate (GameObject *, uint32)
 

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 ()=default
 
- Protected Member Functions inherited from UpdatableScript< GameObject >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ go_warmaul_prison()

go_warmaul_prison::go_warmaul_prison ( )
inline
586: GameObjectScript("go_warmaul_prison") { }
Definition: ScriptMgr.h:758

Member Function Documentation

◆ OnGossipHello()

bool go_warmaul_prison::OnGossipHello ( Player player,
GameObject go 
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

589 {
590 go->UseDoorOrButton();
591
593 return false;
594
595 if (Creature* prisoner = go->FindNearestCreature(NPC_MAGHAR_PRISONER, 5.0f))
596 {
598
599 prisoner->AI()->Talk(SAY_FREE, player);
600 prisoner->DespawnOrUnsummon(6000);
601 }
602
603 return true;
604 }
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
@ SAY_FREE
Definition: zone_nagrand.cpp:580
@ QUEST_FINDING_THE_SURVIVORS
Definition: zone_nagrand.cpp:577
@ NPC_MAGHAR_PRISONER
Definition: zone_nagrand.cpp:578
Definition: Creature.h:46
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
Definition: GameObject.cpp:1427
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2395
void KilledMonsterCredit(uint32 entry, ObjectGuid guid=ObjectGuid::Empty)
Definition: PlayerQuest.cpp:1904
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1407

References WorldObject::FindNearestCreature(), Player::GetQuestStatus(), Player::KilledMonsterCredit(), NPC_MAGHAR_PRISONER, QUEST_FINDING_THE_SURVIVORS, QUEST_STATUS_INCOMPLETE, SAY_FREE, and GameObject::UseDoorOrButton().