TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PlayerMenu Class Reference

#include <GossipDef.h>

Public Member Functions

GossipMenuGetGossipMenu ()
 
QuestMenuGetQuestMenu ()
 
bool Empty () const
 
uint32 GetGossipOptionSender (uint32 selection) const
 
uint32 GetGossipOptionAction (uint32 selection) const
 
bool IsGossipOptionCoded (uint32 selection) const
 

Private Attributes

GossipMenu _gossipMenu
 
QuestMenu _questMenu
 
WorldSession_session
 

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.
 PlayerMenu (WorldSession *session)
 
 ~PlayerMenu ()
 
void ClearMenus ()
 
void SendGossipMenu (uint32 titleTextId, ObjectGuid objectGUID)
 
void SendCloseGossip ()
 
void SendPointOfInterest (uint32 poiId) const
 
void SendQuestGiverStatus (uint32 questStatus, ObjectGuid npcGUID) const
 
void SendQuestGiverQuestList (ObjectGuid npcGUID)
 
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
 
static void AddQuestLevelToTitle (std::string &title, int32 level)
 

Constructor & Destructor Documentation

PlayerMenu::PlayerMenu ( WorldSession session)
explicit
174  : _session(session)
175 {
176  if (_session)
178 }
LocaleConstant GetSessionDbLocaleIndex() const
Definition: WorldSession.h:1060
void SetLocale(LocaleConstant locale)
Definition: GossipDef.h:174
WorldSession * _session
Definition: GossipDef.h:274
GossipMenu _gossipMenu
Definition: GossipDef.h:272

+ Here is the call graph for this function:

PlayerMenu::~PlayerMenu ( )
181 {
182  ClearMenus();
183 }
void ClearMenus()
Definition: GossipDef.cpp:185

+ Here is the call graph for this function:

Member Function Documentation

void PlayerMenu::AddQuestLevelToTitle ( std::string &  title,
int32  level 
)
static
745 {
746  // Adds the quest level to the front of the quest title
747  // example: [13] Westfall Stew
748 
749  std::stringstream questTitlePretty;
750  questTitlePretty << "[" << level << "] " << title;
751  title = questTitlePretty.str();
752 }

+ Here is the caller graph for this function:

void PlayerMenu::ClearMenus ( )
186 {
189 }
QuestMenu _questMenu
Definition: GossipDef.h:273
void ClearMenu()
Definition: GossipDef.cpp:168
GossipMenu _gossipMenu
Definition: GossipDef.h:272
void ClearMenu()
Definition: GossipDef.cpp:327

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool PlayerMenu::Empty ( ) const
inline
245 { return _gossipMenu.Empty() && _questMenu.Empty(); }
bool Empty() const
Definition: GossipDef.h:228
QuestMenu _questMenu
Definition: GossipDef.h:273
bool Empty() const
Definition: GossipDef.h:180
GossipMenu _gossipMenu
Definition: GossipDef.h:272
GossipMenu& PlayerMenu::GetGossipMenu ( )
inline
242 { return _gossipMenu; }
GossipMenu _gossipMenu
Definition: GossipDef.h:272
uint32 PlayerMenu::GetGossipOptionAction ( uint32  selection) const
inline
249 { return _gossipMenu.GetMenuItemAction(selection); }
uint32 GetMenuItemAction(uint32 menuItemId) const
Definition: GossipDef.cpp:150
GossipMenu _gossipMenu
Definition: GossipDef.h:272
uint32 PlayerMenu::GetGossipOptionSender ( uint32  selection) const
inline
248 { return _gossipMenu.GetMenuItemSender(selection); }
uint32 GetMenuItemSender(uint32 menuItemId) const
Definition: GossipDef.cpp:141
GossipMenu _gossipMenu
Definition: GossipDef.h:272
QuestMenu& PlayerMenu::GetQuestMenu ( )
inline
243 { return _questMenu; }
QuestMenu _questMenu
Definition: GossipDef.h:273
bool PlayerMenu::IsGossipOptionCoded ( uint32  selection) const
inline
250 { return _gossipMenu.IsMenuItemCoded(selection); }
bool IsMenuItemCoded(uint32 menuItemId) const
Definition: GossipDef.cpp:159
GossipMenu _gossipMenu
Definition: GossipDef.h:272
void PlayerMenu::SendCloseGossip ( )
255 {
257 
259  _session->SendPacket(packet.Write());
260 }
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
WorldPacket const * Write() override
Definition: NPCPackets.h:101
Definition: NPCPackets.h:96
void SetSenderGUID(ObjectGuid guid)
Definition: GossipDef.h:172
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
Definition: WorldSession.cpp:211
WorldSession * _session
Definition: GossipDef.h:274
GossipMenu _gossipMenu
Definition: GossipDef.h:272

+ Here is the call graph for this function:

