How do you turn msg:"Cast communication is turned on." on Cast Description from database?
protocolgame.cpp
protocolgame.cpp
Code:
Player* _player = g_game.getPlayerByID(playerId);
if(castAccount) { //CA
PlayerCast pc = _player->getCast();
for(std::list<CastBan>::iterator it = pc.bans.begin(); it != pc.bans.end(); ++it)
if(it->ip == getIP()) {
disconnectClient(0x14, "You are banned from this cast.");
return false;
}
if(_player->getCastViewerCount() >= 50) {
disconnectClient(0x14, "The cast reached the maximum viewer limit (50).");
return false;
}
player = _player;
player->addRef();
m_acceptPackets = true;
isCast = true;
player->addCastViewer(this);
sendAddCreature(_player, _player->getPosition(), _player->getTile()->getClientIndexOfThing(_player, _player));
PrivateChatChannel* channel = g_chat.getPrivateChannel(_player);
if(channel) {
sendCreatePrivateChannel(channel->getId(), channel->getName());
channel->talk("", SPEAK_CHANNEL_RA, (getViewerName() + " has joined the cast."));
sendCreatureSay(player, SPEAK_PRIVATE, "Cast communication is turned on.");
} else
sendCreatureSay(player, SPEAK_PRIVATE, "Cast communication is turned off.");
return true;
}