public DysonBlueprintPacket(int starIndex, int layerId, EDysonBlueprintType blueprintType, string stringData) { StarIndex = starIndex; LayerId = layerId; BlueprintType = blueprintType; // because string length may exceed maxStringLength in NetSerializer, convert to char array here BinaryData = Encoding.ASCII.GetBytes(stringData); }
public static void FromBase64String_Postfix(DysonBlueprintDataIOError __result, string str64Data, EDysonBlueprintType requestType, DysonSphere sphere, DysonSphereLayer layer) { if (Multiplayer.IsActive) { Multiplayer.Session.DysonSpheres.InBlueprint = false; if (!Multiplayer.Session.DysonSpheres.IsIncomingRequest && __result == DysonBlueprintDataIOError.OK) { int starIndex = sphere.starData.index; int layerId = layer?.id ?? -1; Multiplayer.Session.Network.SendPacket(new DysonBlueprintPacket(starIndex, layerId, requestType, str64Data)); } } }