TrinityCore
Loading...
Searching...
No Matches
PlayerMenu Class Reference

#include <GossipDef.h>

Public Member Functions

GossipMenu & GetGossipMenu ()
 
QuestMenu & GetQuestMenu ()
 
bool Empty () const
 
uint32 GetGossipOptionSender (uint32 selection) const
 
uint32 GetGossipOptionAction (uint32 selection) const
 
bool IsGossipOptionCoded (uint32 selection) const
 
AddMenuItem

Adds a localized gossip menu item from db by menu id and menu item id.

Parameters
menuIdGossip menu id.
menuItemIdGossip menu item id.
senderIdentifier of the current menu.
actionCustom action given to OnGossipHello.
 PlayerMenu (WorldSession *session)
 
 ~PlayerMenu ()
 
void ClearMenus ()
 
void SendGossipMenu (uint32 titleTextId, ObjectGuid objectGUID)
 
void SendCloseGossip ()
 
void SendPointOfInterest (uint32 poiId) const
 
void SendQuestGiverStatus (QuestGiverStatus questStatus, ObjectGuid npcGUID) const
 
void SendQuestGiverQuestList (QEmote const &eEmote, const std::string &Title, ObjectGuid npcGUID)
 
void SendQuestQueryResponse (Quest const *quest) const
 
void SendQuestGiverQuestDetails (Quest const *quest, ObjectGuid npcGUID, bool autoLaunched) const
 
void SendQuestGiverOfferReward (Quest const *quest, ObjectGuid npcGUID, bool autoLaunched) const
 
void SendQuestGiverRequestItems (Quest const *quest, ObjectGuid npcGUID, bool canComplete, bool autoLaunched) const
 

Private Attributes

GossipMenu _gossipMenu
 
QuestMenu _questMenu
 
WorldSession * _session
 

Detailed Description

Definition at line 257 of file GossipDef.h.

Constructor & Destructor Documentation

◆ PlayerMenu()

PlayerMenu::PlayerMenu ( WorldSession *  session)
explicit

◆ ~PlayerMenu()

PlayerMenu::~PlayerMenu ( )

Definition at line 191 of file GossipDef.cpp.

References ClearMenus().

Member Function Documentation

◆ ClearMenus()

◆ Empty()

bool PlayerMenu::Empty ( ) const
inline

Definition at line 266 of file GossipDef.h.

◆ GetGossipMenu()

◆ GetGossipOptionAction()

uint32 PlayerMenu::GetGossipOptionAction ( uint32  selection) const
inline

Definition at line 270 of file GossipDef.h.

Referenced by GetGossipActionFor(), npc_lokhtos_darkbargainer::npc_lokhtos_darkbargainerAI::OnGossipSelect(), boss_gloomrel::boss_gloomrelAI::OnGossipSelect(), boss_doomrel::boss_doomrelAI::OnGossipSelect(), npc_barnes::OnGossipSelect(), npc_death_knight_initiate::npc_death_knight_initiateAI::OnGossipSelect(), npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::OnGossipSelect(), npc_shadowfang_prisoner::npc_shadowfang_prisonerAI::OnGossipSelect(), npc_zulaman_hostage::npc_zulaman_hostageAI::OnGossipSelect(), npc_jaina_proudmoore::npc_jaina_proudmooreAI::OnGossipSelect(), npc_thrall::npc_thrallAI::OnGossipSelect(), npc_tyrande_whisperwind::npc_tyrande_whisperwindAI::OnGossipSelect(), npc_erozion::OnGossipSelect(), npc_thrall_old_hillsbrad::OnGossipSelect(), npc_taretha::OnGossipSelect(), npc_thrall_warchief::npc_thrall_warchiefAI::OnGossipSelect(), go_wind_stone::go_wind_stoneAI::OnGossipSelect(), npc_sergeant_bly::npc_sergeant_blyAI::OnGossipSelect(), npc_weegli_blastfuse::npc_weegli_blastfuseAI::OnGossipSelect(), npc_announcer_toc5::npc_announcer_toc5AI::OnGossipSelect(), npc_brann_hos::OnGossipSelect(), npc_wg_demolisher_engineer::OnGossipSelect(), npc_wg_spirit_guide::OnGossipSelect(), go_amberpine_outhouse::go_amberpine_outhouseAI::OnGossipSelect(), npc_innkeeper::npc_innkeeperAI::OnGossipSelect(), npc_prof_blacksmith::npc_prof_blacksmithAI::OnGossipSelect(), npc_engineering_tele_trinket::npc_engineering_tele_trinketAI::OnGossipSelect(), npc_prof_leather::npc_prof_leatherAI::OnGossipSelect(), npc_prof_tailor::npc_prof_tailorAI::OnGossipSelect(), npc_prof_alchemy::npc_prof_alchemyAI::OnGossipSelect(), npc_wormhole::npc_wormholeAI::OnGossipSelect(), and npc_experience::npc_experienceAI::OnGossipSelect().

◆ GetGossipOptionSender()

uint32 PlayerMenu::GetGossipOptionSender ( uint32  selection) const
inline

◆ GetQuestMenu()

QuestMenu & PlayerMenu::GetQuestMenu ( )
inline

◆ IsGossipOptionCoded()

bool PlayerMenu::IsGossipOptionCoded ( uint32  selection) const
inline

Definition at line 271 of file GossipDef.h.

Referenced by WorldSession::HandleGossipSelectOptionOpcode().

◆ SendCloseGossip()

◆ SendGossipMenu()

◆ SendPointOfInterest()

◆ SendQuestGiverOfferReward()

◆ SendQuestGiverQuestDetails()

