cfiController 1 + fix bug BUSY FREE not for Unity

This commit is contained in:
2026-01-27 12:34:20 +03:00
parent b452ef347d
commit 4ce3f53171
9 changed files with 43 additions and 28 deletions

View File

@@ -105,17 +105,26 @@ void CommonClientHandler::slot_StatusTasksFIMofTraineeChanged(int trainee_id)
}*/
}
void CommonClientHandler::slot_sendPacketToAllClients(PacketType packetType)
void CommonClientHandler::slot_sendPacketToAllClients(PacketType packetType, bool flOnlyGUI)
{
foreach(int idSocket, clientsMap->keys())
{
ClientHandler *handler = clientsMap->value(idSocket);
if(flOnlyGUI)
{
if(handler->getClient()->getTypeClient() != TypeClientAutorization::TYPE_GUI)
continue;
}
//if(packetType != PacketType::BUSY && packetType != PacketType::FREE)
if (!handler->getClient()->getIsLoggedIn()) continue;
handler->sendPacketType(packetType);
Logger::instance().log("AllSending " + handler->getClient()->getLogin() + " " + enumToString(packetType));
if(flOnlyGUI)
Logger::instance().log("All GUI Sending " + handler->getClient()->getLogin() + " " + enumToString(packetType));
else
Logger::instance().log("All Sending " + handler->getClient()->getLogin() + " " + enumToString(packetType));
}
//emit sigSetServerState(packetType);