upstream: merge

upstream: merge
This commit is contained in:
xKylee
2020-03-01 20:44:44 +00:00
13 changed files with 319 additions and 170 deletions

View File

@@ -35,8 +35,8 @@ public class KitDefinition
public short[] retextureToFind; public short[] retextureToFind;
public short[] retextureToReplace; public short[] retextureToReplace;
public int bodyPartId = -1; public int bodyPartId = -1;
public int[] modelIds; public int[] models;
public int[] models = new int[] public int[] chatheadModels = new int[]
{ {
-1, -1, -1, -1, -1 -1, -1, -1, -1, -1
}; };

View File

@@ -53,11 +53,11 @@ public class KitLoader
else if (opcode == 2) else if (opcode == 2)
{ {
int length = is.readUnsignedByte(); int length = is.readUnsignedByte();
def.modelIds = new int[length]; def.models = new int[length];
for (int index = 0; index < length; ++index) for (int index = 0; index < length; ++index)
{ {
def.modelIds[index] = is.readUnsignedShort(); def.models[index] = is.readUnsignedShort();
} }
} }
else if (opcode == 3) else if (opcode == 3)
@@ -90,7 +90,7 @@ public class KitLoader
} }
else if (opcode >= 60 && opcode < 70) else if (opcode >= 60 && opcode < 70)
{ {
def.models[opcode - 60] = is.readShort(); def.chatheadModels[opcode - 60] = is.readUnsignedShort();
} }
} }

View File

@@ -57,6 +57,10 @@ public enum InventoryID
* Monkey madness puzzle box inventory. * Monkey madness puzzle box inventory.
*/ */
MONKEY_MADNESS_PUZZLE_BOX(221), MONKEY_MADNESS_PUZZLE_BOX(221),
/**
* Drift net fishing reward
*/
DRIFT_NET_FISHING_REWARD(307),
/** /**
* Looting Bag inventory * Looting Bag inventory
*/ */

View File

@@ -501,6 +501,7 @@ public enum Varbits
SUPERIOR_ENABLED(5362), SUPERIOR_ENABLED(5362),
FOSSIL_ISLAND_WYVERN_DISABLE(6251), FOSSIL_ISLAND_WYVERN_DISABLE(6251),
BANK_REARRANGE_MODE(3959),
CURRENT_BANK_TAB(4150), CURRENT_BANK_TAB(4150),
WORLDHOPPER_FAVROITE_1(4597), WORLDHOPPER_FAVROITE_1(4597),

View File

@@ -33,11 +33,12 @@ import java.util.Collection;
import java.util.List; import java.util.List;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.text.WordUtils; import org.apache.commons.text.WordUtils;
import org.apache.commons.text.similarity.JaroWinklerDistance;
public class Text public class Text
{ {
private static final StringBuilder SB = new StringBuilder(64); private static final StringBuilder SB = new StringBuilder(64);
private static final JaroWinklerDistance DISTANCE = new JaroWinklerDistance();
public static final Splitter COMMA_SPLITTER = Splitter public static final Splitter COMMA_SPLITTER = Splitter
.on(",") .on(",")
.omitEmptyStrings() .omitEmptyStrings()
@@ -292,4 +293,22 @@ public class Text
return toString; return toString;
} }
/**
* Checks if all the search terms in the given list matches at least one keyword.
*
* @return true if all search terms matches at least one keyword, or false if otherwise.
*/
public static boolean matchesSearchTerms(String[] searchTerms, final Collection<String> keywords)
{
for (String term : searchTerms)
{
if (keywords.stream().noneMatch((t) -> t.contains(term) ||
DISTANCE.apply(t, term) > 0.9))
{
return false;
}
}
return true;
}
} }

View File

@@ -124,6 +124,7 @@ public class WidgetID
public static final int WORLD_SWITCHER_GROUP_ID = 69; public static final int WORLD_SWITCHER_GROUP_ID = 69;
public static final int DIALOG_OPTION_GROUP_ID = 219; public static final int DIALOG_OPTION_GROUP_ID = 219;
public static final int DIALOG_PLAYER_GROUP_ID = 217; public static final int DIALOG_PLAYER_GROUP_ID = 217;
public static final int DRIFT_NET_FISHING_REWARD_GROUP_ID = 607;
public static final int FOSSIL_ISLAND_OXYGENBAR_ID = 609; public static final int FOSSIL_ISLAND_OXYGENBAR_ID = 609;
public static final int MINIGAME_TAB_ID = 76; public static final int MINIGAME_TAB_ID = 76;
public static final int SPELLBOOK_GROUP_ID = 218; public static final int SPELLBOOK_GROUP_ID = 218;
@@ -164,6 +165,8 @@ public class WidgetID
public static final int OPTIONS_GROUP_ID = 261; public static final int OPTIONS_GROUP_ID = 261;
public static final int THEATRE_OF_BLOOD_PARTY_GROUP_ID = 28; public static final int THEATRE_OF_BLOOD_PARTY_GROUP_ID = 28;
public static final int GWD_KC_GROUP_ID = 406; public static final int GWD_KC_GROUP_ID = 406;
public static final int ADVENTURE_LOG_ID = 187;
public static final int COUNTERS_LOG_GROUP_ID = 625;
static class WorldMap static class WorldMap
{ {
@@ -1226,5 +1229,25 @@ public class WidgetID
{ {
static final int CONTAINER = 0; static final int CONTAINER = 0;
} }
static class Lms
{
static final int INFO = 3;
}
static class LmsKDA
{
static final int INFO = 4;
}
static class AdventureLog
{
static final int CONTAINER = 0;
}
static class CountersLog
{
static final int OWNER = 4;
static final int TEXT = 6;
}
} }

View File

@@ -515,6 +515,10 @@ public enum WidgetInfo
KILL_LOG_KILLS(WidgetID.KILL_LOGS_GROUP_ID, WidgetID.KillLog.KILLS), KILL_LOG_KILLS(WidgetID.KILL_LOGS_GROUP_ID, WidgetID.KillLog.KILLS),
KILL_LOG_STREAK(WidgetID.KILL_LOGS_GROUP_ID, WidgetID.KillLog.STREAK), KILL_LOG_STREAK(WidgetID.KILL_LOGS_GROUP_ID, WidgetID.KillLog.STREAK),
ADVENTURE_LOG(WidgetID.ADVENTURE_LOG_ID, WidgetID.AdventureLog.CONTAINER),
COUNTERS_LOG_TEXT(WidgetID.COUNTERS_LOG_GROUP_ID, WidgetID.CountersLog.TEXT),
WORLD_SWITCHER_LIST(WidgetID.WORLD_SWITCHER_GROUP_ID, WidgetID.WorldSwitcher.WORLD_LIST), WORLD_SWITCHER_LIST(WidgetID.WORLD_SWITCHER_GROUP_ID, WidgetID.WorldSwitcher.WORLD_LIST),
FOSSIL_ISLAND_OXYGENBAR(WidgetID.FOSSIL_ISLAND_OXYGENBAR_ID, WidgetID.FossilOxygen.FOSSIL_ISLAND_OXYGEN_BAR), FOSSIL_ISLAND_OXYGENBAR(WidgetID.FOSSIL_ISLAND_OXYGENBAR_ID, WidgetID.FossilOxygen.FOSSIL_ISLAND_OXYGEN_BAR),

View File

@@ -41,7 +41,6 @@ import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.text.DecimalFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.HashMap; import java.util.HashMap;
@@ -672,11 +671,7 @@ class ConfigPanel extends PluginPanel
if (units != null) if (units != null)
{ {
DecimalFormat df = ((JSpinner.NumberEditor) spinner.getEditor()).getFormat(); spinnerTextField.setFormatterFactory(new UnitFormatterFactory(units));
df.setPositiveSuffix(units.value());
df.setNegativeSuffix(units.value());
// Force update the spinner to have it add the units initially
spinnerTextField.setValue(value);
} }
item.add(spinner, BorderLayout.EAST); item.add(spinner, BorderLayout.EAST);
@@ -812,11 +807,7 @@ class ConfigPanel extends PluginPanel
if (units != null) if (units != null)
{ {
DecimalFormat df = ((JSpinner.NumberEditor) widthSpinner.getEditor()).getFormat(); widthSpinnerTextField.setFormatterFactory(new UnitFormatterFactory(units));
df.setPositiveSuffix(units.value());
df.setNegativeSuffix(units.value());
// Force update the spinner to have it add the units initially
widthSpinnerTextField.setValue(width);
} }
SpinnerModel heightModel = new SpinnerNumberModel(height, 0, Integer.MAX_VALUE, 1); SpinnerModel heightModel = new SpinnerNumberModel(height, 0, Integer.MAX_VALUE, 1);
@@ -827,11 +818,7 @@ class ConfigPanel extends PluginPanel
if (units != null) if (units != null)
{ {
DecimalFormat df = ((JSpinner.NumberEditor) heightSpinner.getEditor()).getFormat(); heightSpinnerTextField.setFormatterFactory(new UnitFormatterFactory(units));
df.setPositiveSuffix(units.value());
df.setNegativeSuffix(units.value());
// Force update the spinner to have it add the units initially
heightSpinnerTextField.setValue(height);
} }
ChangeListener listener = e -> ChangeListener listener = e ->

View File

