[Server][Game] Make undo draw failure visible in chat

This commit is contained in:
RickyRister 2026-05-13 02:31:57 -07:00
parent 5219cffa6b
commit b4da05e75f
8 changed files with 35 additions and 0 deletions

View file

@ -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;
}