AzerothCore 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
436 {
437 MaleText.resize(DEFAULT_LOCALE + 1);
438 FemaleText.resize(DEFAULT_LOCALE + 1);
439 }
#define DEFAULT_LOCALE
Definition: Common.h:79
std::vector< std::string > FemaleText
Definition: ObjectMgr.h:444
std::vector< std::string > MaleText
Definition: ObjectMgr.h:443

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
457 {
458 if (gender == GENDER_FEMALE && (forceGender || !FemaleText[DEFAULT_LOCALE].empty()))
459 {
460 if (FemaleText.size() > std::size_t(locale) && !FemaleText[locale].empty())
461 return FemaleText[locale];
463 }
464 // else if (gender == GENDER_MALE)
465 {
466 if (MaleText.size() > std::size_t(locale) && !MaleText[locale].empty())
467 return MaleText[locale];
468 return MaleText[DEFAULT_LOCALE];
469 }
470 }
@ GENDER_FEMALE
Definition: SharedDefines.h:62

References DEFAULT_LOCALE, FemaleText, GENDER_FEMALE, and MaleText.

Referenced by CreatureTextMgr::GetLocalizedChatString(), WorldSession::HandleNpcTextQueryOpcode(), spell_the_flag_of_ownership::HandleScript(), 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}