31 : Type(chatType),
Language(language), Sender(sender), Receiver(receiver),
Text(
std::move(message)), AchievementId(achievementId), Locale(locale), PlayerConditionID(playerConditionId)
36 if (sender && sender->
IsUnit() && emoteId)
49 SoundPacket = std::make_unique<WorldPackets::Misc::PlaySound>(
57 SoundPacket = std::make_unique<WorldPackets::Misc::PlayObjectSound>(
134 static size_t const BufferSize = 2048;
135 char strBuffer[BufferSize];
136 vsnprintf(strBuffer, BufferSize, text, ap);
147 return new ChatPacketSender(
_msgType,
_language,
_talker,
_target,
sCreatureTextMgr->GetLocalizedChatString(
_source->
GetEntry(),
_gender,
_textGroup,
_textId, locale), 0, locale,
DB2Storage< BroadcastTextEntry > sBroadcastTextStore("BroadcastText.db2", &BroadcastTextLoadInfo::Instance)
ObjectGuid const & GetGUID() const
static char const * GetBroadcastTextValue(BroadcastTextEntry const *broadcastText, LocaleConstant locale=DEFAULT_LOCALE, uint8 gender=GENDER_MALE, bool forceGender=false)
static ObjectGuid const Empty
void SendDirectMessage(WorldPacket const *data) const
bool MeetPlayerCondition(uint32 conditionId) const
WorldSession * GetSession() const
bool CanUnderstandLanguage(Language language) const
WorldObject const * _source
WorldObject const * _target
ChatPacketSender * operator()(LocaleConstant locale) const
WorldPackets::Chat::Chat UntranslatedPacket
WorldObject const * Sender
WorldObject const * Receiver
Optional< WorldPackets::Chat::Chat > TranslatedPacket
std::unique_ptr< WorldPackets::ServerPacket > SoundPacket
Optional< WorldPackets::Chat::Emote > EmotePacket
void operator()(Player const *player) const
ChatPacketSender(ChatMsg chatType, ::Language language, WorldObject const *sender, WorldObject const *receiver, std::string message, uint32 achievementId=0, LocaleConstant locale=LOCALE_enUS, uint32 broadcastTextId=0, uint16 emoteId=0, uint32 soundKitId=0, SoundKitPlayType soundKitPlayType=SoundKitPlayType::Normal, uint32 playerConditionId=0)
WorldObject const * _source
ChatPacketSender * operator()(LocaleConstant locale) const
WorldObject const * _talker
uint32 _playerConditionId
WorldObject const * _target
SoundKitPlayType _soundKitPlayType
ChatPacketSender * operator()(LocaleConstant locale) const
WorldObject const * _target
WorldObject const * _source
WorldObject const * _target
WorldObject const * _source
ChatPacketSender * operator()(LocaleConstant locale) const
void Initialize(ChatMsg chatType, Language language, WorldObject const *sender, WorldObject const *receiver, std::string_view message, uint32 achievementId=0, std::string_view channelName="", LocaleConstant locale=DEFAULT_LOCALE, std::string_view addonPrefix="")
WorldPacket const * Write() override
WorldPacket const * GetRawPacket() const
LocaleConstant GetSessionDbcLocale() const
std::array< uint32, 2 > SoundKitID
constexpr void GetPosition(float &x, float &y) const