mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-21 23:00:24 -08:00
concede fix
This commit is contained in:
@@ -141,7 +141,7 @@ void MessageLogWidget::logUndoDraw(Player *player, QString cardName)
|
||||
if (cardName.isEmpty())
|
||||
append(tr("%1 undoes his last draw.").arg(sanitizeHtml(player->getName())));
|
||||
else
|
||||
append(tr("%1 undoes his last draw (%2).").arg(sanitizeHtml(player->getName())).arg(sanitizeHtml(cardName)));
|
||||
append(tr("%1 undoes his last draw (%2).").arg(sanitizeHtml(player->getName())).arg(QString("<font color=\"blue\">%1</font>").arg(sanitizeHtml(cardName))));
|
||||
}
|
||||
|
||||
QPair<QString, QString> MessageLogWidget::getFromStr(CardZone *zone, QString cardName, int position) const
|
||||
|
||||
@@ -512,6 +512,8 @@ ResponseCode Server_ProtocolHandler::cmdConcede(Command_Concede * /*cmd*/, Comma
|
||||
{
|
||||
if (player->getSpectator())
|
||||
return RespFunctionNotAllowed;
|
||||
if (!game->getGameStarted())
|
||||
return RespGameNotStarted;
|
||||
if (player->getConceded())
|
||||
return RespContextError;
|
||||
|
||||
@@ -530,7 +532,7 @@ ResponseCode Server_ProtocolHandler::cmdReadyStart(Command_ReadyStart *cmd, Comm
|
||||
if (player->getSpectator())
|
||||
return RespFunctionNotAllowed;
|
||||
|
||||
if (!player->getDeck())
|
||||
if (!player->getDeck() || game->getGameStarted())
|
||||
return RespContextError;
|
||||
|
||||
if (player->getReadyStart() == cmd->getReady())
|
||||
|
||||
Reference in New Issue
Block a user