void PlayerMenu::SendGossipMenu ( uint32  titleTextId,
ObjectGuid  objectGUID 
)
192 {
193  _gossipMenu.SetSenderGUID(objectGUID);
194 
196  packet.GossipGUID = objectGUID;
197  packet.GossipID = _gossipMenu.GetMenuId();
198  packet.TextID = titleTextId;
199 
200  packet.GossipOptions.resize(_gossipMenu.GetMenuItems().size());
201  uint32 count = 0;
202  for (GossipMenuItemContainer::const_iterator itr = _gossipMenu.GetMenuItems().begin(); itr != _gossipMenu.GetMenuItems().end(); ++itr)
203  {
205  GossipMenuItem const& item = itr->second;
206  opt.ClientOption = itr->first;
207  opt.OptionNPC = item.MenuItemIcon;
208  opt.OptionFlags = item.IsCoded; // makes pop up box password
209  opt.OptionCost = item.BoxMoney; // money required to open menu, 2.0.3
210  opt.Text = item.Message; // text for gossip item
211  opt.Confirm = item.BoxMessage; // accept text (related to money) pop up box, 2.0.3
212  ++count;
213  }
214 
215  // Store this instead of checking the Singleton every loop iteration
216  bool questLevelInTitle = sWorld->getBoolConfig(CONFIG_UI_QUESTLEVELS_IN_DIALOGS);
217 
218  packet.GossipText.resize(_questMenu.GetMenuItemCount());
219  count = 0;
220  for (uint8 i = 0; i < _questMenu.GetMenuItemCount(); ++i)
221  {
222  QuestMenuItem const& item = _questMenu.GetItem(i);
223  uint32 questID = item.QuestId;
224  if (Quest const* quest = sObjectMgr->GetQuestTemplate(questID))
225  {
226  WorldPackets::NPC::ClientGossipText& text = packet.GossipText[count];
227  text.QuestID = questID;
228  text.QuestType = item.QuestIcon;
229  text.QuestLevel = quest->GetQuestLevel();
230  text.QuestFlags[0] = quest->GetFlags();
231  text.QuestFlags[1] = quest->GetFlagsEx();
232  text.Repeatable = quest->IsRepeatable();
233 
234  std::string title = quest->GetLogTitle();
235  LocaleConstant localeConstant = _session->GetSessionDbLocaleIndex();
236  if (localeConstant >= LOCALE_enUS)
237  if (QuestTemplateLocale const* localeData = sObjectMgr->GetQuestLocale(questID))
238  ObjectMgr::GetLocaleString(localeData->LogTitle, localeConstant, title);
239 
240  if (questLevelInTitle)
241  AddQuestLevelToTitle(title, quest->GetQuestLevel());
242 
243  text.QuestTitle = title;
244  ++count;
245  }
246  }
247 
248  // Shrink to the real size
249  packet.GossipText.resize(count);
250 
251  _session->SendPacket(packet.Write());
252 }
std::string BoxMessage
Definition: GossipDef.h:137
Definition: GossipDef.h:153
uint8 OptionFlags
Definition: NPCPackets.h:52
Definition: QuestDef.h:279
bool IsCoded
Definition: GossipDef.h:133
LocaleConstant GetSessionDbLocaleIndex() const
Definition: WorldSession.h:1060
static void AddQuestLevelToTitle(std::string &title, int32 level)
Definition: GossipDef.cpp:744
Definition: QuestDef.h:239
void SetSenderGUID(ObjectGuid guid)
Definition: GossipDef.h:172
bool Repeatable
Definition: NPCPackets.h:63
#define sWorld
Definition: World.h:887
uint8 MenuItemIcon
Definition: GossipDef.h:132
int32 OptionCost
Definition: NPCPackets.h:53
#define sObjectMgr
Definition: ObjectMgr.h:1567
int32 ClientOption
Definition: NPCPackets.h:50
std::vector< ClientGossipOptions > GossipOptions
Definition: NPCPackets.h:75
Definition: NPCPackets.h:58
LocaleConstant
Definition: Common.h:115
Definition: NPCPackets.h:48
QuestMenu _questMenu
Definition: GossipDef.h:273
std::vector< ClientGossipText > GossipText
Definition: NPCPackets.h:78
ObjectGuid GossipGUID
Definition: NPCPackets.h:77
GossipMenuItemContainer const & GetMenuItems() const
Definition: GossipDef.h:206
Definition: GossipDef.h:130
uint32_t uint32
Definition: Define.h:150
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
Definition: WorldSession.cpp:211
int32 TextID
Definition: NPCPackets.h:79
int32 GossipID
Definition: NPCPackets.h:80
uint8 QuestIcon
Definition: GossipDef.h:156
Definition: Common.h:117
int32 QuestFlags[2]
Definition: NPCPackets.h:65
uint8 OptionNPC
Definition: NPCPackets.h:51
std::string Text
Definition: NPCPackets.h:54
WorldSession * _session
Definition: GossipDef.h:274
uint8_t uint8
Definition: Define.h:152
GossipMenu _gossipMenu
Definition: GossipDef.h:272
static void GetLocaleString(StringVector const &data, LocaleConstant localeConstant, std::string &value)
Definition: ObjectMgr.h:1345
WorldPacket const * Write() override
Definition: NPCPackets.cpp:25
int32 QuestType
Definition: NPCPackets.h:61
std::string Confirm
Definition: NPCPackets.h:55
uint32 QuestId
Definition: GossipDef.h:155
std::string Message
Definition: GossipDef.h:134
std::string QuestTitle
Definition: NPCPackets.h:64
uint32 GetMenuId() const
Definition: GossipDef.h:171
QuestMenuItem const & GetItem(uint16 index) const
Definition: GossipDef.h:230
int32 QuestID
Definition: NPCPackets.h:60
Definition: World.h:169
int32 QuestLevel
Definition: NPCPackets.h:62
Definition: NPCPackets.h:68
uint8 GetMenuItemCount() const
Definition: GossipDef.h:227
uint32 BoxMoney
Definition: GossipDef.h:138

+ Here is the call graph for this function:

void PlayerMenu::SendPointOfInterest ( uint32  poiId) const
263 {
264  PointOfInterest const* pointOfInterest = sObjectMgr->GetPointOfInterest(id);
265  if (!pointOfInterest)
266  {
267  TC_LOG_ERROR("sql.sql", "Request to send non-existing PointOfInterest (Id: %u), ignored.", id);
268  return;
269  }
270 
271  std::string name = pointOfInterest->Name;
272 
273  LocaleConstant localeConstant = _session->GetSessionDbLocaleIndex();
274  if (localeConstant >= LOCALE_enUS)
275  if (PointOfInterestLocale const* localeData = sObjectMgr->GetPointOfInterestLocale(id))
276  ObjectMgr::GetLocaleString(localeData->Name, localeConstant, name);
277 
279 
280  packet.Flags = pointOfInterest->Flags;
281  packet.Pos = pointOfInterest->Pos;
282  packet.Icon = pointOfInterest->Icon;
283  packet.Importance = pointOfInterest->Importance;
284  packet.Name = name;
285 
286  _session->SendPacket(packet.Write());
287 }
WorldPacket const * Write() override
Definition: NPCPackets.cpp:154
uint32 Flags
Definition: ObjectMgr.h:505
LocaleConstant GetSessionDbLocaleIndex() const
Definition: WorldSession.h:1060
G3D::Vector2 Pos
Definition: NPCPackets.h:194
std::string Name
Definition: NPCPackets.h:197
Definition: Creature.h:272
uint32 Flags
Definition: NPCPackets.h:193
#define sObjectMgr
Definition: ObjectMgr.h:1567
LocaleConstant
Definition: Common.h:115
uint32 Importance
Definition: ObjectMgr.h:506
std::string Name
Definition: ObjectMgr.h:507
Definition: ObjectMgr.h:500
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
Definition: WorldSession.cpp:211
Definition: Common.h:117
WorldSession * _session
Definition: GossipDef.h:274
static void GetLocaleString(StringVector const &data, LocaleConstant localeConstant, std::string &value)
Definition: ObjectMgr.h:1345
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
int32 Icon
Definition: NPCPackets.h:195
uint32 Icon
Definition: ObjectMgr.h:504
int32 Importance
Definition: NPCPackets.h:196
Definition: NPCPackets.h:186
G3D::Vector2 Pos
Definition: ObjectMgr.h:503

