AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "GossipDef.h"
Public Member Functions | |||||||||||
GossipMenu () | |||||||||||
~GossipMenu () | |||||||||||
void | AddMenuItem (int32 menuItemId, uint8 icon, std::string const &message, uint32 sender, uint32 action, std::string const &boxMessage, uint32 boxMoney, bool coded=false) | ||||||||||
void | SetMenuId (uint32 menu_id) | ||||||||||
uint32 | GetMenuId () const | ||||||||||
void | SetLocale (LocaleConstant locale) | ||||||||||
LocaleConstant | GetLocale () const | ||||||||||
uint32 | GetMenuItemCount () const | ||||||||||
bool | Empty () const | ||||||||||
GossipMenuItem const * | GetItem (uint32 id) const | ||||||||||
GossipMenuItemData const * | GetItemData (uint32 indexId) const | ||||||||||
GossipMenuItemContainer const & | GetMenuItems () const | ||||||||||
void | SetSenderGUID (ObjectGuid guid) | ||||||||||
ObjectGuid | GetSenderGUID () const | ||||||||||
AddMenuItem | |||||||||||
Adds a localized gossip menu item from db by menu id and menu item id.
| |||||||||||
void | AddMenuItem (uint32 menuId, uint32 menuItemId, uint32 sender, uint32 action, uint32 boxMoney) | ||||||||||
void | AddGossipMenuItemData (uint32 menuItemId, uint32 gossipActionMenuId, uint32 gossipActionPoi) | ||||||||||
uint32 | GetMenuItemSender (uint32 menuItemId) const | ||||||||||
uint32 | GetMenuItemAction (uint32 menuItemId) const | ||||||||||
bool | IsMenuItemCoded (uint32 menuItemId) const | ||||||||||
void | ClearMenu () | ||||||||||
Private Attributes | |
GossipMenuItemContainer | _menuItems |
GossipMenuItemDataContainer | _menuItemData |
uint32 | _menuId |
LocaleConstant | _locale |
ObjectGuid | _senderGUID |
GossipMenu::GossipMenu | ( | ) |
References _locale, _menuId, _senderGUID, ObjectGuid::Clear(), and DEFAULT_LOCALE.
GossipMenu::~GossipMenu | ( | ) |
References ClearMenu().
void GossipMenu::AddGossipMenuItemData | ( | uint32 | menuItemId, |
uint32 | gossipActionMenuId, | ||
uint32 | gossipActionPoi | ||
) |
References _menuItemData, GossipMenuItemData::GossipActionMenuId, and GossipMenuItemData::GossipActionPoi.
Referenced by Player::PrepareGossipMenu().
void GossipMenu::AddMenuItem | ( | int32 | menuItemId, |
uint8 | icon, | ||
std::string const & | message, | ||
uint32 | sender, | ||
uint32 | action, | ||
std::string const & | boxMessage, | ||
uint32 | boxMoney, | ||
bool | coded = false |
||
) |
References _menuItems, ASSERT, GossipMenuItem::BoxMessage, GossipMenuItem::BoxMoney, GOSSIP_MAX_MENU_ITEMS, GossipMenuItem::IsCoded, GossipMenuItem::MenuItemIcon, GossipMenuItem::Message, GossipMenuItem::OptionType, and GossipMenuItem::Sender.
Referenced by AddGossipItemFor(), AddMenuItem(), and Player::PrepareGossipMenu().
void GossipMenu::AddMenuItem | ( | uint32 | menuId, |
uint32 | menuItemId, | ||
uint32 | sender, | ||
uint32 | action, | ||
uint32 | boxMoney | ||
) |
Find items for given menu id.
Return if there are none.
Iterate over each of them.
Find the one with the given menu item id.
Store texts for localization.
OptionText
BoxText
Check need of localization.
Find localizations from database.
Find localizations from database.
Add menu item with existing method. Menu item id -1 is also used in ADD_GOSSIP_ITEM macro.
References AddMenuItem(), DEFAULT_LOCALE, GetLocale(), ObjectMgr::GetLocaleString(), MAKE_PAIR32(), BroadcastText::MaleText, and sObjectMgr.
void GossipMenu::ClearMenu | ( | ) |
References _menuItemData, and _menuItems.
Referenced by PlayerMenu::ClearMenus(), and ~GossipMenu().
|
inline |
References _menuItems.
Referenced by PlayerMenu::Empty().
|
inline |
References _menuItems.
Referenced by Player::OnGossipSelect().
|
inline |
References _menuItemData.
Referenced by npc_thrall_old_hillsbrad::OnGossipSelect(), and Player::OnGossipSelect().
|
inline |
|
inline |
References _menuItems.
Referenced by PlayerMenu::GetGossipOptionAction().
|
inline |
References _menuItems.
Referenced by PlayerMenu::SendGossipMenu().
|
inline |
References _menuItems.
Referenced by PlayerMenu::SendGossipMenu().
References _menuItems.
Referenced by PlayerMenu::GetGossipOptionSender().
|
inline |
References _senderGUID.
Referenced by WorldSession::HandleGossipSelectOptionOpcode(), and WorldSession::HandleQuestgiverStatusQueryOpcode().
bool GossipMenu::IsMenuItemCoded | ( | uint32 | menuItemId | ) | const |
References _menuItems.
Referenced by PlayerMenu::IsGossipOptionCoded().
|
inline |
|
inline |
|
inline |
References _senderGUID.
Referenced by PlayerMenu::SendCloseGossip(), and PlayerMenu::SendGossipMenu().
|
private |
Referenced by GetLocale(), GossipMenu(), and SetLocale().
|
private |
Referenced by GetMenuId(), GossipMenu(), and SetMenuId().
|
private |
Referenced by AddGossipMenuItemData(), ClearMenu(), and GetItemData().
|
private |
Referenced by AddMenuItem(), ClearMenu(), Empty(), GetItem(), GetMenuItemAction(), GetMenuItemCount(), GetMenuItems(), GetMenuItemSender(), and IsMenuItemCoded().
|
private |
Referenced by GetSenderGUID(), GossipMenu(), and SetSenderGUID().