AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
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
 
uint16 GetTotalAvailableHooks ()
 
- 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, uint16 totalAvailableHooks=0)
 
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 ( )
inline
1044: GameObjectScript("go_apexis_relic") { }
Definition: GameObjectScript.h:25

Member Function Documentation

◆ OnGossipHello()

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

Reimplemented from GameObjectScript.

1047 {
1048 player->PrepareGossipMenu(go, go->GetGOInfo()->questgiver.gossipID);
1049 player->SendPreparedGossip(go);
1050 return true;
1051 }
GameObjectTemplate const * GetGOInfo() const
Definition: GameObject.h:136
struct GameObjectTemplate::@230::@234 questgiver
uint32 gossipID
Definition: GameObjectData.h:72
void SendPreparedGossip(WorldObject *source)
Definition: PlayerGossip.cpp:209
void PrepareGossipMenu(WorldObject *source, uint32 menuId=0, bool showQuests=false)
Definition: PlayerGossip.cpp:32

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

◆ OnGossipSelect()

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

Reimplemented from GameObjectScript.

1054 {
1055 CloseGossipMenuFor(player);
1056
1057 bool large = (go->GetEntry() == GO_APEXIS_MONUMENT);
1058 if (player->HasItemCount(ITEM_APEXIS_SHARD, large ? 35 : 1))
1059 {
1060 player->CastSpell(player, large ? SPELL_TAKE_REAGENTS_GROUP : SPELL_TAKE_REAGENTS_SOLO, false);
1061
1062 if (Creature* bunny = player->SummonCreature(NPC_SIMON_BUNNY, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ()))
1063 bunny->AI()->SetGUID(player->GetGUID(), large);
1064 }
1065
1066 return true;
1067 }
@ ITEM_APEXIS_SHARD
Definition: zone_blades_edge_mountains.cpp:1036
@ SPELL_TAKE_REAGENTS_SOLO
Definition: zone_blades_edge_mountains.cpp:1037
@ SPELL_TAKE_REAGENTS_GROUP
Definition: zone_blades_edge_mountains.cpp:1038
@ GO_APEXIS_MONUMENT
Definition: zone_blades_edge_mountains.cpp:499
@ NPC_SIMON_BUNNY
Definition: zone_blades_edge_mountains.cpp:495
void CloseGossipMenuFor(Player *player)
Definition: ScriptedGossip.cpp:56
Definition: Creature.h:43
uint32 GetEntry() const
Definition: Object.h:115
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
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:2366
float GetPositionZ() const
Definition: Position.h:118
float GetPositionX() const
Definition: Position.h:116
float GetPositionY() const
Definition: Position.h:117
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition: PlayerStorage.cpp:655
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:1167

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