mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
Another huge compilation fix
please delete cache and re-run cmake
This commit is contained in:
@@ -96,7 +96,7 @@ void Channel::UpdateChannelInDB() const
|
||||
stmt->setUInt32(2, _channelDBId);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "Channel(%s) updated in database", _name.c_str());
|
||||
#endif
|
||||
}
|
||||
@@ -684,7 +684,7 @@ void Channel::List(Player const* player)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "SMSG_CHANNEL_LIST %s Channel: %s", player->GetSession()->GetPlayerInfo().c_str(), GetName().c_str());
|
||||
#endif
|
||||
WorldPacket data(SMSG_CHANNEL_LIST, 1+(GetName().size()+1)+1+4+playersStore.size()*(8+1));
|
||||
|
||||
@@ -64,7 +64,7 @@ inline bool CheckDelimiter(std::istringstream& iss, char delimiter, const char*
|
||||
char c = iss.peek();
|
||||
if (c != delimiter)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid %s link structure ('%c' expected, '%c' found)", iss.str().c_str(), context, delimiter, c);
|
||||
#endif
|
||||
return false;
|
||||
@@ -100,7 +100,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
|
||||
uint32 itemEntry = 0;
|
||||
if (!ReadUInt32(iss, itemEntry))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item entry", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -109,7 +109,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
|
||||
_item = sObjectMgr->GetItemTemplate(itemEntry);
|
||||
if (!_item)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid itemEntry %u in |item command", iss.str().c_str(), itemEntry);
|
||||
#endif
|
||||
return false;
|
||||
@@ -117,7 +117,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
|
||||
// Validate item's color
|
||||
if (_color != ItemQualityColors[_item->Quality])
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked item has color %u, but user claims %u", iss.str().c_str(), ItemQualityColors[_item->Quality], _color);
|
||||
#endif
|
||||
return false;
|
||||
@@ -133,7 +133,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
|
||||
int32 id = 0;
|
||||
if (!ReadInt32(iss, id))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item property (%u)", iss.str().c_str(), index);
|
||||
#endif
|
||||
return false;
|
||||
@@ -146,7 +146,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
|
||||
_property = sItemRandomPropertiesStore.LookupEntry(id);
|
||||
if (!_property)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid item property id %u in |item command", iss.str().c_str(), id);
|
||||
#endif
|
||||
return false;
|
||||
@@ -157,7 +157,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
|
||||
_suffix = sItemRandomSuffixStore.LookupEntry(-id);
|
||||
if (!_suffix)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid item suffix id %u in |item command", iss.str().c_str(), -id);
|
||||
#endif
|
||||
return false;
|
||||
@@ -202,7 +202,7 @@ bool ItemChatLink::ValidateName(char* buffer, const char* context)
|
||||
}
|
||||
}
|
||||
//if (!res)
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked item (id: %u) name wasn't found in any localization", context, _item->ItemId);
|
||||
#endif
|
||||
return res;
|
||||
@@ -216,7 +216,7 @@ bool QuestChatLink::Initialize(std::istringstream& iss)
|
||||
uint32 questId = 0;
|
||||
if (!ReadUInt32(iss, questId))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest entry", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -225,7 +225,7 @@ bool QuestChatLink::Initialize(std::istringstream& iss)
|
||||
_quest = sObjectMgr->GetQuestTemplate(questId);
|
||||
if (!_quest)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): quest template %u not found", iss.str().c_str(), questId);
|
||||
#endif
|
||||
return false;
|
||||
@@ -236,7 +236,7 @@ bool QuestChatLink::Initialize(std::istringstream& iss)
|
||||
// Read quest level
|
||||
if (!ReadInt32(iss, _questLevel))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest level", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -244,7 +244,7 @@ bool QuestChatLink::Initialize(std::istringstream& iss)
|
||||
// Validate quest level
|
||||
if (_questLevel >= STRONG_MAX_LEVEL)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): quest level %d is too big", iss.str().c_str(), _questLevel);
|
||||
#endif
|
||||
return false;
|
||||
@@ -259,7 +259,7 @@ bool QuestChatLink::ValidateName(char* buffer, const char* context)
|
||||
bool res = (_quest->GetTitle() == buffer);
|
||||
|
||||
//if (!res)
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked quest (id: %u) title wasn't found in any localization", context, _quest->GetQuestId());
|
||||
#endif
|
||||
return res;
|
||||
@@ -275,7 +275,7 @@ bool SpellChatLink::Initialize(std::istringstream& iss)
|
||||
uint32 spellId = 0;
|
||||
if (!ReadUInt32(iss, spellId))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading spell entry", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -284,7 +284,7 @@ bool SpellChatLink::Initialize(std::istringstream& iss)
|
||||
_spell = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!_spell)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |spell command", iss.str().c_str(), spellId);
|
||||
#endif
|
||||
return false;
|
||||
@@ -302,7 +302,7 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
|
||||
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(_spell->Id);
|
||||
if (bounds.first == bounds.second)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line not found for spell %u", context, _spell->Id);
|
||||
#endif
|
||||
return false;
|
||||
@@ -310,7 +310,7 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
|
||||
SkillLineAbilityEntry const* skillInfo = bounds.first->second;
|
||||
if (!skillInfo)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line ability not found for spell %u", context, _spell->Id);
|
||||
#endif
|
||||
return false;
|
||||
@@ -318,7 +318,7 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
|
||||
SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(skillInfo->skillId);
|
||||
if (!skillLine)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line not found for skill %u", context, skillInfo->skillId);
|
||||
#endif
|
||||
return false;
|
||||
@@ -347,7 +347,7 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
|
||||
}
|
||||
|
||||
//if (!res)
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked spell (id: %u) name wasn't found in any localization", context, _spell->Id);
|
||||
#endif
|
||||
return res;
|
||||
@@ -363,7 +363,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
|
||||
uint32 achievementId = 0;
|
||||
if (!ReadUInt32(iss, achievementId))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -372,7 +372,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
|
||||
_achievement = sAchievementStore.LookupEntry(achievementId);
|
||||
if (!_achievement)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid achivement id %u in |achievement command", iss.str().c_str(), achievementId);
|
||||
#endif
|
||||
return false;
|
||||
@@ -383,7 +383,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
|
||||
// Read HEX
|
||||
if (!ReadHex(iss, _guid, 0))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading char's guid", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -397,7 +397,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
|
||||
|
||||
if (!ReadUInt32(iss, _data[index]))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement property (%u)", iss.str().c_str(), index);
|
||||
#endif
|
||||
return false;
|
||||
@@ -419,7 +419,7 @@ bool AchievementChatLink::ValidateName(char* buffer, const char* context)
|
||||
}
|
||||
|
||||
//if (!res)
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID);
|
||||
#endif
|
||||
return res;
|
||||
@@ -435,7 +435,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
|
||||
uint32 spellId = 0;
|
||||
if (!ReadUInt32(iss, spellId))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -444,7 +444,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
|
||||
_spell = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!_spell)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), spellId);
|
||||
#endif
|
||||
return false;
|
||||
@@ -455,7 +455,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
|
||||
// Minimum talent level
|
||||
if (!ReadInt32(iss, _minSkillLevel))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading minimum talent level", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -466,7 +466,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
|
||||
// Maximum talent level
|
||||
if (!ReadInt32(iss, _maxSkillLevel))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading maximum talent level", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -477,7 +477,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
|
||||
// Something hexadecimal
|
||||
if (!ReadHex(iss, _guid, 0))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement's owner guid", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -496,7 +496,7 @@ bool TalentChatLink::Initialize(std::istringstream& iss)
|
||||
// Read talent entry
|
||||
if (!ReadUInt32(iss, _talentId))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent entry", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -505,7 +505,7 @@ bool TalentChatLink::Initialize(std::istringstream& iss)
|
||||
TalentEntry const* talentInfo = sTalentStore.LookupEntry(_talentId);
|
||||
if (!talentInfo)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid talent id %u in |talent command", iss.str().c_str(), _talentId);
|
||||
#endif
|
||||
return false;
|
||||
@@ -514,7 +514,7 @@ bool TalentChatLink::Initialize(std::istringstream& iss)
|
||||
_spell = sSpellMgr->GetSpellInfo(talentInfo->RankID[0]);
|
||||
if (!_spell)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), talentInfo->RankID[0]);
|
||||
#endif
|
||||
return false;
|
||||
@@ -525,7 +525,7 @@ bool TalentChatLink::Initialize(std::istringstream& iss)
|
||||
// Rank
|
||||
if (!ReadInt32(iss, _rankId))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent rank", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -543,7 +543,7 @@ bool EnchantmentChatLink::Initialize(std::istringstream& iss)
|
||||
uint32 spellId = 0;
|
||||
if (!ReadUInt32(iss, spellId))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading enchantment spell entry", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -552,7 +552,7 @@ bool EnchantmentChatLink::Initialize(std::istringstream& iss)
|
||||
_spell = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!_spell)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |enchant command", iss.str().c_str(), spellId);
|
||||
#endif
|
||||
return false;
|
||||
@@ -569,7 +569,7 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
|
||||
// Slot
|
||||
if (!ReadUInt32(iss, _slotId))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading slot id", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -581,7 +581,7 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
|
||||
uint32 glyphId = 0;
|
||||
if (!ReadUInt32(iss, glyphId))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading glyph entry", iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -590,7 +590,7 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
|
||||
_glyph = sGlyphPropertiesStore.LookupEntry(glyphId);
|
||||
if (!_glyph)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid glyph id %u in |glyph command", iss.str().c_str(), glyphId);
|
||||
#endif
|
||||
return false;
|
||||
@@ -599,7 +599,7 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
|
||||
_spell = sSpellMgr->GetSpellInfo(_glyph->SpellId);
|
||||
if (!_spell)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellId);
|
||||
#endif
|
||||
return false;
|
||||
@@ -639,7 +639,7 @@ bool LinkExtractor::IsValidMessage()
|
||||
}
|
||||
else if (_iss.get() != PIPE_CHAR)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence aborted unexpectedly", _iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -648,7 +648,7 @@ bool LinkExtractor::IsValidMessage()
|
||||
// pipe has always to be followed by at least one char
|
||||
if (_iss.peek() == '\0')
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): pipe followed by '\\0'", _iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -673,7 +673,7 @@ bool LinkExtractor::IsValidMessage()
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid sequence, expected '%c' but got '%c'", _iss.str().c_str(), *validSequenceIterator, commandChar);
|
||||
#endif
|
||||
return false;
|
||||
@@ -682,7 +682,7 @@ bool LinkExtractor::IsValidMessage()
|
||||
else if (validSequence != validSequenceIterator)
|
||||
{
|
||||
// no escaped pipes in sequences
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got escaped pipe in sequence", _iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -693,7 +693,7 @@ bool LinkExtractor::IsValidMessage()
|
||||
case 'c':
|
||||
if (!ReadHex(_iss, color, 8))
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading color", _iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -704,7 +704,7 @@ bool LinkExtractor::IsValidMessage()
|
||||
_iss.getline(buffer, 256, DELIMITER);
|
||||
if (_iss.eof())
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -728,7 +728,7 @@ bool LinkExtractor::IsValidMessage()
|
||||
link = new GlyphChatLink();
|
||||
else
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): user sent unsupported link type '%s'", _iss.str().c_str(), buffer);
|
||||
#endif
|
||||
return false;
|
||||
@@ -745,7 +745,7 @@ bool LinkExtractor::IsValidMessage()
|
||||
// links start with '['
|
||||
if (_iss.get() != '[')
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): link caption doesn't start with '['", _iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -753,7 +753,7 @@ bool LinkExtractor::IsValidMessage()
|
||||
_iss.getline(buffer, 256, ']');
|
||||
if (_iss.eof())
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
@@ -773,7 +773,7 @@ bool LinkExtractor::IsValidMessage()
|
||||
// no further payload
|
||||
break;
|
||||
default:
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid command |%c", _iss.str().c_str(), commandChar);
|
||||
#endif
|
||||
return false;
|
||||
@@ -783,7 +783,7 @@ bool LinkExtractor::IsValidMessage()
|
||||
// check if every opened sequence was also closed properly
|
||||
if (validSequence != validSequenceIterator)
|
||||
{
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): EOF in active sequence", _iss.str().c_str());
|
||||
#endif
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user