Veilheim/Map/SharedMapSystem.cs
/// <summary>
///     After SetMapData is done, send it to the server
///     TODO: Check if configuration is loaded already, data should not be sent if map sharing is disabled
/// </summary>
After SetMapData is done, send it to the server
TODO: Check if configuration is loaded already, data should not be sent if map sharing is disabled
After SetMapData is done send it to the server TODO : Check if configuration is loaded already data should not be sent if map sharing is disabled
private static void InitialSendRequest(On.Minimap.orig_SetMapData orig, Minimap self, byte[] data)
        {
            isInSetMapData = true;
            orig(self, data);
            if (ConfigUtil.Get<bool>("MapServer", "shareMapProgression"))
            {
                Logger.LogInfo("Sending Map data initially to server");
                var pkg = new ZPackage(CreateExplorationData().ToArray());
                ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.instance.GetServerPeerID(), nameof(RPC_Veilheim_ReceiveExploration), pkg);
            }
            isInSetMapData = false;
        }
private static void InitialSendRequest ( On . Minimap . orig_SetMapData orig , Minimap self , byte [ ] data ) { isInSetMapData = true ; orig ( self , data ) ; if ( ConfigUtil . Get < bool > ( " " , " " ) ) { Logger . LogInfo ( " " ) ; var pkg = new ZPackage ( CreateExplorationData ( ) . ToArray ( ) ) ; ZRoutedRpc . instance . InvokeRoutedRPC ( ZRoutedRpc . instance . GetServerPeerID ( ) , nameof ( RPC_Veilheim_ReceiveExploration ) , pkg ) ; } isInSetMapData = false ; }
After SetMapData is done, send it to the server
TODO: Check if configuration is loaded already, data should not be sent if map sharing is disabled
After SetMapData is done send it to the server TODO : Check if configuration is loaded already data should not be sent if map sharing is disabled
// Prevent queueing up loaded data // After login, send map data to server (and get new map data back)
orig
On.Minimap.orig_SetMapData
self
Minimap
data
byte[]