Core/Channels: Fix the console error "opcode CMSG_MESSAGECHAT have unprocessed tail data" and some logic problems when joining/leaving some channels (like only be able to join LFG inside a city)
This commit is contained in:
@@ -5522,14 +5522,14 @@ void Player::RepopAtGraveyard()
|
||||
|
||||
bool Player::CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, AreaTableEntry const* zone)
|
||||
{
|
||||
if (channel->flags & CHANNEL_DBC_FLAG_ZONE_DEP)
|
||||
{
|
||||
if (zone->flags & AREA_FLAG_ARENA_INSTANCE)
|
||||
return false;
|
||||
if (channel->flags & CHANNEL_DBC_FLAG_ZONE_DEP && zone->flags & AREA_FLAG_ARENA_INSTANCE)
|
||||
return false;
|
||||
|
||||
if ((channel->flags & CHANNEL_DBC_FLAG_CITY_ONLY) && !(zone->flags & AREA_FLAG_CAPITAL))
|
||||
return false;
|
||||
}
|
||||
if ((channel->flags & CHANNEL_DBC_FLAG_CITY_ONLY) && (!(zone->flags & AREA_FLAG_SLAVE_CAPITAL)))
|
||||
return false;
|
||||
|
||||
if ((channel->flags & CHANNEL_DBC_FLAG_GUILD_REQ) && GetGuildId())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -5577,12 +5577,6 @@ void Player::UpdateLocalChannels(uint32 newZone)
|
||||
{
|
||||
if (ChatChannelsEntry const* channel = sChatChannelsStore.LookupEntry(i))
|
||||
{
|
||||
if (!(channel->flags & CHANNEL_DBC_FLAG_ZONE_DEP))
|
||||
continue; // Not zone dependent, don't handle it here
|
||||
|
||||
if ((channel->flags & CHANNEL_DBC_FLAG_GUILD_REQ) && GetGuildId())
|
||||
continue; // Should not join to these channels automatically
|
||||
|
||||
Channel* usedChannel = NULL;
|
||||
|
||||
for (JoinedChannelsList::iterator itr = m_channels.begin(); itr != m_channels.end(); ++itr)
|
||||
|
||||
Reference in New Issue
Block a user