• 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!

C++ Help to a little change in cast system

Joined
Aug 15, 2014
Messages
143
Reaction score
24
I want to don't show castings live with password in first page at login when the password board is empty.
Because it's flood the cast page with not necessary casts.

aaaaa.png

Lua:
const auto& casts = ProtocolGame::getLiveCasts();
    output->addByte(casts.size());
    for (const auto& cast : casts)
    {
        std::ostringstream entry;
        entry << cast.first->getName() << " [" << cast.second->getSpectatorCount() << (cast.second->isPasswordProtected() ? "*]" : "]");
        output->addString(entry.str());
        entry.str(std::string());
        output->addString("Level " + std::to_string(cast.first->getLevel()));
        output->add<uint32_t>(serverIp);
        output->add<uint16_t>(g_config.getNumber(ConfigManager::GAME_PORT));
    }
        
    output->add<uint16_t>(0);
    send(std::move(output));
    disconnect();

Is possible hide and not show casts with * ?
Thank you.
 
C++:
const auto& casts = ProtocolGame::getLiveCasts();
output->addByte(casts.size());
for (const auto& cast : casts)
{
    if(!cast.second->isPasswordProtected()){
        std::ostringstream entry;
        entry << cast.first->getName() << " [" << cast.second->getSpectatorCount() << "]";
        output->addString(entry.str());
        entry.str(std::string());
        output->addString("Level " + std::to_string(cast.first->getLevel()));
        output->add<uint32_t>(serverIp);
        output->add<uint16_t>(g_config.getNumber(ConfigManager::GAME_PORT));
    }
}

output->add<uint16_t>(0);
send(std::move(output));
disconnect();
 
We need more info bud. Can you post a link to the cast system files or something? What cast system is it, where can we find info on it.
 
Back
Top