fixed load and overlay flow, missing sync
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9abe30904f
commit
db41143312
10 changed files with 51 additions and 19 deletions
|
@ -84,7 +84,7 @@ namespace Sledgemapper.UI
|
|||
CenterOnTile(obj.X, obj.Y);
|
||||
}
|
||||
|
||||
private void OnMapOpenedMessage(MapOpenedMessage obj)
|
||||
private async void OnMapOpenedMessage(MapOpenedMessage obj)
|
||||
{
|
||||
lblMap.Text = obj.MapName;
|
||||
MenuConnectSync.Enabled = true;
|
||||
|
@ -93,6 +93,13 @@ namespace Sledgemapper.UI
|
|||
CommunicationManager.SessionData.MapEntityDeleted -= OnMapEntityDeleted;
|
||||
CommunicationManager.SessionData.MapEntityAdded += OnMapEntityAdded;
|
||||
CommunicationManager.SessionData.MapEntityDeleted += OnMapEntityDeleted;
|
||||
var serverMap = await CommunicationManager.Api.GetMap(State.Instance.CampaignId, State.Instance.MapId);
|
||||
CommunicationManager.SessionData.Overlays = serverMap.Overlays;
|
||||
CommunicationManager.SessionData.Map = serverMap.Map;
|
||||
CommunicationManager.SessionData.Walls = serverMap.Walls;
|
||||
CommunicationManager.SessionData.Notes = serverMap.Notes;
|
||||
CommunicationManager.SessionData.Lines = serverMap.Lines;
|
||||
CommunicationManager.SessionData.Rooms = serverMap.Rooms;
|
||||
}
|
||||
|
||||
private async void OnSignalrConnectionUpdateMessage(SignalrConnectionUpdateMessage obj)
|
||||
|
@ -204,7 +211,7 @@ namespace Sledgemapper.UI
|
|||
return;
|
||||
}
|
||||
|
||||
var serverMap = await CommunicationManager.Api.Session(CommunicationManager.SessionData.SessionName);
|
||||
var serverMap = await CommunicationManager.Api.GetMap(State.Instance.CampaignId, State.Instance.MapId);
|
||||
CommunicationManager.SessionData.Overlays = serverMap.Overlays;
|
||||
CommunicationManager.SessionData.Map = serverMap.Map;
|
||||
CommunicationManager.SessionData.Walls = serverMap.Walls;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue