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

#include <GossipDef.h>

Public Member Functions

 GossipMenu ()
 
 ~GossipMenu ()
 
uint32 AddMenuItem (int32 menuItemId, GossipOptionIcon 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 SetSenderGUID (ObjectGuid guid)
 
ObjectGuid GetSenderGUID () 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
 
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.
void AddMenuItem (uint32 menuId, uint32 menuItemId, uint32 sender, uint32 action)
 
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
 
ObjectGuid _senderGUID
 
LocaleConstant _locale
 

Detailed Description

Definition at line 161 of file GossipDef.h.

Constructor & Destructor Documentation

◆ GossipMenu()

GossipMenu::GossipMenu ( )

Definition at line 28 of file GossipDef.cpp.

+ Here is the call graph for this function:

◆ ~GossipMenu()

GossipMenu::~GossipMenu ( )

Definition at line 35 of file GossipDef.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddGossipMenuItemData()

void GossipMenu::AddGossipMenuItemData ( uint32  menuItemId,
uint32  gossipActionMenuId,
uint32  gossipActionPoi 
)

Definition at line 144 of file GossipDef.cpp.

+ Here is the caller graph for this function:

◆ AddMenuItem() [1/2]

uint32 GossipMenu::AddMenuItem ( int32  menuItemId,
GossipOptionIcon  icon,
std::string const &  message,
uint32  sender,
uint32  action,
std::string const &  boxMessage,
uint32  boxMoney,
bool  coded = false 
)

Definition at line 40 of file GossipDef.cpp.

+ Here is the caller graph for this function:

◆ AddMenuItem() [2/2]

void GossipMenu::AddMenuItem ( uint32  menuId,
uint32  menuItemId,
uint32  sender,
uint32  action 
)

Find items for given menu 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.

Definition at line 92 of file GossipDef.cpp.

+ Here is the call graph for this function:

◆ ClearMenu()

void GossipMenu::ClearMenu ( )

Definition at line 179 of file GossipDef.cpp.

+ Here is the caller graph for this function:

◆ Empty()

bool GossipMenu::Empty ( ) const
inline

Definition at line 184 of file GossipDef.h.

◆ GetItem()

GossipMenuItem const * GossipMenu::GetItem ( uint32  id) const
inline

Definition at line 189 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ GetItemData()

GossipMenuItemData const * GossipMenu::GetItemData ( uint32  indexId) const
inline

Definition at line 198 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ GetLocale()

LocaleConstant GossipMenu::GetLocale ( ) const
inline

Definition at line 175 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ GetMenuId()

uint32 GossipMenu::GetMenuId ( ) const
inline

Definition at line 171 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ GetMenuItemAction()

uint32 GossipMenu::GetMenuItemAction ( uint32  menuItemId) const

Definition at line 161 of file GossipDef.cpp.

◆ GetMenuItemCount()

uint32 GossipMenu::GetMenuItemCount ( ) const
inline

Definition at line 179 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ GetMenuItems()

GossipMenuItemContainer const & GossipMenu::GetMenuItems ( ) const
inline

Definition at line 213 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ GetMenuItemSender()

uint32 GossipMenu::GetMenuItemSender ( uint32  menuItemId) const

Definition at line 152 of file GossipDef.cpp.

◆ GetSenderGUID()

ObjectGuid GossipMenu::GetSenderGUID ( ) const
inline

Definition at line 173 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ IsMenuItemCoded()

bool GossipMenu::IsMenuItemCoded ( uint32  menuItemId) const

Definition at line 170 of file GossipDef.cpp.

◆ SetLocale()

void GossipMenu::SetLocale ( LocaleConstant  locale)
inline

Definition at line 174 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ SetMenuId()

void GossipMenu::SetMenuId ( uint32  menu_id)
inline

Definition at line 170 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ SetSenderGUID()

void GossipMenu::SetSenderGUID ( ObjectGuid  guid)
inline

Definition at line 172 of file GossipDef.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _locale

LocaleConstant GossipMenu::_locale
private

Definition at line 223 of file GossipDef.h.

◆ _menuId

uint32 GossipMenu::_menuId
private

Definition at line 221 of file GossipDef.h.

◆ _menuItemData

GossipMenuItemDataContainer GossipMenu::_menuItemData
private

Definition at line 220 of file GossipDef.h.

◆ _menuItems

GossipMenuItemContainer GossipMenu::_menuItems
private

Definition at line 219 of file GossipDef.h.

◆ _senderGUID

ObjectGuid GossipMenu::_senderGUID
private

Definition at line 222 of file GossipDef.h.


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