18#ifndef TRINITYCORE_GOSSIP_H
19#define TRINITYCORE_GOSSIP_H
34#define GOSSIP_MAX_MENU_ITEMS 32
35#define DEFAULT_GOSSIP_MESSAGE 0xffffff
190 return _menuItems.size();
195 return _menuItems.empty();
203 bool IsMenuItemCoded(
uint32 orderIndex)
const;
231 bool Empty()
const {
return _questMenuItems.empty(); }
232 bool HasItem(
uint32 questId)
const;
295 TrainerData*
GetTrainer() {
return std::holds_alternative<TrainerData>(_data) ? &std::get<TrainerData>(_data) :
nullptr; }
301 std::get<PlayerChoiceData>(_data).AddResponse(responseId, ++_playerChoiceResponseIdentifierGenerator);
302 return _playerChoiceResponseIdentifierGenerator;
305 bool IsLaunchedByQuest =
false;
308 uint16 _playerChoiceResponseIdentifierGenerator = 0;
309 std::variant<std::monostate, TrainerData, PlayerChoiceData>
_data;
326 bool Empty()
const {
return _gossipMenu.Empty() && _questMenu.Empty(); }
334 void SendCloseGossip();
335 void SendPointOfInterest(
uint32 poiId)
const;
342 void SendQuestGiverQuestListMessage(
Object* questgiver);
344 void SendQuestQueryResponse(
Quest const* quest)
const;
345 void SendQuestGiverQuestDetails(
Quest const* quest,
ObjectGuid npcGUID,
bool autoLaunched,
bool displayPopup);
347 void SendQuestGiverOfferReward(
Quest const* quest,
ObjectGuid npcGUID,
bool autoLaunched);
348 void SendQuestGiverRequestItems(
Quest const* quest,
ObjectGuid npcGUID,
bool canComplete,
bool autoLaunched);
std::vector< GossipMenuItem > GossipMenuItemContainer
std::vector< QuestMenuItem > QuestMenuItemList
@ HousingOpenCharterConfirmation
@ ProfessionsCraftingOrder
@ HousingGetNeighborhoodCharter
@ PetSpecializationMaster
@ ProfessionsCustomerOrder
@ BlackMarketAuctionHouse
@ RuneforgeLegendaryUpgrade
@ RuneforgeLegendaryCrafting
@ HousingCreateGuildNeighborhood
std::optional< T > Optional
Optional helper class to wrap optional values within.
PlayerChoiceData * GetPlayerChoice()
InteractionData(InteractionData const &other)
uint16 AddPlayerChoiceResponse(uint32 responseId)
InteractionData & operator=(InteractionData &&other) noexcept
InteractionData(InteractionData &&other) noexcept
InteractionData & operator=(InteractionData const &other)
bool IsInteractingWith(ObjectGuid target, PlayerInteractionType type) const
TrainerData * GetTrainer()
std::variant< std::monostate, TrainerData, PlayerChoiceData > _data
void AddResponse(uint32 id, uint16 clientIdentifier)
PlayerChoiceData()=default
std::vector< Response > _responses
void SetChoiceId(uint32 choiceId)
Optional< uint32 > FindIdByClientIdentifier(uint16 clientIdentifier) const
void SetExpireTime(Optional< SystemTimePoint > expireTime)
uint32 GetChoiceId() const
Optional< SystemTimePoint > GetExpireTime() const
Optional< SystemTimePoint > _expireTime
PlayerChoiceData(uint32 choiceId)
Player session in the World.