mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-14 10:04:46 -07:00
Make undo draw failure visible in chat (#6889)
* [Server][Game] Make undo draw failure visible in chat * genericize the proto
This commit is contained in:
parent
762f36335e
commit
cb2ca152b7
8 changed files with 54 additions and 0 deletions
|
|
@ -36,6 +36,7 @@
|
|||
#include <libcockatrice/protocol/pb/event_create_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_del_counter.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_draw_cards.pb.h>
|
||||
#include <libcockatrice/protocol/pb/event_game_log_notice.pb.h>
|
||||
#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>
|
||||
|
|
@ -409,6 +410,9 @@ Server_Player::cmdUndoDraw(const Command_UndoDraw & /*cmd*/, ResponseContainer &
|
|||
}
|
||||
|
||||
if (lastDrawList.isEmpty()) {
|
||||
Event_GameLogNotice event;
|
||||
event.set_notice_type(Event_GameLogNotice::UNDO_DRAW_FAILED);
|
||||
ges.enqueueGameEvent(event, playerId);
|
||||
return Response::RespContextError;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue