Conflicts:
	runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java
This commit is contained in:
SRLJustin
2022-06-02 08:27:22 +10:00
3 changed files with 7 additions and 3 deletions

View File

@@ -27,12 +27,12 @@ package net.runelite.client.account;
import com.google.gson.Gson;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.time.Instant;
import java.util.UUID;
import javax.inject.Inject;
@@ -123,7 +123,7 @@ public class SessionManager
return;
}
try (Writer fw = new OutputStreamWriter(new FileOutputStream(sessionFile), StandardCharsets.UTF_8))
try (Writer fw = new OutputStreamWriter(Files.newOutputStream(sessionFile.toPath()), StandardCharsets.UTF_8))
{
gson.toJson(accountSession, fw);

View File

@@ -254,6 +254,10 @@ enum ItemIdentification
DRAGONSTONE(Type.GEM, "Dragon", "DR", ItemID.UNCUT_DRAGONSTONE, ItemID.DRAGONSTONE),
ONYX(Type.GEM, "Onyx", "ON", ItemID.UNCUT_ONYX, ItemID.ONYX),
ZENYTE(Type.GEM, "Zenyte", "Z", ItemID.UNCUT_ZENYTE, ItemID.ZENYTE),
SHADOW_DIAMOND(Type.GEM, "Shadow", "SHD", ItemID.SHADOW_DIAMOND),
BLOOD_DIAMOND(Type.GEM, "Blood", "BD", ItemID.BLOOD_DIAMOND),
ICE_DIAMOND(Type.GEM, "Ice", "ID", ItemID.ICE_DIAMOND),
SMOKE_DIAMOND(Type.GEM, "Smoke", "SMD", ItemID.SMOKE_DIAMOND),
// Potions
ATTACK(Type.POTION, "Att", "A", ItemID.ATTACK_POTION4, ItemID.ATTACK_POTION3, ItemID.ATTACK_POTION2, ItemID.ATTACK_POTION1),

View File

@@ -495,7 +495,7 @@ public class ClientLoader implements Supplier<Applet>
}
}
try (HashingOutputStream hos = new HashingOutputStream(Hashing.sha512(), new FileOutputStream(PATCHED_CACHE));
try (HashingOutputStream hos = new HashingOutputStream(Hashing.sha512(), java.nio.file.Files.newOutputStream(PATCHED_CACHE.toPath()));
InputStream patch = ClientLoader.class.getResourceAsStream("/client.patch"))
{
new FileByFileV1DeltaApplier().applyDelta(VANILLA_CACHE, patch, hos);