mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Stuffs
Took 39 minutes Took 4 seconds Took 43 minutes
This commit is contained in:
parent
ef93d8a253
commit
98da0a066f
4 changed files with 42 additions and 13 deletions
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "decklist.h"
|
||||
#include "pb/context_connection_state_changed.pb.h"
|
||||
#include "pb/context_deck_select.pb.h"
|
||||
#include "pb/context_ping_changed.pb.h"
|
||||
#include "pb/event_delete_arrow.pb.h"
|
||||
#include "pb/event_game_closed.pb.h"
|
||||
|
|
@ -512,6 +513,21 @@ void Server_Game::addPlayer(Server_AbstractUserInterface *userInterface,
|
|||
userInterface->playerAddedToGame(gameId, room->getId(), newPlayer->getPlayerId());
|
||||
|
||||
createGameJoinedEvent(newPlayer, rc, false);
|
||||
|
||||
Event_PlayerPropertiesChanged event;
|
||||
GameEventStorage ges;
|
||||
|
||||
if (getShareDecklistsOnLoad()) {
|
||||
for (const auto &player : players) {
|
||||
Context_DeckSelect context;
|
||||
if (player->getDeckList() != nullptr) {
|
||||
context.set_deck_list(player->getDeckList()->writeToString_Native().toStdString());
|
||||
ges.setGameEventContext(context);
|
||||
ges.enqueueGameEvent(event, player->getPlayerId());
|
||||
ges.sendToGame(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Server_Game::removePlayer(Server_Player *player, Event_Leave::LeaveReason reason)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue