![]() |
TrinityCore
|
#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.
| |||||||||
| 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 |
Definition at line 257 of file GossipDef.h.
|
explicit |
Definition at line 185 of file GossipDef.cpp.
References _gossipMenu, _session, WorldSession::GetSessionDbLocaleIndex(), and GossipMenu::SetLocale().
| PlayerMenu::~PlayerMenu | ( | ) |
Definition at line 191 of file GossipDef.cpp.
References ClearMenus().
| void PlayerMenu::ClearMenus | ( | ) |
Definition at line 196 of file GossipDef.cpp.
References _gossipMenu, _questMenu, GossipMenu::ClearMenu(), and QuestMenu::ClearMenu().
Referenced by Player::AddQuestAndCheckCompletion(), ClearGossipMenuFor(), WorldSession::HandleGossipHelloOpcode(), WorldSession::HandleQuestgiverChooseRewardOpcode(), WorldSession::HandleQuestgiverHelloOpcode(), ScriptMgr::OnQuestAccept(), Player::PrepareGossipMenu(), Spell::SendLoot(), and ~PlayerMenu().
|
inline |
Definition at line 266 of file GossipDef.h.
|
inline |
Definition at line 263 of file GossipDef.h.
Referenced by AddGossipItemFor(), AddGossipItemFor(), AddGossipItemFor(), WorldSession::HandleGossipSelectOptionOpcode(), InitGossipMenuFor(), Player::OnGossipSelect(), Player::PrepareGossipMenu(), and Player::SendPreparedGossip().
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().
Definition at line 269 of file GossipDef.h.
Referenced by GetGossipSenderFor(), and npc_engineering_tele_trinket::npc_engineering_tele_trinketAI::OnGossipSelect().
|
inline |
Definition at line 264 of file GossipDef.h.
Referenced by Player::PrepareQuestMenu(), Player::SendPreparedGossip(), and Player::SendPreparedQuest().
|
inline |
Definition at line 271 of file GossipDef.h.
Referenced by WorldSession::HandleGossipSelectOptionOpcode().
| void PlayerMenu::SendCloseGossip | ( | ) |
Definition at line 254 of file GossipDef.cpp.
References _gossipMenu, _session, ObjectGuid::Empty, WorldSession::SendPacket(), GossipMenu::SetSenderGUID(), and SMSG_GOSSIP_COMPLETE.
Referenced by CloseGossipMenuFor(), OPvPCapturePointZM_Graveyard::HandleGossipOption(), WorldSession::HandleGossipSelectOptionOpcode(), WorldSession::HandleQuestgiverAcceptQuestOpcode(), WorldSession::HandleQuestgiverCancel(), WorldSession::HandleQuestgiverQueryQuestOpcode(), npc_verdisa_beglaristrasz_eternos::OnGossipSelect(), npc_brann_bronzebeard_ulduar_intro::npc_brann_bronzebeard_ulduar_introAI::OnGossipSelect(), npc_lorekeeper::npc_lorekeeperAI::OnGossipSelect(), npc_sinclari_vh::OnGossipSelect(), npc_stable_master::npc_stable_masterAI::OnGossipSelect(), npc_blastmaster_emi_shortfuse::npc_blastmaster_emi_shortfuseAI::OnGossipSelect(), go_wind_stone::go_wind_stoneAI::OnGossipSelect(), npc_jaina_or_sylvanas_intro_hor::npc_jaina_or_sylvanas_intro_horAI::OnGossipSelect(), npc_jaina_or_sylvanas_escape_hor::npc_jaina_or_sylvanas_escape_horAI::OnGossipSelect(), npc_barada::npc_baradaAI::OnGossipSelect(), npc_argent_squire_gruntling::npc_argent_squire_gruntlingAI::OnGossipSelect(), npc_zafod_boombox::OnGossipSelect(), Player::OnGossipSelect(), WorldSession::SendBindPoint(), and Player::SendPreparedQuest().
| void PlayerMenu::SendGossipMenu | ( | uint32 | titleTextId, |
| ObjectGuid | objectGUID | ||
| ) |
Definition at line 202 of file GossipDef.cpp.
References _gossipMenu, _questMenu, _session, WorldPackets::NPC::ClientGossipOptions::Confirm, QuestMenu::GetItem(), ObjectMgr::GetLocaleString(), GossipMenu::GetMenuId(), QuestMenu::GetMenuItemCount(), GossipMenu::GetMenuItems(), WorldSession::GetSessionDbLocaleIndex(), WorldPackets::NPC::GossipMessage::GossipGUID, WorldPackets::NPC::GossipMessage::GossipID, WorldPackets::NPC::ClientGossipOptions::GossipOptionID, WorldPackets::NPC::GossipMessage::GossipOptions, WorldPackets::NPC::GossipMessage::GossipText, LOCALE_enUS, WorldPackets::NPC::ClientGossipOptions::OptionCost, WorldPackets::NPC::ClientGossipOptions::OptionFlags, WorldPackets::NPC::ClientGossipOptions::OptionNPC, WorldPackets::NPC::ClientGossipText::QuestFlags, QuestMenuItem::QuestIcon, QuestMenuItem::QuestId, WorldPackets::NPC::ClientGossipText::QuestID, WorldPackets::NPC::ClientGossipText::QuestLevel, WorldPackets::NPC::ClientGossipText::QuestTitle, WorldPackets::NPC::ClientGossipText::QuestType, WorldPackets::NPC::GossipMessage::RandomTextID, WorldPackets::NPC::ClientGossipText::Repeatable, WorldSession::SendPacket(), GossipMenu::SetSenderGUID(), sObjectMgr, WorldPackets::NPC::ClientGossipOptions::Text, and WorldPackets::NPC::GossipMessage::Write().
Referenced by SendGossipMenuFor(), and Player::SendPreparedGossip().
| void PlayerMenu::SendPointOfInterest | ( | uint32 | poiId | ) | const |
Definition at line 262 of file GossipDef.cpp.
References _session, PointOfInterest::Flags, WorldPackets::NPC::GossipPOI::Flags, ObjectMgr::GetLocaleString(), WorldSession::GetSessionDbLocaleIndex(), PointOfInterest::Icon, WorldPackets::NPC::GossipPOI::Icon, PointOfInterest::Importance, WorldPackets::NPC::GossipPOI::Importance, LOCALE_enUS, PointOfInterest::Name, WorldPackets::NPC::GossipPOI::Name, TaggedPosition< Tag >::Pos, WorldPackets::NPC::GossipPOI::Pos, PointOfInterest::PositionX, PointOfInterest::PositionY, Position::Relocate(), WorldSession::SendPacket(), sObjectMgr, TC_LOG_ERROR, and WorldPackets::NPC::GossipPOI::Write().
Referenced by Player::OnGossipSelect().
| void PlayerMenu::SendQuestGiverOfferReward | ( | Quest const * | quest, |
| ObjectGuid | npcGUID, | ||
| bool | autoLaunched | ||
| ) | const |
Definition at line 449 of file GossipDef.cpp.
References _session, WorldPackets::Quest::QuestGiverOfferRewardMessage::AutoLaunched, Quest::BuildQuestRewards(), WorldPackets::Quest::QuestGiverOfferRewardMessage::Emotes, WorldPackets::Quest::QuestGiverOfferRewardMessage::Flags, Quest::GetFlags(), ObjectMgr::GetLocaleString(), Quest::GetLogTitle(), Quest::GetOfferRewardText(), WorldSession::GetPlayer(), Quest::GetQuestId(), WorldSession::GetSessionDbLocaleIndex(), Quest::GetSuggestedPlayers(), LOCALE_enUS, Quest::OfferRewardEmote, Quest::OfferRewardEmoteDelay, QUEST_EMOTE_COUNT, WorldPackets::Quest::QuestGiverOfferRewardMessage::QuestGiverGUID, WorldPackets::Quest::QuestGiverOfferRewardMessage::QuestID, WorldPackets::Quest::QuestGiverOfferRewardMessage::QuestTitle, WorldPackets::Quest::QuestGiverOfferRewardMessage::Rewards, WorldPackets::Quest::QuestGiverOfferRewardMessage::RewardText, WorldSession::SendPacket(), sObjectMgr, WorldPackets::Quest::QuestGiverOfferRewardMessage::SuggestedGroupNum, TC_LOG_DEBUG, ObjectGuid::ToString(), and WorldPackets::Quest::QuestGiverOfferRewardMessage::Write().
Referenced by WorldSession::HandleQuestgiverChooseRewardOpcode(), WorldSession::HandleQuestgiverCompleteQuest(), WorldSession::HandleQuestgiverRequestRewardOpcode(), and SendQuestGiverRequestItems().
| 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().
| void PlayerMenu::SendQuestGiverQuestList | ( | QEmote const & | eEmote, |
| const std::string & | Title, | ||
| ObjectGuid | npcGUID | ||
| ) |
Definition at line 330 of file GossipDef.cpp.
References QEmote::_Delay, QEmote::_Emote, _questMenu, _session, ObjectGuid::GetEntry(), QuestMenu::GetItem(), ObjectMgr::GetLocaleString(), QuestMenu::GetMenuItemCount(), WorldSession::GetSessionDbLocaleIndex(), ObjectGuid::GetTypeId(), LOCALE_enUS, MAKE_PAIR32(), ByteBuffer::put(), QuestMenuItem::QuestIcon, QuestMenuItem::QuestId, WorldSession::SendPacket(), SMSG_QUESTGIVER_QUEST_LIST, sObjectMgr, TC_LOG_DEBUG, ObjectGuid::ToString(), and ByteBuffer::wpos().
Referenced by Player::SendPreparedQuest().
| 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().
| void PlayerMenu::SendQuestGiverStatus | ( | QuestGiverStatus | questStatus, |
| ObjectGuid | npcGUID | ||
| ) | const |
Definition at line 389 of file GossipDef.cpp.
References _session, AsUnderlyingType(), WorldPackets::Quest::QuestGiverInfo::Guid, WorldPackets::Quest::QuestGiverStatus::QuestGiver, WorldSession::SendPacket(), WorldPackets::Quest::QuestGiverInfo::Status, TC_LOG_DEBUG, ObjectGuid::ToString(), and WorldPackets::Quest::QuestGiverStatus::Write().
Referenced by WorldSession::HandleQuestgiverStatusQueryOpcode().
| void PlayerMenu::SendQuestQueryResponse | ( | Quest const * | quest | ) | const |
Definition at line 436 of file GossipDef.cpp.
References _session, Quest::BuildQueryData(), CONFIG_CACHE_DATA_QUERIES, Quest::GetQuestId(), WorldSession::GetSessionDbLocaleIndex(), Quest::QueryData, WorldSession::SendPacket(), sWorld, and TC_LOG_DEBUG.
Referenced by WorldSession::HandleQuestQueryOpcode().
|
private |
Definition at line 291 of file GossipDef.h.
Referenced by ClearMenus(), PlayerMenu(), SendCloseGossip(), and SendGossipMenu().
|
private |
Definition at line 292 of file GossipDef.h.
Referenced by ClearMenus(), SendGossipMenu(), and SendQuestGiverQuestList().
|
private |
Definition at line 293 of file GossipDef.h.
Referenced by PlayerMenu(), SendCloseGossip(), SendGossipMenu(), SendPointOfInterest(), SendQuestGiverOfferReward(), SendQuestGiverQuestDetails(), SendQuestGiverQuestList(), SendQuestGiverRequestItems(), SendQuestGiverStatus(), and SendQuestQueryResponse().