Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2023-04-19 09:48:45 -06:00
committed by GitHub
33 changed files with 353 additions and 17 deletions

View File

@@ -491,12 +491,11 @@ void Player::UpdateLocalChannels(uint32 newZone)
{
Channel* usedChannel = nullptr;
for (JoinedChannelsList::iterator itr = m_channels.begin();
itr != m_channels.end(); ++itr)
for (Channel* channel : m_channels)
{
if ((*itr)->GetChannelId() == i)
if (channel && channel->GetChannelId() == i)
{
usedChannel = *itr;
usedChannel = channel;
break;
}
}