Playerbot fixes and functionnality to talk in channels

This commit is contained in:
antony
2024-07-26 11:34:32 +02:00
parent 5276676a11
commit 4a48e18d5b
5 changed files with 72 additions and 2 deletions

View File

@@ -4955,6 +4955,15 @@ void Player::CleanupChannels()
}
}
// Playerbot helper if bot talks in a different locale
bool Player::IsInChannel(const Channel* c)
{
return std::any_of(m_channels.begin(), m_channels.end(), [c](const Channel* chan)
{
return c->GetChannelId() == chan->GetChannelId();
});
}
void Player::ClearChannelWatch()
{
for (JoinedChannelsList::iterator itr = m_channels.begin(); itr != m_channels.end(); ++itr)

View File

@@ -2043,6 +2043,7 @@ public:
void JoinedChannel(Channel* c);
void LeftChannel(Channel* c);
bool IsInChannel(const Channel* c);
void CleanupChannels();
void ClearChannelWatch();
void UpdateLocalChannels(uint32 newZone);