+ Here is the call graph for this function:

void PlayerMenu::SendQuestGiverOfferReward ( Quest const quest,
ObjectGuid  npcGUID,
bool  enableNext 
) const
606 {
607  std::string questTitle = quest->GetLogTitle();
608  std::string questOfferRewardText = quest->GetOfferRewardText();
609  std::string portraitGiverText = quest->GetPortraitGiverText();
610  std::string portraitGiverName = quest->GetPortraitGiverName();
611  std::string portraitTurnInText = quest->GetPortraitTurnInText();
612  std::string portraitTurnInName = quest->GetPortraitTurnInName();
613 
615  if (locale >= LOCALE_enUS)
616  {
617  if (QuestTemplateLocale const* questTemplateLocale = sObjectMgr->GetQuestLocale(quest->GetQuestId()))
618  {
619  ObjectMgr::GetLocaleString(questTemplateLocale->LogTitle, locale, questTitle);
620  ObjectMgr::GetLocaleString(questTemplateLocale->OfferRewardText, locale, questOfferRewardText);
621  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitGiverText, locale, portraitGiverText);
622  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitGiverName, locale, portraitGiverName);
623  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitTurnInText, locale, portraitTurnInText);
624  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitTurnInName, locale, portraitTurnInName);
625  }
626  }
627 
628  if (sWorld->getBoolConfig(CONFIG_UI_QUESTLEVELS_IN_DIALOGS))
629  AddQuestLevelToTitle(questTitle, quest->GetQuestLevel());
630 
633 
634  quest->BuildQuestRewards(offer.Rewards, _session->GetPlayer());
635  offer.QuestGiverGUID = npcGUID;
636 
637  // Is there a better way? what about game objects?
638  if (Creature const* creature = ObjectAccessor::GetCreature(*_session->GetPlayer(), npcGUID))
639  offer.QuestGiverCreatureID = creature->GetCreatureTemplate()->Entry;
640 
641  offer.QuestID = quest->GetQuestId();
642  offer.AutoLaunched = enableNext;
643  offer.SuggestedPartyMembers = quest->GetSuggestedPlayers();
644 
645  for (uint32 i = 0; i < QUEST_EMOTE_COUNT && quest->OfferRewardEmote[i]; ++i)
646  offer.Emotes.push_back(WorldPackets::Quest::QuestDescEmote(quest->OfferRewardEmote[i], quest->OfferRewardEmoteDelay[i]));
647 
648  offer.QuestFlags[0] = quest->GetFlags();
649  offer.QuestFlags[1] = quest->GetFlagsEx();
650 
651  packet.QuestTitle = questTitle;
652  packet.RewardText = questOfferRewardText;
653  packet.PortraitTurnIn = quest->GetQuestTurnInPortrait();
654  packet.PortraitGiver = quest->GetQuestGiverPortrait();
655  packet.PortraitGiverText = portraitGiverText;
656  packet.PortraitGiverName = portraitGiverName;
657  packet.PortraitTurnInText = portraitTurnInText;
658  packet.PortraitTurnInName = portraitTurnInName;
659  packet.QuestPackageID = quest->GetQuestPackageID();
660 
661  _session->SendPacket(packet.Write());
662  TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPC=%s, questid=%u", npcGUID.ToString().c_str(), quest->GetQuestId());
663 }
Definition: QuestPackets.h:244
std::vector< QuestDescEmote > Emotes
Definition: QuestPackets.h:252
std::string PortraitGiverName
Definition: QuestPackets.h:268
LocaleConstant GetSessionDbLocaleIndex() const
Definition: WorldSession.h:1060
static void AddQuestLevelToTitle(std::string &title, int32 level)
Definition: GossipDef.cpp:744
QuestGiverOfferReward QuestData
Definition: QuestPackets.h:271
#define QUEST_EMOTE_COUNT
Definition: QuestDef.h:50
std::string QuestTitle
Definition: QuestPackets.h:265
Definition: QuestDef.h:239
int32 SuggestedPartyMembers
Definition: QuestPackets.h:250
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
std::string PortraitTurnInText
Definition: QuestPackets.h:269
Definition: Creature.h:467
Player * GetPlayer() const
Definition: WorldSession.h:927
#define sWorld
Definition: World.h:887
#define sObjectMgr
Definition: ObjectMgr.h:1567
Definition: QuestPackets.h:237
int32 QuestFlags[2]
Definition: QuestPackets.h:253
int32 QuestGiverCreatureID
Definition: QuestPackets.h:247
LocaleConstant
Definition: Common.h:115
int32 QuestID
Definition: QuestPackets.h:248
std::string PortraitGiverText
Definition: QuestPackets.h:267
bool AutoLaunched
Definition: QuestPackets.h:249
QuestRewards Rewards
Definition: QuestPackets.h:251
uint32_t uint32
Definition: Define.h:150
WorldPacket const * Write() override
Definition: QuestPackets.cpp:278
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
Definition: WorldSession.cpp:211
std::string RewardText
Definition: QuestPackets.h:266
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
int32 QuestPackageID
Definition: QuestPackets.h:272
int32 PortraitGiver
Definition: QuestPackets.h:264
Definition: Common.h:117
WorldSession * _session
Definition: GossipDef.h:274
static void GetLocaleString(StringVector const &data, LocaleConstant localeConstant, std::string &value)
Definition: ObjectMgr.h:1345
std::string PortraitTurnInName
Definition: QuestPackets.h:270
Definition: World.h:169
int32 PortraitTurnIn
Definition: QuestPackets.h:263
std::string ToString() const
Definition: ObjectGuid.cpp:99
ObjectGuid QuestGiverGUID
Definition: QuestPackets.h:246

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PlayerMenu::SendQuestGiverQuestDetails ( Quest const quest,
ObjectGuid  npcGUID,
bool  activateAccept 
) const
388 {
389  std::string questLogTitle = quest->GetLogTitle();
390  std::string questLogDescription = quest->GetLogDescription();
391  std::string questDescription = quest->GetQuestDescription();
392  std::string portraitGiverText = quest->GetPortraitGiverText();
393  std::string portraitGiverName = quest->GetPortraitGiverName();
394  std::string portraitTurnInText = quest->GetPortraitTurnInText();
395  std::string portraitTurnInName = quest->GetPortraitTurnInName();
396 
397  LocaleConstant localeConstant = _session->GetSessionDbLocaleIndex();
398  if (localeConstant >= LOCALE_enUS)
399  {
400  if (QuestTemplateLocale const* questTemplateLocale = sObjectMgr->GetQuestLocale(quest->GetQuestId()))
401  {
402  ObjectMgr::GetLocaleString(questTemplateLocale->LogTitle, localeConstant, questLogTitle);
403  ObjectMgr::GetLocaleString(questTemplateLocale->LogDescription, localeConstant, questLogDescription);
404  ObjectMgr::GetLocaleString(questTemplateLocale->QuestDescription, localeConstant, questDescription);
405  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitGiverText, localeConstant, portraitGiverText);
406  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitGiverName, localeConstant, portraitGiverName);
407  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitTurnInText, localeConstant, portraitTurnInText);
408  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitTurnInName, localeConstant, portraitTurnInName);
409  }
410  }
411 
412  if (sWorld->getBoolConfig(CONFIG_UI_QUESTLEVELS_IN_DIALOGS))
413  AddQuestLevelToTitle(questLogTitle, quest->GetQuestLevel());
414 
416  packet.QuestGiverGUID = npcGUID;
417  packet.InformUnit = _session->GetPlayer()->GetDivider();
418  packet.QuestID = quest->GetQuestId();
419  packet.QuestTitle = questLogTitle;
420  packet.LogDescription = questLogDescription;
421  packet.DescriptionText = questDescription;
422  packet.PortraitGiverText = portraitGiverText;
423  packet.PortraitGiverName = portraitGiverName;
424  packet.PortraitTurnInText = portraitTurnInText;
425  packet.PortraitTurnInName = portraitTurnInName;
426  packet.PortraitGiver = quest->GetQuestGiverPortrait();
427  packet.PortraitTurnIn = quest->GetQuestTurnInPortrait();
428  packet.DisplayPopup = activateAccept;
429  packet.QuestFlags[0] = quest->GetFlags();
430  packet.QuestFlags[1] = quest->GetFlagsEx();
431  packet.SuggestedPartyMembers = quest->GetSuggestedPlayers();
432 
433  if (quest->GetSrcSpell())
434  packet.LearnSpells.push_back(quest->GetSrcSpell());
435 
436  quest->BuildQuestRewards(packet.Rewards, _session->GetPlayer());
437 
438  packet.DescEmotes.resize(QUEST_EMOTE_COUNT);
439  for (uint32 i = 0; i < QUEST_EMOTE_COUNT; ++i)
440  {
441  packet.DescEmotes[i].Type = quest->DetailsEmote[i];
442  packet.DescEmotes[i].Delay = quest->DetailsEmoteDelay[i];
443  }
444 
445  QuestObjectives const& objs = quest->GetObjectives();
446  packet.Objectives.resize(objs.size());
447  for (uint32 i = 0; i < objs.size(); ++i)
448  {
449  packet.Objectives[i].ID = objs[i].ID;
450  packet.Objectives[i].ObjectID = objs[i].ObjectID;
451  packet.Objectives[i].Amount = objs[i].Amount;
452  packet.Objectives[i].Type = objs[i].Type;
453  }
454 
455  _session->SendPacket(packet.Write());
456 
457  TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPC=%s, questid=%u", npcGUID.ToString().c_str(), quest->GetQuestId());
458 }
std::string QuestTitle
Definition: QuestPackets.h:348
ObjectGuid QuestGiverGUID
Definition: QuestPackets.h:332
int32 SuggestedPartyMembers
Definition: QuestPackets.h:337
std::vector< int32 > LearnSpells
Definition: QuestPackets.h:341
LocaleConstant GetSessionDbLocaleIndex() const
Definition: WorldSession.h:1060
static void AddQuestLevelToTitle(std::string &title, int32 level)
Definition: GossipDef.cpp:744
#define QUEST_EMOTE_COUNT
Definition: QuestDef.h:50
Definition: QuestDef.h:239
WorldPacket const * Write() override
Definition: QuestPackets.cpp:334
std::vector< QuestObjectiveSimple > Objectives
Definition: QuestPackets.h:339
uint32 QuestFlags[2]
Definition: QuestPackets.h:336
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
std::string PortraitTurnInName
Definition: QuestPackets.h:347
Player * GetPlayer() const
Definition: WorldSession.h:927
#define sWorld
Definition: World.h:887
Definition: QuestPackets.h:325
#define sObjectMgr
Definition: ObjectMgr.h:1567
std::string PortraitTurnInText
Definition: QuestPackets.h:346
std::string LogDescription
Definition: QuestPackets.h:349
std::string PortraitGiverText
Definition: QuestPackets.h:344
ObjectGuid InformUnit
Definition: QuestPackets.h:333
LocaleConstant
Definition: Common.h:115
std::string PortraitGiverName
Definition: QuestPackets.h:345
int32 PortraitTurnIn
Definition: QuestPackets.h:342
std::vector< QuestObjective > QuestObjectives
Definition: QuestDef.h:274
bool DisplayPopup
Definition: QuestPackets.h:351
uint32_t uint32
Definition: Define.h:150
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
Definition: WorldSession.cpp:211
std::string DescriptionText
Definition: QuestPackets.h:350
int32 PortraitGiver
Definition: QuestPackets.h:343
Definition: Common.h:117
WorldSession * _session
Definition: GossipDef.h:274
static void GetLocaleString(StringVector const &data, LocaleConstant localeConstant, std::string &value)
Definition: ObjectMgr.h:1345
int32 QuestID
Definition: QuestPackets.h:334
std::vector< QuestDescEmote > DescEmotes
Definition: QuestPackets.h:340
QuestRewards Rewards
Definition: QuestPackets.h:338
Definition: World.h:169
std::string ToString() const
Definition: ObjectGuid.cpp:99

