aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Texts/CreatureTextMgr.cpp
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2012-10-30 10:30:05 +0100
committerSpp <spp@jorge.gr>2012-10-30 10:30:05 +0100
commitc97fc99e1683edc4a5b177119ba7a775cf7a19a1 (patch)
tree16007f950c058d3c6963e2924981d7bbe5a3c898 /src/server/game/Texts/CreatureTextMgr.cpp
parent59a828b49ed1e07bd5d705e3d3aa1a6d110be8fc (diff)
parentcd8e9dfb5213f6e299065cc1f87535a26c2f2936 (diff)
Merge branch 'master' into 4.3.4
Note: What a bad automatic merge!!! needed to fix a lot of stuff... grrr Conflicts: src/server/game/AI/EventAI/CreatureEventAI.cpp src/server/game/AI/EventAI/CreatureEventAIMgr.cpp src/server/game/Achievements/AchievementMgr.cpp src/server/game/Entities/Creature/GossipDef.cpp src/server/game/Entities/Pet/Pet.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Player/Player.h src/server/game/Globals/ObjectMgr.cpp src/server/game/Guilds/Guild.cpp src/server/game/Guilds/Guild.h src/server/game/Guilds/GuildMgr.h src/server/game/Handlers/AuctionHouseHandler.cpp src/server/game/Handlers/BattleGroundHandler.cpp src/server/game/Handlers/ChannelHandler.cpp src/server/game/Handlers/CharacterHandler.cpp src/server/game/Handlers/ChatHandler.cpp src/server/game/Handlers/GroupHandler.cpp src/server/game/Handlers/LFGHandler.cpp src/server/game/Handlers/MiscHandler.cpp src/server/game/Handlers/QuestHandler.cpp src/server/game/Handlers/TradeHandler.cpp src/server/game/Quests/QuestDef.h src/server/game/Server/Protocol/Opcodes.cpp src/server/game/Server/WorldSession.cpp src/server/game/Server/WorldSession.h src/server/game/Spells/Spell.cpp src/server/scripts/Commands/cs_debug.cpp src/server/scripts/Commands/cs_titles.cpp src/server/scripts/Kalimdor/boss_azuregos.cpp src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
Diffstat (limited to 'src/server/game/Texts/CreatureTextMgr.cpp')
-rwxr-xr-xsrc/server/game/Texts/CreatureTextMgr.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 7818527b34b..5c2639175d2 100755
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -34,14 +34,14 @@ class CreatureTextBuilder
size_t operator()(WorldPacket* data, LocaleConstant locale) const
{
- std::string text = sCreatureTextMgr->GetLocalizedChatString(_source->GetEntry(), _textGroup, _textId, locale);
- char const* localizedName = _source->GetNameForLocaleIdx(locale);
+ std::string const& text = sCreatureTextMgr->GetLocalizedChatString(_source->GetEntry(), _textGroup, _textId, locale);
+ std::string const& localizedName = _source->GetNameForLocaleIdx(locale);
*data << uint8(_msgType);
*data << uint32(_language);
*data << uint64(_source->GetGUID());
*data << uint32(1); // 2.1.0
- *data << uint32(strlen(localizedName)+1);
+ *data << uint32(localizedName.size() + 1);
*data << localizedName;
size_t whisperGUIDpos = data->wpos();
*data << uint64(_targetGUID); // Unit Target
@@ -178,7 +178,7 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisp
CreatureTextMap::const_iterator sList = mTextMap.find(source->GetEntry());
if (sList == mTextMap.end())
{
- sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: Could not find Text for Creature(%s) Entry %u in 'creature_text' table. Ignoring.", source->GetName(), source->GetEntry());
+ sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: Could not find Text for Creature(%s) Entry %u in 'creature_text' table. Ignoring.", source->GetName().c_str(), source->GetEntry());
return 0;
}
@@ -186,7 +186,7 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisp
CreatureTextHolder::const_iterator itr = textHolder.find(textGroup);
if (itr == textHolder.end())
{
- sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: Could not find TextGroup %u for Creature(%s) GuidLow %u Entry %u. Ignoring.", uint32(textGroup), source->GetName(), source->GetGUIDLow(), source->GetEntry());
+ sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: Could not find TextGroup %u for Creature(%s) GuidLow %u Entry %u. Ignoring.", uint32(textGroup), source->GetName().c_str(), source->GetGUIDLow(), source->GetEntry());
return 0;
}
@@ -383,7 +383,7 @@ void CreatureTextMgr::SetRepeatId(Creature* source, uint8 textGroup, uint8 id)
if (std::find(repeats.begin(), repeats.end(), id) == repeats.end())
repeats.push_back(id);
else
- sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: TextGroup %u for Creature(%s) GuidLow %u Entry %u, id %u already added", uint32(textGroup), source->GetName(), source->GetGUIDLow(), source->GetEntry(), uint32(id));
+ sLog->outError(LOG_FILTER_SQL, "CreatureTextMgr: TextGroup %u for Creature(%s) GuidLow %u Entry %u, id %u already added", uint32(textGroup), source->GetName().c_str(), source->GetGUIDLow(), source->GetEntry(), uint32(id));
}
CreatureTextRepeatIds CreatureTextMgr::GetRepeatGroup(Creature* source, uint8 textGroup)