network: reworked client-server events (related to triggers dialog problem from #11173) (#11189)

* added bad connection mode to test client works on slow network, use -Dxmage.badconnection;
* added bad connection protection in events processing due event type;
* split events to different types (can be ignored, must be synced, etc);
* removed some unused server events.
This commit is contained in:
Oleg Agafonov 2023-09-21 18:40:52 +04:00 committed by GitHub
parent fa8e93a29d
commit 342979a55a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 299 additions and 202 deletions

View file

@ -7,6 +7,7 @@ import mage.game.draft.Draft;
import mage.game.match.MatchOptions;
import mage.game.tournament.MultiplayerRound;
import mage.game.tournament.TournamentPairing;
import org.apache.log4j.Logger;
import java.io.Serializable;
import java.util.EventObject;
@ -17,11 +18,15 @@ import java.util.UUID;
*/
public class TableEvent extends EventObject implements ExternalEvent, Serializable {
private static final Logger logger = Logger.getLogger(TableEvent.class);
public enum EventType {
UPDATE, INFO, STATUS, START_DRAFT, START_MATCH, SIDEBOARD, CONSTRUCT, SUBMIT_DECK, END, END_GAME_INFO, ERROR,
INIT_TIMER, RESUME_TIMER, PAUSE_TIMER, CHECK_STATE_PLAYERS, START_MULTIPLAYER_MATCH
}
private Game game;
private Draft draft;
private EventType eventType;