+ Here is the call graph for this function:

void PlayerMenu::SendQuestGiverQuestList ( ObjectGuid  npcGUID)
333 {
335  questList.QuestGiverGUID = guid;
336 
337  if (QuestGreeting const* questGreeting = sObjectMgr->GetQuestGreeting(guid))
338  {
339  questList.GreetEmoteDelay = questGreeting->greetEmoteDelay;
340  questList.GreetEmoteType = questGreeting->greetEmoteType;
341  questList.Greeting = questGreeting->greeting;
342  }
343  else
344  TC_LOG_ERROR("misc", "Guid: %s - No quest greeting found.", guid.ToString().c_str());
345 
346  // Store this instead of checking the Singleton every loop iteration
347  bool questLevelInTitle = sWorld->getBoolConfig(CONFIG_UI_QUESTLEVELS_IN_DIALOGS);
348 
349  for (uint32 i = 0; i < _questMenu.GetMenuItemCount(); ++i)
350  {
351  QuestMenuItem const& questMenuItem = _questMenu.GetItem(i);
352 
353  uint32 questID = questMenuItem.QuestId;
354 
355  if (Quest const* quest = sObjectMgr->GetQuestTemplate(questID))
356  {
357  std::string title = quest->GetLogTitle();
358 
359  LocaleConstant localeConstant = _session->GetSessionDbLocaleIndex();
360  if (localeConstant >= LOCALE_enUS)
361  if (QuestTemplateLocale const* questTemplateLocale = sObjectMgr->GetQuestLocale(questID))
362  ObjectMgr::GetLocaleString(questTemplateLocale->LogTitle, localeConstant, title);
363 
364  if (questLevelInTitle)
365  AddQuestLevelToTitle(title, quest->GetQuestLevel());
366 
367  bool repeatable = false; // NYI
368 
369  questList.GossipTexts.push_back(WorldPackets::Quest::GossipTextData(questID, questMenuItem.QuestIcon, quest->GetQuestLevel(), quest->GetFlags(), quest->GetFlagsEx(), repeatable, title));
370  }
371  }
372 
373  _session->SendPacket(questList.Write());
374  TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUEST_GIVER_QUEST_LIST_MESSAGE NPC=%s", guid.ToString().c_str());
375 }
uint32 GreetEmoteDelay
Definition: QuestPackets.h:459
Definition: GossipDef.h:153
Definition: QuestDef.h:279
WorldPacket const * Write() override
Definition: QuestPackets.cpp:455
LocaleConstant GetSessionDbLocaleIndex() const
Definition: WorldSession.h:1060
static void AddQuestLevelToTitle(std::string &title, int32 level)
Definition: GossipDef.cpp:744
Definition: QuestDef.h:239
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
#define sWorld
Definition: World.h:887
#define sObjectMgr
Definition: ObjectMgr.h:1567
Definition: QuestPackets.h:451
std::vector< GossipTextData > GossipTexts
Definition: QuestPackets.h:461
LocaleConstant
Definition: Common.h:115
QuestMenu _questMenu
Definition: GossipDef.h:273
ObjectGuid QuestGiverGUID
Definition: QuestPackets.h:458
uint32_t uint32
Definition: Define.h:150
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
Definition: WorldSession.cpp:211
uint8 QuestIcon
Definition: GossipDef.h:156
Definition: Common.h:117
WorldSession * _session
Definition: GossipDef.h:274
static void GetLocaleString(StringVector const &data, LocaleConstant localeConstant, std::string &value)
Definition: ObjectMgr.h:1345
uint32 GreetEmoteType
Definition: QuestPackets.h:460
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
uint32 QuestId
Definition: GossipDef.h:155
Definition: ObjectMgr.h:576
QuestMenuItem const & GetItem(uint16 index) const
Definition: GossipDef.h:230
std::string Greeting
Definition: QuestPackets.h:462
Definition: World.h:169
Definition: QuestPackets.h:438
uint8 GetMenuItemCount() const
Definition: GossipDef.h:227

