concede fix
This commit is contained in:
parent
ac46edd790
commit
349a60fb58
2 changed files with 4 additions and 2 deletions
|
@ -141,7 +141,7 @@ void MessageLogWidget::logUndoDraw(Player *player, QString cardName)
|
||||||
if (cardName.isEmpty())
|
if (cardName.isEmpty())
|
||||||
append(tr("%1 undoes his last draw.").arg(sanitizeHtml(player->getName())));
|
append(tr("%1 undoes his last draw.").arg(sanitizeHtml(player->getName())));
|
||||||
else
|
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
|
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())
|
if (player->getSpectator())
|
||||||
return RespFunctionNotAllowed;
|
return RespFunctionNotAllowed;
|
||||||
|
if (!game->getGameStarted())
|
||||||
|
return RespGameNotStarted;
|
||||||
if (player->getConceded())
|
if (player->getConceded())
|
||||||
return RespContextError;
|
return RespContextError;
|
||||||
|
|
||||||
|
@ -530,7 +532,7 @@ ResponseCode Server_ProtocolHandler::cmdReadyStart(Command_ReadyStart *cmd, Comm
|
||||||
if (player->getSpectator())
|
if (player->getSpectator())
|
||||||
return RespFunctionNotAllowed;
|
return RespFunctionNotAllowed;
|
||||||
|
|
||||||
if (!player->getDeck())
|
if (!player->getDeck() || game->getGameStarted())
|
||||||
return RespContextError;
|
return RespContextError;
|
||||||
|
|
||||||
if (player->getReadyStart() == cmd->getReady())
|
if (player->getReadyStart() == cmd->getReady())
|
||||||
|
|
Loading…
Reference in a new issue