@@ -45,12 +45,9 @@ import net.runelite.client.ui.ColorScheme;
import net.runelite.client.ui.PluginPanel; import net.runelite.client.ui.PluginPanel;
import net.runelite.client.util.ImageUtil; import net.runelite.client.util.ImageUtil;
import net.runelite.client.util.SwingUtil; import net.runelite.client.util.SwingUtil;
import org.apache.commons.text.similarity.JaroWinklerDistance;
public class PluginListItem extends JPanel public class PluginListItem extends JPanel
{ {
private static final JaroWinklerDistance DISTANCE = new JaroWinklerDistance();
private static final ImageIcon CONFIG_ICON; private static final ImageIcon CONFIG_ICON;
private static final ImageIcon CONFIG_ICON_HOVER; private static final ImageIcon CONFIG_ICON_HOVER;
private static final ImageIcon ON_STAR; private static final ImageIcon ON_STAR;
@@ -61,6 +58,7 @@ public class PluginListItem extends JPanel
@Getter @Getter
private final PluginConfigurationDescriptor pluginConfig; private final PluginConfigurationDescriptor pluginConfig;
@Getter
private final List<String> keywords = new ArrayList<>(); private final List<String> keywords = new ArrayList<>();
public JLabel nameLabel; public JLabel nameLabel;
@@ -201,24 +199,6 @@ public class PluginListItem extends JPanel
onOffToggle.setSelected(enabled); onOffToggle.setSelected(enabled);
} }
/**
* Checks if all the search terms in the given list matches at least one keyword.
*
* @return true if all search terms matches at least one keyword, or false if otherwise.
*/
boolean matchesSearchTerms(String[] searchTerms)
{
for (String term : searchTerms)
{
if (keywords.stream().noneMatch((t) -> t.contains(term) ||
DISTANCE.apply(t, term) > 0.9))
{
return false;
}
}
return true;
}
private void openGroupConfigPanel() private void openGroupConfigPanel()
{ {
pluginListPanel.openConfigurationPanel(pluginConfig); pluginListPanel.openConfigurationPanel(pluginConfig);

View File

@@ -381,7 +381,7 @@ public class PluginListPanel extends PluginPanel
final String[] searchTerms = text.toLowerCase().split(" "); final String[] searchTerms = text.toLowerCase().split(" ");
pluginList.forEach(listItem -> pluginList.forEach(listItem ->
{ {
if (pinned == listItem.isPinned() && listItem.matchesSearchTerms(searchTerms)) if (pinned == listItem.isPinned() && Text.matchesSearchTerms(searchTerms, listItem.getKeywords()))
{ {
if (openOSRSConfig.pluginSortMode() == OpenOSRSConfig.SortStyle.ALPHABETICALLY || !openOSRSConfig.enableCategories()) if (openOSRSConfig.pluginSortMode() == OpenOSRSConfig.SortStyle.ALPHABETICALLY || !openOSRSConfig.enableCategories())
{ {

View File

@@ -0,0 +1,86 @@
/*
* 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.config;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
import javax.swing.JFormattedTextField;
import lombok.RequiredArgsConstructor;
import net.runelite.client.config.Units;
final class UnitFormatter extends JFormattedTextField.AbstractFormatter
{
private final String units;
UnitFormatter(Units units)
{
this.units = units.value();
}
@Override
public Object stringToValue(final String text) throws ParseException
{
final String trimmedText;
// Using the spinner controls causes the value to have the unit on the end, so remove it
if (text.endsWith(units))
{
trimmedText = text.substring(0, text.length() - units.length());
}
else
{
trimmedText = text;
}
try
{
return Integer.valueOf(trimmedText);
}
catch (NumberFormatException e)
{
throw new ParseException(trimmedText + " is not an integer.", 0);
}
}
@Override
public String valueToString(final Object value)
{
return value + units;
}
}
@RequiredArgsConstructor
final class UnitFormatterFactory extends JFormattedTextField.AbstractFormatterFactory
{
private final Units units;
private final Map<JFormattedTextField, JFormattedTextField.AbstractFormatter> formatters = new HashMap<>();
@Override
public JFormattedTextField.AbstractFormatter getFormatter(final JFormattedTextField tf)
{
return formatters.computeIfAbsent(tf, (key) -> new UnitFormatter(units));
}
}

View File

@@ -25,6 +25,7 @@
*/ */
package net.runelite.client.util; package net.runelite.client.util;
import com.google.common.base.Strings;
import java.awt.Toolkit; import java.awt.Toolkit;
import java.awt.TrayIcon; import java.awt.TrayIcon;
import java.awt.datatransfer.Clipboard; import java.awt.datatransfer.Clipboard;
@@ -40,6 +41,7 @@ import java.text.SimpleDateFormat;
import java.util.Base64; import java.util.Base64;
import java.util.Date; import java.util.Date;
import java.util.EnumSet; import java.util.EnumSet;
import javax.annotation.Nullable;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
@@ -80,10 +82,11 @@ public class ImageCapture
* *
* @param screenshot BufferedImage to capture. * @param screenshot BufferedImage to capture.
* @param fileName Filename to use, without file extension. * @param fileName Filename to use, without file extension.
* @param subDir Directory within the player screenshots dir to store the captured screenshot to.
* @param notify Send a notification to the system tray when the image is captured. * @param notify Send a notification to the system tray when the image is captured.
* @param imageUploadStyle which method to use to upload the screenshot (Imgur or directly to clipboard). * @param imageUploadStyle which method to use to upload the screenshot (Imgur or directly to clipboard).
*/ */
public void takeScreenshot(BufferedImage screenshot, String fileName, boolean notify, ImageUploadStyle imageUploadStyle) public void takeScreenshot(BufferedImage screenshot, String fileName, @Nullable String subDir, boolean notify, ImageUploadStyle imageUploadStyle)
{ {
if (client.getGameState() == GameState.LOGIN_SCREEN) if (client.getGameState() == GameState.LOGIN_SCREEN)
{ {
@@ -106,6 +109,12 @@ public class ImageCapture
{ {
playerDir += "-League"; playerDir += "-League";
} }
if (!Strings.isNullOrEmpty(subDir))
{
playerDir += File.separator + subDir;
}
playerFolder = new File(SCREENSHOT_DIR, playerDir); playerFolder = new File(SCREENSHOT_DIR, playerDir);
} }
else else
@@ -157,6 +166,20 @@ public class ImageCapture
} }
} }
/**
* Saves a screenshot of the client window to the screenshot folder as a PNG,
* and optionally uploads it to an image-hosting service.
*
* @param screenshot BufferedImage to capture.
* @param fileName Filename to use, without file extension.
* @param notify Send a notification to the system tray when the image is captured.
* @param imageUploadStyle which method to use to upload the screenshot (Imgur or directly to clipboard).
*/
public void takeScreenshot(BufferedImage screenshot, String fileName, boolean notify, ImageUploadStyle imageUploadStyle)
{
takeScreenshot(screenshot, fileName, null, notify, imageUploadStyle);
}
/** /**
* Uploads a screenshot to the Imgur image-hosting service, * Uploads a screenshot to the Imgur image-hosting service,
* and copies the image link to the clipboard. * and copies the image link to the clipboard.

View File

@@ -3,7 +3,17 @@
.string_stack_count 0 .string_stack_count 0
.int_var_count 35 .int_var_count 35
.string_var_count 1 .string_var_count 1
sconst "bankLayoutInit" ; callback "beforeBankLayout"
; Fired before the bank starts its layout
; Used by the TabInterface to hide fake bank items for tag tabs
;
; callback "setBankScroll"
; Fired before bank is calculated
; Used by the TabInterface to show fake bank items for tag tabs
;
; callback "isTabMenuActive"
; Used by the TabInterface to skip setting the bank title
sconst "beforeBankLayout"
runelite_callback runelite_callback
get_varbit 5102 get_varbit 5102
iconst 1 iconst 1
@@ -12,12 +22,12 @@
LABEL4: LABEL4:
iconst 0 iconst 0
iload 9 iload 9
if_sethide if_sethide
jump LABEL13 jump LABEL13
LABEL8: LABEL8:
iconst 1 iconst 1
iload 9 iload 9
if_sethide if_sethide
iload 11 iload 11
invoke 41 invoke 41
LABEL13: LABEL13:
@@ -33,10 +43,10 @@ LABEL19:
LABEL21: LABEL21:
iload 16 iload 16
iload 14 iload 14
if_sethide if_sethide
iload 16 iload 16
iload 15 iload 15
if_sethide if_sethide
get_varbit 8352 get_varbit 8352
iconst 1 iconst 1
if_icmpeq LABEL31 if_icmpeq LABEL31
@@ -51,22 +61,22 @@ LABEL34:
LABEL36: LABEL36:
iload 16 iload 16
iload 12 iload 12
if_sethide if_sethide
iload 16 iload 16
iload 13 iload 13
if_sethide if_sethide
iconst 441 iconst 441
iconst 0 iconst 0
iconst 0 iconst 0
iconst 0 iconst 0
iload 14 iload 14
if_setposition if_setposition
iconst 444 iconst 444
iconst 7 iconst 7
iconst 0 iconst 0
iconst 0 iconst 0
iload 15 iload 15
if_setposition if_setposition
get_varbit 8352 get_varbit 8352
iconst 1 iconst 1
if_icmpeq LABEL58 if_icmpeq LABEL58
@@ -78,27 +88,27 @@ LABEL58:
jump LABEL85 jump LABEL85
LABEL62: LABEL62:
iload 12 iload 12
if_getx if_getx
iload 12 iload 12
if_gety if_gety
iconst 0 iconst 0
iconst 0 iconst 0
iload 14 iload 14
if_setposition if_setposition
iload 13 iload 13
if_getx if_getx
iload 13 iload 13
if_gety if_gety
iconst 0 iconst 0
iconst 0 iconst 0
iload 15 iload 15
if_setposition if_setposition
iconst 37 iconst 37
iconst 37 iconst 37
iconst 1 iconst 1
iconst 0 iconst 0
iload 4 iload 4
if_setsize if_setsize
jump LABEL121 jump LABEL121
LABEL85: LABEL85:
get_varbit 8352 get_varbit 8352
@@ -116,7 +126,7 @@ LABEL93:
iconst 1 iconst 1
iconst 0 iconst 0
iload 4 iload 4
if_setsize if_setsize
jump LABEL121 jump LABEL121
LABEL100: LABEL100:
get_varbit 8352 get_varbit 8352
@@ -134,7 +144,7 @@ LABEL108:
iconst 1 iconst 1
iconst 0 iconst 0
iload 4 iload 4
if_setsize if_setsize
jump LABEL121 jump LABEL121
LABEL115: LABEL115:
iconst 0 iconst 0
@@ -142,13 +152,13 @@ LABEL115:
iconst 1 iconst 1
iconst 0 iconst 0
iload 4 iload 4
if_setsize if_setsize
LABEL121: LABEL121:
iconst 1 iconst 1
iload 10 iload 10
if_sethide if_sethide
iload 10 iload 10
cc_deleteall cc_deleteall
iconst 0 iconst 0
istore 17 istore 17
get_varbit 4170 get_varbit 4170
@@ -201,7 +211,7 @@ LABEL165:
LABEL171: LABEL171:
iconst 1 iconst 1
iload 8 iload 8
if_sethide if_sethide
iconst 2 iconst 2
istore 18 istore 18
iconst 460 iconst 460
@@ -209,42 +219,42 @@ LABEL171:
iconst 0 iconst 0
iconst 1 iconst 1
iload 2 iload 2
if_setsize if_setsize
iconst 16 iconst 16
iconst 39 iconst 39
iconst 0 iconst 0
iconst 1 iconst 1
iload 3 iload 3
if_setsize if_setsize
iconst 28 iconst 28
iconst 42 iconst 42
iconst 2 iconst 2
iconst 0 iconst 0
iload 1 iload 1
if_setposition if_setposition
jump LABEL216 jump LABEL216
LABEL195: LABEL195:
iconst 0 iconst 0
iload 8 iload 8
if_sethide if_sethide
iconst 460 iconst 460
iconst 81 iconst 81
iconst 0 iconst 0
iconst 1 iconst 1
iload 2 iload 2
if_setsize if_setsize
iconst 16 iconst 16
iconst 81 iconst 81
iconst 0 iconst 0
iconst 1 iconst 1
iload 3 iload 3
if_setsize if_setsize
iconst 12 iconst 12
iconst 42 iconst 42
iconst 2 iconst 2
iconst 0 iconst 0
iload 1 iload 1
if_setposition if_setposition
LABEL216: LABEL216:
iload 3 iload 3
iload 2 iload 2
@@ -254,8 +264,8 @@ LABEL216:
iconst 816 iconst 816
iconst 9 iconst 9
iconst 3 iconst 3
multiply multiply
add add
istore 20 istore 20
LABEL227: LABEL227:
iload 19 iload 19
@@ -265,17 +275,17 @@ LABEL227:
LABEL231: LABEL231:
iload 2 iload 2
iload 19 iload 19
cc_find cc_find
iconst 1 iconst 1
if_icmpeq LABEL237 if_icmpeq LABEL237
jump LABEL239 jump LABEL239
LABEL237: LABEL237:
iconst 1 iconst 1
cc_sethide cc_sethide
LABEL239: LABEL239:
iload 19 iload 19
iconst 1 iconst 1
add add
istore 19 istore 19
jump LABEL227 jump LABEL227
LABEL244: LABEL244:
@@ -283,22 +293,22 @@ LABEL244:
istore 19 istore 19
iconst 8 iconst 8
iconst 1 iconst 1
sub sub
istore 21 istore 21
iload 2 iload 2
if_getwidth if_getwidth
iconst 51 iconst 51
sub sub
iconst 35 iconst 35
sub sub
istore 22 istore 22
iload 22 iload 22
iconst 8 iconst 8
iconst 36 iconst 36
multiply multiply
sub sub
iload 21 iload 21
div div
istore 23 istore 23
iconst -1 iconst -1
istore 24 istore 24
@@ -331,51 +341,51 @@ LABEL288:
LABEL292: LABEL292:
iload 2 iload 2
iload 19 iload 19
cc_find cc_find
iconst 1 iconst 1
if_icmpeq LABEL298 if_icmpeq LABEL298
jump LABEL300 jump LABEL300
LABEL298: LABEL298:
iconst 1 iconst 1
cc_sethide cc_sethide
LABEL300: LABEL300:
iconst 95 iconst 95
iload 19 iload 19
inv_getobj inv_getobj
iconst -1 iconst -1
if_icmpne LABEL306 if_icmpne LABEL306
jump LABEL312 jump LABEL312
LABEL306: LABEL306:
iload 28 iload 28
iconst 1 iconst 1
add add
iload 19 iload 19
istore 29 istore 29
istore 28 istore 28
LABEL312: LABEL312:
iload 19 iload 19
iconst 1 iconst 1
add add
istore 19 istore 19
jump LABEL288 jump LABEL288
LABEL317: LABEL317:
get_varbit 4171 get_varbit 4171
get_varbit 4172 get_varbit 4172
add add
get_varbit 4173 get_varbit 4173
add add
get_varbit 4174 get_varbit 4174
add add
get_varbit 4175 get_varbit 4175
add add
get_varbit 4176 get_varbit 4176
add add
get_varbit 4177 get_varbit 4177
add add
get_varbit 4178 get_varbit 4178
add add
get_varbit 4179 get_varbit 4179
add add
istore 30 istore 30
iload 30 iload 30
iconst 0 iconst 0
@@ -384,13 +394,22 @@ LABEL317:
LABEL339: LABEL339:
iconst 816 iconst 816
iconst 1 iconst 1
sub sub
istore 29 istore 29
LABEL343: LABEL343:
iconst 0 ; Scroll height variable
iconst 0 ; Compare variable
iconst 0 ;
sconst "setBankScroll" ; Show fake bank items for tag tabs
runelite_callback ; If tag tab menu search isn't active
if_icmpeq CONTINUE_SEARCH ; continue to normal bank search
istore 27 ; Load scroll height into variable
jump GetTabRange ; Skip normal bank layout
CONTINUE_SEARCH:
iload 30 iload 30
iload 29 iload 29
iconst 1 iconst 1
add add
iconst 0 iconst 0
iload 2 iload 2
iload 3 iload 3
@@ -406,7 +425,7 @@ LABEL343:
istore 27 istore 27
iload 26 iload 26
iload 25 iload 25
add add
istore 26 istore 26
iconst 0 iconst 0
istore 19 istore 19
@@ -423,7 +442,7 @@ LABEL370:
iload 19 iload 19
iload 19 iload 19
get_varbit 4171 get_varbit 4171
add add
iconst 1 iconst 1
iload 2 iload 2
iload 3 iload 3
@@ -439,11 +458,11 @@ LABEL370:
istore 27 istore 27
iload 26 iload 26
iload 25 iload 25
add add
istore 26 istore 26
iload 19 iload 19
get_varbit 4171 get_varbit 4171
add add
istore 19 istore 19
LABEL400: LABEL400:
get_varbit 4172 get_varbit 4172
@@ -459,7 +478,7 @@ LABEL404:
iload 19 iload 19
iload 19 iload 19
get_varbit 4172 get_varbit 4172
add add
iconst 2 iconst 2
iload 2 iload 2
iload 3 iload 3
@@ -475,11 +494,11 @@ LABEL404:
istore 27 istore 27
iload 26 iload 26
iload 25 iload 25
add add
istore 26 istore 26
iload 19 iload 19
get_varbit 4172 get_varbit 4172
add add
istore 19 istore 19
LABEL434: LABEL434:
get_varbit 4173 get_varbit 4173
@@ -495,7 +514,7 @@ LABEL438:
iload 19 iload 19
iload 19 iload 19
get_varbit 4173 get_varbit 4173
add add
iconst 3 iconst 3
iload 2 iload 2
iload 3 iload 3
@@ -511,11 +530,11 @@ LABEL438:
istore 27 istore 27
iload 26 iload 26
iload 25 iload 25
add add
istore 26 istore 26
iload 19 iload 19
get_varbit 4173 get_varbit 4173
add add
istore 19 istore 19
LABEL468: LABEL468:
get_varbit 4174 get_varbit 4174
@@ -531,7 +550,7 @@ LABEL472:
iload 19 iload 19
iload 19 iload 19
get_varbit 4174 get_varbit 4174
add add
iconst 4 iconst 4
iload 2 iload 2
iload 3 iload 3
@@ -547,11 +566,11 @@ LABEL472:
istore 27 istore 27
iload 26 iload 26
iload 25 iload 25
add add
istore 26 istore 26
iload 19 iload 19
get_varbit 4174 get_varbit 4174
add add
istore 19 istore 19
LABEL502: LABEL502:
get_varbit 4175 get_varbit 4175
@@ -567,7 +586,7 @@ LABEL506:
iload 19 iload 19
iload 19 iload 19
get_varbit 4175 get_varbit 4175
add add
iconst 5 iconst 5
iload 2 iload 2
iload 3 iload 3
@@ -583,11 +602,11 @@ LABEL506:
istore 27 istore 27
iload 26 iload 26
iload 25 iload 25
add add
istore 26 istore 26
iload 19 iload 19
get_varbit 4175 get_varbit 4175
add add
istore 19 istore 19
LABEL536: LABEL536:
get_varbit 4176 get_varbit 4176
@@ -603,7 +622,7 @@ LABEL540:
iload 19 iload 19
iload 19 iload 19
get_varbit 4176 get_varbit 4176
add add
iconst 6 iconst 6
iload 2 iload 2
iload 3 iload 3
@@ -619,11 +638,11 @@ LABEL540:
istore 27 istore 27
iload 26 iload 26
iload 25 iload 25
add add
istore 26 istore 26
iload 19 iload 19
get_varbit 4176 get_varbit 4176
add add
istore 19 istore 19
LABEL570: LABEL570:
get_varbit 4177 get_varbit 4177
@@ -639,7 +658,7 @@ LABEL574:
iload 19 iload 19
iload 19 iload 19
get_varbit 4177 get_varbit 4177
add add
iconst 7 iconst 7
iload 2 iload 2
iload 3 iload 3
@@ -655,11 +674,11 @@ LABEL574:
istore 27 istore 27
iload 26 iload 26
iload 25 iload 25
add add
istore 26 istore 26
iload 19 iload 19
get_varbit 4177 get_varbit 4177
add add
istore 19 istore 19
LABEL604: LABEL604:
get_varbit 4178 get_varbit 4178
@@ -675,7 +694,7 @@ LABEL608:
iload 19 iload 19
iload 19 iload 19
get_varbit 4178 get_varbit 4178
add add
iconst 8 iconst 8
iload 2 iload 2
iload 3 iload 3
@@ -691,11 +710,11 @@ LABEL608:
istore 27 istore 27
iload 26 iload 26
iload 25 iload 25
add add
istore 26 istore 26
iload 19 iload 19
get_varbit 4178 get_varbit 4178
add add
istore 19 istore 19
LABEL638: LABEL638:
get_varbit 4179 get_varbit 4179
@@ -711,7 +730,7 @@ LABEL642:
iload 19 iload 19
iload 19 iload 19
get_varbit 4179 get_varbit 4179
add add
iconst 9 iconst 9
iload 2 iload 2
iload 3 iload 3
@@ -727,11 +746,11 @@ LABEL642:
istore 27 istore 27
iload 26 iload 26
iload 25 iload 25
add add
istore 26 istore 26
iload 19 iload 19
get_varbit 4179 get_varbit 4179
add add
istore 19 istore 19
LABEL672: LABEL672:
invoke 514 invoke 514
@@ -743,7 +762,7 @@ LABEL676:
lowercase ; instead get the var directly and lowercase it lowercase ; instead get the var directly and lowercase it
sstore 0 sstore 0
sload 0 sload 0
string_length string_length
iconst 0 iconst 0
if_icmpgt LABEL683 if_icmpgt LABEL683
jump LABEL702 jump LABEL702
@@ -754,7 +773,7 @@ LABEL683:
sconst "</col>" sconst "</col>"
join_string 4 join_string 4
iload 5 iload 5
if_settext if_settext
get_varc_int 5 get_varc_int 5
iconst 11 iconst 11
if_icmpeq LABEL694 if_icmpeq LABEL694
@@ -762,7 +781,7 @@ LABEL683:
LABEL694: LABEL694:
sconst "Show items whose names contain the following text: (" sconst "Show items whose names contain the following text: ("
iload 26 iload 26
tostring tostring
sconst " found)" sconst " found)"
join_string 3 join_string 3
iload 26 ; load number of matches iload 26 ; load number of matches
@@ -770,7 +789,7 @@ LABEL694:
runelite_callback ; invoke callback runelite_callback ; invoke callback
pop_int ; pop number of matches pop_int ; pop number of matches
iconst 10616876 iconst 10616876
if_settext if_settext
LABEL701: LABEL701:
jump LABEL716 jump LABEL716
LABEL702: LABEL702:
@@ -780,7 +799,7 @@ LABEL702:
sconst "</col>" sconst "</col>"
join_string 4 join_string 4
iload 5 iload 5
if_settext if_settext
get_varc_int 5 get_varc_int 5
iconst 11 iconst 11
if_icmpeq LABEL713 if_icmpeq LABEL713
@@ -790,7 +809,7 @@ LABEL713:
sconst "setSearchBankInputText" ; load event name sconst "setSearchBankInputText" ; load event name
runelite_callback ; invoke callback runelite_callback ; invoke callback
iconst 10616876 iconst 10616876
if_settext if_settext
LABEL716: LABEL716:
jump LABEL720 jump LABEL720
LABEL717: LABEL717:
@@ -798,7 +817,7 @@ LABEL717:
sconst "setBankTitle" ; sconst "setBankTitle" ;
runelite_callback ; runelite_callback ;
iload 5 iload 5
if_settext if_settext
LABEL720: LABEL720:
iload 0 iload 0
iload 1 iload 1
@@ -814,24 +833,22 @@ LABEL720:
iload 11 iload 11
iload 27 iload 27
iload 28 iload 28
sconst "addLastRow"
runelite_callback
iload 12 iload 12
iload 13 iload 13
iload 14 iload 14
iload 15 iload 15
invoke 505 invoke 505
return return
LABEL740: LABEL740:
invoke 514 invoke 514
iconst 1 iconst 1
if_icmpeq LABEL744 if_icmpeq LABEL744
jump LABEL747 jump GetTabRange
LABEL744: LABEL744:
iconst 1 iconst 1
iconst 1 iconst 1
invoke 299 invoke 299
LABEL747: GetTabRange:
iconst -1 iconst -1
istore 31 istore 31
iconst -1 iconst -1
@@ -848,18 +865,18 @@ LABEL759:
iload 19 iload 19
iconst 816 iconst 816
if_icmplt LABEL763 if_icmplt LABEL763
jump LABEL843 jump SetTitle
LABEL763: LABEL763:
iload 2 iload 2
iload 19 iload 19
cc_find cc_find
iconst 1 iconst 1
if_icmpeq LABEL769 if_icmpeq LABEL769
jump LABEL838 jump LABEL838
LABEL769: LABEL769:
iconst 95 iconst 95
iload 19 iload 19
inv_getobj inv_getobj
istore 24 istore 24
iload 24 iload 24
iconst -1 iconst -1
@@ -868,7 +885,7 @@ LABEL769:
LABEL777: LABEL777:
iload 28 iload 28
iconst 1 iconst 1
add add
istore 28 istore 28
LABEL781: LABEL781:
iload 19 iload 19
@@ -882,11 +899,11 @@ LABEL785:
jump LABEL836 jump LABEL836
LABEL789: LABEL789:
iconst 0 iconst 0
cc_sethide cc_sethide
iload 24 iload 24
iconst 95 iconst 95
iload 19 iload 19
inv_getnum inv_getnum
iload 2 iload 2
iload 3 iload 3
iload 9 iload 9
@@ -895,22 +912,22 @@ LABEL789:
invoke 278 invoke 278
iload 34 iload 34
iconst 36 iconst 36
multiply multiply
istore 27 istore 27
iconst 51 iconst 51
iload 33 iload 33
iconst 36 iconst 36
iload 23 iload 23
add add
multiply multiply
add add
iload 27 iload 27
iconst 0 iconst 0
iconst 0 iconst 0
cc_setposition cc_setposition
iload 27 iload 27
iconst 32 iconst 32
add add
istore 27 istore 27
iload 33 iload 33
iload 21 iload 21
@@ -919,55 +936,60 @@ LABEL789:
LABEL824: LABEL824:
iload 33 iload 33
iconst 1 iconst 1
add add
istore 33 istore 33
jump LABEL835 jump LABEL835
LABEL829: LABEL829:
iconst 0 iconst 0
iload 34 iload 34
iconst 1 iconst 1
add add
istore 34 istore 34
istore 33 istore 33
LABEL835: LABEL835:
jump LABEL838 jump LABEL838
LABEL836: LABEL836:
iconst 1 iconst 1
cc_sethide cc_sethide
LABEL838: LABEL838:
iload 19 iload 19
iconst 1 iconst 1
add add
istore 19 istore 19
jump LABEL759 jump LABEL759
LABEL843: SetTitle:
iconst 0 ; Compare variable
iconst 0 ;
sconst "isTabMenuActive" ; Check if tag tab menu
runelite_callback ; is active and skip setting
if_icmpne FinishBuilding ; the bank title if it is
get_varbit 4170 get_varbit 4170
iconst 2 iconst 2
if_icmpeq LABEL847 if_icmpeq SetTitleRomanNumeral
jump LABEL857 jump SetTitleNumber
LABEL847: SetTitleRomanNumeral:
sconst "Tab " sconst "Tab "
iconst 105 iconst 105
iconst 115 iconst 115
iconst 207 iconst 207
get_varbit 4150 get_varbit 4150
enum enum
join_string 2 join_string 2
sconst "setBankTitle" ; sconst "setBankTitle" ;
runelite_callback ; runelite_callback ;
iload 5 iload 5
if_settext if_settext
jump LABEL863 jump FinishBuilding
LABEL857: SetTitleNumber:
sconst "Tab " sconst "Tab "
get_varbit 4150 get_varbit 4150
tostring tostring
join_string 2 join_string 2
sconst "setBankTitle" ; sconst "setBankTitle" ;
runelite_callback ; runelite_callback ;
iload 5 iload 5
if_settext if_settext
LABEL863: FinishBuilding:
iload 0 iload 0
iload 1 iload 1
iload 2 iload 2
@@ -987,4 +1009,4 @@ LABEL863:
iload 14 iload 14
iload 15 iload 15
invoke 505 invoke 505
return return