AzerothCore 3.3.5a
OpenSource WoW Emulator
No Matches
go_apexis_relic Class Reference
Inheritance diagram for go_apexis_relic:
GameObjectScript ScriptObject UpdatableScript< GameObject >

Public Member Functions

 go_apexis_relic ()
bool OnGossipHello (Player *player, GameObject *go) override
bool OnGossipSelect (Player *player, GameObject *go, uint32, uint32) 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 OnModifyHealth (GameObject *, Unit *, int32 &, SpellInfo const *)
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_apexis_relic()

go_apexis_relic::go_apexis_relic ( )
1046: GameObjectScript("go_apexis_relic") { }
Definition: GameObjectScript.h:25

Member Function Documentation

◆ OnGossipHello()

bool go_apexis_relic::OnGossipHello ( Player player,
GameObject go 

Reimplemented from GameObjectScript.

1049 {
1050 player->PrepareGossipMenu(go, go->GetGOInfo()->questgiver.gossipID);
1051 player->SendPreparedGossip(go);
1052 return true;
1053 }
GameObjectTemplate const * GetGOInfo() const
Definition: GameObject.h:138
uint32 gossipID
Definition: GameObjectData.h:73
struct GameObjectTemplate::@223::@227 questgiver
void SendPreparedGossip(WorldObject *source)
Definition: PlayerGossip.cpp:208
void PrepareGossipMenu(WorldObject *source, uint32 menuId=0, bool showQuests=false)
Definition: PlayerGossip.cpp:31

References GameObject::GetGOInfo(), GameObjectTemplate::gossipID, Player::PrepareGossipMenu(), GameObjectTemplate::questgiver, and Player::SendPreparedGossip().

◆ OnGossipSelect()

bool go_apexis_relic::OnGossipSelect ( Player player,
GameObject go,
uint32  ,

Reimplemented from GameObjectScript.

1056 {
1057 CloseGossipMenuFor(player);
1059 bool large = (go->GetEntry() == GO_APEXIS_MONUMENT);
1060 if (player->HasItemCount(ITEM_APEXIS_SHARD, large ? 35 : 1))
1061 {
1062 player->CastSpell(player, large ? SPELL_TAKE_REAGENTS_GROUP : SPELL_TAKE_REAGENTS_SOLO, false);
1064 if (Creature* bunny = player->SummonCreature(NPC_SIMON_BUNNY, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ()))
1065 bunny->AI()->SetGUID(player->GetGUID(), large);
1066 }
1068 return true;
1069 }
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
Definition: zone_blades_edge_mountains.cpp:1038
Definition: zone_blades_edge_mountains.cpp:1039
Definition: zone_blades_edge_mountains.cpp:1040
Definition: zone_blades_edge_mountains.cpp:501
Definition: zone_blades_edge_mountains.cpp:497
Definition: Creature.h:46
uint32 GetEntry() const
Definition: Object.h:109
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2343
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition: PlayerStorage.cpp:683
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1169

References Unit::CastSpell(), CloseGossipMenuFor(), Object::GetEntry(), Object::GetGUID(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GO_APEXIS_MONUMENT, Player::HasItemCount(), ITEM_APEXIS_SHARD, NPC_SIMON_BUNNY, SPELL_TAKE_REAGENTS_GROUP, SPELL_TAKE_REAGENTS_SOLO, and WorldObject::SummonCreature().