void PlayerMenu::SendQuestGiverQuestDetails ( Quest const *  quest,
ObjectGuid  npcGUID,
bool  autoLaunched 
) const

Definition at line 399 of file GossipDef.cpp.

References _session, WorldPackets::Quest::QuestGiverQuestDetails::AutoLaunched, Quest::BuildQuestRewards(), CONFIG_QUEST_IGNORE_AUTO_ACCEPT, WorldPackets::Quest::QuestGiverQuestDetails::DescEmotes, WorldPackets::Quest::QuestGiverQuestDetails::DescriptionText, Quest::DetailsEmote, Quest::DetailsEmoteDelay, WorldPackets::Quest::QuestGiverQuestDetails::Flags, Quest::GetFlags(), ObjectMgr::GetLocaleString(), Quest::GetLogDescription(), Quest::GetLogTitle(), WorldSession::GetPlayer(), Player::GetPlayerSharingQuest(), Quest::GetQuestDescription(), Quest::GetQuestId(), WorldSession::GetSessionDbLocaleIndex(), Quest::GetSuggestedPlayers(), WorldPackets::Quest::QuestGiverQuestDetails::InformUnit, LOCALE_enUS, WorldPackets::Quest::QuestGiverQuestDetails::LogDescription, QUEST_EMOTE_COUNT, WorldPackets::Quest::QuestGiverQuestDetails::QuestGiverGUID, WorldPackets::Quest::QuestGiverQuestDetails::QuestID, WorldPackets::Quest::QuestGiverQuestDetails::QuestTitle, WorldPackets::Quest::QuestGiverQuestDetails::Rewards, WorldSession::SendPacket(), sObjectMgr, WorldPackets::Quest::QuestGiverQuestDetails::SuggestedGroupNum, sWorld, TC_LOG_DEBUG, ObjectGuid::ToString(), and WorldPackets::Quest::QuestGiverQuestDetails::Write().

Referenced by Spell::EffectQuestStart(), WorldSession::HandlePushQuestToParty(), WorldSession::HandleQuestgiverChooseRewardOpcode(), WorldSession::HandleQuestgiverQueryQuestOpcode(), SmartScript::ProcessAction(), Player::SendInitialPacketsAfterAddToMap(), and Player::SendPreparedQuest().

◆ SendQuestGiverQuestList()

◆ SendQuestGiverRequestItems()

void PlayerMenu::SendQuestGiverRequestItems ( Quest const *  quest,
ObjectGuid  npcGUID,
bool  canComplete,
bool  autoLaunched 
) const

Definition at line 482 of file GossipDef.cpp.

References _session, WorldPackets::Quest::QuestObjectiveCollect::Amount, WorldPackets::Quest::QuestGiverRequestItems::AutoLaunched, WorldPackets::Quest::QuestGiverRequestItems::Collect, WorldPackets::Quest::QuestGiverRequestItems::CompEmoteDelay, WorldPackets::Quest::QuestGiverRequestItems::CompEmoteType, WorldPackets::Quest::QuestGiverRequestItems::CompletionText, WorldPackets::Quest::QuestObjectiveCollect::DisplayID, WorldPackets::Quest::QuestGiverRequestItems::Explored, Quest::GetCompleteEmote(), Quest::GetCompleteEmoteDelay(), Quest::GetFlags(), Quest::GetIncompleteEmote(), Quest::GetIncompleteEmoteDelay(), ObjectMgr::GetLocaleString(), Quest::GetLogTitle(), Quest::GetQuestId(), Quest::GetReqItemsCount(), Quest::GetRequestItemsText(), Quest::GetRewOrReqMoney(), WorldSession::GetSessionDbLocaleIndex(), Quest::GetSuggestedPlayers(), WorldPackets::Quest::QuestGiverRequestItems::HasFaction, WorldPackets::Quest::QuestGiverRequestItems::HasItems, WorldPackets::Quest::QuestGiverRequestItems::HasMoney, LOCALE_enUS, WorldPackets::Quest::QuestGiverRequestItems::MoneyToGet, WorldPackets::Quest::QuestObjectiveCollect::ObjectID, QUEST_ITEM_OBJECTIVES_COUNT, WorldPackets::Quest::QuestGiverRequestItems::QuestFlags, WorldPackets::Quest::QuestGiverRequestItems::QuestGiverGUID, WorldPackets::Quest::QuestGiverRequestItems::QuestID, WorldPackets::Quest::QuestGiverRequestItems::QuestTitle, Quest::RequiredItemCount, Quest::RequiredItemId, WorldSession::SendPacket(), SendQuestGiverOfferReward(), sObjectMgr, WorldPackets::Quest::QuestGiverRequestItems::SuggestPartyMembers, TC_LOG_DEBUG, ObjectGuid::ToString(), and WorldPackets::Quest::QuestGiverRequestItems::Write().

Referenced by WorldSession::HandlePushQuestToParty(), WorldSession::HandleQuestgiverCompleteQuest(), WorldSession::HandleQuestgiverQueryQuestOpcode(), and Player::SendPreparedQuest().

◆ SendQuestGiverStatus()

◆ SendQuestQueryResponse()

Member Data Documentation

◆ _gossipMenu

GossipMenu PlayerMenu::_gossipMenu
private

Definition at line 291 of file GossipDef.h.

Referenced by ClearMenus(), PlayerMenu(), SendCloseGossip(), and SendGossipMenu().

◆ _questMenu

QuestMenu PlayerMenu::_questMenu
private

Definition at line 292 of file GossipDef.h.

Referenced by ClearMenus(), SendGossipMenu(), and SendQuestGiverQuestList().

◆ _session


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