114 bool foundAura =
false;
115 for (Unit::AuraEffectList::const_iterator i = langAuras.begin(); i != langAuras.end(); ++i)
117 if ((*i)->GetMiscValue() ==
int32(lang))
143 std::string msg =
"";
157 SF_LOG_ERROR(
"network",
"Player %s (GUID: %u) sent a chatmessage with an invalid language/message type combination",
201 if (!ModLangAuras.empty())
202 lang =
Language(ModLangAuras.front()->GetMiscValue());
225 uint32 receiverLength = 0;
226 std::string to, channel, msg;
227 bool ignoreChecks =
false;
244 receiverLength = recvData.
ReadBits(9);
250 receiverLength = recvData.
ReadBits(8);
280 SF_LOG_ERROR(
"network",
"Player %s (GUID: %u) sent a chatmessage with an invalid link: %s",
GetPlayer()->GetName().c_str(),
304 sender->
Say(msg, lang);
308 sender->
Yell(msg, lang);
321 bool const receiverFiltersWhispers = receiver && !receiver->
isAcceptWhispers() &&
322 !senderBypassesWhisperFilter &&
324 if (!receiver || !receiver->
GetSession() || receiverFiltersWhispers)
467 chn->Say(
_player->GetGUID(), msg.c_str(), lang);
550 SF_LOG_ERROR(
"network",
"HandleAddonMessagechatOpcode: Unknown addon chat opcode (%u)", recvData.
GetOpcode());
557 std::string targetName;
594 if (prefix.empty() || prefix.length() > 16)
658 SF_LOG_ERROR(
"misc",
"HandleAddonMessagechatOpcode: unknown addon message type %u",
uint8(type));
751 uint32 text_emote, emoteNum;
753 recvData >> text_emote;
754 recvData >> emoteNum;
855 data <<
uint8(restriction);
@ ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE
DBCStorage< EmotesTextEntry > sEmotesTextStore(EmotesTextEntryfmt)
TypeMapContainer< AllWorldObjectTypes > WorldTypeMapContainer
CoordPair< TOTAL_NUMBER_OF_CELLS_PER_MAP > CellCoord
@ LANG_NOT_LEARNED_LANGUAGE
@ LANG_WAIT_BEFORE_SPEAKING
@ LANG_PLAYER_AFK_DEFAULT
@ LANG_PLAYER_DND_DEFAULT
#define SF_LOG_DEBUG(filterType__,...)
#define SF_LOG_ERROR(filterType__,...)
LanguageDesc const * GetLanguageDescByID(Language lang)
bool normalizePlayerName(std::string &name)
@ CHAT_MSG_INSTANCE_LEADER
@ SPELL_AURA_COMPREHEND_LANGUAGE
@ SPELL_AURA_MOD_LANGUAGE
void stripLineInvisibleChars(std::string &str)
std::string secsToTimeString(uint64 timeInSecs, bool shortText, bool hoursOnly)
bool WriteBit(uint32 bit)
uint32 ReadBits(size_t bits)
void ReadGuidBytes(ObjectGuid &guid, Offsets... offsets)
std::string ReadString(size_t length)
void ReadGuidMask(ObjectGuid &guid, Offsets... offsets)
void WriteBits(T value, size_t bits)
void WriteByteSeq(uint8 b)
static ChannelMgr * forTeam(uint32 team)
static size_t BuildChatPacket(WorldPacket &data, ChatMsg chatType, Language language, ObjectGuid senderGUID, ObjectGuid receiverGUID, std::string const &message, uint8 chatTag, std::string const &senderName="", std::string const &receiverName="", uint32 achievementId=0, bool gmMessage=false, std::string const &channelName="", std::string const &addonPrefix="")
void BroadcastPacket(WorldPacket *packet, bool ignorePlayersInBGRaid, int group=-1, uint64 ignore=0)
void BroadcastAddonMessagePacket(WorldPacket *packet, const std::string &prefix, bool ignorePlayersInBGRaid, int group=-1, uint64 ignore=0)
uint8 GetMemberGroup(uint64 guid) const
bool IsAssistant(uint64 guid) const
bool IsLeader(uint64 guid) const
static Unit * GetUnit(WorldObject const &, uint64 guid)
static Player * FindPlayer(uint64)
void Yell(std::string const &text, const Language language)
Handles yelled message in regular chat based on declared language and in config pre-defined Range.
void Whisper(std::string const &text, const Language language, uint64 receiver)
Handles whispers from Addons and players based on sender, receiver's guid and language.
void TextEmote(std::string const &text)
Outputs an universal text which is supposed to be an action.
uint32 GetGuildId() const
void WhisperAddon(std::string const &text, std::string const &prefix, Player *receiver)
WorldSession * GetSession() const
bool HasSkill(uint32 skill) const
void Say(std::string const &text, const Language language)
Handles said message in regular chat based on declared language and in config pre-defined Range.
bool IsGameMaster() const
void UpdateAchievementCriteria(AchievementCriteriaTypes type, uint64 miscValue1=0, uint64 miscValue2=0, uint64 miscValue3=0, Unit *unit=NULL)
bool isAcceptWhispers() const
void AddWhisperWhiteList(uint64 guid)
bool IsInWhisperWhiteList(uint64 guid)
Group * GetOriginalGroup()
void operator()(WorldPacket &data, LocaleConstant loc_idx)
EmoteChatBuilder(Player const &player, uint32 text_emote, uint32 emote_num, Unit const *target)
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
void HandleEmoteCommand(uint32 anim_id)
std::list< AuraEffect * > AuraEffectList
std::string const & GetName() const
void Initialize(Opcodes opcode, size_t newres=200)
Opcodes GetOpcode() const
void KickPlayer()
Kick a player out of the World.
const char * GetSkyFireString(int32 entry) const
void HandleChatIgnoredOpcode(WorldPacket &recvPacket)
void SendPlayerNotFoundNotice(std::string const &name)
void SendNotification(const char *format,...) ATTR_PRINTF(2
AccountTypes GetSecurity() const
void HandleTextEmoteOpcode(WorldPacket &recvPacket)
Player * GetPlayer() const
void SendPlayerAmbiguousNotice(std::string const &name)
void HandleEmoteOpcode(WorldPacket &recvPacket)
bool HasPermission(uint32 permissionId)
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
void SendWrongFactionNotice()
void SendChatRestrictedNotice(ChatRestrictionType restriction)
void HandleAddonMessagechatOpcode(WorldPacket &recvPacket)
void HandleMessagechatOpcode(WorldPacket &recvPacket)
void HandleChannelDeclineInvite(WorldPacket &recvPacket)
@ CMSG_MESSAGECHAT_ADDON_GUILD
@ SMSG_CHAT_WRONG_FACTION
@ SMSG_CHAT_PLAYER_NOT_FOUND
@ CMSG_MESSAGECHAT_CHANNEL
@ CMSG_MESSAGECHAT_ADDON_WHISPER
@ CMSG_MESSAGECHAT_RAID_WARNING
@ CMSG_MESSAGECHAT_ADDON_BATTLEGROUND
@ CMSG_MESSAGECHAT_ADDON_PARTY
@ CMSG_MESSAGECHAT_ADDON_OFFICER
@ CMSG_MESSAGECHAT_WHISPER
@ CMSG_MESSAGECHAT_ADDON_RAID
@ CMSG_MESSAGECHAT_OFFICER
@ SMSG_CHAT_PLAYER_AMBIGUOUS
@ CONFIG_CHAT_CHANNEL_LEVEL_REQ
@ CONFIG_CHAT_SAY_LEVEL_REQ
@ CONFIG_CHAT_WHISPER_LEVEL_REQ
@ CONFIG_CHAT_STRICT_LINK_CHECKING_KICK
@ CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY
@ CONFIG_CHAT_GM_WHISPER_FILTER_BYPASS
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD
@ CONFIG_CHAT_FAKE_MESSAGE_PREVENTING
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP
@ CONFIG_LISTEN_RANGE_TEXTEMOTE
CellCoord ComputeCellCoord(float x, float y)
@ RBAC_PERM_TWO_SIDE_INTERACTION_CHAT
@ RBAC_PERM_CAN_FILTER_WHISPERS
@ RBAC_PERM_SKIP_CHECK_CHAT_CHANNEL_REQ
void Visit(CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, WorldObject const &, float) const