![]() |
TrinityCore
|
#include <GossipDef.h>
Public Member Functions | |||||||||
| GossipMenu () | |||||||||
| GossipMenu (GossipMenu const &)=delete | |||||||||
| GossipMenu (GossipMenu &&)=delete | |||||||||
| GossipMenu & | operator= (GossipMenu const &)=delete | ||||||||
| GossipMenu & | operator= (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.
| |||||||||
| 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 |
Definition at line 167 of file GossipDef.h.
| GossipMenu::GossipMenu | ( | ) |
Definition at line 35 of file GossipDef.cpp.
References _locale, _menuId, and DEFAULT_LOCALE.
|
delete |
|
delete |
|
default |
| 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.
References GossipMenuItems::ActionMenuID, GossipMenuItems::ActionPoiID, AddMenuItem(), GossipMenuItems::BoxBroadcastTextID, GossipMenuItems::BoxCoded, GossipMenuItems::BoxMoney, GossipMenuItems::BoxText, GossipMenuItems::Flags, DB2Manager::GetBroadcastTextValue(), GetLocale(), ObjectMgr::GetLocaleString(), GossipMenuItems::GossipNpcOptionID, GossipMenuItems::GossipOptionID, GossipMenuItems::Language, LOCALE_enUS, GossipMenuItems::MenuID, GossipMenuItems::OptionBroadcastTextID, GossipMenuItems::OptionNpc, GossipMenuItems::OptionText, GossipMenuItems::OrderIndex, GossipMenuItems::OverrideIconID, sBroadcastTextStore, sObjectMgr, and GossipMenuItems::SpellID.
| 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.
References _menuId, _menuItems, GossipMenuItem::Action, GossipMenuItem::ActionMenuID, GossipMenuItem::ActionPoiID, ASSERT, GossipMenuItem::BoxCoded, GossipMenuItem::BoxMoney, GossipMenuItem::BoxText, Trinity::IteratorPair< iterator, end_iterator >::end(), flags, GossipMenuItem::Flags, GOSSIP_MAX_MENU_ITEMS, GossipMenuItem::GossipNpcOptionID, GossipMenuItem::GossipOptionID, GossipMenuItem::Language, GossipMenuItem::OptionNpc, GossipMenuItem::OptionText, GossipMenuItem::OrderIndex, GossipMenuItem::OverrideIconID, GossipMenuItem::Sender, sObjectMgr, and GossipMenuItem::SpellID.
Referenced by AddMenuItem(), and AddMenuItem().
Find items for given menu id.
Find the one with the given menu item id.
Definition at line 106 of file GossipDef.cpp.
References AddMenuItem(), Trinity::IteratorPair< iterator, end_iterator >::end(), and sObjectMgr.
| void GossipMenu::ClearMenu | ( | ) |
Definition at line 201 of file GossipDef.cpp.
References _menuItems.
Referenced by PlayerMenu::ClearMenus().
|
inline |
Definition at line 193 of file GossipDef.h.
| GossipMenuItem const * GossipMenu::GetItem | ( | int32 | gossipOptionId | ) | const |
Definition at line 159 of file GossipDef.cpp.
References _menuItems, and GossipMenuItem::GossipOptionID.
Referenced by Player::OnGossipSelect().
| GossipMenuItem const * GossipMenu::GetItemByIndex | ( | uint32 | orderIndex | ) | const |
Definition at line 168 of file GossipDef.cpp.
References _menuItems, and GossipMenuItem::OrderIndex.
Referenced by GetMenuItemAction(), GetMenuItemSender(), and IsMenuItemCoded().
|
inline |
Definition at line 186 of file GossipDef.h.
Referenced by AddMenuItem().
|
inline |
Definition at line 184 of file GossipDef.h.
Referenced by Player::OnGossipSelect(), and PlayerMenu::SendGossipMenu().
Definition at line 185 of file GossipDef.cpp.
References GetItemByIndex().
|
inline |
Definition at line 188 of file GossipDef.h.
|
inline |
Definition at line 207 of file GossipDef.h.
Referenced by PlayerMenu::SendGossipMenu().
Definition at line 177 of file GossipDef.cpp.
References GetItemByIndex().
| bool GossipMenu::IsMenuItemCoded | ( | uint32 | orderIndex | ) | const |
Definition at line 193 of file GossipDef.cpp.
References GetItemByIndex().
|
delete |
|
delete |
|
inline |
Definition at line 185 of file GossipDef.h.
Referenced by PlayerMenu::PlayerMenu().
|
inline |
Definition at line 183 of file GossipDef.h.
|
private |
Definition at line 215 of file GossipDef.h.
Referenced by GossipMenu().
|
private |
Definition at line 214 of file GossipDef.h.
Referenced by AddMenuItem(), and GossipMenu().
|
private |
Definition at line 213 of file GossipDef.h.
Referenced by AddMenuItem(), ClearMenu(), GetItem(), and GetItemByIndex().