From 7d13192517d9b8b2b55964ed150d17c95ba17a0d Mon Sep 17 00:00:00 2001 From: Atidot3 Date: Sun, 28 Jul 2024 21:12:06 +0200 Subject: [PATCH] removed useless string --- src/strategy/actions/SuggestWhatToDoAction.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/strategy/actions/SuggestWhatToDoAction.cpp b/src/strategy/actions/SuggestWhatToDoAction.cpp index 776c1ac9..391978f1 100644 --- a/src/strategy/actions/SuggestWhatToDoAction.cpp +++ b/src/strategy/actions/SuggestWhatToDoAction.cpp @@ -243,8 +243,6 @@ void SuggestWhatToDoAction::spam(std::string msg, uint8 flags, bool worldChat, b /*AreaTableEntry const* area = sAreaTableStore.LookupEntry(bot->GetMap()->GetAreaId(bot->GetPhaseMask(), bot->GetPositionX(), bot->GetPositionY(), bot->GetPositionZ())); if (!area) return;*/ - std::string areaname = zone->area_name[_dbc_locale]; - for (uint32 i = 0; i < sChatChannelsStore.GetNumRows(); ++i) { ChatChannelsEntry const* channel = sChatChannelsStore.LookupEntry(i); @@ -260,7 +258,7 @@ void SuggestWhatToDoAction::spam(std::string msg, uint8 flags, bool worldChat, b } else { - snprintf(channelName, 100, channel->pattern[_dbc_locale], areaname); + snprintf(channelName, 100, channel->pattern[_dbc_locale], zone->area_name[_dbc_locale]); chn = cMgr->GetChannel(channelName, bot); } if (!chn)