mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
[Server][Game] Make undo draw failure visible in chat
This commit is contained in:
parent
5219cffa6b
commit
b4da05e75f
8 changed files with 35 additions and 0 deletions
|
|
@ -39,6 +39,7 @@
|
|||
#include <libcockatrice/protocol/pb/event_player_properties_changed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_set_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_shuffle.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_undo_draw_failed.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_deck_download.pb.h>
|
||||
#include <libcockatrice/protocol/pb/response_dump_zone.pb.h>
|
||||
|
|
@ -409,6 +410,8 @@ Server_Player::cmdUndoDraw(const Command_UndoDraw & /*cmd*/, ResponseContainer &
|
|||
}
|
||||
|
||||
if (lastDrawList.isEmpty()) {
|
||||
Event_UndoDrawFailed event;
|
||||
ges.enqueueGameEvent(event, playerId);
|
||||
return Response::RespContextError;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue