AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
BroadcastText Struct Reference

#include "ObjectMgr.h"

Public Member Functions

 BroadcastText ()
 
std::string const & GetText (LocaleConstant locale=DEFAULT_LOCALE, uint8 gender=GENDER_MALE, bool forceGender=false) const
 

Public Attributes

uint32 Id {0}
 
uint32 LanguageID {0}
 
std::vector< std::string > MaleText
 
std::vector< std::string > FemaleText
 
uint32 EmoteId1 {0}
 
uint32 EmoteId2 {0}
 
uint32 EmoteId3 {0}
 
uint32 EmoteDelay1 {0}
 
uint32 EmoteDelay2 {0}
 
uint32 EmoteDelay3 {0}
 
uint32 SoundEntriesId {0}
 
uint32 EmotesID {0}
 
uint32 Flags {0}
 

Detailed Description

Constructor & Destructor Documentation

◆ BroadcastText()

BroadcastText::BroadcastText ( )
inline
437 {
438 MaleText.resize(DEFAULT_LOCALE + 1);
439 FemaleText.resize(DEFAULT_LOCALE + 1);
440 }
#define DEFAULT_LOCALE
Definition: Common.h:88
std::vector< std::string > FemaleText
Definition: ObjectMgr.h:445
std::vector< std::string > MaleText
Definition: ObjectMgr.h:444

References DEFAULT_LOCALE, FemaleText, and MaleText.

Member Function Documentation

◆ GetText()

std::string const & BroadcastText::GetText ( LocaleConstant  locale = DEFAULT_LOCALE,
uint8  gender = GENDER_MALE,
bool  forceGender = false 
) const
inline
458 {
459 if (gender == GENDER_FEMALE && (forceGender || !FemaleText[DEFAULT_LOCALE].empty()))
460 {
461 if (FemaleText.size() > size_t(locale) && !FemaleText[locale].empty())
462 return FemaleText[locale];
464 }
465 // else if (gender == GENDER_MALE)
466 {
467 if (MaleText.size() > size_t(locale) && !MaleText[locale].empty())
468 return MaleText[locale];
469 return MaleText[DEFAULT_LOCALE];
470 }
471 }
@ GENDER_FEMALE
Definition: SharedDefines.h:61

References DEFAULT_LOCALE, FemaleText, GENDER_FEMALE, and MaleText.

Referenced by CreatureTextMgr::GetLocalizedChatString(), WorldSession::HandleNpcTextQueryOpcode(), Acore::BroadcastTextBuilder::operator()(), Unit::Whisper(), and Player::Whisper().

Member Data Documentation

◆ EmoteDelay1

uint32 BroadcastText::EmoteDelay1 {0}

◆ EmoteDelay2

uint32 BroadcastText::EmoteDelay2 {0}

◆ EmoteDelay3

uint32 BroadcastText::EmoteDelay3 {0}

◆ EmoteId1

uint32 BroadcastText::EmoteId1 {0}

◆ EmoteId2

uint32 BroadcastText::EmoteId2 {0}

◆ EmoteId3

uint32 BroadcastText::EmoteId3 {0}

◆ EmotesID

uint32 BroadcastText::EmotesID {0}

◆ FemaleText

std::vector<std::string> BroadcastText::FemaleText

◆ Flags

uint32 BroadcastText::Flags {0}

◆ Id

uint32 BroadcastText::Id {0}

◆ LanguageID

uint32 BroadcastText::LanguageID {0}

◆ MaleText

std::vector<std::string> BroadcastText::MaleText

◆ SoundEntriesId

uint32 BroadcastText::SoundEntriesId {0}