• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Cast Description

Pastel16

New Member
Joined
Jul 22, 2013
Messages
49
Reaction score
3
Location
Poland
How do you turn msg:"Cast communication is turned on." on Cast Description from database?

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;
   }
 
I do it:
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, (player->getCastDescription()) );
     } else
       sendCreatureSay(player, SPEAK_PRIVATE, "Cast communication is turned off.");
     return true;
   }
 
Back
Top Bottom