Merge pull request #2800 from ThatGamerBlue/master

project: upstream
This commit is contained in:
ThatGamerBlue
2020-09-08 21:01:30 +01:00
committed by GitHub
39 changed files with 527 additions and 932 deletions

View File

@@ -25,9 +25,9 @@
object ProjectVersions {
const val launcherVersion = "2.2.0"
const val rlVersion = "1.6.25"
const val rlVersion = "1.6.26"
const val openosrsVersion = "3.4.3"
const val openosrsVersion = "3.4.4"
const val rsversion = 191
const val cacheversion = 165

View File

@@ -33,6 +33,7 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Base64;
import java.util.Comparator;
@@ -103,7 +104,7 @@ public class FlatStorage implements Storage
for (Index idx : store.getIndexes())
{
String file = idx.getId() + EXTENSION;
try (BufferedReader br = new BufferedReader(new InputStreamReader(openReader(file))))
try (BufferedReader br = new BufferedReader(new InputStreamReader(openReader(file), StandardCharsets.UTF_8)))
{
int lineNo = 0;
Archive archive = null;
@@ -213,7 +214,7 @@ public class FlatStorage implements Storage
for (Index idx : store.getIndexes())
{
String file = idx.getId() + EXTENSION;
try (PrintStream br = new PrintStream(openWriter(file)))
try (PrintStream br = new PrintStream(openWriter(file), false, StandardCharsets.UTF_8.name()))
{
br.printf("protocol=%d\n", idx.getProtocol());
br.printf("revision=%d\n", idx.getRevision());

View File

@@ -26,10 +26,8 @@ package net.runelite.cache.io;
import com.google.common.base.Preconditions;
import java.io.IOException;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
public final class OutputStream extends java.io.OutputStream
{
@@ -183,23 +181,13 @@ public final class OutputStream extends java.io.OutputStream
public void writeString(String str)
{
Charset utf8charset = Charset.forName("UTF-8");
Charset cp1252charset = Charset.forName("Cp1252");
ByteBuffer inputBuffer = ByteBuffer.wrap(str.getBytes());
CharBuffer data = utf8charset.decode(inputBuffer);
ByteBuffer outputBuffer = cp1252charset.encode(data);
byte[] outputData = outputBuffer.array();
writeBytes(outputData);
writeBytes(str.getBytes(StandardCharsets.ISO_8859_1));
writeByte(0);
}
public byte[] flip()
{
((Buffer) buffer).flip();
buffer.flip();
byte[] b = new byte[buffer.limit()];
buffer.get(b);
return b;

View File

@@ -26,10 +26,12 @@ package net.runelite.cache.script.assembler;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import net.runelite.cache.definitions.ScriptDefinition;
import net.runelite.cache.script.Instructions;
import net.runelite.cache.script.assembler.rs2asmParser.ProgContext;
import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.tree.ParseTreeWalker;
@@ -45,7 +47,7 @@ public class Assembler
public ScriptDefinition assemble(InputStream in) throws IOException
{
// Get our lexer
rs2asmLexer lexer = new rs2asmLexer(CharStreams.fromStream(in));
rs2asmLexer lexer = new rs2asmLexer(new ANTLRInputStream(new InputStreamReader(in, StandardCharsets.UTF_8)));
LexerErrorListener errorListener = new LexerErrorListener();
lexer.addErrorListener(errorListener);

View File

@@ -25,6 +25,7 @@
package net.runelite.cache.script.assembler;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import net.runelite.cache.definitions.ScriptDefinition;
import net.runelite.cache.script.Instructions;
import net.runelite.cache.script.disassembler.Disassembler;
@@ -76,7 +77,7 @@ public class AssemblerTest
in = AssemblerTest.class.getResourceAsStream(this.script);
Assert.assertNotNull(in);
String original = new String(IOUtils.toByteArray(in)).replaceAll("\r\n", "\n");
String original = new String(IOUtils.toByteArray(in), StandardCharsets.UTF_8).replaceAll("\r\n", "\n");
logger.info(original);
logger.info("-----------------------");

View File

@@ -27,6 +27,7 @@ package net.runelite.cache.script.disassembler;
import com.google.common.io.Files;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import net.runelite.cache.IndexType;
import net.runelite.cache.StoreLocation;
import net.runelite.cache.definitions.ScriptDefinition;
@@ -78,7 +79,7 @@ public class DisassemblerTest
Disassembler disassembler = new Disassembler();
String out = disassembler.disassemble(script);
Files.write(out.getBytes(), outFile);
Files.write(out.getBytes(StandardCharsets.UTF_8), outFile);
++count;
}

View File

@@ -24,6 +24,7 @@
*/
package net.runelite.cache.util;
import java.nio.charset.StandardCharsets;
import static org.junit.Assert.assertArrayEquals;
import org.junit.Test;
@@ -32,7 +33,7 @@ public class XteaTest
@Test
public void test()
{
byte[] data = "testtesttest1".getBytes();
byte[] data = "testtesttest1".getBytes(StandardCharsets.UTF_8);
int[] key = new int[]
{

View File

@@ -29,6 +29,7 @@ import io.reactivex.rxjava3.core.Observable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.UUID;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -67,7 +68,7 @@ public class AccountClient
try (Response response = client.newCall(request).execute())
{
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), OAuthResponse.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), OAuthResponse.class);
}
catch (JsonParseException ex)
{

View File

@@ -28,6 +28,7 @@ import com.google.gson.JsonParseException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import lombok.AllArgsConstructor;
import net.runelite.http.api.RuneLiteAPI;
import okhttp3.HttpUrl;
@@ -171,7 +172,7 @@ public class ChatClient
}
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), Task.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), Task.class);
}
catch (JsonParseException ex)
{
@@ -309,7 +310,7 @@ public class ChatClient
}
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), Duels.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), Duels.class);
}
catch (JsonParseException ex)
{
@@ -356,7 +357,7 @@ public class ChatClient
}
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), LayoutRoom[].class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), LayoutRoom[].class);
}
catch (JsonParseException ex)
{

View File

@@ -28,6 +28,7 @@ import com.google.gson.JsonParseException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import lombok.AllArgsConstructor;
@@ -67,7 +68,7 @@ public class ConfigClient
try (Response response = client.newCall(request).execute())
{
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), Configuration.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), Configuration.class);
}
catch (JsonParseException ex)
{

View File

@@ -28,6 +28,7 @@ import com.google.gson.JsonParseException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.runelite.http.api.RuneLiteAPI;
@@ -63,7 +64,7 @@ public class FeedClient
}
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), FeedResult.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), FeedResult.class);
}
catch (JsonParseException ex)
{

View File

@@ -35,6 +35,7 @@ import java.io.InputStreamReader;
import java.util.Arrays;
import javax.imageio.ImageIO;
import javax.naming.directory.SearchResult;
import java.nio.charset.StandardCharsets;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.runelite.http.api.RuneLiteAPI;
@@ -72,7 +73,7 @@ public class ItemClient
}
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), ItemPrice.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), ItemPrice.class);
}
catch (JsonParseException ex)
{
@@ -108,7 +109,7 @@ public class ItemClient
}
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), ItemPrice[].class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), ItemPrice[].class);
}
catch (JsonParseException ex)
{
@@ -174,7 +175,7 @@ public class ItemClient
}
InputStream in = response.body().byteStream();
return Observable.just(RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), SearchResult.class));
return Observable.just(RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), SearchResult.class));
}
catch (JsonParseException ex)
{

View File

@@ -30,6 +30,7 @@ import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.List;
import java.util.UUID;
@@ -118,7 +119,7 @@ public class LootTrackerClient
}
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), new TypeToken<List<LootRecord>>() {}.getType());
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), new TypeToken<List<LootRecord>>() {}.getType());
}
catch (JsonParseException ex)
{

View File

@@ -30,6 +30,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import lombok.Value;
import lombok.extern.slf4j.Slf4j;
@@ -71,7 +72,7 @@ public class NpcInfoClient
final Type typeToken = new TypeToken<Map<Integer, NpcInfo>>()
{
}.getType();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), typeToken);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), typeToken);
}
catch (JsonParseException ex)
{

View File

@@ -29,6 +29,7 @@ import io.reactivex.rxjava3.core.Observable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.runelite.http.api.RuneLiteAPI;
@@ -67,7 +68,7 @@ public class OSBGrandExchangeClient
}
final InputStream in = response.body().byteStream();
return Observable.just(RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), OSBGrandExchangeResult.class));
return Observable.just(RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), OSBGrandExchangeResult.class));
}
catch (JsonParseException ex)
{

View File

@@ -29,6 +29,7 @@ import com.google.gson.JsonParseException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.runelite.http.api.RuneLiteAPI;
@@ -66,7 +67,7 @@ public class WorldClient
}
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), WorldResult.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), WorldResult.class);
}
catch (JsonParseException ex)
{

View File

@@ -30,6 +30,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.nio.charset.StandardCharsets;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.runelite.http.api.RuneLiteAPI;
@@ -104,7 +105,7 @@ public class XteaClient
{
InputStream in = response.body().byteStream();
// CHECKSTYLE:OFF
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), new TypeToken<HashMap<Integer, Integer[]>>() {}.getType());
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), new TypeToken<HashMap<Integer, Integer[]>>() {}.getType());
// CHECKSTYLE:ON
}
catch (JsonParseException ex)

