AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#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 (uint8 questStatus, ObjectGuid npcGUID) const | ||||||||||
void | SendQuestGiverQuestList (QEmote const &eEmote, std::string const &Title, ObjectGuid guid) | ||||||||||
void | SendQuestQueryResponse (Quest const *quest) const | ||||||||||
void | SendQuestGiverQuestDetails (Quest const *quest, ObjectGuid npcGUID, bool activateAccept) const | ||||||||||
void | SendQuestGiverOfferReward (Quest const *quest, ObjectGuid npcGUID, bool enableNext) const | ||||||||||
void | SendQuestGiverRequestItems (Quest const *quest, ObjectGuid npcGUID, bool canComplete, bool closeOnCancel) const | ||||||||||
Private Attributes | |
GossipMenu | _gossipMenu |
QuestMenu | _questMenu |
WorldSession * | _session |
|
explicit |
References _gossipMenu, WorldSession::GetSessionDbLocaleIndex(), and GossipMenu::SetLocale().
PlayerMenu::~PlayerMenu | ( | ) |
References ClearMenus().
void PlayerMenu::ClearMenus | ( | ) |
References _gossipMenu, _questMenu, GossipMenu::ClearMenu(), and QuestMenu::ClearMenu().
Referenced by ClearGossipMenuFor(), Player::PrepareGossipMenu(), and ~PlayerMenu().
|
inline |
References _gossipMenu, _questMenu, GossipMenu::Empty(), and QuestMenu::Empty().
|
inline |
References _gossipMenu.
Referenced by AddGossipItemFor(), WorldSession::HandleGossipSelectOptionOpcode(), WorldSession::HandleQuestgiverStatusQueryOpcode(), npc_cos_chromie_start::OnGossipSelect(), npc_cos_chromie_middle::OnGossipSelect(), npc_thrall_old_hillsbrad::OnGossipSelect(), npc_icc_buff_switcher::OnGossipSelect(), Player::OnGossipSelect(), Player::PrepareGossipMenu(), and Player::SendPreparedGossip().
References _gossipMenu, and GossipMenu::GetMenuItemAction().
Referenced by WorldSession::HandleGossipSelectOptionOpcode(), npc_echo_of_medivh::sGossipSelect(), npc_chesspiece::sGossipSelect(), npc_sergeant_bly::npc_sergeant_blyAI::sGossipSelect(), and npc_weegli_blastfuse::npc_weegli_blastfuseAI::sGossipSelect().
References _gossipMenu, and GossipMenu::GetMenuItemSender().
Referenced by WorldSession::HandleGossipSelectOptionOpcode().
|
inline |
|
inline |
References _gossipMenu, and GossipMenu::IsMenuItemCoded().
Referenced by WorldSession::HandleGossipSelectOptionOpcode().
void PlayerMenu::SendCloseGossip | ( | ) |
References _gossipMenu, _session, ObjectGuid::Empty, WorldSession::SendPacket(), GossipMenu::SetSenderGUID(), and SMSG_GOSSIP_COMPLETE.
Referenced by CloseGossipMenuFor(), go_wind_stone::go_wind_stoneAI::GossipSelect(), OPvPCapturePointZM_GraveYard::HandleGossipOption(), WorldSession::HandleGossipSelectOptionOpcode(), WorldSession::HandleQuestgiverAcceptQuestOpcode(), WorldSession::HandleQuestgiverCancel(), WorldSession::HandleQuestgiverChooseRewardOpcode(), WorldSession::HandleQuestgiverQueryQuestOpcode(), npc_experience::OnGossipSelect(), npc_ulduar_expedition_commander::OnGossipSelect(), Player::OnGossipSelect(), WorldSession::SendBindPoint(), Player::SendPreparedQuest(), npc_pet_trainer::npc_pet_trainerAI::sGossipSelect(), npc_stable_master::npc_stable_masterAI::sGossipSelect(), and npc_zafod_boombox::npc_zafod_boomboxAI::sGossipSelect().
void PlayerMenu::SendGossipMenu | ( | uint32 | titleTextId, |
ObjectGuid | objectGUID | ||
) |
References _gossipMenu, _questMenu, _session, GossipMenuItem::BoxMessage, GossipMenuItem::BoxMoney, QuestMenu::GetItem(), ObjectMgr::GetLocaleString(), GossipMenu::GetMenuId(), GossipMenu::GetMenuItemCount(), QuestMenu::GetMenuItemCount(), GossipMenu::GetMenuItems(), WorldSession::GetSessionDbLocaleIndex(), GossipMenuItem::IsCoded, GossipMenuItem::MenuItemIcon, GossipMenuItem::Message, QuestMenuItem::QuestIcon, QuestMenuItem::QuestId, WorldSession::SendPacket(), GossipMenu::SetSenderGUID(), SMSG_GOSSIP_MESSAGE, and sObjectMgr.
Referenced by SendGossipMenuFor(), and Player::SendPreparedGossip().
void PlayerMenu::SendPointOfInterest | ( | uint32 | poiId | ) | const |
References _session, PointOfInterest::Flags, ObjectMgr::GetLocaleString(), WorldSession::GetSessionDbLocaleIndex(), PointOfInterest::Icon, PointOfInterest::Importance, LOG_ERROR, PointOfInterest::Name, PointOfInterest::PositionX, PointOfInterest::PositionY, WorldSession::SendPacket(), SMSG_GOSSIP_POI, and sObjectMgr.
Referenced by Player::OnGossipSelect().
void PlayerMenu::SendQuestGiverOfferReward | ( | Quest const * | quest, |
ObjectGuid | npcGUID, | ||
bool | enableNext | ||
) | const |
References _session, Quest::CalculateHonorGain(), Player::CalculateQuestRewardXP(), CONFIG_MAX_PLAYER_LEVEL, Quest::GetBonusTalents(), Quest::GetCharTitleId(), Quest::GetFlags(), Unit::GetLevel(), ObjectMgr::GetLocaleString(), Quest::GetOfferRewardText(), WorldSession::GetPlayer(), Quest::GetQuestId(), Player::GetQuestLevel(), Quest::GetRewArenaPoints(), Quest::GetRewChoiceItemsCount(), Quest::GetRewItemsCount(), Quest::GetRewMoneyMaxLevel(), Quest::GetRewOrReqMoney(), Quest::GetRewSpell(), Quest::GetRewSpellCast(), WorldSession::GetSessionDbLocaleIndex(), Quest::GetSuggestedPlayers(), Quest::GetTitle(), LOG_DEBUG, Quest::OfferRewardEmote, Quest::OfferRewardEmoteDelay, QUEST_EMOTE_COUNT, QUEST_REPUTATIONS_COUNT, Quest::RewardChoiceItemCount, Quest::RewardChoiceItemId, Quest::RewardFactionId, Quest::RewardFactionValueId, Quest::RewardFactionValueIdOverride, Quest::RewardItemId, Quest::RewardItemIdCount, WorldSession::SendPacket(), SMSG_QUESTGIVER_OFFER_REWARD, sObjectMgr, sScriptMgr, sWorld, and ObjectGuid::ToString().
Referenced by WorldSession::HandleQuestgiverChooseRewardOpcode(), WorldSession::HandleQuestgiverCompleteQuest(), WorldSession::HandleQuestgiverRequestRewardOpcode(), and SendQuestGiverRequestItems().
void PlayerMenu::SendQuestGiverQuestDetails | ( | Quest const * | quest, |
ObjectGuid | npcGUID, | ||
bool | activateAccept | ||
) | const |
References _session, Quest::CalculateHonorGain(), Player::CalculateQuestRewardXP(), CONFIG_MAX_PLAYER_LEVEL, Quest::DetailsEmote, Quest::DetailsEmoteDelay, Quest::GetAreaDescription(), Quest::GetBonusTalents(), Quest::GetCharTitleId(), Quest::GetDetails(), Player::GetDivider(), Quest::GetFlags(), Unit::GetLevel(), ObjectMgr::GetLocaleString(), Quest::GetObjectives(), WorldSession::GetPlayer(), Quest::GetQuestId(), Player::GetQuestLevel(), Quest::GetRewArenaPoints(), Quest::GetRewChoiceItemsCount(), Quest::GetRewItemsCount(), Quest::GetRewMoneyMaxLevel(), Quest::GetRewOrReqMoney(), Quest::GetRewSpell(), Quest::GetRewSpellCast(), WorldSession::GetSessionDbLocaleIndex(), Quest::GetSuggestedPlayers(), Quest::GetTitle(), Quest::HasFlag(), LOG_DEBUG, QUEST_EMOTE_COUNT, QUEST_FLAGS_HIDDEN_REWARDS, QUEST_REPUTATIONS_COUNT, QUEST_REWARD_CHOICES_COUNT, QUEST_REWARDS_COUNT, Quest::RewardChoiceItemCount, Quest::RewardChoiceItemId, Quest::RewardFactionId, Quest::RewardFactionValueId, Quest::RewardFactionValueIdOverride, Quest::RewardItemId, Quest::RewardItemIdCount, WorldSession::SendPacket(), SMSG_QUESTGIVER_QUEST_DETAILS, sObjectMgr, sScriptMgr, sWorld, and ObjectGuid::ToString().
Referenced by Spell::EffectQuestStart(), WorldSession::HandlePushQuestToParty(), WorldSession::HandleQuestgiverChooseRewardOpcode(), WorldSession::HandleQuestgiverQueryQuestOpcode(), SmartScript::ProcessAction(), and Player::SendPreparedQuest().
void PlayerMenu::SendQuestGiverQuestList | ( | QEmote const & | eEmote, |
std::string const & | Title, | ||
ObjectGuid | guid | ||
) |
References QEmote::_Delay, QEmote::_Emote, _questMenu, _session, DEFAULT_LOCALE, ObjectGuid::GetEntry(), QuestMenu::GetItem(), ObjectMgr::GetLocaleString(), QuestMenu::GetMenuItemCount(), WorldSession::GetSessionDbLocaleIndex(), ObjectGuid::GetTypeId(), LOCALE_enUS, LOG_DEBUG, ByteBuffer::put(), QuestMenuItem::QuestIcon, QuestMenuItem::QuestId, WorldSession::SendPacket(), SMSG_QUESTGIVER_QUEST_LIST, sObjectMgr, ObjectGuid::ToString(), and ByteBuffer::wpos().
Referenced by Player::SendPreparedQuest().
void PlayerMenu::SendQuestGiverRequestItems | ( | Quest const * | quest, |
ObjectGuid | npcGUID, | ||
bool | canComplete, | ||
bool | closeOnCancel | ||
) | const |
References _session, Player::CanCompleteQuest(), Player::CompleteQuest(), Quest::GetCompleteEmote(), Quest::GetFlags(), Quest::GetIncompleteEmote(), Player::GetItemCount(), ObjectMgr::GetLocaleString(), WorldSession::GetPlayer(), Quest::GetQuestId(), Player::getQuestStatusMap(), Quest::GetReqItemsCount(), Quest::GetRequestItemsText(), Quest::GetRewOrReqMoney(), WorldSession::GetSessionDbLocaleIndex(), Quest::GetSuggestedPlayers(), Quest::GetTitle(), LOG_DEBUG, QUEST_ITEM_OBJECTIVES_COUNT, QUEST_STATUS_INCOMPLETE, Quest::RequiredItemCount, Quest::RequiredItemId, WorldSession::SendPacket(), SendQuestGiverOfferReward(), SMSG_QUESTGIVER_REQUEST_ITEMS, sObjectMgr, and ObjectGuid::ToString().
Referenced by WorldSession::HandlePushQuestToParty(), WorldSession::HandleQuestgiverCompleteQuest(), WorldSession::HandleQuestgiverQueryQuestOpcode(), npc_elder_clearwater::OnGossipHello(), and Player::SendPreparedQuest().
void PlayerMenu::SendQuestGiverStatus | ( | uint8 | questStatus, |
ObjectGuid | npcGUID | ||
) | const |
References _session, LOG_DEBUG, WorldSession::SendPacket(), SMSG_QUESTGIVER_STATUS, and ObjectGuid::ToString().
Referenced by WorldSession::HandleQuestgiverChooseRewardOpcode(), and WorldSession::HandleQuestgiverStatusQueryOpcode().
void PlayerMenu::SendQuestQueryResponse | ( | Quest const * | quest | ) | const |
References _session, CONFIG_MAX_PLAYER_LEVEL, Quest::GetAreaDescription(), Quest::GetBonusTalents(), Quest::GetCharTitleId(), Quest::GetCompletedText(), Quest::GetDetails(), Quest::GetFlags(), Unit::GetLevel(), ObjectMgr::GetLocaleString(), Quest::GetMinLevel(), Quest::GetNextQuestInChain(), Quest::GetObjectives(), WorldSession::GetPlayer(), Quest::GetPlayersSlain(), Quest::GetPOIContinent(), Quest::GetPointOpt(), Quest::GetPOIx(), Quest::GetPOIy(), Quest::GetQuestId(), Quest::GetQuestLevel(), Quest::GetQuestMethod(), Quest::GetRepObjectiveFaction(), Quest::GetRepObjectiveFaction2(), Quest::GetRepObjectiveValue(), Quest::GetRepObjectiveValue2(), Quest::GetRewArenaPoints(), Quest::GetRewHonorAddition(), Quest::GetRewHonorMultiplier(), Quest::GetRewMoneyMaxLevel(), Quest::GetRewOrReqMoney(), Quest::GetRewSpell(), Quest::GetRewSpellCast(), WorldSession::GetSessionDbLocaleIndex(), Quest::GetSrcItemId(), Quest::GetSuggestedPlayers(), Quest::GetTitle(), Quest::GetType(), Quest::GetXPId(), Quest::GetZoneOrSort(), Quest::HasFlag(), Quest::ItemDrop, LOG_DEBUG, Quest::ObjectiveText, QUEST_FLAGS_HIDDEN_REWARDS, QUEST_ITEM_OBJECTIVES_COUNT, QUEST_OBJECTIVES_COUNT, QUEST_REPUTATIONS_COUNT, QUEST_REWARD_CHOICES_COUNT, QUEST_REWARDS_COUNT, Quest::RequiredItemCount, Quest::RequiredItemId, Quest::RequiredNpcOrGo, Quest::RequiredNpcOrGoCount, Quest::RewardChoiceItemCount, Quest::RewardChoiceItemId, Quest::RewardFactionId, Quest::RewardFactionValueId, Quest::RewardFactionValueIdOverride, Quest::RewardItemId, Quest::RewardItemIdCount, WorldSession::SendPacket(), SMSG_QUEST_QUERY_RESPONSE, sObjectMgr, sScriptMgr, and sWorld.
Referenced by WorldSession::HandleQuestQueryOpcode().
|
private |
|
private |
Referenced by ClearMenus(), Empty(), GetQuestMenu(), SendGossipMenu(), and SendQuestGiverQuestList().
|
private |