+ Here is the call graph for this function:

void PlayerMenu::SendQuestGiverRequestItems ( Quest const quest,
ObjectGuid  npcGUID,
bool  canComplete,
bool  closeOnCancel 
) const
666 {
667  // We can always call to RequestItems, but this packet only goes out if there are actually
668  // items. Otherwise, we'll skip straight to the OfferReward
669 
670  std::string questTitle = quest->GetLogTitle();
671  std::string requestItemsText = quest->GetRequestItemsText();
672 
674  if (locale >= LOCALE_enUS)
675  {
676  if (QuestTemplateLocale const* questTemplateLocale = sObjectMgr->GetQuestLocale(quest->GetQuestId()))
677  {
678  ObjectMgr::GetLocaleString(questTemplateLocale->LogTitle, locale, questTitle);
679  ObjectMgr::GetLocaleString(questTemplateLocale->RequestItemsText, locale, requestItemsText);
680  }
681  }
682 
683  if (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_DELIVER) && canComplete)
684  {
685  SendQuestGiverOfferReward(quest, npcGUID, true);
686  return;
687  }
688 
689  if (sWorld->getBoolConfig(CONFIG_UI_QUESTLEVELS_IN_DIALOGS))
690  AddQuestLevelToTitle(questTitle, quest->GetQuestLevel());
691 
693  packet.QuestGiverGUID = npcGUID;
694 
695  // Is there a better way? what about game objects?
696  if (Creature const* creature = ObjectAccessor::GetCreature(*_session->GetPlayer(), npcGUID))
697  packet.QuestGiverCreatureID = creature->GetCreatureTemplate()->Entry;
698 
699  packet.QuestID = quest->GetQuestId();
700 
701  if (canComplete)
702  {
703  packet.CompEmoteDelay = quest->EmoteOnCompleteDelay;
704  packet.CompEmoteType = quest->EmoteOnComplete;
705  }
706  else
707  {
708  packet.CompEmoteDelay = quest->EmoteOnIncompleteDelay;
709  packet.CompEmoteType = quest->EmoteOnIncomplete;
710  }
711 
712  packet.QuestFlags[0] = quest->GetFlags();
713  packet.QuestFlags[1] = quest->GetFlagsEx();
714  packet.SuggestPartyMembers = quest->GetSuggestedPlayers();
715  packet.StatusFlags = 0xDF; // Unk, send common value
716 
717  packet.MoneyToGet = 0;
718  for (QuestObjective const& obj : quest->GetObjectives())
719  {
720  switch (obj.Type)
721  {
723  packet.Collect.push_back(WorldPackets::Quest::QuestObjectiveCollect(obj.ObjectID, obj.Amount));
724  break;
726  packet.Currency.push_back(WorldPackets::Quest::QuestCurrency(obj.ObjectID, obj.Amount));
727  break;
729  packet.MoneyToGet += obj.Amount;
730  break;
731  default:
732  break;
733  }
734  }
735 
736  packet.AutoLaunched = closeOnCancel;
737  packet.QuestTitle = questTitle;
738  packet.CompletionText = requestItemsText;
739 
740  _session->SendPacket(packet.Write());
741  TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPC=%s, questid=%u", npcGUID.ToString().c_str(), quest->GetQuestId());
742 }
Definition: QuestDef.h:211
Definition: QuestDef.h:221
std::string CompletionText
Definition: QuestPackets.h:390
WorldPacket const * Write() override
Definition: QuestPackets.cpp:390
LocaleConstant GetSessionDbLocaleIndex() const
Definition: WorldSession.h:1060
static void AddQuestLevelToTitle(std::string &title, int32 level)
Definition: GossipDef.cpp:744
int32 CompEmoteDelay
Definition: QuestPackets.h:380
Definition: QuestDef.h:261
int32 QuestGiverCreatureID
Definition: QuestPackets.h:378
Definition: QuestDef.h:239
bool AutoLaunched
Definition: QuestPackets.h:382
Definition: QuestDef.h:224
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
Definition: Creature.h:467
Player * GetPlayer() const
Definition: WorldSession.h:927
#define sWorld
Definition: World.h:887
std::vector< QuestCurrency > Currency
Definition: QuestPackets.h:386
#define sObjectMgr
Definition: ObjectMgr.h:1567
Definition: QuestDef.h:228
void SendQuestGiverOfferReward(Quest const *quest, ObjectGuid npcGUID, bool enableNext) const
Definition: GossipDef.cpp:605
LocaleConstant
Definition: Common.h:115
int32 SuggestPartyMembers
Definition: QuestPackets.h:383
int32 MoneyToGet
Definition: QuestPackets.h:384
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
Definition: WorldSession.cpp:211
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
int32 QuestID
Definition: QuestPackets.h:379
uint32 QuestFlags[2]
Definition: QuestPackets.h:388
int32 CompEmoteType
Definition: QuestPackets.h:381
Definition: QuestPackets.h:356
std::string QuestTitle
Definition: QuestPackets.h:389
Definition: Common.h:117
WorldSession * _session
Definition: GossipDef.h:274
static void GetLocaleString(StringVector const &data, LocaleConstant localeConstant, std::string &value)
Definition: ObjectMgr.h:1345
Definition: QuestPackets.h:370
int32 StatusFlags
Definition: QuestPackets.h:387
Definition: QuestPackets.h:363
Definition: World.h:169
std::string ToString() const
Definition: ObjectGuid.cpp:99
std::vector< QuestObjectiveCollect > Collect
Definition: QuestPackets.h:385
ObjectGuid QuestGiverGUID
Definition: QuestPackets.h:377