View File

@@ -3726,7 +3726,7 @@ public final class ItemID
public static final int FISHLIKE_THING_6206 = 6206;
public static final int SMALL_FISHING_NET_6209 = 6209;
public static final int TEAK_PYRE_LOGS = 6211;
public static final int MAHOGANY_PYRE_LOG = 6213;
public static final int MAHOGANY_PYRE_LOGS = 6213;
public static final int BROODOO_SHIELD_10 = 6215;
public static final int BROODOO_SHIELD_9 = 6217;
public static final int BROODOO_SHIELD_8 = 6219;
@@ -5651,7 +5651,7 @@ public final class ItemID
public static final int PURPLE_TRICORN_HAT = 8964;
public static final int GREY_TRICORN_HAT = 8965;
public static final int CUTTHROAT_FLAG = 8966;
public static final int GUILDED_SMILE_FLAG = 8967;
public static final int GILDED_SMILE_FLAG = 8967;
public static final int BRONZE_FIST_FLAG = 8968;
public static final int LUCKY_SHOT_FLAG = 8969;
public static final int TREASURE_FLAG = 8970;
@@ -6110,8 +6110,6 @@ public final class ItemID
public static final int FARMING_HOOD = 9812;
public static final int QUEST_POINT_CAPE = 9813;
public static final int QUEST_POINT_HOOD = 9814;
public static final int BOBBLE_HAT_9815 = 9815;
public static final int BOBBLE_SCARF_9816 = 9816;
public static final int OAK_CAPE_RACK = 9817;
public static final int TEAK_CAPE_RACK = 9818;
public static final int MAHOGANY_CAPE_RACK = 9819;
@@ -6333,8 +6331,6 @@ public final class ItemID
public static final int HUNTERS_CROSSBOW = 10156;
public static final int KEBBIT_BOLTS = 10158;
public static final int LONG_KEBBIT_BOLTS = 10159;
public static final int MORE = 10165;
public static final int BACK = 10166;
public static final int EAGLE_FEATHER = 10167;
public static final int EAGLE_CAPE = 10171;
public static final int FAKE_BEAK = 10172;
@@ -6640,177 +6636,6 @@ public final class ItemID
public static final int MISSION_REPORT_10598 = 10598;
public static final int MISSION_REPORT_10599 = 10599;
public static final int KGP_ID_CARD = 10600;
public static final int MYSTIC_HAT_10601 = 10601;
public static final int MYSTIC_HAT_DARK_10602 = 10602;
public static final int MYSTIC_HAT_LIGHT_10603 = 10603;
public static final int SKELETAL_HELM_10604 = 10604;
public static final int INFINITY_TOP_10605 = 10605;
public static final int SPLITBARK_HELM_10606 = 10606;
public static final int GHOSTLY_BOOTS_10607 = 10607;
public static final int MOONCLAN_HAT_10608 = 10608;
public static final int LUNAR_HELM_10609 = 10609;
public static final int DECORATIVE_ARMOUR_10610 = 10610;
public static final int VOID_KNIGHT_TOP_10611 = 10611;
public static final int ROGUE_MASK_10612 = 10612;
public static final int ROCKSHELL_HELM_10613 = 10613;
public static final int SPINED_HELM_10614 = 10614;
public static final int TRIBAL_MASK_10615 = 10615;
public static final int TRIBAL_MASK_10616 = 10616;
public static final int TRIBAL_MASK_10617 = 10617;
public static final int WHITE_PLATEBODY_10618 = 10618;
public static final int INITIATE_HAUBERK_10619 = 10619;
public static final int PROSELYTE_HAUBERK_10620 = 10620;
public static final int MOURNER_TOP_10621 = 10621;
public static final int KYATT_TOP_10622 = 10622;
public static final int LARUPIA_TOP_10623 = 10623;
public static final int GRAAHK_TOP_10624 = 10624;
public static final int WOOD_CAMO_TOP_10625 = 10625;
public static final int JUNGLE_CAMO_TOP_10626 = 10626;
public static final int DESERT_CAMO_TOP_10627 = 10627;
public static final int POLAR_CAMO_TOP_10628 = 10628;
public static final int MIME_MASK_10629 = 10629;
public static final int PRINCESS_BLOUSE_10630 = 10630;
public static final int ZOMBIE_SHIRT_10631 = 10631;
public static final int CAMO_TOP_10632 = 10632;
public static final int LEDERHOSEN_TOP_10633 = 10633;
public static final int SHADE_ROBE_10634 = 10634;
public static final int CAPE_OF_LEGENDS_10635 = 10635;
public static final int OBSIDIAN_CAPE_10636 = 10636;
public static final int FIRE_CAPE_10637 = 10637;
public static final int TEAM1_CAPE_10638 = 10638;
public static final int ATTACK_CAPE_10639 = 10639;
public static final int STRENGTH_CAPE_10640 = 10640;
public static final int DEFENCE_CAPE_10641 = 10641;
public static final int RANGING_CAPE_10642 = 10642;
public static final int PRAYER_CAPE_10643 = 10643;
public static final int MAGIC_CAPE_10644 = 10644;
public static final int RUNECRAFT_CAPE_10645 = 10645;
public static final int HUNTER_CAPE_10646 = 10646;
public static final int HITPOINTS_CAPE_10647 = 10647;
public static final int AGILITY_CAPE_10648 = 10648;
public static final int HERBLORE_CAPE_10649 = 10649;
public static final int THIEVING_CAPE_10650 = 10650;
public static final int CRAFTING_CAPE_10651 = 10651;
public static final int FLETCHING_CAPE_10652 = 10652;
public static final int SLAYER_CAPE_10653 = 10653;
public static final int CONSTRUCT_CAPE_10654 = 10654;
public static final int MINING_CAPE_10655 = 10655;
public static final int SMITHING_CAPE_10656 = 10656;
public static final int FISHING_CAPE_10657 = 10657;
public static final int COOKING_CAPE_10658 = 10658;
public static final int FIREMAKING_CAPE_10659 = 10659;
public static final int WOODCUTTING_CAPE_10660 = 10660;
public static final int FARMING_CAPE_10661 = 10661;
public static final int QUEST_POINT_CAPE_10662 = 10662;
public static final int SPOTTED_CAPE_10663 = 10663;
public static final int SPOTTIER_CAPE_10664 = 10664;
public static final int BLACK_SHIELD_H1_10665 = 10665;
public static final int ADAMANT_SHIELD_H1_10666 = 10666;
public static final int RUNE_SHIELD_H1_10667 = 10667;
public static final int BLACK_SHIELD_H2_10668 = 10668;
public static final int ADAMANT_SHIELD_H2_10669 = 10669;
public static final int RUNE_SHIELD_H2_10670 = 10670;
public static final int BLACK_SHIELD_H3_10671 = 10671;
public static final int ADAMANT_SHIELD_H3_10672 = 10672;
public static final int RUNE_SHIELD_H3_10673 = 10673;
public static final int BLACK_SHIELD_H4_10674 = 10674;
public static final int ADAMANT_SHIELD_H4_10675 = 10675;
public static final int RUNE_SHIELD_H4_10676 = 10676;
public static final int BLACK_SHIELD_H5_10677 = 10677;
public static final int ADAMANT_SHIELD_H5_10678 = 10678;
public static final int RUNE_SHIELD_H5_10679 = 10679;
public static final int STUDDED_BODY_G_10680 = 10680;
public static final int STUDDED_BODY_T_10681 = 10681;
public static final int DHIDE_BODY_G = 10682;
public static final int DHIDE_BODY_T = 10683;
public static final int DHIDE_BODY_G_10684 = 10684;
public static final int DHIDE_BODY_T_10685 = 10685;
public static final int WIZARD_ROBE_G = 10686;
public static final int WIZARD_ROBE_T = 10687;
public static final int ENCHANTED_TOP_10688 = 10688;
public static final int WIZARD_BOOTS_10689 = 10689;
public static final int BLACK_PLATEBODY_T_10690 = 10690;
public static final int BLACK_PLATEBODY_G_10691 = 10691;
public static final int HIGHWAYMAN_MASK_10692 = 10692;
public static final int BLUE_BERET_10693 = 10693;
public static final int BLACK_BERET_10694 = 10694;
public static final int WHITE_BERET_10695 = 10695;
public static final int RANGER_BOOTS_10696 = 10696;
public static final int ADAMANT_PLATEBODY_T_10697 = 10697;
public static final int ADAMANT_PLATEBODY_G_10698 = 10698;
public static final int BLACK_HELM_H1_10699 = 10699;
public static final int BLACK_HELM_H2_10700 = 10700;
public static final int BLACK_HELM_H3_10701 = 10701;
public static final int BLACK_HELM_H4_10702 = 10702;
public static final int BLACK_HELM_H5_10703 = 10703;
public static final int RUNE_HELM_H1_10704 = 10704;
public static final int RUNE_HELM_H2_10705 = 10705;
public static final int RUNE_HELM_H3_10706 = 10706;
public static final int RUNE_HELM_H4_10707 = 10707;
public static final int RUNE_HELM_H5_10708 = 10708;
public static final int ADAMANT_HELM_H1_10709 = 10709;
public static final int ADAMANT_HELM_H2_10710 = 10710;
public static final int ADAMANT_HELM_H3_10711 = 10711;
public static final int ADAMANT_HELM_H4_10712 = 10712;
public static final int ADAMANT_HELM_H5_10713 = 10713;
public static final int BOBS_RED_SHIRT_10714 = 10714;
public static final int BOBS_BLUE_SHIRT_10715 = 10715;
public static final int BOBS_GREEN_SHIRT_10716 = 10716;
public static final int BOBS_BLACK_SHIRT_10717 = 10717;
public static final int BOBS_PURPLE_SHIRT_10718 = 10718;
public static final int AMULET_OF_GLORY_T_10719 = 10719;
public static final int GUTHIX_CAPE_10720 = 10720;
public static final int FROG_MASK_10721 = 10721;
public static final int REINDEER_HAT_10722 = 10722;
public static final int JACK_LANTERN_MASK_10723 = 10723;
public static final int SKELETON_BOOTS_10724 = 10724;
public static final int SKELETON_GLOVES_10725 = 10725;
public static final int SKELETON_LEGGINGS_10726 = 10726;
public static final int SKELETON_SHIRT_10727 = 10727;
public static final int SKELETON_MASK_10728 = 10728;
public static final int EASTER_RING_10729 = 10729;
public static final int BLUE_MARIONETTE_10730 = 10730;
public static final int ZOMBIE_HEAD_10731 = 10731;
public static final int RUBBER_CHICKEN_10732 = 10732;
public static final int YOYO_10733 = 10733;
public static final int BUNNY_EARS_10734 = 10734;
public static final int SCYTHE_10735 = 10735;
public static final int STRENGTH_AMULET_T_10736 = 10736;
public static final int AMULET_OF_MAGIC_T_10738 = 10738;
public static final int A_POWDERED_WIG_10740 = 10740;
public static final int FLARED_TROUSERS_10742 = 10742;
public static final int PANTALOONS_10744 = 10744;
public static final int SLEEPING_CAP_10746 = 10746;
public static final int BLACK_ELEGANT_SHIRT_10748 = 10748;
public static final int RED_ELEGANT_SHIRT_10750 = 10750;
public static final int BLUE_ELEGANT_SHIRT_10752 = 10752;
public static final int GREEN_ELEGANT_SHIRT_10754 = 10754;
public static final int PURPLE_ELEGANT_SHIRT_10756 = 10756;
public static final int RED_BOATER_10758 = 10758;
public static final int ORANGE_BOATER_10760 = 10760;
public static final int GREEN_BOATER_10762 = 10762;
public static final int BLUE_BOATER_10764 = 10764;
public static final int BLACK_BOATER_10766 = 10766;
public static final int RED_HEADBAND_10768 = 10768;
public static final int BLACK_HEADBAND_10770 = 10770;
public static final int BROWN_HEADBAND_10772 = 10772;
public static final int PIRATES_HAT_10774 = 10774;
public static final int ZAMORAK_PLATEBODY_10776 = 10776;
public static final int SARADOMIN_PLATE = 10778;
public static final int GUTHIX_PLATEBODY_10780 = 10780;
public static final int GILDED_PLATEBODY_10782 = 10782;
public static final int SARADOMIN_ROBE_TOP_10784 = 10784;
public static final int ZAMORAK_ROBE_TOP_10786 = 10786;
public static final int GUTHIX_ROBE_TOP_10788 = 10788;
public static final int ZAMORAK_DHIDE_BODY_10790 = 10790;
public static final int SARADOMIN_DHIDE_BODY_10792 = 10792;
public static final int GUTHIX_DRAGONHIDE = 10794;
public static final int ROBIN_HOOD_HAT_10796 = 10796;
public static final int RUNE_PLATEBODY_G_10798 = 10798;
public static final int RUNE_PLATEBODY_T_10800 = 10800;
public static final int TAN_CAVALIER_10802 = 10802;
public static final int DARK_CAVALIER_10804 = 10804;
public static final int BLACK_CAVALIER_10806 = 10806;
public static final int ARCTIC_PYRE_LOGS = 10808;
public static final int ARCTIC_PINE_LOGS = 10810;
public static final int SPLIT_LOG = 10812;
@@ -6870,7 +6695,6 @@ public final class ItemID
public static final int BLACK_SATCHEL = 10880;
public static final int GOLD_SATCHEL = 10881;
public static final int RUNE_SATCHEL = 10882;
public static final int HARD_HAT_10883 = 10883;
public static final int FUSE_10884 = 10884;
public static final int KEG = 10885;
public static final int PRAYER_BOOK = 10886;
@@ -6910,7 +6734,6 @@ public final class ItemID
public static final int REWARD_TOKEN_10942 = 10942;
public static final int REWARD_TOKEN_10943 = 10943;
public static final int REWARD_TOKEN_10944 = 10944;
public static final int LUMBERJACK_TOP_10945 = 10945;
public static final int PUSHUP = 10946;
public static final int RUN = 10947;
public static final int SITUP = 10948;
@@ -6970,14 +6793,10 @@ public final class ItemID
public static final int WAND = 11012;
public static final int INFUSED_WAND = 11013;
public static final int BEACON_RING = 11014;
public static final int CHICKEN_HEAD = 11015;
public static final int CHICKEN_FEET = 11016;
public static final int CHICKEN_WINGS = 11017;
public static final int CHICKEN_LEGS = 11018;
public static final int CHICKEN_FEET_11019 = 11019;
public static final int CHICKEN_WINGS_11020 = 11020;
public static final int CHICKEN_HEAD_11021 = 11021;
public static final int CHICKEN_LEGS_11022 = 11022;
public static final int CHICKEN_FEET = 11019;
public static final int CHICKEN_WINGS = 11020;
public static final int CHICKEN_HEAD = 11021;
public static final int CHICKEN_LEGS = 11022;
public static final int MAGIC_EGG = 11023;
public static final int RABBIT_MOULD = 11024;
public static final int CHOCOLATE_CHUNKS = 11025;
@@ -7055,7 +6874,6 @@ public final class ItemID
public static final int ONYX_BRACELET = 11130;
public static final int ONYX_BRACELET_11132 = 11132;
public static final int REGEN_BRACELET = 11133;
public static final int BOMBER_JACKET_11135 = 11135;
public static final int KARAMJA_GLOVES_1 = 11136;
public static final int ANTIQUE_LAMP_11137 = 11137;
public static final int KARAMJA_GLOVES_2 = 11138;
@@ -7144,12 +6962,9 @@ public final class ItemID
public static final int DUMMY_11269 = 11269;
public static final int DUMMY_11271 = 11271;
public static final int IMPLING_SCROLL = 11273;
public static final int HAM_SHIRT_11274 = 11274;
public static final int CAVALIER_MASK = 11277;
public static final int BERET_MASK = 11278;
public static final int ELVARGS_HEAD = 11279;
public static final int CAVALIER_MASK_11280 = 11280;
public static final int BERET_MASK_11282 = 11282;
public static final int CAVALIER_MASK = 11280;
public static final int BERET_MASK = 11282;
public static final int DRAGONFIRE_SHIELD = 11283;
public static final int DRAGONFIRE_SHIELD_11284 = 11284;
public static final int DRACONIC_VISAGE = 11286;
@@ -7285,9 +7100,6 @@ public final class ItemID
public static final int VOID_SEAL3 = 11671;
public static final int VOID_SEAL2 = 11672;
public static final int VOID_SEAL1 = 11673;
public static final int VOID_MAGE_HELM_11674 = 11674;
public static final int VOID_RANGER_HELM_11675 = 11675;
public static final int VOID_MELEE_HELM_11676 = 11676;
public static final int EXPLORERS_NOTES = 11677;
public static final int BLACK_KNIGHT_HELM = 11678;
public static final int ANTIQUE_LAMP_11679 = 11679;
@@ -8409,7 +8221,6 @@ public final class ItemID
public static final int MUSIC_CAPE = 13221;
public static final int MUSIC_CAPET = 13222;
public static final int MUSIC_HOOD = 13223;
public static final int MUSIC_CAPE_13224 = 13224;
public static final int TZREKJAD = 13225;
public static final int HERB_SACK = 13226;
public static final int ETERNAL_CRYSTAL = 13227;
@@ -8449,7 +8260,6 @@ public final class ItemID
public static final int OVERSEERS_BOOK = 13279;
public static final int MAX_CAPE = 13280;
public static final int MAX_HOOD = 13281;
public static final int MAX_CAPE_13282 = 13282;
public static final int GRAVEDIGGER_MASK = 13283;
public static final int GRAVEDIGGER_TOP = 13284;
public static final int GRAVEDIGGER_LEGGINGS = 13285;

