Skip to content

Commit

Permalink
Revert specific changeover from MapTool to MapToolClient
Browse files Browse the repository at this point in the history
For now, the global `MapTool.setCampaign()` still does a fair bit of work outside of `MapToolClient`, so it was not
correct to have removed it the call to it in `ClientMessaageHandlder`. On the other hand, the call to
`MapTool.getPlayerList()` is not necessary.
  • Loading branch information
kwvanderlinde committed May 7, 2024
1 parent 4b3f0a1 commit 958664d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ private void handle(SetCampaignMsg msg) {
EventQueue.invokeLater(
() -> {
Campaign campaign = Campaign.fromDto(msg.getCampaign());
client.setCampaign(campaign);
MapTool.setCampaign(campaign);

// Hide the "Connecting" overlay
MapTool.getFrame().hideGlassPane();
Expand Down Expand Up @@ -1048,7 +1048,7 @@ private void handle(UpdatePlayerStatusMsg updatePlayerStatusMsg) {
var loaded = updatePlayerStatusMsg.getLoaded();

Player player =
MapTool.getPlayerList().stream()
client.getPlayerList().stream()
.filter(x -> x.getName().equals(playerName))
.findFirst()
.orElse(null);
Expand Down

0 comments on commit 958664d

Please sign in to comment.