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

#include <GossipDef.h>

Public Member Functions

 GossipMenu ()
 
 GossipMenu (GossipMenu const &)=delete
 
 GossipMenu (GossipMenu &&)=delete
 
GossipMenuoperator= (GossipMenu const &)=delete
 
GossipMenuoperator= (GossipMenu &&)=delete
 
 ~GossipMenu ()
 
uint32 AddMenuItem (int32 gossipOptionId, int32 orderIndex, GossipOptionNpc optionNpc, std::string optionText, uint32 language, GossipOptionFlags flags, Optional< int32 > gossipNpcOptionId, uint32 actionMenuId, uint32 actionPoiId, bool boxCoded, uint64 boxMoney, std::string boxText, Optional< int32 > spellId, Optional< int32 > overrideIconId, uint32 sender, uint32 action)
 
void SetMenuId (uint32 menu_id)
 
uint32 GetMenuId () const
 
void SetLocale (LocaleConstant locale)
 
LocaleConstant GetLocale () const
 
uint32 GetMenuItemCount () const
 
bool Empty () 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 AddMenuItem (GossipMenuItems const &menuItem, uint32 sender, uint32 action)
 
GossipMenuItem const * GetItem (int32 gossipOptionId) const
 
GossipMenuItem const * GetItemByIndex (uint32 orderIndex) const
 
uint32 GetMenuItemSender (uint32 orderIndex) const
 
uint32 GetMenuItemAction (uint32 orderIndex) const
 
bool IsMenuItemCoded (uint32 orderIndex) const
 
void ClearMenu ()
 

Private Attributes

GossipMenuItemContainer _menuItems
 
uint32 _menuId
 
LocaleConstant _locale
 

Detailed Description

Definition at line 167 of file GossipDef.h.

Constructor & Destructor Documentation

◆ GossipMenu() [1/3]

GossipMenu::GossipMenu ( )

Definition at line 35 of file GossipDef.cpp.

◆ GossipMenu() [2/3]

GossipMenu::GossipMenu ( GossipMenu const &  )
delete

◆ GossipMenu() [3/3]

GossipMenu::GossipMenu ( GossipMenu &&  )
delete

◆ ~GossipMenu()

GossipMenu::~GossipMenu ( )
default

Member Function Documentation

◆ AddMenuItem() [1/3]

void GossipMenu::AddMenuItem ( GossipMenuItems const &  menuItem,
uint32  sender,
uint32  action 
)

Store texts for localization.

OptionText

Find localizations from database.

BoxText

Find localizations from database.

Definition at line 121 of file GossipDef.cpp.

+ Here is the call graph for this function:

◆ AddMenuItem() [2/3]

uint32 GossipMenu::AddMenuItem ( int32  gossipOptionId,
int32  orderIndex,
GossipOptionNpc  optionNpc,
std::string  optionText,
uint32  language,
GossipOptionFlags  flags,
Optional< int32 gossipNpcOptionId,
uint32  actionMenuId,
uint32  actionPoiId,
bool  boxCoded,
uint64  boxMoney,
std::string  boxText,
Optional< int32 spellId,
Optional< int32 overrideIconId,
uint32  sender,
uint32  action 
)

Definition at line 43 of file GossipDef.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddMenuItem() [3/3]

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

Find items for given menu id.

Find the one with the given menu item id.

Definition at line 106 of file GossipDef.cpp.

+ Here is the call graph for this function:

◆ ClearMenu()

void GossipMenu::ClearMenu ( )

Definition at line 201 of file GossipDef.cpp.

+ Here is the caller graph for this function:

◆ Empty()

bool GossipMenu::Empty ( ) const
inline

Definition at line 193 of file GossipDef.h.

◆ GetItem()

GossipMenuItem const * GossipMenu::GetItem ( int32  gossipOptionId) const

Definition at line 159 of file GossipDef.cpp.

+ Here is the caller graph for this function:

◆ GetItemByIndex()

GossipMenuItem const * GossipMenu::GetItemByIndex ( uint32  orderIndex) const

Definition at line 168 of file GossipDef.cpp.

+ Here is the caller graph for this function:

◆ GetLocale()

LocaleConstant GossipMenu::GetLocale ( ) const
inline

Definition at line 186 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ GetMenuId()

uint32 GossipMenu::GetMenuId ( ) const
inline

Definition at line 184 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ GetMenuItemAction()

uint32 GossipMenu::GetMenuItemAction ( uint32  orderIndex) const

Definition at line 185 of file GossipDef.cpp.

+ Here is the call graph for this function:

◆ GetMenuItemCount()

uint32 GossipMenu::GetMenuItemCount ( ) const
inline

Definition at line 188 of file GossipDef.h.

◆ GetMenuItems()

GossipMenuItemContainer const & GossipMenu::GetMenuItems ( ) const
inline

Definition at line 207 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ GetMenuItemSender()

uint32 GossipMenu::GetMenuItemSender ( uint32  orderIndex) const

Definition at line 177 of file GossipDef.cpp.

+ Here is the call graph for this function:

◆ IsMenuItemCoded()

bool GossipMenu::IsMenuItemCoded ( uint32  orderIndex) const

Definition at line 193 of file GossipDef.cpp.

+ Here is the call graph for this function:

◆ operator=() [1/2]

GossipMenu & GossipMenu::operator= ( GossipMenu &&  )
delete

◆ operator=() [2/2]

GossipMenu & GossipMenu::operator= ( GossipMenu const &  )
delete

◆ SetLocale()

void GossipMenu::SetLocale ( LocaleConstant  locale)
inline

Definition at line 185 of file GossipDef.h.

+ Here is the caller graph for this function:

◆ SetMenuId()

void GossipMenu::SetMenuId ( uint32  menu_id)
inline

Definition at line 183 of file GossipDef.h.

Member Data Documentation

◆ _locale

LocaleConstant GossipMenu::_locale
private

Definition at line 215 of file GossipDef.h.

◆ _menuId

uint32 GossipMenu::_menuId
private

Definition at line 214 of file GossipDef.h.

◆ _menuItems

GossipMenuItemContainer GossipMenu::_menuItems
private

Definition at line 213 of file GossipDef.h.


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