View File

@@ -3590,6 +3590,8 @@ public final class NullItemID
public static final int NULL_9742 = 9742;
public static final int NULL_9744 = 9744;
public static final int NULL_9746 = 9746;
public static final int NULL_9815 = 9815;
public static final int NULL_9816 = 9816;
public static final int NULL_9868 = 9868;
public static final int NULL_9869 = 9869;
public static final int NULL_9870 = 9870;
@@ -3717,6 +3719,8 @@ public final class NullItemID
public static final int NULL_10162 = 10162;
public static final int NULL_10163 = 10163;
public static final int NULL_10164 = 10164;
public static final int NULL_10165 = 10165;
public static final int NULL_10166 = 10166;
public static final int NULL_10168 = 10168;
public static final int NULL_10169 = 10169;
public static final int NULL_10170 = 10170;
@@ -3846,41 +3850,212 @@ public final class NullItemID
public static final int NULL_10579 = 10579;
public static final int NULL_10580 = 10580;
public static final int NULL_10590 = 10590;
public static final int NULL_10601 = 10601;
public static final int NULL_10602 = 10602;
public static final int NULL_10603 = 10603;
public static final int NULL_10604 = 10604;
public static final int NULL_10605 = 10605;
public static final int NULL_10606 = 10606;
public static final int NULL_10607 = 10607;
public static final int NULL_10608 = 10608;
public static final int NULL_10609 = 10609;
public static final int NULL_10610 = 10610;
public static final int NULL_10611 = 10611;
public static final int NULL_10612 = 10612;
public static final int NULL_10613 = 10613;
public static final int NULL_10614 = 10614;
public static final int NULL_10615 = 10615;
public static final int NULL_10616 = 10616;
public static final int NULL_10617 = 10617;
public static final int NULL_10618 = 10618;
public static final int NULL_10619 = 10619;
public static final int NULL_10620 = 10620;
public static final int NULL_10621 = 10621;
public static final int NULL_10622 = 10622;
public static final int NULL_10623 = 10623;
public static final int NULL_10624 = 10624;
public static final int NULL_10625 = 10625;
public static final int NULL_10626 = 10626;
public static final int NULL_10627 = 10627;
public static final int NULL_10628 = 10628;
public static final int NULL_10629 = 10629;
public static final int NULL_10630 = 10630;
public static final int NULL_10631 = 10631;
public static final int NULL_10632 = 10632;
public static final int NULL_10633 = 10633;
public static final int NULL_10634 = 10634;
public static final int NULL_10635 = 10635;
public static final int NULL_10636 = 10636;
public static final int NULL_10637 = 10637;
public static final int NULL_10638 = 10638;
public static final int NULL_10639 = 10639;
public static final int NULL_10640 = 10640;
public static final int NULL_10641 = 10641;
public static final int NULL_10642 = 10642;
public static final int NULL_10643 = 10643;
public static final int NULL_10644 = 10644;
public static final int NULL_10645 = 10645;
public static final int NULL_10646 = 10646;
public static final int NULL_10647 = 10647;
public static final int NULL_10648 = 10648;
public static final int NULL_10649 = 10649;
public static final int NULL_10650 = 10650;
public static final int NULL_10651 = 10651;
public static final int NULL_10652 = 10652;
public static final int NULL_10653 = 10653;
public static final int NULL_10654 = 10654;
public static final int NULL_10655 = 10655;
public static final int NULL_10656 = 10656;
public static final int NULL_10657 = 10657;
public static final int NULL_10658 = 10658;
public static final int NULL_10659 = 10659;
public static final int NULL_10660 = 10660;
public static final int NULL_10661 = 10661;
public static final int NULL_10662 = 10662;
public static final int NULL_10663 = 10663;
public static final int NULL_10664 = 10664;
public static final int NULL_10665 = 10665;
public static final int NULL_10666 = 10666;
public static final int NULL_10667 = 10667;
public static final int NULL_10668 = 10668;
public static final int NULL_10669 = 10669;
public static final int NULL_10670 = 10670;
public static final int NULL_10671 = 10671;
public static final int NULL_10672 = 10672;
public static final int NULL_10673 = 10673;
public static final int NULL_10674 = 10674;
public static final int NULL_10675 = 10675;
public static final int NULL_10676 = 10676;
public static final int NULL_10677 = 10677;
public static final int NULL_10678 = 10678;
public static final int NULL_10679 = 10679;
public static final int NULL_10680 = 10680;
public static final int NULL_10681 = 10681;
public static final int NULL_10682 = 10682;
public static final int NULL_10683 = 10683;
public static final int NULL_10684 = 10684;
public static final int NULL_10685 = 10685;
public static final int NULL_10686 = 10686;
public static final int NULL_10687 = 10687;
public static final int NULL_10688 = 10688;
public static final int NULL_10689 = 10689;
public static final int NULL_10690 = 10690;
public static final int NULL_10691 = 10691;
public static final int NULL_10692 = 10692;
public static final int NULL_10693 = 10693;
public static final int NULL_10694 = 10694;
public static final int NULL_10695 = 10695;
public static final int NULL_10696 = 10696;
public static final int NULL_10697 = 10697;
public static final int NULL_10698 = 10698;
public static final int NULL_10699 = 10699;
public static final int NULL_10700 = 10700;
public static final int NULL_10701 = 10701;
public static final int NULL_10702 = 10702;
public static final int NULL_10703 = 10703;
public static final int NULL_10704 = 10704;
public static final int NULL_10705 = 10705;
public static final int NULL_10706 = 10706;
public static final int NULL_10707 = 10707;
public static final int NULL_10708 = 10708;
public static final int NULL_10709 = 10709;
public static final int NULL_10710 = 10710;
public static final int NULL_10711 = 10711;
public static final int NULL_10712 = 10712;
public static final int NULL_10713 = 10713;
public static final int NULL_10714 = 10714;
public static final int NULL_10715 = 10715;
public static final int NULL_10716 = 10716;
public static final int NULL_10717 = 10717;
public static final int NULL_10718 = 10718;
public static final int NULL_10719 = 10719;
public static final int NULL_10720 = 10720;
public static final int NULL_10721 = 10721;
public static final int NULL_10722 = 10722;
public static final int NULL_10723 = 10723;
public static final int NULL_10724 = 10724;
public static final int NULL_10725 = 10725;
public static final int NULL_10726 = 10726;
public static final int NULL_10727 = 10727;
public static final int NULL_10728 = 10728;
public static final int NULL_10729 = 10729;
public static final int NULL_10730 = 10730;
public static final int NULL_10731 = 10731;
public static final int NULL_10732 = 10732;
public static final int NULL_10733 = 10733;
public static final int NULL_10734 = 10734;
public static final int NULL_10735 = 10735;
public static final int NULL_10736 = 10736;
public static final int NULL_10737 = 10737;
public static final int NULL_10738 = 10738;
public static final int NULL_10739 = 10739;
public static final int NULL_10740 = 10740;
public static final int NULL_10741 = 10741;
public static final int NULL_10742 = 10742;
public static final int NULL_10743 = 10743;
public static final int NULL_10744 = 10744;
public static final int NULL_10745 = 10745;
public static final int NULL_10746 = 10746;
public static final int NULL_10747 = 10747;
public static final int NULL_10748 = 10748;
public static final int NULL_10749 = 10749;
public static final int NULL_10750 = 10750;
public static final int NULL_10751 = 10751;
public static final int NULL_10752 = 10752;
public static final int NULL_10753 = 10753;
public static final int NULL_10754 = 10754;
public static final int NULL_10755 = 10755;
public static final int NULL_10756 = 10756;
public static final int NULL_10757 = 10757;
public static final int NULL_10758 = 10758;
public static final int NULL_10759 = 10759;
public static final int NULL_10760 = 10760;
public static final int NULL_10761 = 10761;
public static final int NULL_10762 = 10762;
public static final int NULL_10763 = 10763;
public static final int NULL_10764 = 10764;
public static final int NULL_10765 = 10765;
public static final int NULL_10766 = 10766;
public static final int NULL_10767 = 10767;
public static final int NULL_10768 = 10768;
public static final int NULL_10769 = 10769;
public static final int NULL_10770 = 10770;
public static final int NULL_10771 = 10771;
public static final int NULL_10772 = 10772;
public static final int NULL_10773 = 10773;
public static final int NULL_10774 = 10774;
public static final int NULL_10775 = 10775;
public static final int NULL_10776 = 10776;
public static final int NULL_10777 = 10777;
public static final int NULL_10778 = 10778;
public static final int NULL_10779 = 10779;
public static final int NULL_10780 = 10780;
public static final int NULL_10781 = 10781;
public static final int NULL_10782 = 10782;
public static final int NULL_10783 = 10783;
public static final int NULL_10784 = 10784;
public static final int NULL_10785 = 10785;
public static final int NULL_10786 = 10786;
public static final int NULL_10787 = 10787;
public static final int NULL_10788 = 10788;
public static final int NULL_10789 = 10789;
public static final int NULL_10790 = 10790;
public static final int NULL_10791 = 10791;
public static final int NULL_10792 = 10792;
public static final int NULL_10793 = 10793;
public static final int NULL_10794 = 10794;
public static final int NULL_10795 = 10795;
public static final int NULL_10796 = 10796;
public static final int NULL_10797 = 10797;
public static final int NULL_10798 = 10798;
public static final int NULL_10799 = 10799;
public static final int NULL_10800 = 10800;
public static final int NULL_10801 = 10801;
public static final int NULL_10802 = 10802;
public static final int NULL_10803 = 10803;
public static final int NULL_10804 = 10804;
public static final int NULL_10805 = 10805;
public static final int NULL_10806 = 10806;
public static final int NULL_10807 = 10807;
public static final int NULL_10809 = 10809;
public static final int NULL_10811 = 10811;
@@ -3898,6 +4073,7 @@ public final class NullItemID
public static final int NULL_10867 = 10867;
public static final int NULL_10868 = 10868;
public static final int NULL_10869 = 10869;
public static final int NULL_10883 = 10883;
public static final int NULL_10892 = 10892;
public static final int NULL_10900 = 10900;
public static final int NULL_10901 = 10901;
@@ -3920,6 +4096,7 @@ public final class NullItemID
public static final int NULL_10930 = 10930;
public static final int NULL_10932 = 10932;
public static final int NULL_10938 = 10938;
public static final int NULL_10945 = 10945;
public static final int NULL_10953 = 10953;
public static final int NULL_10955 = 10955;
public static final int NULL_10957 = 10957;
@@ -3930,6 +4107,10 @@ public final class NullItemID
public static final int NULL_11000 = 11000;
public static final int NULL_11004 = 11004;
public static final int NULL_11005 = 11005;
public static final int NULL_11015 = 11015;
public static final int NULL_11016 = 11016;
public static final int NULL_11017 = 11017;
public static final int NULL_11018 = 11018;
public static final int NULL_11038 = 11038;
public static final int NULL_11063 = 11063;
public static final int NULL_11064 = 11064;
@@ -3965,6 +4146,7 @@ public final class NullItemID
public static final int NULL_11129 = 11129;
public static final int NULL_11131 = 11131;
public static final int NULL_11134 = 11134;
public static final int NULL_11135 = 11135;
public static final int NULL_11142 = 11142;
public static final int NULL_11143 = 11143;
public static final int NULL_11144 = 11144;
@@ -4015,8 +4197,11 @@ public final class NullItemID
public static final int NULL_11265 = 11265;
public static final int NULL_11270 = 11270;
public static final int NULL_11272 = 11272;
public static final int NULL_11274 = 11274;
public static final int NULL_11275 = 11275;
public static final int NULL_11276 = 11276;
public static final int NULL_11277 = 11277;
public static final int NULL_11278 = 11278;
public static final int NULL_11281 = 11281;
public static final int NULL_11285 = 11285;
public static final int NULL_11287 = 11287;
@@ -4274,6 +4459,9 @@ public final class NullItemID
public static final int NULL_11660 = 11660;
public static final int NULL_11661 = 11661;
public static final int NULL_11662 = 11662;
public static final int NULL_11674 = 11674;
public static final int NULL_11675 = 11675;
public static final int NULL_11676 = 11676;
public static final int NULL_11683 = 11683;
public static final int NULL_11684 = 11684;
public static final int NULL_11685 = 11685;
@@ -4700,6 +4888,7 @@ public final class NullItemID
public static final int NULL_13214 = 13214;
public static final int NULL_13219 = 13219;
public static final int NULL_13220 = 13220;
public static final int NULL_13224 = 13224;
public static final int NULL_13228 = 13228;
public static final int NULL_13230 = 13230;
public static final int NULL_13232 = 13232;
@@ -4718,6 +4907,7 @@ public final class NullItemID
public static final int NULL_13270 = 13270;
public static final int NULL_13272 = 13272;
public static final int NULL_13278 = 13278;
public static final int NULL_13282 = 13282;
public static final int NULL_13289 = 13289;
public static final int NULL_13290 = 13290;
public static final int NULL_13291 = 13291;

View File

@@ -53,7 +53,7 @@ public enum SlayerUnlock
GREATER_DEMON_EXTEND(15),
MITHRIL_DRAGON_UNLOCK(16),
AVIANSIES_ENABLE(17),
TZHARR_ENABLE(18),
TZHAAR_ENABLE(18),
BOSS_ENABLE(19),
BLOODVELD_EXTEND(20),
ABERRANT_SPECTRE_EXTEND(21),

View File

@@ -27,6 +27,9 @@ package net.runelite.client;
import io.reactivex.rxjava3.core.Completable;
import io.reactivex.rxjava3.core.Observable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.UUID;
import lombok.AllArgsConstructor;
import net.runelite.http.api.RuneLiteAPI;
@@ -34,6 +37,7 @@ import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
@AllArgsConstructor
class SessionClient
@@ -54,7 +58,10 @@ class SessionClient
try (Response response = okHttpClient.newCall(request).execute())
{
return RuneLiteAPI.GSON.fromJson(response.body().string(), UUID.class);
ResponseBody body = response.body();
InputStream in = body.byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), UUID.class);
}
});
}

View File

@@ -28,9 +28,11 @@ import com.google.gson.Gson;
import io.reactivex.rxjava3.schedulers.Schedulers;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
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.time.Instant;
import java.util.UUID;
@@ -87,7 +89,7 @@ public class SessionManager
try (FileInputStream in = new FileInputStream(SESSION_FILE))
{
session = new Gson().fromJson(new InputStreamReader(in), AccountSession.class);
session = new Gson().fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), AccountSession.class);
log.debug("Loaded session for {}", session.getUsername());
}
@@ -128,7 +130,7 @@ public class SessionManager
return;
}
try (FileWriter fw = new FileWriter(SESSION_FILE, StandardCharsets.UTF_8))
try (Writer fw = new OutputStreamWriter(new FileOutputStream(SESSION_FILE), StandardCharsets.UTF_8))
{
new Gson().toJson(accountSession, fw);

View File

@@ -28,7 +28,6 @@ import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.collect.ImmutableMap;
import io.reactivex.rxjava3.core.Completable;
import io.reactivex.rxjava3.schedulers.Schedulers;
import java.awt.Color;
import java.awt.image.BufferedImage;
@@ -216,13 +215,6 @@ public class ItemManager
eventbus.subscribe(GameStateChanged.class, this, this::onGameStateChanged);
eventbus.subscribe(PostItemDefinition.class, this, this::onPostItemDefinition);
Completable.fromAction(ItemVariationMapping::load)
.subscribeOn(Schedulers.computation())
.subscribe(
() -> log.debug("Loaded {} item variations", ItemVariationMapping.getSize()),
ex -> log.warn("Error loading item variations", ex)
);
}
private void loadPrices()

View File

@@ -192,7 +192,7 @@ public enum ItemMapping
ITEM_RING_OF_ENDURANCE(RING_OF_ENDURANCE_UNCHARGED_24844, RING_OF_ENDURANCE),
// Infinity colour kits
ITEM_INFINITY_TOP(INFINITY_TOP, INFINITY_TOP_10605, INFINITY_TOP_20574, DARK_INFINITY_TOP, LIGHT_INFINITY_TOP),
ITEM_INFINITY_TOP(INFINITY_TOP, INFINITY_TOP_20574, DARK_INFINITY_TOP, LIGHT_INFINITY_TOP),
ITEM_INFINITY_TOP_LIGHT_COLOUR_KIT(LIGHT_INFINITY_COLOUR_KIT, LIGHT_INFINITY_TOP),
ITEM_INFINITY_TOP_DARK_COLOUR_KIT(DARK_INFINITY_COLOUR_KIT, DARK_INFINITY_TOP),
ITEM_INFINITY_BOTTOMS(INFINITY_BOTTOMS, INFINITY_BOTTOMS_20575, DARK_INFINITY_BOTTOMS, LIGHT_INFINITY_BOTTOMS),

View File

@@ -28,23 +28,54 @@ package net.runelite.client.game;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Multimap;
import com.google.gson.stream.JsonReader;
import java.io.IOException;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
/**
* Converts variation items to it's base item counterparts
*/
@Slf4j
public class ItemVariationMapping
{
private static Map<Integer, Integer> MAPPINGS;
private static Multimap<Integer, Integer> INVERTED_MAPPINGS;
private static final Map<Integer, Integer> MAPPINGS;
private static final Multimap<Integer, Integer> INVERTED_MAPPINGS;
static
{
final Gson gson = new Gson();
final TypeToken<Map<String, Collection<Integer>>> typeToken = new TypeToken<Map<String, Collection<Integer>>>()
{
};
final InputStream geLimitData = ItemVariationMapping.class.getResourceAsStream("/item_variations.json");
final Map<String, Collection<Integer>> itemVariations = gson.fromJson(new InputStreamReader(geLimitData, StandardCharsets.UTF_8), typeToken.getType());
ImmutableMap.Builder<Integer, Integer> builder = new ImmutableMap.Builder<>();
ImmutableMultimap.Builder<Integer, Integer> invertedBuilder = new ImmutableMultimap.Builder<>();
for (Collection<Integer> value : itemVariations.values())
{
final Iterator<Integer> iterator = value.iterator();
final int base = iterator.next();
while (iterator.hasNext())
{
final int id = iterator.next();
builder.put(id, base);
invertedBuilder.put(base, id);
}
invertedBuilder.put(base, base);
}
INVERTED_MAPPINGS = invertedBuilder.build();
MAPPINGS = builder.build();
}
/**
* Get base item id for provided variation item id.
@@ -68,41 +99,6 @@ public class ItemVariationMapping
return INVERTED_MAPPINGS.asMap().getOrDefault(itemId, Collections.singletonList(itemId));
}
public static void load() throws IOException
{
try (JsonReader reader = new JsonReader(new InputStreamReader(ItemVariationMapping.class.getResourceAsStream("/item_variations.min.json"), StandardCharsets.UTF_8)))
{
ImmutableMap.Builder<Integer, Integer> builder = ImmutableMap.builderWithExpectedSize(5039);
ImmutableMultimap.Builder<Integer, Integer> invertedBuilder = new ImmutableMultimap.Builder<>();
reader.beginObject();
while (reader.hasNext())
{
// Names are useless
reader.skipValue();
reader.beginArray();
int base = reader.nextInt();
while (reader.hasNext())
{
final int id = reader.nextInt();
builder.put(id, base);
invertedBuilder.put(base, id);
}
invertedBuilder.put(base, base);
reader.endArray();
}
reader.endObject();
INVERTED_MAPPINGS = invertedBuilder.build();
MAPPINGS = builder.build();
}
}
static int getSize()
{
return MAPPINGS.size();

View File

@@ -40,9 +40,14 @@ public class MouseManager
private final List<MouseListener> mouseListeners = new CopyOnWriteArrayList<>();
private final List<MouseWheelListener> mouseWheelListeners = new CopyOnWriteArrayList<>();
private final RuneLiteConfig runeLiteConfig;
@Inject
private RuneLiteConfig runeLiteConfig;
private MouseManager(RuneLiteConfig runeLiteConfig)
{
this.runeLiteConfig = runeLiteConfig;
}
public void registerMouseListener(MouseListener mouseListener)
{
@@ -136,7 +141,7 @@ public class MouseManager
}
return mouseEvent;
}
private void checkExtraMouseButtons(MouseEvent mouseEvent)
{
// Prevent extra mouse buttons from being passed into the client,

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2020, Hydrox6 <ikada@protonmail.ch>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.timetracking;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public enum TimeFormatMode
{
RELATIVE("Relative"),
ABSOLUTE_12H("12 Hour"),
ABSOLUTE_24H("24 Hour");
private final String name;
@Override
public String toString()
{
return name;
}
}

View File

@@ -28,6 +28,7 @@ package net.runelite.client.rs;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import lombok.AllArgsConstructor;
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
@@ -55,7 +56,7 @@ class ClientConfigLoader
}
String str;
final BufferedReader in = new BufferedReader(new InputStreamReader(response.body().byteStream()));
final BufferedReader in = new BufferedReader(new InputStreamReader(response.body().byteStream(), StandardCharsets.UTF_8));
while ((str = in.readLine()) != null)
{
int idx = str.indexOf('=');

View File

@@ -98,7 +98,7 @@ public class ColorValueSlider extends JPanel
super.paint(g);
g.setColor(TRACK_COLOR);
g.fillRect(0, this.getHeight() / 2 - 2, this.getWidth() - KNOB_WIDTH, 5);
g.fillRect(0, this.getHeight() / 2 - 2, ColorUtil.MAX_RGB_VALUE + KNOB_WIDTH * 2, 5);
g.setColor(KNOB_COLOR);
g.fillRect(value - KNOB_WIDTH / 2, this.getHeight() / 2 - KNOB_HEIGHT / 2, KNOB_WIDTH, KNOB_HEIGHT);

View File

@@ -65,7 +65,7 @@ public class RuneliteColorPicker extends JDialog
{
static final String CONFIG_GROUP = "colorpicker";
private final static int FRAME_WIDTH = 400;
private final static int FRAME_WIDTH = 410;
private final static int FRAME_HEIGHT = 380;
private final static int TONE_PANEL_SIZE = 160;

View File

@@ -35,6 +35,7 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
@@ -219,7 +220,7 @@ public class ImageCapture
try (InputStream in = response.body().byteStream())
{
ImageUploadResponse imageUploadResponse = RuneLiteAPI.GSON
.fromJson(new InputStreamReader(in), ImageUploadResponse.class);
.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), ImageUploadResponse.class);
if (imageUploadResponse.isSuccess())
{

View File

@@ -339,7 +339,6 @@ public class WeaponMap
StyleMap.put(ItemID.ROCK_HAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.ROYAL_SCEPTRE, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUBBER_CHICKEN, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUBBER_CHICKEN_10732, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUBBER_CHICKEN_22666, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_2H_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_AXE, WeaponStyle.MELEE);
@@ -370,7 +369,6 @@ public class WeaponMap
StyleMap.put(ItemID.SARADOMIN_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.SARAS_BLESSED_SWORD_FULL, WeaponStyle.MELEE);
StyleMap.put(ItemID.SCYTHE, WeaponStyle.MELEE);
StyleMap.put(ItemID.SCYTHE_10735, WeaponStyle.MELEE);
StyleMap.put(ItemID.SCYTHE_OF_VITUR, WeaponStyle.MELEE);
StyleMap.put(ItemID.SCYTHE_OF_VITUR_22664, WeaponStyle.MELEE);
StyleMap.put(ItemID.SCYTHE_OF_VITUR_UNCHARGED, WeaponStyle.MELEE);

View File

@@ -559,10 +559,6 @@
20199,
23303
],
"shade robe": [
548,
10634
],
"ghostspeak amulet": [
552,
4250
@@ -1666,18 +1662,13 @@
12445,
12447
],
"bunny ears": [
1037,
10734
],
"blue partyhat": [
1042,
2422
],
"cape of legends": [
1052,
8284,
10635
8284
],
"leather boots": [
1061,
@@ -1793,8 +1784,6 @@
1123,
2599,
2607,
10697,
10698,
20415,
23392,
23395,
@@ -1806,8 +1795,6 @@
1125,
2583,
2591,
10690,
10691,
23366,
23369,
23372,
@@ -1818,8 +1805,6 @@
1127,
2615,
2623,
10798,
10800,
20421,
23209,
23212,
@@ -1834,9 +1819,7 @@
"studded body": [
1133,
7362,
7364,
10680,
10681
7364
],
"green dhide body": [
1135,
@@ -1880,11 +1863,6 @@
10300,
10302,
10304,
10709,
10710,
10711,
10712,
10713,
20561
],
"rune helm": [
@@ -1895,12 +1873,7 @@
10288,
10290,
10292,
10294,
10704,
10705,
10706,
10707,
10708
10294
],
"black helm": [
1165,
@@ -1910,12 +1883,7 @@
10308,
10310,
10312,
10314,
10699,
10700,
10701,
10702,
10703
10314
],
"wooden shield": [
1171,
@@ -2144,10 +2112,6 @@
1410,
12658
],
"scythe": [
1419,
10735
],
"amulet of accuracy": [
1478,
20584
@@ -2252,7 +2216,6 @@
10358,
10360,
10362,
10719,
11964,
11966,
11976,
@@ -2269,8 +2232,7 @@
],
"amulet of magic": [
1727,
10366,
10738
10366
],
"amulet of defence": [
1729,
@@ -2718,10 +2680,6 @@
3718,
5604
],
"guthix cape": [
2413,
10720
],
"bronze key": [
2418,
5585,
@@ -2845,70 +2803,6 @@
20789,
20790
],
"ranger boots": [
2577,
10696
],
"wizard boots": [
2579,
10689
],
"robin hood hat": [
2581,
10796
],
"highwayman mask": [
2631,
10692
],
"blue beret": [
2633,
10693
],
"black beret": [
2635,
10694
],
"white beret": [
2637,
10695
],
"tan cavalier": [
2639,
10802
],
"dark cavalier": [
2641,
10804
],
"black cavalier": [
2643,
10806
],
"red headband": [
2645,
10768
],
"black headband": [
2647,
10770
],
"brown headband": [
2649,
10772
],
"pirates hat": [
2651,
10774
],
"zamorak platebody": [
2653,
10776
],
"guthix platebody": [
2669,
10780
],
"puzzle box": [
2795,
2798,
@@ -3121,10 +3015,6 @@
3054,
21200
],
"mime mask": [
3057,
10629
],
"black dart": [
3093,
3094,
@@ -3240,7 +3130,6 @@
],
"splitbark helm": [
3385,
10606,
20568
],
"unfinished potion": [
@@ -3270,10 +3159,6 @@
3434,
3436
],
"gilded platebody": [
3481,
10782
],
"shoe": [
3680,
3681,
@@ -3477,7 +3362,6 @@
4505,
4509,
4510,
10610,
11893,
11894,
11895,
@@ -3520,10 +3404,6 @@
20491,
24161
],
"yoyo": [
4079,
10733
],
"salve amulet": [
4081,
10588,
@@ -3544,9 +3424,6 @@
4089,
4099,
4109,
10601,
10602,
10603,
20562,
23047
],
@@ -3728,10 +3605,6 @@
4284,
4285
],
"ham shirt": [
4298,
11274
],
"teamcape": [
4315,
4317,
@@ -3782,8 +3655,7 @@
4407,
4409,
4411,
4413,
10638
4413
],
"guthix rest": [
4417,
@@ -3870,7 +3742,6 @@
],
"rubber chicken": [
4566,
10732,
22666
],
"book page": [
@@ -4444,10 +4315,6 @@
5518,
5519
],
"rogue mask": [
5554,
10612
],
"gear": [
5562,
5563,
@@ -4468,10 +4335,6 @@
13135,
13136
],
"initiate hauberk": [
5575,
10619
],
"metal spade": [
5586,
5587
@@ -4612,10 +4475,6 @@
6063,
20635
],
"mourner top": [
6065,
10621
],
"teleport crystal": [
6099,
6100,
@@ -4624,10 +4483,6 @@
13102,
23904
],
"ghostly boots": [
6106,
10607
],
"ghostly robe": [
6107,
6108
@@ -4636,35 +4491,11 @@
6119,
6120
],
"rockshell helm": [
6128,
10613
],
"spined helm": [
6131,
10614
],
"skeletal helm": [
6137,
10604
],
"raw pheasant": [
6178,
6179,
11704
],
"lederhosen top": [
6180,
10633
],
"princess blouse": [
6186,
10630
],
"frog mask": [
6188,
10721
],
"raw fishlike thing": [
6200,
6204
@@ -4728,10 +4559,7 @@
"tribal mask": [
6335,
6337,
6339,
10615,
10616,
10617
6339
],
"tribal top": [
6341,
@@ -4842,13 +4670,11 @@
],
"obsidian cape": [
6568,
10636,
20050
],
"fire cape": [
6570,
10566,
10637,
20445,
24223
],
@@ -4867,10 +4693,6 @@
6595,
6597
],
"white platebody": [
6617,
10618
],
"hand mirror": [
6639,
23775
@@ -4912,8 +4734,7 @@
],
"camo top": [
6654,
6657,
10632
6657
],
"camo bottoms": [
6655,
@@ -4962,7 +4783,6 @@
],
"zombie head": [
6722,
10731,
19912
],
"seers ring": [
@@ -5063,22 +4883,13 @@
6853,
6855
],
"bobble hat": [
6856,
9815
],
"bobble scarf": [
6857,
9816
],
"blue marionette": [
6865,
6868,
6875,
6876,
6877,
6878,
10730
6878
],
"green marionette": [
6866,
@@ -5125,7 +4936,6 @@
],
"infinity top": [
6916,
10605,
20574
],
"infinity bottoms": [
@@ -5231,65 +5041,26 @@
7218,
7220
],
"red boater": [
7319,
10758
],
"orange boater": [
7321,
10760
],
"green boater": [
7323,
10762
],
"blue boater": [
7325,
10764
],
"black boater": [
7327,
10766
],
"black shield": [
7332,
7338,
7344,
7350,
7356,
10665,
10668,
10671,
10674,
10677
7356
],
"adamant shield": [
7334,
7340,
7346,
7352,
7358,
10666,
10669,
10672,
10675,
10678
7358
],
"rune shield": [
7336,
7342,
7348,
7354,
7360,
10667,
10670,
10673,
10676,
10679
],
"enchanted top": [
7399,
10688
7360
],
"magic secateurs": [
7409,
@@ -5398,10 +5169,6 @@
7590,
7591
],
"zombie shirt": [
7592,
10631
],
"item": [
7597,
7598,
@@ -5721,10 +5488,6 @@
7914,
7916
],
"easter ring": [
7927,
10729
],
"fresh monkfish": [
7942,
7943
@@ -6260,7 +6023,6 @@
],
"void knight top": [
8839,
10611,
20465,
24177
],
@@ -6403,10 +6165,6 @@
9065,
20722
],
"moonclan hat": [
9069,
10608
],
"astral rune": [
9075,
11699
@@ -6415,10 +6173,6 @@
9094,
20799
],
"lunar helm": [
9096,
10609
],
"blurite bolts": [
9139,
9286,
@@ -6588,7 +6342,6 @@
],
"proselyte hauberk": [
9674,
10620,
20564
],
"proselyte cuisse": [
@@ -6617,118 +6370,92 @@
],
"attack cape": [
9747,
9748,
10639
9748
],
"strength cape": [
9750,
9751,
10640
9751
],
"defence cape": [
9753,
9754,
10641
9754
],
"ranging cape": [
9756,
9757,
10642
9757
],
"prayer cape": [
9759,
9760,
10643
9760
],
"magic cape": [
9762,
9763,
10644
9763
],
"runecraft cape": [
9765,
9766,
10645
9766
],
"hitpoints cape": [
9768,
9769,
10647
9769
],
"agility cape": [
9771,
9772,
10648,
13340,
13341
],
"herblore cape": [
9774,
9775,
10649
9775
],
"thieving cape": [
9777,
9778,
10650
9778
],
"crafting cape": [
9780,
9781,
10651
9781
],
"fletching cape": [
9783,
9784,
10652
9784
],
"slayer cape": [
9786,
9787,
10653
9787
],
"construct cape": [
9789,
9790,
10654
9790
],
"mining cape": [
9792,
9793,
10655
9793
],
"smithing cape": [
9795,
9796,
10656
9796
],
"fishing cape": [
9798,
9799,
10657
9799
],
"cooking cape": [
9801,
9802,
10658
9802
],
"firemaking cape": [
9804,
9805,
10659
],
"woodcutting cape": [
9807,
10660
9805
],
"farming cape": [
9810,
9811,
10661
9811
],
"quest point cape": [
9813,
10662,
13068
],
"oak cape rack": [
@@ -6792,38 +6519,9 @@
9911,
9912
],
"jack lantern mask": [
9920,
10723
],
"skeleton boots": [
9921,
10724
],
"skeleton gloves": [
9922,
10725
],
"skeleton leggings": [
9923,
10726
],
"skeleton shirt": [
9924,
10727
],
"skeleton mask": [
9925,
10728
],
"bomber jacket": [
9944,
11135
],
"hunter cape": [
9948,
9949,
10646
9949
],
"kebbit": [
9953,
@@ -6867,63 +6565,13 @@
10027,
10028
],
"kyatt top": [
10037,
10622
],
"larupia top": [
10043,
10623
],
"graahk top": [
10049,
10624
],
"wood camo top": [
10053,
10625
],
"jungle camo top": [
10057,
10626
],
"desert camo top": [
10061,
10627
],
"polar camo top": [
10065,
10628
],
"spotted cape": [
10069,
10073,
10663
10073
],
"spottier cape": [
10071,
10074,
10664
],
"bobs red shirt": [
10316,
10714
],
"bobs blue shirt": [
10318,
10715
],
"bobs green shirt": [
10320,
10716
],
"bobs black shirt": [
10322,
10717
],
"bobs purple shirt": [
10324,
10718
10074
],
"3rd age robe top": [
10338,
@@ -6933,74 +6581,10 @@
10340,
20577
],
"strength amulet": [
10364,
10736
],
"zamorak dhide body": [
10370,
10790
],
"saradomin dhide body": [
10386,
10792
],
"a powdered wig": [
10392,
10740
],
"flared trousers": [
10394,
10742
],
"pantaloons": [
10396,
10744
],
"sleeping cap": [
10398,
10746
],
"black elegant shirt": [
10400,
10748
],
"red elegant shirt": [
10404,
10750
],
"blue elegant shirt": [
10408,
10752
],
"green elegant shirt": [
10412,
10754
],
"purple elegant shirt": [
10416,
10756
],
"saradomin robe top": [
10458,
10784
],
"zamorak robe top": [
10460,
10786
],
"guthix robe top": [
10462,
10788
],
"avas accumulator": [
10499,
23609
],
"reindeer hat": [
10507,
10722
],
"fremennik sea boots": [
10510,
13129,
@@ -7161,16 +6745,6 @@
10598,
10599
],
"dhide body": [
10682,
10683,
10684,
10685
],
"wizard robe": [
10686,
10687
],
"yakhide armour": [
10822,
10824
@@ -7183,10 +6757,6 @@
10857,
24792
],
"hard hat": [
10862,
10883
],
"keg": [
10885,
10898
@@ -7219,10 +6789,6 @@
23563,
23565
],
"lumberjack top": [
10939,
10945
],
"skull staples": [
10950,
10951
@@ -7243,22 +6809,6 @@
10993,
10994
],
"chicken head": [
11015,
11021
],
"chicken feet": [
11016,
11019
],
"chicken wings": [
11017,
11020
],
"chicken legs": [
11018,
11022
],
"rotten barrel": [
11044,
11045
@@ -7374,14 +6924,6 @@
12768,
20408
],
"cavalier mask": [
11277,
11280
],
"beret mask": [
11278,
11282
],
"dragonfire shield": [
11283,
11284
@@ -7566,19 +7108,16 @@
],
"void mage helm": [
11663,
11674,
20477,
24183
],
"void ranger helm": [
11664,
11675,
20479,
24184
],
"void melee helm": [
11665,
11676,
20481,
24185
],
@@ -8312,8 +7851,7 @@
],
"music cape": [
13221,
13222,
13224
13222
],
"herb sack": [
13226,
@@ -8339,7 +7877,6 @@
],
"max cape": [
13280,
13282,
13342
],
"bank key": [

View File

@@ -1 +1 @@
BDBD51EF867D393E41B723CD28720A91E2ED34FAFF581AC69B37C648EAC7B714
12B91B740FE760F73A23EF34E1D4F53EA00F829EF7FC33E648F6FF5EA17417A0

View File

@@ -5,13 +5,16 @@
.string_var_count 1
get_varc_int 5
iconst 14
if_icmpeq LABEL4
jump LABEL7
LABEL4:
if_icmpeq LABEL7
get_varc_int 5
iconst 17
if_icmpeq LABEL7
jump LABEL10
LABEL7:
iconst 1
set_varc_int 66
return
LABEL7:
LABEL10:
iconst -1
istore 0
sconst ""
@@ -21,108 +24,108 @@ LABEL7:
istore 1
iload 1
iconst 0
if_icmpgt LABEL18
jump LABEL184
LABEL18:
if_icmpgt LABEL21
jump LABEL187
LABEL21:
get_varc_int 5
switch
1: LABEL21
2: LABEL44
3: LABEL44
4: LABEL23
5: LABEL23
6: LABEL44
7: LABEL107
8: LABEL111
9: LABEL117
10: LABEL120
11: LABEL176
12: LABEL136
13: LABEL154
15: LABEL117
16: LABEL181
jump LABEL183
LABEL21:
1: LABEL24
2: LABEL47
3: LABEL47
4: LABEL26
5: LABEL26
6: LABEL47
7: LABEL110
8: LABEL114
9: LABEL120
10: LABEL123
11: LABEL179
12: LABEL139
13: LABEL157
15: LABEL120
16: LABEL184
jump LABEL186
LABEL24:
return
jump LABEL183
LABEL23:
jump LABEL186
LABEL26:
ignore_count
iconst 0
if_icmplt LABEL27
jump LABEL30
LABEL27:
if_icmplt LABEL30
jump LABEL33
LABEL30:
sconst "Unable to update ignore list - system busy."
mes
jump LABEL43
LABEL30:
jump LABEL46
LABEL33:
get_varc_int 5
iconst 4
if_icmpeq LABEL34
jump LABEL37
LABEL34:
if_icmpeq LABEL37
jump LABEL40
LABEL37:
get_varc_string 359
ignore_add
jump LABEL43
LABEL37:
jump LABEL46
LABEL40:
get_varc_int 5
iconst 5
if_icmpeq LABEL41
jump LABEL43
LABEL41:
if_icmpeq LABEL44
jump LABEL46
LABEL44:
get_varc_string 359
ignore_del
LABEL43:
jump LABEL183
LABEL44:
LABEL46:
jump LABEL186
LABEL47:
friend_count
iconst 0
if_icmplt LABEL48
jump LABEL51
LABEL48:
if_icmplt LABEL51
jump LABEL54
LABEL51:
sconst "Unable to complete action - system busy."
mes
jump LABEL106
LABEL51:
jump LABEL109
LABEL54:
get_varc_int 5
iconst 2
if_icmpeq LABEL55
jump LABEL58
LABEL55:
if_icmpeq LABEL58
jump LABEL61
LABEL58:
get_varc_string 359
friend_add
jump LABEL106
LABEL58:
jump LABEL109
LABEL61:
get_varc_int 5
iconst 3
if_icmpeq LABEL62
jump LABEL65
LABEL62:
if_icmpeq LABEL65
jump LABEL68
LABEL65:
get_varc_string 359
friend_del
jump LABEL106
LABEL65:
jump LABEL109
LABEL68:
get_varc_int 5
iconst 6
if_icmpeq LABEL69
jump LABEL106
LABEL69:
if_icmpeq LABEL72
jump LABEL109
LABEL72:
get_varbit 8119
iconst 0
if_icmpeq LABEL73
jump LABEL79
LABEL73:
if_icmpeq LABEL76
jump LABEL82
LABEL76:
iconst 1
iconst 1
invoke 299
sconst "You must set a name before you can chat."
mes
return
LABEL79:
LABEL82:
chat_getfilter_private
iconst 2
if_icmpeq LABEL83
jump LABEL94
LABEL83:
if_icmpeq LABEL86
jump LABEL97
LABEL86:
chat_getfilter_public
iconst 1
chat_getfilter_trade
@@ -134,99 +137,99 @@ LABEL83:
invoke 84
iload 0
invoke 89
LABEL94:
LABEL97:
get_varbit 4394
iconst 1
if_icmpeq LABEL98
jump LABEL101
LABEL98:
get_varc_string 360
friend_del
if_icmpeq LABEL101
jump LABEL104
LABEL101:
get_varc_string 360
friend_del
jump LABEL107
LABEL104:
get_varc_string 360
get_varc_string 359
sconst "privateMessage" ; load event name
iconst 0 ; whether or not to skip
runelite_callback ; invoke callback
iconst 1
if_icmpeq LABEL104 ; if skipped, do not message
if_icmpeq LABEL107 ; if skipped, do not message
chat_sendprivate
LABEL104:
LABEL107:
clientclock
set_varc_int 61
LABEL106:
jump LABEL183
LABEL107:
LABEL109:
jump LABEL186
LABEL110:
get_varc_string 359
invoke 212
resume_countdialog
jump LABEL183
LABEL111:
jump LABEL186
LABEL114:
get_varc_string 359
removetags
set_varc_string 361
get_varc_string 359
resume_namedialog
jump LABEL183
LABEL117:
jump LABEL186
LABEL120:
get_varc_string 359
resume_stringdialog
jump LABEL183
LABEL120:
jump LABEL186
LABEL123:
get_varbit 8119
iconst 0
if_icmpeq LABEL124
jump LABEL130
LABEL124:
if_icmpeq LABEL127
jump LABEL133
LABEL127:
iconst 1
iconst 1
invoke 299
sconst "You must set a name before you can chat."
mes
return
LABEL130:
LABEL133:
get_varc_string 359
removetags
set_varc_string 362
get_varc_string 359
clan_joinchat
jump LABEL183
LABEL136:
jump LABEL186
LABEL139:
iload 1
iconst 10
if_icmpgt LABEL140
jump LABEL146
LABEL140:
if_icmpgt LABEL143
jump LABEL149
LABEL143:
get_varc_string 359
iconst 0
iconst 9
substring
sstore 0
jump LABEL148
LABEL146:
jump LABEL151
LABEL149:
get_varc_string 359
sstore 0
LABEL148:
LABEL151:
sload 0
lowercase
chat_setmessagefilter
invoke 553
invoke 84
jump LABEL183
LABEL154:
jump LABEL186
LABEL157:
get_varbit 8119
iconst 0
if_icmpeq LABEL158
jump LABEL164
LABEL158:
if_icmpeq LABEL161
jump LABEL167
LABEL161:
iconst 1
iconst 1
invoke 299
sconst "You must set a name before you can chat."
mes
return
LABEL164:
LABEL167:
get_varc_string 359
iconst 0
set_varc_int 62
@@ -238,33 +241,33 @@ LABEL164:
sconst "I1"
iconst 10616845
if_setontimer
jump LABEL183
LABEL176:
jump LABEL186
LABEL179:
iconst 0
iconst 1
invoke 299
return
jump LABEL183
LABEL181:
jump LABEL186
LABEL184:
get_varc_string 359
invoke 2061
LABEL183:
jump LABEL190
LABEL184:
LABEL186:
jump LABEL193
LABEL187:
get_varc_int 5
switch
16: LABEL189
7: LABEL187
8: LABEL187
9: LABEL187
15: LABEL187
jump LABEL190
LABEL187:
return
jump LABEL190
LABEL189:
return
16: LABEL192
7: LABEL190
8: LABEL190
9: LABEL190
15: LABEL190
jump LABEL193
LABEL190:
return
jump LABEL193
LABEL192:
return
LABEL193:
iconst 1
iconst 1
invoke 299

View File

@@ -1 +1 @@
55CFDE9983A73FA698E2F3CF4F79C0E62F40BF154E34A4F01112041928B01CB7
A9577B60999F586BCC424D2312B2D4A5D033DB0A3228719B9BA1DFD9742B92E7

View File

@@ -88,6 +88,10 @@ LABEL40:
iconst 1
iconst 10616887
if_sethide
iconst 0
iconst 0
iconst 10616885
if_setscrollpos
iconst 10616885
cc_deleteall
iconst 10616886
@@ -225,19 +229,19 @@ LABEL40:
if_setonclick
get_varc_int 41
iconst 1337
if_icmpeq LABEL215
jump LABEL219
LABEL215:
if_icmpeq LABEL219
jump LABEL223
LABEL219:
invoke 2526
pop_int
clientclock
set_varc_int 384
LABEL219:
LABEL223:
invoke 1972
iconst 1
if_icmpeq LABEL223
jump LABEL224
LABEL223:
if_icmpeq LABEL227
jump LABEL228
LABEL227:
invoke 2581
LABEL224:
LABEL228:
return

View File

@@ -340,10 +340,8 @@ public class ItemVariationMappingTest
}};
@Test
public void testMappedNames() throws Exception
public void testMappedNames()
{
ItemVariationMapping.load();
ITEMS_MAP.forEach((key, value) ->
assertEquals(value, (Integer) ItemVariationMapping.map(key)));
}

View File

@@ -26,4 +26,8 @@ public interface RSGraphicsObject extends GraphicsObject, RSEntity
@Import("height")
@Override
int getHeight();
@Import("isFinished")
@Override
boolean finished();
}