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

#include <GossipDef.h>

Classes

struct  TaggedId
 

Public Member Functions

bool IsInteractingWith (ObjectGuid target, PlayerInteractionType type) const
 
TrainerDataGetTrainer ()
 
PlayerChoiceDataGetPlayerChoice ()
 
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
 
InteractionDataoperator= (InteractionData const &other)
 
InteractionDataoperator= (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 391 of file GossipDef.cpp.

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

◆ StartInteraction()

void InteractionData::StartInteraction ( ObjectGuid  target,
PlayerInteractionType  type 
)

Definition at line 373 of file GossipDef.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _data

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

Definition at line 309 of file GossipDef.h.

◆ _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.

◆ SourceGuid

ObjectGuid InteractionData::SourceGuid

Definition at line 292 of file GossipDef.h.

◆ Type

PlayerInteractionType InteractionData::Type = { }

Definition at line 293 of file GossipDef.h.


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