Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (uint32 i = 0; i < sChatChannelsStore.GetNumRows(); ++i)
- {
- ChatChannelsEntry const* channel = sChatChannelsStore.LookupEntry(i);
- AreaTableEntry const* area = sAreaStore.LookupEntry(
- (channel->ChannelID == tradeChannelID) ? cityLookupAreaID : playerZoneId);
- if (channel && area && channel->ChannelID == channelId)
- {
- char channelName[255];
- snprintf(channelName, 255, channel->pattern[0], area->area_name[0]);
- if (ChannelMgr* cMgr = channelMgr(bot->GetTeam()))
- {
- if (Channel* chn = cMgr->GetJoinChannel(channelName))
- {
- chn->Join(bot, "");
- chn->Say(bot, msg.c_str(), LANG_UNIVERSAL);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement