forked from External/mage
Changed color of frame of avatar for active player to green again. Checked that a player of a game can't also watch his own game. Added a match score to the start of the game log. Changed the color of the Turn [X] message. Tips and join messages during a game are displayed in the chat panel instead the game log panel. Display of the player name when hovering over the avatar is more vertical centered.
This commit is contained in:
parent
20a99ed894
commit
f644ffe041
16 changed files with 100 additions and 22 deletions
|
|
@ -40,6 +40,7 @@ import mage.MageException;
|
|||
import mage.cards.decks.Deck;
|
||||
import mage.cards.decks.DeckCardLists;
|
||||
import mage.cards.decks.InvalidDeckException;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.GameOptions;
|
||||
import mage.game.Seat;
|
||||
|
|
@ -63,6 +64,7 @@ import mage.server.tournament.TournamentFactory;
|
|||
import mage.server.tournament.TournamentManager;
|
||||
import mage.server.util.ServerMessagesUtil;
|
||||
import mage.server.util.ThreadExecutor;
|
||||
import mage.view.ChatMessage.MessageColor;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
|
|
@ -248,6 +250,10 @@ public class TableController {
|
|||
if (table.getState() != TableState.DUELING) {
|
||||
return false;
|
||||
}
|
||||
// you can't watch your own game
|
||||
if (userPlayerMap.get(userId) != null) {
|
||||
return false;
|
||||
}
|
||||
UserManager.getInstance().getUser(userId).watchGame(match.getGame().getId());
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue