Merge remote-tracking branch 'runelite/master' into 2310-merge
This commit is contained in:
@@ -25,13 +25,9 @@
|
||||
package net.runelite.http.api;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import net.runelite.http.api.item.ItemEquipmentStats;
|
||||
import net.runelite.http.api.item.ItemPrice;
|
||||
import net.runelite.http.api.item.ItemStats;
|
||||
import net.runelite.http.api.util.TypeAdapters;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.Interceptor;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
@@ -60,12 +56,9 @@ public class RuneLiteAPI
|
||||
public static final String RUNELITE_AUTH = "RUNELITE-AUTH";
|
||||
|
||||
public static final OkHttpClient CLIENT;
|
||||
public static final Gson GSON = new GsonBuilder()
|
||||
.setPrettyPrinting()
|
||||
.registerTypeAdapter(ItemStats.class, TypeAdapters.ITEMSTATS)
|
||||
.registerTypeAdapter(ItemEquipmentStats.class, TypeAdapters.EQUIPMENTSTATS)
|
||||
.registerTypeAdapter(ItemPrice.class, TypeAdapters.ITEMPRICE)
|
||||
.create();
|
||||
public static final Gson GSON = new Gson();
|
||||
public static final MediaType JSON = MediaType.parse("application/json");
|
||||
public static String userAgent;
|
||||
|
||||
private static final String BASE = "https://api.runelite.net";
|
||||
private static final String WSBASE = "https://api.runelite.net/ws";
|
||||
@@ -76,8 +69,6 @@ public class RuneLiteAPI
|
||||
private static final String MAVEN_METADATA = "http://repo.runelite.net/net/runelite/runelite-parent/maven-metadata.xml";
|
||||
|
||||
private static final Properties properties = new Properties();
|
||||
private static String userAgent;
|
||||
|
||||
private static String version;
|
||||
private static String upstreamVersion;
|
||||
private static int rsVersion;
|
||||
|
||||
@@ -30,10 +30,10 @@ import java.util.UUID;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.http.api.RuneLiteAPI;
|
||||
import static net.runelite.http.api.RuneLiteAPI.JSON;
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.Response;
|
||||
@@ -42,7 +42,6 @@ import okhttp3.Response;
|
||||
@AllArgsConstructor
|
||||
public class GrandExchangeClient
|
||||
{
|
||||
private static final MediaType JSON = MediaType.parse("application/json");
|
||||
private static final Gson GSON = RuneLiteAPI.GSON;
|
||||
|
||||
private final UUID uuid;
|
||||
|
||||
@@ -36,10 +36,10 @@ import java.util.UUID;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.http.api.RuneLiteAPI;
|
||||
import static net.runelite.http.api.RuneLiteAPI.JSON;
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.Response;
|
||||
@@ -48,7 +48,6 @@ import okhttp3.Response;
|
||||
@AllArgsConstructor
|
||||
public class LootTrackerClient
|
||||
{
|
||||
private static final MediaType JSON = MediaType.parse("application/json");
|
||||
private static final Gson GSON = RuneLiteAPI.GSON;
|
||||
|
||||
private final UUID uuid;
|
||||
|
||||
@@ -31,10 +31,10 @@ import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.List;
|
||||
import net.runelite.http.api.RuneLiteAPI;
|
||||
import static net.runelite.http.api.RuneLiteAPI.JSON;
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.Response;
|
||||
@@ -43,8 +43,6 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
public class XteaClient
|
||||
{
|
||||
private static final MediaType JSON = MediaType.parse("application/json");
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(XteaClient.class);
|
||||
|
||||
public void submit(XteaRequest xteaRequest)
|
||||
|
||||
@@ -164,7 +164,7 @@ public interface ChatColorConfig extends Config
|
||||
position = 45,
|
||||
keyName = "opaqueServerMessage",
|
||||
name = "Server message",
|
||||
description = "Color of Server Messages (eg. 'Welcome to Runescape')"
|
||||
description = "Color of Server Messages (eg. 'Welcome to RuneScape')"
|
||||
)
|
||||
Color opaqueServerMessage();
|
||||
|
||||
@@ -404,7 +404,7 @@ public interface ChatColorConfig extends Config
|
||||
position = 75,
|
||||
keyName = "transparentServerMessage",
|
||||
name = "Server message (transparent)",
|
||||
description = "Color of Server Messages (eg. 'Welcome to Runescape') (transparent)"
|
||||
description = "Color of Server Messages (eg. 'Welcome to RuneScape') (transparent)"
|
||||
)
|
||||
Color transparentServerMessage();
|
||||
|
||||
|
||||
@@ -106,6 +106,8 @@ public enum ItemMapping
|
||||
ITEM_FURY_ORNAMENT_KIT(FURY_ORNAMENT_KIT, AMULET_OF_FURY_OR),
|
||||
ITEM_TORMENTED_BRACELET(TORMENTED_BRACELET, TORMENTED_BRACELET_OR),
|
||||
ITEM_TORMENTED_ORNAMENT_KIT(TORMENTED_ORNAMENT_KIT, TORMENTED_BRACELET_OR),
|
||||
ITEM_BERSERKER_NECKLACE(BERSERKER_NECKLACE, BERSERKER_NECKLACE_OR),
|
||||
ITEM_BERSERKER_NECKLACE_ORNAMENT_KIT(BERSERKER_NECKLACE_ORNAMENT_KIT, BERSERKER_NECKLACE_OR),
|
||||
|
||||
// Ensouled heads
|
||||
ITEM_ENSOULED_GOBLIN_HEAD(ENSOULED_GOBLIN_HEAD_13448, ENSOULED_GOBLIN_HEAD),
|
||||
|
||||
@@ -599,9 +599,11 @@ public class TabInterface
|
||||
chatboxPanelManager.close();
|
||||
}
|
||||
|
||||
if (event.getIdentifier() == WidgetInfo.BANK_ITEM_CONTAINER.getId()
|
||||
if ((event.getIdentifier() == WidgetInfo.BANK_ITEM_CONTAINER.getId()
|
||||
|| event.getIdentifier() == WidgetInfo.BANK_INVENTORY_ITEMS_CONTAINER.getId())
|
||||
&& event.getMenuOpcode() == MenuOpcode.EXAMINE_ITEM_BANK_EQ
|
||||
&& event.getOption().equalsIgnoreCase("withdraw-x"))
|
||||
&& (event.getOption().equalsIgnoreCase("withdraw-x")
|
||||
|| event.getOption().equalsIgnoreCase("deposit-x")))
|
||||
{
|
||||
waitSearchTick = true;
|
||||
rememberedSearch = client.getVar(VarClientStr.INPUT_TEXT);
|
||||
|
||||
@@ -144,7 +144,7 @@ public class SkillChallengeClue extends ClueScroll implements NpcClueScroll
|
||||
new SkillChallengeClue("Craft multiple cosmic runes from a single essence.", item(ItemID.PURE_ESSENCE)),
|
||||
new SkillChallengeClue("Plant a watermelon seed.", item(ItemID.RAKE), item(ItemID.SEED_DIBBER), xOfItem(ItemID.WATERMELON_SEED, 3)),
|
||||
new SkillChallengeClue("Activate the Chivalry prayer."),
|
||||
new SkillChallengeClue("Hand in a Tier 2 or higher set of Shayzien supply armour", "hand in a boxed set of shayzien supply armour at tier 2 or above.", any("Shayzien Supply Set (Tier 2 or higher)", item(ItemID.SHAYZIEN_SUPPLY_SET_2), item(ItemID.SHAYZIEN_SUPPLY_SET_3), item(ItemID.SHAYZIEN_SUPPLY_SET_4), item(ItemID.SHAYZIEN_SUPPLY_SET_5))),
|
||||
new SkillChallengeClue("Hand in a Tier 2 or higher set of Shayzien supply armour", "take the lovakengj armourers a boxed set of shayzien supply armour at tier 2 or above.", any("Shayzien Supply Set (Tier 2 or higher)", item(ItemID.SHAYZIEN_SUPPLY_SET_2), item(ItemID.SHAYZIEN_SUPPLY_SET_3), item(ItemID.SHAYZIEN_SUPPLY_SET_4), item(ItemID.SHAYZIEN_SUPPLY_SET_5))),
|
||||
// Master Sherlock Tasks
|
||||
new SkillChallengeClue("Equip an abyssal whip in front of the abyssal demons of the Slayer Tower.", true, any("Abyssal Whip", item(ItemID.ABYSSAL_WHIP), item(ItemID.FROZEN_ABYSSAL_WHIP), item(ItemID.VOLCANIC_ABYSSAL_WHIP))),
|
||||
new SkillChallengeClue("Smith a runite med helm.", item(ItemID.HAMMER), item(ItemID.RUNITE_BAR)),
|
||||
|
||||
@@ -38,7 +38,7 @@ import net.runelite.api.coords.WorldPoint;
|
||||
* <p>
|
||||
* These puzzles are established by having some way to test the distance from the solution via "warmth", where being
|
||||
* colder means one is farther away from the target, and being warmer means one is closer to it, with the goal being to
|
||||
* reach the most warm value to discover the solution point. Hot-cold puzzles in Old School Runescape are implemented
|
||||
* reach the most warm value to discover the solution point. Hot-cold puzzles in Old School RuneScape are implemented
|
||||
* with specific set of solution points, so this solver will filter from a provided set of possible solutions as new
|
||||
* signals of temperatures and temperature changes are provided.
|
||||
*/
|
||||
|
||||
@@ -48,11 +48,16 @@ public class MultipleOfItemRequirement implements ItemRequirement
|
||||
@Override
|
||||
public boolean fulfilledBy(Item[] items)
|
||||
{
|
||||
int quantityFound = 0;
|
||||
for (Item item : items)
|
||||
{
|
||||
if (item.getId() == itemId && item.getQuantity() >= quantity)
|
||||
if (item.getId() == itemId)
|
||||
{
|
||||
return true;
|
||||
quantityFound += item.getQuantity();
|
||||
if (quantityFound >= quantity)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ import net.runelite.http.api.hiscore.Skill;
|
||||
@Singleton
|
||||
public class HiscorePanel extends PluginPanel
|
||||
{
|
||||
/* The maximum allowed username length in runescape accounts */
|
||||
/* The maximum allowed username length in RuneScape accounts */
|
||||
private static final int MAX_USERNAME_LENGTH = 12;
|
||||
|
||||
/**
|
||||
@@ -344,7 +344,7 @@ public class HiscorePanel extends PluginPanel
|
||||
return;
|
||||
}
|
||||
|
||||
/* Runescape usernames can't be longer than 12 characters long */
|
||||
/* RuneScape usernames can't be longer than 12 characters long */
|
||||
if (lookup.length() > MAX_USERNAME_LENGTH)
|
||||
{
|
||||
searchBar.setIcon(IconTextField.Icon.ERROR);
|
||||
|
||||
@@ -426,13 +426,21 @@ public class MusicPlugin extends Plugin
|
||||
{
|
||||
{
|
||||
Widget handle = slider.getHandle();
|
||||
Widget[] siblings = handle.getParent().getChildren();
|
||||
if (siblings.length < handle.getIndex() || siblings[handle.getIndex()] != handle)
|
||||
Widget parent = handle.getParent();
|
||||
if (parent == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
siblings[slider.getTrack().getIndex()] = null;
|
||||
siblings[handle.getIndex()] = null;
|
||||
else
|
||||
{
|
||||
Widget[] siblings = parent.getChildren();
|
||||
if (siblings == null || handle.getIndex() >= siblings.length || siblings[handle.getIndex()] != handle)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
siblings[slider.getTrack().getIndex()] = null;
|
||||
siblings[handle.getIndex()] = null;
|
||||
}
|
||||
}
|
||||
|
||||
Object[] init = icon.getOnLoadListener();
|
||||
@@ -459,11 +467,19 @@ public class MusicPlugin extends Plugin
|
||||
Widget handle = slider.getHandle();
|
||||
if (handle != null)
|
||||
{
|
||||
Widget[] siblings = handle.getParent().getChildren();
|
||||
if (siblings.length < handle.getIndex() || siblings[handle.getIndex()] != handle)
|
||||
Widget parent = handle.getParent();
|
||||
if (parent == null)
|
||||
{
|
||||
handle = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
Widget[] siblings = parent.getChildren();
|
||||
if (siblings == null || handle.getIndex() >= siblings.length || siblings[handle.getIndex()] != handle)
|
||||
{
|
||||
handle = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (handle == null)
|
||||
{
|
||||
|
||||
@@ -377,12 +377,17 @@ LABEL327:
|
||||
jump LABEL372
|
||||
LABEL330:
|
||||
iload 7
|
||||
iload 12 ; Load the id of the messageNode
|
||||
sconst "" ; Push a container for the timestamp
|
||||
sconst "addTimestamp" ; Push event name
|
||||
runelite_callback ; Invoke callback
|
||||
pop_int ; Pop the id of the messageNode
|
||||
sconst "From "
|
||||
sload 1
|
||||
sconst ":"
|
||||
sconst "privateChatSplitFrom"
|
||||
runelite_callback
|
||||
join_string 3
|
||||
join_string 4 ; Add the timestamp to the message
|
||||
sload 0
|
||||
iload 9
|
||||
iload 10
|
||||
@@ -401,12 +406,17 @@ LABEL330:
|
||||
jump LABEL407
|
||||
LABEL351:
|
||||
iload 7
|
||||
iload 12 ; Load the id of the messageNode
|
||||
sconst "" ; Push container for the timestamp
|
||||
sconst "addTimestamp" ; Push event name
|
||||
runelite_callback ; Invoke callback
|
||||
pop_int ; Pop the id of the messageNode
|
||||
sconst "To "
|
||||
sload 1
|
||||
sconst ":"
|
||||
sconst "privateChatSplitTo"
|
||||
runelite_callback
|
||||
join_string 3
|
||||
join_string 4 ; Add the timestamp to the message
|
||||
sload 0
|
||||
iload 9
|
||||
iload 10
|
||||
@@ -425,7 +435,13 @@ LABEL351:
|
||||
jump LABEL407
|
||||
LABEL372:
|
||||
iload 7
|
||||
sload 0
|
||||
iload 12 ; Load the id of the messageNode
|
||||
sconst "" ; Push a container for the timestamp
|
||||
sconst "addTimestamp" ; Push event name
|
||||
runelite_callback ; Invoke callback
|
||||
pop_int ; Pop the id of the messageNode
|
||||
sload 0 ; Load the log in/out message
|
||||
join_string 2 ; Add the timestamp to the message
|
||||
iload 9
|
||||
iload 10
|
||||
iconst 10682368
|
||||
|
||||
Reference in New Issue
Block a user