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

#include <GossipDef.h>

Classes

struct  TaggedId
 

Public Member Functions

bool IsInteractingWith (ObjectGuid target, PlayerInteractionType type) const
 
TrainerData * GetTrainer ()
 
PlayerChoiceData * GetPlayerChoice ()
 
uint16 AddPlayerChoiceResponse (uint32 responseId)
 
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.
 InteractionData ()
 
 InteractionData (InteractionData const &other)
 
 InteractionData (InteractionData &&other) noexcept
 
InteractionData & operator= (InteractionData const &other)
 
InteractionData & operator= (InteractionData &&other) noexcept
 
 ~InteractionData ()
 
void StartInteraction (ObjectGuid target, PlayerInteractionType type)
 
void Reset ()
 

Public Attributes

ObjectGuid SourceGuid
 
PlayerInteractionType Type = { }
 
bool IsLaunchedByQuest = false
 

Private Types

using TrainerData = TaggedId< TrainerTag >
 

Private Attributes

uint16 _playerChoiceResponseIdentifierGenerator = 0
 
std::variant< std::monostate, TrainerData, PlayerChoiceData > _data
 

Detailed Description

Definition at line 266 of file GossipDef.h.

Member Typedef Documentation

◆ TrainerData

using InteractionData::TrainerData = TaggedId<TrainerTag>
private

Definition at line 278 of file GossipDef.h.

Constructor & Destructor Documentation

◆ InteractionData() [1/3]

InteractionData::InteractionData ( )
default

◆ InteractionData() [2/3]

InteractionData::InteractionData ( InteractionData const &  other)
default

◆ InteractionData() [3/3]

InteractionData::InteractionData ( InteractionData &&  other)
defaultnoexcept

◆ ~InteractionData()

InteractionData::~InteractionData ( )
default

Member Function Documentation

◆ AddPlayerChoiceResponse()

uint16 InteractionData::AddPlayerChoiceResponse ( uint32  responseId)
inline

Definition at line 299 of file GossipDef.h.

◆ GetPlayerChoice()

PlayerChoiceData * InteractionData::GetPlayerChoice ( )
inline

Definition at line 297 of file GossipDef.h.

◆ GetTrainer()

TrainerData * InteractionData::GetTrainer ( )
inline

Definition at line 295 of file GossipDef.h.

◆ IsInteractingWith()

bool InteractionData::IsInteractingWith ( ObjectGuid  target,
PlayerInteractionType  type 
) const
inline

Definition at line 289 of file GossipDef.h.

◆ operator=() [1/2]

InteractionData & InteractionData::operator= ( InteractionData &&  other)
defaultnoexcept

◆ operator=() [2/2]

InteractionData & InteractionData::operator= ( InteractionData const &  other)
default

◆ Reset()

void InteractionData::Reset ( )

Definition at line 392 of file GossipDef.cpp.

References _data, ObjectGuid::Clear(), IsLaunchedByQuest, None, SourceGuid, and Type.

Referenced by PlayerMenu::SendCloseGossip().

◆ StartInteraction()

Member Data Documentation

◆ _data

std::variant<std::monostate, TrainerData, PlayerChoiceData> InteractionData::_data
private

Definition at line 309 of file GossipDef.h.

Referenced by Reset(), and StartInteraction().

◆ _playerChoiceResponseIdentifierGenerator

uint16 InteractionData::_playerChoiceResponseIdentifierGenerator = 0
private

Definition at line 308 of file GossipDef.h.

◆ IsLaunchedByQuest

bool InteractionData::IsLaunchedByQuest = false

Definition at line 305 of file GossipDef.h.

Referenced by Reset(), and StartInteraction().

◆ SourceGuid

ObjectGuid InteractionData::SourceGuid

Definition at line 292 of file GossipDef.h.

Referenced by Reset(), and StartInteraction().

◆ Type

PlayerInteractionType InteractionData::Type = { }

Definition at line 293 of file GossipDef.h.

Referenced by Reset(), and StartInteraction().


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