+ Here is the call graph for this function:

void PlayerMenu::SendQuestGiverStatus ( uint32  questStatus,
ObjectGuid  npcGUID 
) const
378 {
380  packet.QuestGiver.Guid = npcGUID;
381  packet.QuestGiver.Status = questStatus;
382 
383  _session->SendPacket(packet.Write());
384  TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC=%s, status=%u", npcGUID.ToString().c_str(), questStatus);
385 }
Definition: QuestPackets.h:59
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
QuestGiverInfo QuestGiver
Definition: QuestPackets.h:66
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
Definition: WorldSession.cpp:211
WorldSession * _session
Definition: GossipDef.h:274
uint32 Status
Definition: QuestPackets.h:56
WorldPacket const * Write() override
Definition: QuestPackets.cpp:25
std::string ToString() const
Definition: ObjectGuid.cpp:99
ObjectGuid Guid
Definition: QuestPackets.h:55

+ Here is the call graph for this function:

void PlayerMenu::SendQuestQueryResponse ( Quest const quest) const
461 {
462  LocaleConstant localeConstant = _session->GetSessionDbLocaleIndex();
463 
464  std::string questLogTitle = quest->GetLogTitle();
465  std::string questLogDescription = quest->GetLogDescription();
466  std::string questDescription = quest->GetQuestDescription();
467  std::string areaDescription = quest->GetAreaDescription();
468  std::string questCompletionLog = quest->GetQuestCompletionLog();
469  std::string portraitGiverText = quest->GetPortraitGiverText();
470  std::string portraitGiverName = quest->GetPortraitGiverName();
471  std::string portraitTurnInText = quest->GetPortraitTurnInText();
472  std::string portraitTurnInName = quest->GetPortraitTurnInName();
473 
474  if (localeConstant >= LOCALE_enUS)
475  {
476  if (QuestTemplateLocale const* questTemplateLocale = sObjectMgr->GetQuestLocale(quest->GetQuestId()))
477  {
478  ObjectMgr::GetLocaleString(questTemplateLocale->LogTitle, localeConstant, questLogTitle);
479  ObjectMgr::GetLocaleString(questTemplateLocale->LogDescription, localeConstant, questLogDescription);
480  ObjectMgr::GetLocaleString(questTemplateLocale->QuestDescription, localeConstant, questDescription);
481  ObjectMgr::GetLocaleString(questTemplateLocale->AreaDescription, localeConstant, areaDescription);
482  ObjectMgr::GetLocaleString(questTemplateLocale->QuestCompletionLog, localeConstant, questCompletionLog);
483  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitGiverText, localeConstant, portraitGiverText);
484  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitGiverName, localeConstant, portraitGiverName);
485  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitTurnInText, localeConstant, portraitTurnInText);
486  ObjectMgr::GetLocaleString(questTemplateLocale->PortraitTurnInName, localeConstant, portraitTurnInName);
487  }
488  }
489 
491 
492  packet.Allow = true;
493  packet.QuestID = quest->GetQuestId();
494 
495  packet.Info.QuestID = quest->GetQuestId();
496  packet.Info.QuestType = quest->GetQuestType();
497  packet.Info.QuestLevel = quest->GetQuestLevel();
498  packet.Info.QuestPackageID = quest->GetQuestPackageID();
499  packet.Info.QuestMinLevel = quest->GetMinLevel();
500  packet.Info.QuestSortID = quest->GetZoneOrSort();
501  packet.Info.QuestInfoID = quest->GetQuestInfoID();
502  packet.Info.SuggestedGroupNum = quest->GetSuggestedPlayers();
503  packet.Info.RewardNextQuest = quest->GetNextQuestInChain();
504  packet.Info.RewardXPDifficulty = quest->GetXPDifficulty();
505  packet.Info.RewardXPMultiplier = quest->GetXPMultiplier();
506 
507  if (!quest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS))
508  packet.Info.RewardMoney = quest->RewardMoney < 0 ? quest->RewardMoney : _session->GetPlayer()->GetQuestMoneyReward(quest);
509 
510  packet.Info.RewardMoneyDifficulty = quest->GetRewMoneyDifficulty();
511  packet.Info.RewardMoneyMultiplier = quest->GetMoneyMultiplier();
512  packet.Info.RewardBonusMoney = quest->GetRewMoneyMaxLevel();
513  packet.Info.RewardDisplaySpell = quest->GetRewDisplaySpell();
514  packet.Info.RewardSpell = quest->GetRewSpell();
515 
516  packet.Info.RewardHonor = quest->GetRewHonor();
517  packet.Info.RewardKillHonor = quest->GetRewKillHonor();
518 
519  packet.Info.StartItem = quest->GetSrcItemId();
520  packet.Info.Flags = quest->GetFlags();
521  packet.Info.FlagsEx = quest->GetFlagsEx();
522  packet.Info.RewardTitle = quest->GetRewTitle();
523  packet.Info.RewardTalents = quest->GetBonusTalents();
524  packet.Info.RewardArenaPoints = quest->GetRewArenaPoints();
525  packet.Info.RewardSkillLineID = quest->GetRewardSkillId();
526  packet.Info.RewardNumSkillUps = quest->GetRewardSkillPoints();
527  packet.Info.RewardFactionFlags = quest->GetRewardReputationMask();
528  packet.Info.PortraitGiver = quest->GetQuestGiverPortrait();
529  packet.Info.PortraitTurnIn = quest->GetQuestTurnInPortrait();
530 
531  for (uint8 i = 0; i < QUEST_ITEM_DROP_COUNT; ++i)
532  {
533  packet.Info.ItemDrop[i] = quest->ItemDrop[i];
534  packet.Info.ItemDropQuantity[i] = quest->ItemDropQuantity[i];
535  }
536 
537  if (!quest->HasFlag(QUEST_FLAGS_HIDDEN_REWARDS))
538  {
539  for (uint8 i = 0; i < QUEST_REWARD_ITEM_COUNT; ++i)
540  {
541  packet.Info.RewardItems[i] = quest->RewardItemId[i];
542  packet.Info.RewardAmount[i] = quest->RewardItemCount[i];
543  }
544  for (uint8 i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
545  {
546  packet.Info.UnfilteredChoiceItems[i].ItemID = quest->RewardChoiceItemId[i];
547  packet.Info.UnfilteredChoiceItems[i].Quantity = quest->RewardChoiceItemCount[i];
548  }
549  }
550 
551  for (uint8 i = 0; i < QUEST_REWARD_REPUTATIONS_COUNT; ++i)
552  {
553  packet.Info.RewardFactionID[i] = quest->RewardFactionId[i];
554  packet.Info.RewardFactionValue[i] = quest->RewardFactionValue[i];
555  packet.Info.RewardFactionOverride[i] = quest->RewardFactionOverride[i];
556  }
557 
558  packet.Info.POIContinent = quest->GetPOIContinent();
559  packet.Info.POIx = quest->GetPOIx();
560  packet.Info.POIy = quest->GetPOIy();
561  packet.Info.POIPriority = quest->GetPOIPriority();
562 
563  if (sWorld->getBoolConfig(CONFIG_UI_QUESTLEVELS_IN_DIALOGS))
564  AddQuestLevelToTitle(questLogTitle, quest->GetQuestLevel());
565 
566  packet.Info.LogTitle = questLogTitle;
567  packet.Info.LogDescription = questLogDescription;
568  packet.Info.QuestDescription = questDescription;
569  packet.Info.AreaDescription = areaDescription;
570  packet.Info.QuestCompletionLog = questCompletionLog;
571  packet.Info.AllowableRaces = quest->GetAllowableRaces();
572 
573  for (QuestObjective const& questObjective : quest->GetObjectives())
574  {
575  packet.Info.Objectives.push_back(questObjective);
576 
577  if (localeConstant >= LOCALE_enUS)
578  {
579  if (QuestObjectivesLocale const* questObjectivesLocale = sObjectMgr->GetQuestObjectivesLocale(questObjective.ID))
580  ObjectMgr::GetLocaleString(questObjectivesLocale->Description, localeConstant, packet.Info.Objectives.back().Description);
581  }
582  }
583 
584  for (uint32 i = 0; i < QUEST_REWARD_CURRENCY_COUNT; ++i)
585  {
586  packet.Info.RewardCurrencyID[i] = quest->RewardCurrencyId[i];
587  packet.Info.RewardCurrencyQty[i] = quest->RewardCurrencyCount[i];
588  }
589 
590  packet.Info.PortraitGiverText = portraitGiverText;
591  packet.Info.PortraitGiverName = portraitGiverName;
592  packet.Info.PortraitTurnInText = portraitTurnInText;
593  packet.Info.PortraitTurnInName = portraitTurnInName;
594 
595  packet.Info.AcceptedSoundKitID = quest->GetSoundAccept();
596  packet.Info.CompleteSoundKitID = quest->GetSoundTurnIn();
597  packet.Info.AreaGroupID = quest->GetAreaGroupID();
598  packet.Info.TimeAllowed = quest->GetLimitTime();
599 
600  _session->SendPacket(packet.Write());
601 
602  TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", quest->GetQuestId());
603 }
int32 TimeAllowed
Definition: QuestPackets.h:156
float POIy
Definition: QuestPackets.h:133
int32 QuestInfoID
Definition: QuestPackets.h:115
int32 QuestPackageID
Definition: QuestPackets.h:112
int32 RewardSpell
Definition: QuestPackets.h:125
int32 StartItem
Definition: QuestPackets.h:128
std::string QuestCompletionLog
Definition: QuestPackets.h:151
int32 SuggestedGroupNum
Definition: QuestPackets.h:116
int32 RewardHonor
Definition: QuestPackets.h:126
std::vector< QuestObjective > Objectives
Definition: QuestPackets.h:157
std::string QuestDescription
Definition: QuestPackets.h:138
int32 RewardNextQuest
Definition: QuestPackets.h:117
float POIx
Definition: QuestPackets.h:132
int32 QuestSortID
Definition: QuestPackets.h:114
float RewardMoneyMultiplier
Definition: QuestPackets.h:122
int32 RewardTalents
Definition: QuestPackets.h:141
LocaleConstant GetSessionDbLocaleIndex() const
Definition: WorldSession.h:1060
int32 AllowableRaces
Definition: QuestPackets.h:135
static void AddQuestLevelToTitle(std::string &title, int32 level)
Definition: GossipDef.cpp:744
Definition: QuestDef.h:261
int32 QuestLevel
Definition: QuestPackets.h:111
std::string PortraitGiverName
Definition: QuestPackets.h:148
std::string PortraitTurnInName
Definition: QuestPackets.h:150
Definition: QuestDef.h:239
int32 RewardAmount[QUEST_REWARD_ITEM_COUNT]
Definition: QuestPackets.h:159
int32 RewardFactionValue[QUEST_REWARD_REPUTATIONS_COUNT]
Definition: QuestPackets.h:164
int32 PortraitGiver
Definition: QuestPackets.h:145
float RewardKillHonor
Definition: QuestPackets.h:127
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
int32 RewardMoneyDifficulty
Definition: QuestPackets.h:121
Player * GetPlayer() const
Definition: WorldSession.h:927
#define sWorld
Definition: World.h:887
int32 Quantity
Definition: QuestPackets.h:103
#define sObjectMgr
Definition: ObjectMgr.h:1567
int32 RewardCurrencyID[QUEST_REWARD_CURRENCY_COUNT]
Definition: QuestPackets.h:166
int32 RewardCurrencyQty[QUEST_REWARD_CURRENCY_COUNT]
Definition: QuestPackets.h:167
int32 RewardFactionID[QUEST_REWARD_REPUTATIONS_COUNT]
Definition: QuestPackets.h:163
WorldPacket const * Write() override
Definition: QuestPackets.cpp:56
int32 AcceptedSoundKitID
Definition: QuestPackets.h:153
int32 ItemDropQuantity[QUEST_ITEM_DROP_COUNT]
Definition: QuestPackets.h:161
#define QUEST_REWARD_CURRENCY_COUNT
Definition: QuestDef.h:51
int32 PortraitTurnIn
Definition: QuestPackets.h:146
int32 RewardBonusMoney
Definition: QuestPackets.h:123
bool Allow
Definition: QuestPackets.h:177
int32 AreaGroupID
Definition: QuestPackets.h:155
LocaleConstant
Definition: Common.h:115
int32 RewardArenaPoints
Definition: QuestPackets.h:142
QuestInfoChoiceItem UnfilteredChoiceItems[QUEST_REWARD_CHOICES_COUNT]
Definition: QuestPackets.h:162
int32 RewardItems[QUEST_REWARD_ITEM_COUNT]
Definition: QuestPackets.h:158
uint32_t uint32
Definition: Define.h:150
int32 RewardTitle
Definition: QuestPackets.h:140
int32 POIPriority
Definition: QuestPackets.h:134
std::string PortraitTurnInText
Definition: QuestPackets.h:149
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
Definition: WorldSession.cpp:211
uint32 QuestID
Definition: QuestPackets.h:179
int32 ItemDrop[QUEST_ITEM_DROP_COUNT]
Definition: QuestPackets.h:160
int32 RewardMoney
Definition: QuestPackets.h:120
uint32 Flags
Definition: QuestPackets.h:129
QuestInfo Info
Definition: QuestPackets.h:178
std::string LogTitle
Definition: QuestPackets.h:136
int32 ItemID
Definition: QuestPackets.h:102
int32 RewardFactionFlags
Definition: QuestPackets.h:152
int32 POIContinent
Definition: QuestPackets.h:131
Definition: Common.h:117
int32 QuestID
Definition: QuestPackets.h:109
int32 CompleteSoundKitID
Definition: QuestPackets.h:154
#define QUEST_REWARD_CHOICES_COUNT
Definition: QuestDef.h:46
std::string PortraitGiverText
Definition: QuestPackets.h:147
int32 QuestMinLevel
Definition: QuestPackets.h:113
WorldSession * _session
Definition: GossipDef.h:274
int32 RewardDisplaySpell
Definition: QuestPackets.h:124
uint32 FlagsEx
Definition: QuestPackets.h:130
uint8_t uint8
Definition: Define.h:152
int32 RewardXPDifficulty
Definition: QuestPackets.h:118
float RewardXPMultiplier
Definition: QuestPackets.h:119
static void GetLocaleString(StringVector const &data, LocaleConstant localeConstant, std::string &value)
Definition: ObjectMgr.h:1345
std::string AreaDescription
Definition: QuestPackets.h:139
#define QUEST_REWARD_ITEM_COUNT
Definition: QuestDef.h:47
#define QUEST_ITEM_DROP_COUNT
Definition: QuestDef.h:45
int32 RewardSkillLineID
Definition: QuestPackets.h:143
Definition: QuestPackets.h:170
Definition: QuestDef.h:256
Definition: World.h:169
int32 RewardFactionOverride[QUEST_REWARD_REPUTATIONS_COUNT]
Definition: QuestPackets.h:165
int32 RewardNumSkillUps
Definition: QuestPackets.h:144
std::string LogDescription
Definition: QuestPackets.h:137
#define QUEST_REWARD_REPUTATIONS_COUNT
Definition: QuestDef.h:49
int32 QuestType
Definition: QuestPackets.h:110
Definition: QuestDef.h:151

Member Data Documentation

GossipMenu PlayerMenu::_gossipMenu
private
QuestMenu PlayerMenu::_questMenu
private
WorldSession* PlayerMenu::_session
private

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