Merge remote-tracking branch 'runelite/master'
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>cache-client</artifactId>
|
<artifactId>cache-client</artifactId>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<name>Cache Updater</name>
|
<name>Cache Updater</name>
|
||||||
|
|||||||
Vendored
+1
-1
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>cache</artifactId>
|
<artifactId>cache</artifactId>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>deobfuscator</artifactId>
|
<artifactId>deobfuscator</artifactId>
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<name>Web API</name>
|
<name>Web API</name>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<name>Web Service</name>
|
<name>Web Service</name>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>injected-client</artifactId>
|
<artifactId>injected-client</artifactId>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>net.runelite.rs</groupId>
|
<groupId>net.runelite.rs</groupId>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>RuneLite</name>
|
<name>RuneLite</name>
|
||||||
@@ -63,6 +63,7 @@
|
|||||||
<maven.javadoc.skip>true</maven.javadoc.skip>
|
<maven.javadoc.skip>true</maven.javadoc.skip>
|
||||||
<checkstyle.skip>true</checkstyle.skip>
|
<checkstyle.skip>true</checkstyle.skip>
|
||||||
<archetype.test.skip>true</archetype.test.skip>
|
<archetype.test.skip>true</archetype.test.skip>
|
||||||
|
|
||||||
<rs.version>181</rs.version>
|
<rs.version>181</rs.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>protocol-api</artifactId>
|
<artifactId>protocol-api</artifactId>
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>protocol</artifactId>
|
<artifactId>protocol</artifactId>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>runelite-api</artifactId>
|
<artifactId>runelite-api</artifactId>
|
||||||
|
|||||||
@@ -64,7 +64,12 @@ public enum InventoryID
|
|||||||
/**
|
/**
|
||||||
* Theater of Blood reward chest inventory (Raids 2)
|
* Theater of Blood reward chest inventory (Raids 2)
|
||||||
*/
|
*/
|
||||||
THEATRE_OF_BLOOD_CHEST(612);
|
THEATRE_OF_BLOOD_CHEST(612),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Seed vault located inside the Farming Guild
|
||||||
|
*/
|
||||||
|
SEED_VAULT(626);
|
||||||
|
|
||||||
private final int id;
|
private final int id;
|
||||||
|
|
||||||
|
|||||||
@@ -10837,5 +10837,69 @@ public final class ItemID
|
|||||||
public static final int MASK_OF_RANUL = 23522;
|
public static final int MASK_OF_RANUL = 23522;
|
||||||
public static final int JAR_OF_EYES = 23525;
|
public static final int JAR_OF_EYES = 23525;
|
||||||
public static final int SARACHNIS_CUDGEL = 23528;
|
public static final int SARACHNIS_CUDGEL = 23528;
|
||||||
|
public static final int COOKED_KARAMBWAN_23533 = 23533;
|
||||||
|
public static final int SUPER_COMBAT_POTION4_23543 = 23543;
|
||||||
|
public static final int SUPER_COMBAT_POTION3_23545 = 23545;
|
||||||
|
public static final int SUPER_COMBAT_POTION2_23547 = 23547;
|
||||||
|
public static final int SUPER_COMBAT_POTION1_23549 = 23549;
|
||||||
|
public static final int RANGING_POTION4_23551 = 23551;
|
||||||
|
public static final int RANGING_POTION3_23553 = 23553;
|
||||||
|
public static final int RANGING_POTION2_23555 = 23555;
|
||||||
|
public static final int RANGING_POTION1_23557 = 23557;
|
||||||
|
public static final int SANFEW_SERUM4_23559 = 23559;
|
||||||
|
public static final int SANFEW_SERUM3_23561 = 23561;
|
||||||
|
public static final int SANFEW_SERUM2_23563 = 23563;
|
||||||
|
public static final int SANFEW_SERUM1_23565 = 23565;
|
||||||
|
public static final int SUPER_RESTORE4_23567 = 23567;
|
||||||
|
public static final int SUPER_RESTORE3_23569 = 23569;
|
||||||
|
public static final int SUPER_RESTORE2_23571 = 23571;
|
||||||
|
public static final int SUPER_RESTORE1_23573 = 23573;
|
||||||
|
public static final int SARADOMIN_BREW4_23575 = 23575;
|
||||||
|
public static final int SARADOMIN_BREW3_23577 = 23577;
|
||||||
|
public static final int SARADOMIN_BREW2_23579 = 23579;
|
||||||
|
public static final int SARADOMIN_BREW1_23581 = 23581;
|
||||||
|
public static final int STAMINA_POTION4_23583 = 23583;
|
||||||
|
public static final int STAMINA_POTION3_23585 = 23585;
|
||||||
|
public static final int STAMINA_POTION2_23587 = 23587;
|
||||||
|
public static final int STAMINA_POTION1_23589 = 23589;
|
||||||
|
public static final int HELM_OF_NEITIZNOT_23591 = 23591;
|
||||||
|
public static final int BARROWS_GLOVES_23593 = 23593;
|
||||||
|
public static final int BERSERKER_RING_23595 = 23595;
|
||||||
|
public static final int DRAGON_DEFENDER_23597 = 23597;
|
||||||
|
public static final int SPIRIT_SHIELD_23599 = 23599;
|
||||||
|
public static final int RUNE_CROSSBOW_23601 = 23601;
|
||||||
|
public static final int IMBUED_GUTHIX_CAPE_23603 = 23603;
|
||||||
|
public static final int IMBUED_ZAMORAK_CAPE_23605 = 23605;
|
||||||
|
public static final int IMBUED_SARADOMIN_CAPE_23607 = 23607;
|
||||||
|
public static final int AVAS_ACCUMULATOR_23609 = 23609;
|
||||||
|
public static final int ARMADYL_CROSSBOW_23611 = 23611;
|
||||||
|
public static final int STAFF_OF_THE_DEAD_23613 = 23613;
|
||||||
|
public static final int VESTAS_LONGSWORD_23615 = 23615;
|
||||||
|
public static final int ZURIELS_STAFF_23617 = 23617;
|
||||||
|
public static final int MORRIGANS_JAVELIN_23619 = 23619;
|
||||||
|
public static final int STATIUSS_WARHAMMER_23620 = 23620;
|
||||||
|
public static final int INFERNAL_CAPE_23622 = 23622;
|
||||||
|
public static final int SEERS_RING_I_23624 = 23624;
|
||||||
|
public static final int KODAI_WAND_23626 = 23626;
|
||||||
|
public static final int GHRAZI_RAPIER_23628 = 23628;
|
||||||
|
public static final int HEAVY_BALLISTA_23630 = 23630;
|
||||||
|
public static final int KARILS_LEATHERTOP_23632 = 23632;
|
||||||
|
public static final int DHAROKS_PLATELEGS_23633 = 23633;
|
||||||
|
public static final int TORAGS_PLATELEGS_23634 = 23634;
|
||||||
|
public static final int VERACS_PLATESKIRT_23635 = 23635;
|
||||||
|
public static final int VERACS_HELM_23636 = 23636;
|
||||||
|
public static final int TORAGS_HELM_23637 = 23637;
|
||||||
|
public static final int GUTHANS_HELM_23638 = 23638;
|
||||||
|
public static final int DHAROKS_HELM_23639 = 23639;
|
||||||
|
public static final int AMULET_OF_FURY_23640 = 23640;
|
||||||
|
public static final int BLESSED_SPIRIT_SHIELD_23642 = 23642;
|
||||||
|
public static final int ETERNAL_BOOTS_23644 = 23644;
|
||||||
|
public static final int BANDOS_TASSETS_23646 = 23646;
|
||||||
|
public static final int DRAGON_JAVELIN_23648 = 23648;
|
||||||
|
public static final int DIAMOND_BOLTS_E_23649 = 23649;
|
||||||
|
public static final int RUNE_POUCH_23650 = 23650;
|
||||||
|
public static final int MAGES_BOOK_23652 = 23652;
|
||||||
|
public static final int AHRIMS_STAFF_23653 = 23653;
|
||||||
|
public static final int OCCULT_NECKLACE_23654 = 23654;
|
||||||
/* This file is automatically generated. Do not edit. */
|
/* This file is automatically generated. Do not edit. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7882,5 +7882,6 @@ public final class NpcID
|
|||||||
public static final int SARACHNIS = 8713;
|
public static final int SARACHNIS = 8713;
|
||||||
public static final int SPAWN_OF_SARACHNIS = 8714;
|
public static final int SPAWN_OF_SARACHNIS = 8714;
|
||||||
public static final int SPAWN_OF_SARACHNIS_8715 = 8715;
|
public static final int SPAWN_OF_SARACHNIS_8715 = 8715;
|
||||||
|
public static final int JUSTINE = 8721;
|
||||||
/* This file is automatically generated. Do not edit. */
|
/* This file is automatically generated. Do not edit. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12483,5 +12483,65 @@ public final class NullItemID
|
|||||||
public static final int NULL_23527 = 23527;
|
public static final int NULL_23527 = 23527;
|
||||||
public static final int NULL_23529 = 23529;
|
public static final int NULL_23529 = 23529;
|
||||||
public static final int NULL_23530 = 23530;
|
public static final int NULL_23530 = 23530;
|
||||||
|
public static final int NULL_23531 = 23531;
|
||||||
|
public static final int NULL_23532 = 23532;
|
||||||
|
public static final int NULL_23534 = 23534;
|
||||||
|
public static final int NULL_23535 = 23535;
|
||||||
|
public static final int NULL_23536 = 23536;
|
||||||
|
public static final int NULL_23537 = 23537;
|
||||||
|
public static final int NULL_23538 = 23538;
|
||||||
|
public static final int NULL_23539 = 23539;
|
||||||
|
public static final int NULL_23540 = 23540;
|
||||||
|
public static final int NULL_23541 = 23541;
|
||||||
|
public static final int NULL_23542 = 23542;
|
||||||
|
public static final int NULL_23544 = 23544;
|
||||||
|
public static final int NULL_23546 = 23546;
|
||||||
|
public static final int NULL_23548 = 23548;
|
||||||
|
public static final int NULL_23550 = 23550;
|
||||||
|
public static final int NULL_23552 = 23552;
|
||||||
|
public static final int NULL_23554 = 23554;
|
||||||
|
public static final int NULL_23556 = 23556;
|
||||||
|
public static final int NULL_23558 = 23558;
|
||||||
|
public static final int NULL_23560 = 23560;
|
||||||
|
public static final int NULL_23562 = 23562;
|
||||||
|
public static final int NULL_23564 = 23564;
|
||||||
|
public static final int NULL_23566 = 23566;
|
||||||
|
public static final int NULL_23568 = 23568;
|
||||||
|
public static final int NULL_23570 = 23570;
|
||||||
|
public static final int NULL_23572 = 23572;
|
||||||
|
public static final int NULL_23574 = 23574;
|
||||||
|
public static final int NULL_23576 = 23576;
|
||||||
|
public static final int NULL_23578 = 23578;
|
||||||
|
public static final int NULL_23580 = 23580;
|
||||||
|
public static final int NULL_23582 = 23582;
|
||||||
|
public static final int NULL_23584 = 23584;
|
||||||
|
public static final int NULL_23586 = 23586;
|
||||||
|
public static final int NULL_23588 = 23588;
|
||||||
|
public static final int NULL_23590 = 23590;
|
||||||
|
public static final int NULL_23592 = 23592;
|
||||||
|
public static final int NULL_23594 = 23594;
|
||||||
|
public static final int NULL_23596 = 23596;
|
||||||
|
public static final int NULL_23598 = 23598;
|
||||||
|
public static final int NULL_23600 = 23600;
|
||||||
|
public static final int NULL_23602 = 23602;
|
||||||
|
public static final int NULL_23604 = 23604;
|
||||||
|
public static final int NULL_23606 = 23606;
|
||||||
|
public static final int NULL_23608 = 23608;
|
||||||
|
public static final int NULL_23610 = 23610;
|
||||||
|
public static final int NULL_23612 = 23612;
|
||||||
|
public static final int NULL_23614 = 23614;
|
||||||
|
public static final int NULL_23616 = 23616;
|
||||||
|
public static final int NULL_23618 = 23618;
|
||||||
|
public static final int NULL_23621 = 23621;
|
||||||
|
public static final int NULL_23623 = 23623;
|
||||||
|
public static final int NULL_23625 = 23625;
|
||||||
|
public static final int NULL_23627 = 23627;
|
||||||
|
public static final int NULL_23629 = 23629;
|
||||||
|
public static final int NULL_23631 = 23631;
|
||||||
|
public static final int NULL_23641 = 23641;
|
||||||
|
public static final int NULL_23643 = 23643;
|
||||||
|
public static final int NULL_23645 = 23645;
|
||||||
|
public static final int NULL_23647 = 23647;
|
||||||
|
public static final int NULL_23651 = 23651;
|
||||||
/* This file is automatically generated. Do not edit. */
|
/* This file is automatically generated. Do not edit. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18654,5 +18654,6 @@ public final class ObjectID
|
|||||||
public static final int WEB_34897 = 34897;
|
public static final int WEB_34897 = 34897;
|
||||||
public static final int WEB_34898 = 34898;
|
public static final int WEB_34898 = 34898;
|
||||||
public static final int SLASHED_WEB_34899 = 34899;
|
public static final int SLASHED_WEB_34899 = 34899;
|
||||||
|
public static final int FOG_MARKER = 34905;
|
||||||
/* This file is automatically generated. Do not edit. */
|
/* This file is automatically generated. Do not edit. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ public class WidgetID
|
|||||||
public static final int SEED_BOX_GROUP_ID = 128;
|
public static final int SEED_BOX_GROUP_ID = 128;
|
||||||
public static final int ITEMS_KEPT_ON_DEATH_GROUP_ID = 4;
|
public static final int ITEMS_KEPT_ON_DEATH_GROUP_ID = 4;
|
||||||
public static final int TRADING_SCREEN = 335;
|
public static final int TRADING_SCREEN = 335;
|
||||||
|
public static final int SEED_VAULT_GROUP_ID = 631;
|
||||||
|
|
||||||
static class WorldMap
|
static class WorldMap
|
||||||
{
|
{
|
||||||
@@ -1122,4 +1123,9 @@ public class WidgetID
|
|||||||
static final int BUTTON_9 = 32;
|
static final int BUTTON_9 = 32;
|
||||||
static final int BUTTON_0 = 34;
|
static final int BUTTON_0 = 34;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static class SeedVault
|
||||||
|
{
|
||||||
|
static final int TITLE_CONTAINER = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -712,14 +712,6 @@ public enum WidgetInfo
|
|||||||
EQUIPMENT_MAGIC_DAMAGE(WidgetID.EQUIPMENT_PAGE_GROUP_ID, WidgetID.EquipmentWidgetIdentifiers.MAGIC_DAMAGE),
|
EQUIPMENT_MAGIC_DAMAGE(WidgetID.EQUIPMENT_PAGE_GROUP_ID, WidgetID.EquipmentWidgetIdentifiers.MAGIC_DAMAGE),
|
||||||
EQUIP_YOUR_CHARACTER(WidgetID.EQUIPMENT_PAGE_GROUP_ID, WidgetID.EquipmentWidgetIdentifiers.EQUIP_YOUR_CHARACTER),
|
EQUIP_YOUR_CHARACTER(WidgetID.EQUIPMENT_PAGE_GROUP_ID, WidgetID.EquipmentWidgetIdentifiers.EQUIP_YOUR_CHARACTER),
|
||||||
|
|
||||||
ITEMS_KEPT_ON_DEATH_CONTAINER(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.KEPT_ITEMS_CONTAINER),
|
|
||||||
ITEMS_LOST_ON_DEATH_CONTAINER(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.LOST_ITEMS_CONTAINER),
|
|
||||||
ITEMS_KEPT_INFORMATION_CONTAINER(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.INFORMATION_CONTAINER),
|
|
||||||
ITEMS_KEPT_SAFE_ZONE_CONTAINER(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.SAFE_ZONE_CONTAINER),
|
|
||||||
ITEMS_KEPT_CUSTOM_TEXT_CONTAINER(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.CUSTOM_TEXT_CONTAINER),
|
|
||||||
ITEMS_LOST_VALUE(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.LOST_ITEMS_VALUE),
|
|
||||||
ITEMS_KEPT_MAX(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.MAX_ITEMS_KEPT_ON_DEATH),
|
|
||||||
|
|
||||||
FIXED_BANK_PIN(WidgetID.FIXED_VIEWPORT_GROUP_ID, WidgetID.FixedViewport.BANK_PIN),
|
FIXED_BANK_PIN(WidgetID.FIXED_VIEWPORT_GROUP_ID, WidgetID.FixedViewport.BANK_PIN),
|
||||||
RESIZABLE_BANK_PIN(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.BANK_PIN),
|
RESIZABLE_BANK_PIN(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.BANK_PIN),
|
||||||
RESIZABLE_BOTTOM_LINE_BANK_PIN(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.BANK_PIN),
|
RESIZABLE_BOTTOM_LINE_BANK_PIN(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.BANK_PIN),
|
||||||
@@ -750,8 +742,17 @@ public enum WidgetInfo
|
|||||||
XP_DROP_6(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_6),
|
XP_DROP_6(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_6),
|
||||||
XP_DROP_7(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_7),
|
XP_DROP_7(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_7),
|
||||||
|
|
||||||
|
ITEMS_KEPT_CUSTOM_TEXT_CONTAINER(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.CUSTOM_TEXT_CONTAINER),
|
||||||
|
ITEMS_KEPT_ON_DEATH_CONTAINER(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.KEPT_ITEMS_CONTAINER),
|
||||||
ITEMS_KEPT_ON_DEATH_TEXT(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.KEPT_ITEMS_TEXT),
|
ITEMS_KEPT_ON_DEATH_TEXT(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.KEPT_ITEMS_TEXT),
|
||||||
ITEMS_LOST_ON_DEATH_TEXT(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.LOST_ITEMS_TEXT);
|
ITEMS_LOST_ON_DEATH_TEXT(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.LOST_ITEMS_TEXT),
|
||||||
|
ITEMS_LOST_ON_DEATH_CONTAINER(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.LOST_ITEMS_CONTAINER),
|
||||||
|
ITEMS_KEPT_INFORMATION_CONTAINER(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.INFORMATION_CONTAINER),
|
||||||
|
ITEMS_KEPT_SAFE_ZONE_CONTAINER(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.SAFE_ZONE_CONTAINER),
|
||||||
|
ITEMS_LOST_VALUE(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.LOST_ITEMS_VALUE),
|
||||||
|
ITEMS_KEPT_MAX(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.MAX_ITEMS_KEPT_ON_DEATH),
|
||||||
|
|
||||||
|
SEED_VAULT_TITLE_CONTAINER(WidgetID.SEED_VAULT_GROUP_ID, WidgetID.SeedVault.TITLE_CONTAINER);
|
||||||
|
|
||||||
private final int groupId;
|
private final int groupId;
|
||||||
private final int childId;
|
private final int childId;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>client</artifactId>
|
<artifactId>client</artifactId>
|
||||||
|
|||||||
@@ -1,199 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2018, Jeremy Plsek <https://github.com/jplsek>
|
|
||||||
* 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.bank;
|
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import net.runelite.api.Client;
|
|
||||||
import net.runelite.api.InventoryID;
|
|
||||||
import net.runelite.api.Item;
|
|
||||||
import net.runelite.api.ItemContainer;
|
|
||||||
import net.runelite.api.ItemID;
|
|
||||||
import static net.runelite.api.ItemID.COINS_995;
|
|
||||||
import static net.runelite.api.ItemID.PLATINUM_TOKEN;
|
|
||||||
import net.runelite.api.Varbits;
|
|
||||||
import net.runelite.client.game.ItemManager;
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
class BankCalculation
|
|
||||||
{
|
|
||||||
private static final ImmutableList<Varbits> TAB_VARBITS = ImmutableList.of(
|
|
||||||
Varbits.BANK_TAB_ONE_COUNT,
|
|
||||||
Varbits.BANK_TAB_TWO_COUNT,
|
|
||||||
Varbits.BANK_TAB_THREE_COUNT,
|
|
||||||
Varbits.BANK_TAB_FOUR_COUNT,
|
|
||||||
Varbits.BANK_TAB_FIVE_COUNT,
|
|
||||||
Varbits.BANK_TAB_SIX_COUNT,
|
|
||||||
Varbits.BANK_TAB_SEVEN_COUNT,
|
|
||||||
Varbits.BANK_TAB_EIGHT_COUNT,
|
|
||||||
Varbits.BANK_TAB_NINE_COUNT
|
|
||||||
);
|
|
||||||
|
|
||||||
private final BankPlugin plugin;
|
|
||||||
private final ItemManager itemManager;
|
|
||||||
private final Client client;
|
|
||||||
|
|
||||||
// Used to avoid extra calculation if the bank has not changed
|
|
||||||
private int itemsHash;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private long gePrice;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
private long haPrice;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
BankCalculation(ItemManager itemManager, BankPlugin plugin, Client client)
|
|
||||||
{
|
|
||||||
this.itemManager = itemManager;
|
|
||||||
this.plugin = plugin;
|
|
||||||
this.client = client;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculate the bank based on the cache, price can be 0 if bank not active, or cache not set
|
|
||||||
*/
|
|
||||||
void calculate()
|
|
||||||
{
|
|
||||||
ItemContainer bankInventory = client.getItemContainer(InventoryID.BANK);
|
|
||||||
|
|
||||||
if (bankInventory == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Item[] items = bankInventory.getItems();
|
|
||||||
int currentTab = client.getVar(Varbits.CURRENT_BANK_TAB);
|
|
||||||
|
|
||||||
if (currentTab > 0)
|
|
||||||
{
|
|
||||||
int startIndex = 0;
|
|
||||||
|
|
||||||
for (int i = currentTab - 1; i > 0; i--)
|
|
||||||
{
|
|
||||||
startIndex += client.getVar(TAB_VARBITS.get(i - 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
int itemCount = client.getVar(TAB_VARBITS.get(currentTab - 1));
|
|
||||||
items = Arrays.copyOfRange(items, startIndex, startIndex + itemCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (items.length == 0 || !isBankDifferent(items))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
log.debug("Calculating new bank value...");
|
|
||||||
|
|
||||||
gePrice = haPrice = 0;
|
|
||||||
|
|
||||||
List<Integer> itemIds = new ArrayList<>();
|
|
||||||
|
|
||||||
// Generate our lists (and do some quick price additions)
|
|
||||||
for (Item item : items)
|
|
||||||
{
|
|
||||||
int quantity = item.getQuantity();
|
|
||||||
|
|
||||||
if (item.getId() <= 0 || quantity == 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.getId() == COINS_995)
|
|
||||||
{
|
|
||||||
gePrice += quantity;
|
|
||||||
haPrice += quantity;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.getId() == PLATINUM_TOKEN)
|
|
||||||
{
|
|
||||||
gePrice += quantity * 1000L;
|
|
||||||
haPrice += quantity * 1000L;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin.isShowGE())
|
|
||||||
{
|
|
||||||
itemIds.add(item.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin.isShowHA())
|
|
||||||
{
|
|
||||||
long alchValue = itemManager.getAlchValue(item.getId());
|
|
||||||
|
|
||||||
if (alchValue > 0)
|
|
||||||
{
|
|
||||||
haPrice += alchValue * quantity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now do the calculations
|
|
||||||
if (plugin.isShowGE() && !itemIds.isEmpty())
|
|
||||||
{
|
|
||||||
for (Item item : items)
|
|
||||||
{
|
|
||||||
int itemId = item.getId();
|
|
||||||
int quantity = item.getQuantity();
|
|
||||||
|
|
||||||
if (itemId <= 0 || quantity == 0
|
|
||||||
|| itemId == ItemID.COINS_995 || itemId == ItemID.PLATINUM_TOKEN)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
gePrice += (long) itemManager.getItemPrice(itemId) * quantity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isBankDifferent(Item[] items)
|
|
||||||
{
|
|
||||||
Map<Integer, Integer> mapCheck = new HashMap<>();
|
|
||||||
|
|
||||||
for (Item item : items)
|
|
||||||
{
|
|
||||||
mapCheck.put(item.getId(), item.getQuantity());
|
|
||||||
}
|
|
||||||
|
|
||||||
int curHash = mapCheck.hashCode();
|
|
||||||
|
|
||||||
if (curHash != itemsHash)
|
|
||||||
{
|
|
||||||
itemsHash = curHash;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -97,4 +97,15 @@ public interface BankConfig extends Config
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "seedVaultValue",
|
||||||
|
name = "Show seed vault value",
|
||||||
|
description = "Adds the total value of all seeds inside the seed vault to the title",
|
||||||
|
position = 7
|
||||||
|
)
|
||||||
|
default boolean seedVaultValue()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,17 +26,29 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.bank;
|
package net.runelite.client.plugins.bank;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.InventoryID;
|
||||||
|
import net.runelite.api.Item;
|
||||||
|
import net.runelite.api.ItemContainer;
|
||||||
import net.runelite.api.MenuEntry;
|
import net.runelite.api.MenuEntry;
|
||||||
import net.runelite.api.events.ConfigChanged;
|
import net.runelite.api.events.ConfigChanged;
|
||||||
|
import net.runelite.api.Varbits;
|
||||||
|
import net.runelite.api.events.ItemContainerChanged;
|
||||||
import net.runelite.api.events.MenuEntryAdded;
|
import net.runelite.api.events.MenuEntryAdded;
|
||||||
import net.runelite.api.events.MenuShouldLeftClick;
|
import net.runelite.api.events.MenuShouldLeftClick;
|
||||||
import net.runelite.api.events.ScriptCallbackEvent;
|
import net.runelite.api.events.ScriptCallbackEvent;
|
||||||
|
import net.runelite.api.events.WidgetLoaded;
|
||||||
|
import net.runelite.api.widgets.Widget;
|
||||||
|
import net.runelite.api.widgets.WidgetID;
|
||||||
|
import net.runelite.api.widgets.WidgetInfo;
|
||||||
import net.runelite.client.callback.ClientThread;
|
import net.runelite.client.callback.ClientThread;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import net.runelite.client.eventbus.EventBus;
|
import net.runelite.client.eventbus.EventBus;
|
||||||
@@ -53,9 +65,22 @@ import net.runelite.client.util.StackFormatter;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class BankPlugin extends Plugin
|
public class BankPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
private static final List<Varbits> TAB_VARBITS = ImmutableList.of(
|
||||||
|
Varbits.BANK_TAB_ONE_COUNT,
|
||||||
|
Varbits.BANK_TAB_TWO_COUNT,
|
||||||
|
Varbits.BANK_TAB_THREE_COUNT,
|
||||||
|
Varbits.BANK_TAB_FOUR_COUNT,
|
||||||
|
Varbits.BANK_TAB_FIVE_COUNT,
|
||||||
|
Varbits.BANK_TAB_SIX_COUNT,
|
||||||
|
Varbits.BANK_TAB_SEVEN_COUNT,
|
||||||
|
Varbits.BANK_TAB_EIGHT_COUNT,
|
||||||
|
Varbits.BANK_TAB_NINE_COUNT
|
||||||
|
);
|
||||||
|
|
||||||
private static final String DEPOSIT_WORN = "Deposit worn items";
|
private static final String DEPOSIT_WORN = "Deposit worn items";
|
||||||
private static final String DEPOSIT_INVENTORY = "Deposit inventory";
|
private static final String DEPOSIT_INVENTORY = "Deposit inventory";
|
||||||
private static final String DEPOSIT_LOOT = "Deposit loot";
|
private static final String DEPOSIT_LOOT = "Deposit loot";
|
||||||
|
private static final String SEED_VAULT_TITLE = "Seed Vault";
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
@@ -63,9 +88,6 @@ public class BankPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private ClientThread clientThread;
|
private ClientThread clientThread;
|
||||||
|
|
||||||
@Inject
|
|
||||||
private BankCalculation bankCalculation;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private BankConfig config;
|
private BankConfig config;
|
||||||
|
|
||||||
@@ -75,6 +97,12 @@ public class BankPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ContainerCalculation bankCalculation;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ContainerCalculation seedVaultCalculation;
|
||||||
|
|
||||||
private boolean forceRightClickFlag;
|
private boolean forceRightClickFlag;
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -113,6 +141,8 @@ public class BankPlugin extends Plugin
|
|||||||
eventBus.subscribe(MenuShouldLeftClick.class, this, this::onMenuShouldLeftClick);
|
eventBus.subscribe(MenuShouldLeftClick.class, this, this::onMenuShouldLeftClick);
|
||||||
eventBus.subscribe(MenuEntryAdded.class, this, this::onMenuEntryAdded);
|
eventBus.subscribe(MenuEntryAdded.class, this, this::onMenuEntryAdded);
|
||||||
eventBus.subscribe(ScriptCallbackEvent.class, this, this::onScriptCallbackEvent);
|
eventBus.subscribe(ScriptCallbackEvent.class, this, this::onScriptCallbackEvent);
|
||||||
|
eventBus.subscribe(WidgetLoaded.class, this, this::onWidgetLoaded);
|
||||||
|
eventBus.subscribe(ItemContainerChanged.class, this, this::onItemContainerChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onMenuShouldLeftClick(MenuShouldLeftClick event)
|
private void onMenuShouldLeftClick(MenuShouldLeftClick event)
|
||||||
@@ -153,12 +183,47 @@ public class BankPlugin extends Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String strCurrentTab = "";
|
final ContainerPrices prices = bankCalculation.calculate(getBankTabItems());
|
||||||
bankCalculation.calculate();
|
if (prices == null)
|
||||||
long gePrice = bankCalculation.getGePrice();
|
{
|
||||||
long haPrice = bankCalculation.getHaPrice();
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.showGE && gePrice != 0)
|
final String strCurrentTab = createValueText(prices);
|
||||||
|
|
||||||
|
String[] stringStack = client.getStringStack();
|
||||||
|
int stringStackSize = client.getStringStackSize();
|
||||||
|
|
||||||
|
stringStack[stringStackSize - 1] += strCurrentTab;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onWidgetLoaded(WidgetLoaded event)
|
||||||
|
{
|
||||||
|
if (event.getGroupId() != WidgetID.SEED_VAULT_GROUP_ID || !config.seedVaultValue())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateSeedVaultTotal();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onItemContainerChanged(ItemContainerChanged event)
|
||||||
|
{
|
||||||
|
if (event.getContainerId() != InventoryID.SEED_VAULT.getId() || !config.seedVaultValue())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateSeedVaultTotal();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String createValueText(final ContainerPrices prices)
|
||||||
|
{
|
||||||
|
final long gePrice = prices.getGePrice();
|
||||||
|
final long haPrice = prices.getHighAlchPrice();
|
||||||
|
|
||||||
|
String strCurrentTab = "";
|
||||||
|
if (config.showGE() && gePrice != 0)
|
||||||
{
|
{
|
||||||
strCurrentTab += " (";
|
strCurrentTab += " (";
|
||||||
|
|
||||||
@@ -196,10 +261,71 @@ public class BankPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] stringStack = client.getStringStack();
|
return strCurrentTab;
|
||||||
int stringStackSize = client.getStringStackSize();
|
}
|
||||||
|
|
||||||
stringStack[stringStackSize - 1] += strCurrentTab;
|
private Item[] getBankTabItems()
|
||||||
|
{
|
||||||
|
final ItemContainer container = client.getItemContainer(InventoryID.BANK);
|
||||||
|
if (container == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Item[] items = container.getItems();
|
||||||
|
int currentTab = client.getVar(Varbits.CURRENT_BANK_TAB);
|
||||||
|
|
||||||
|
if (currentTab > 0)
|
||||||
|
{
|
||||||
|
int startIndex = 0;
|
||||||
|
|
||||||
|
for (int i = currentTab - 1; i > 0; i--)
|
||||||
|
{
|
||||||
|
startIndex += client.getVar(TAB_VARBITS.get(i - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
int itemCount = client.getVar(TAB_VARBITS.get(currentTab - 1));
|
||||||
|
return Arrays.copyOfRange(items, startIndex, startIndex + itemCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateSeedVaultTotal()
|
||||||
|
{
|
||||||
|
final Widget titleContainer = client.getWidget(WidgetInfo.SEED_VAULT_TITLE_CONTAINER);
|
||||||
|
if (titleContainer == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Widget[] children = titleContainer.getDynamicChildren();
|
||||||
|
if (children == null || children.length < 2)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final ContainerPrices prices = seedVaultCalculation.calculate(getSeedVaultItems());
|
||||||
|
if (prices == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final String titleText = createValueText(prices);
|
||||||
|
|
||||||
|
final Widget title = children[1];
|
||||||
|
title.setText(SEED_VAULT_TITLE + titleText);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Item[] getSeedVaultItems()
|
||||||
|
{
|
||||||
|
final ItemContainer itemContainer = client.getItemContainer(InventoryID.SEED_VAULT);
|
||||||
|
if (itemContainer == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return itemContainer.getItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onConfigChanged(ConfigChanged event)
|
private void onConfigChanged(ConfigChanged event)
|
||||||
|
|||||||
+111
@@ -0,0 +1,111 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2019, TheStonedTurtle <https://github.com/TheStonedTurtle>
|
||||||
|
* Copyright (c) 2019, Adam <Adam@sigterm.info>
|
||||||
|
* 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.bank;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import net.runelite.api.Constants;
|
||||||
|
import net.runelite.api.Item;
|
||||||
|
import net.runelite.api.ItemID;
|
||||||
|
import net.runelite.client.game.ItemManager;
|
||||||
|
|
||||||
|
class ContainerCalculation
|
||||||
|
{
|
||||||
|
private final ItemManager itemManager;
|
||||||
|
|
||||||
|
private int hash;
|
||||||
|
private ContainerPrices containerPrices;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ContainerCalculation(ItemManager itemManager)
|
||||||
|
{
|
||||||
|
this.itemManager = itemManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
ContainerPrices calculate(Item[] items)
|
||||||
|
{
|
||||||
|
// Returns last calculation if inventory hasn't changed
|
||||||
|
final int newHash = hashItems(items);
|
||||||
|
if (containerPrices != null && hash == newHash)
|
||||||
|
{
|
||||||
|
return containerPrices;
|
||||||
|
}
|
||||||
|
|
||||||
|
hash = newHash;
|
||||||
|
|
||||||
|
long ge = 0;
|
||||||
|
long alch = 0;
|
||||||
|
|
||||||
|
for (final Item item : items)
|
||||||
|
{
|
||||||
|
final int qty = item.getQuantity();
|
||||||
|
final int id = item.getId();
|
||||||
|
|
||||||
|
if (id <= 0 || qty == 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case ItemID.COINS_995:
|
||||||
|
ge += qty;
|
||||||
|
alch += qty;
|
||||||
|
break;
|
||||||
|
case ItemID.PLATINUM_TOKEN:
|
||||||
|
ge += qty * 1000L;
|
||||||
|
alch += qty * 1000L;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
final long storePrice = itemManager.getItemDefinition(id).getPrice();
|
||||||
|
final long alchPrice = (long) (storePrice * Constants.HIGH_ALCHEMY_MULTIPLIER);
|
||||||
|
alch += alchPrice * qty;
|
||||||
|
ge += itemManager.getItemPrice(id) * qty;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ContainerPrices prices = new ContainerPrices(ge, alch);
|
||||||
|
containerPrices = prices;
|
||||||
|
|
||||||
|
return prices;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int hashItems(final Item[] items)
|
||||||
|
{
|
||||||
|
final Map<Integer, Integer> mapCheck = new HashMap<>(items.length);
|
||||||
|
for (Item item : items)
|
||||||
|
{
|
||||||
|
mapCheck.put(item.getId(), item.getQuantity());
|
||||||
|
}
|
||||||
|
|
||||||
|
return mapCheck.hashCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2019, TheStonedTurtle <https://github.com/TheStonedTurtle>
|
||||||
|
* 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.bank;
|
||||||
|
|
||||||
|
import lombok.Value;
|
||||||
|
|
||||||
|
@Value
|
||||||
|
class ContainerPrices
|
||||||
|
{
|
||||||
|
private long gePrice;
|
||||||
|
private long highAlchPrice;
|
||||||
|
}
|
||||||
@@ -130,7 +130,11 @@
|
|||||||
169,
|
169,
|
||||||
171,
|
171,
|
||||||
173,
|
173,
|
||||||
2444
|
2444,
|
||||||
|
23551,
|
||||||
|
23553,
|
||||||
|
23555,
|
||||||
|
23557
|
||||||
],
|
],
|
||||||
"antipoison": [
|
"antipoison": [
|
||||||
175,
|
175,
|
||||||
@@ -3059,7 +3063,11 @@
|
|||||||
3024,
|
3024,
|
||||||
3026,
|
3026,
|
||||||
3028,
|
3028,
|
||||||
3030
|
3030,
|
||||||
|
23567,
|
||||||
|
23569,
|
||||||
|
23571,
|
||||||
|
23573
|
||||||
],
|
],
|
||||||
"agility potion": [
|
"agility potion": [
|
||||||
3032,
|
3032,
|
||||||
@@ -3123,7 +3131,8 @@
|
|||||||
],
|
],
|
||||||
"cooked karambwan": [
|
"cooked karambwan": [
|
||||||
3144,
|
3144,
|
||||||
3147
|
3147,
|
||||||
|
23533
|
||||||
],
|
],
|
||||||
"karambwan paste": [
|
"karambwan paste": [
|
||||||
3152,
|
3152,
|
||||||
@@ -3951,7 +3960,8 @@
|
|||||||
4863,
|
4863,
|
||||||
4864,
|
4864,
|
||||||
4865,
|
4865,
|
||||||
4866
|
4866,
|
||||||
|
23653
|
||||||
],
|
],
|
||||||
"ahrims robetop": [
|
"ahrims robetop": [
|
||||||
4712,
|
4712,
|
||||||
@@ -3977,7 +3987,8 @@
|
|||||||
4881,
|
4881,
|
||||||
4882,
|
4882,
|
||||||
4883,
|
4883,
|
||||||
4884
|
4884,
|
||||||
|
23639
|
||||||
],
|
],
|
||||||
"dharoks greataxe": [
|
"dharoks greataxe": [
|
||||||
4718,
|
4718,
|
||||||
@@ -4001,7 +4012,8 @@
|
|||||||
4899,
|
4899,
|
||||||
4900,
|
4900,
|
||||||
4901,
|
4901,
|
||||||
4902
|
4902,
|
||||||
|
23633
|
||||||
],
|
],
|
||||||
"guthans helm": [
|
"guthans helm": [
|
||||||
4724,
|
4724,
|
||||||
@@ -4009,7 +4021,8 @@
|
|||||||
4905,
|
4905,
|
||||||
4906,
|
4906,
|
||||||
4907,
|
4907,
|
||||||
4908
|
4908,
|
||||||
|
23638
|
||||||
],
|
],
|
||||||
"guthans warspear": [
|
"guthans warspear": [
|
||||||
4726,
|
4726,
|
||||||
@@ -4057,7 +4070,8 @@
|
|||||||
4941,
|
4941,
|
||||||
4942,
|
4942,
|
||||||
4943,
|
4943,
|
||||||
4944
|
4944,
|
||||||
|
23632
|
||||||
],
|
],
|
||||||
"karils leatherskirt": [
|
"karils leatherskirt": [
|
||||||
4738,
|
4738,
|
||||||
@@ -4073,7 +4087,8 @@
|
|||||||
4953,
|
4953,
|
||||||
4954,
|
4954,
|
||||||
4955,
|
4955,
|
||||||
4956
|
4956,
|
||||||
|
23637
|
||||||
],
|
],
|
||||||
"torags hammers": [
|
"torags hammers": [
|
||||||
4747,
|
4747,
|
||||||
@@ -4097,7 +4112,8 @@
|
|||||||
4971,
|
4971,
|
||||||
4972,
|
4972,
|
||||||
4973,
|
4973,
|
||||||
4974
|
4974,
|
||||||
|
23634
|
||||||
],
|
],
|
||||||
"veracs helm": [
|
"veracs helm": [
|
||||||
4753,
|
4753,
|
||||||
@@ -4105,7 +4121,8 @@
|
|||||||
4977,
|
4977,
|
||||||
4978,
|
4978,
|
||||||
4979,
|
4979,
|
||||||
4980
|
4980,
|
||||||
|
23636
|
||||||
],
|
],
|
||||||
"veracs flail": [
|
"veracs flail": [
|
||||||
4755,
|
4755,
|
||||||
@@ -4129,7 +4146,8 @@
|
|||||||
4995,
|
4995,
|
||||||
4996,
|
4996,
|
||||||
4997,
|
4997,
|
||||||
4998
|
4998,
|
||||||
|
23635
|
||||||
],
|
],
|
||||||
"sithik portrait": [
|
"sithik portrait": [
|
||||||
4814,
|
4814,
|
||||||
@@ -4812,7 +4830,8 @@
|
|||||||
],
|
],
|
||||||
"amulet of fury": [
|
"amulet of fury": [
|
||||||
6585,
|
6585,
|
||||||
12436
|
12436,
|
||||||
|
23640
|
||||||
],
|
],
|
||||||
"white dagger": [
|
"white dagger": [
|
||||||
6591,
|
6591,
|
||||||
@@ -4872,7 +4891,11 @@
|
|||||||
6685,
|
6685,
|
||||||
6687,
|
6687,
|
||||||
6689,
|
6689,
|
||||||
6691
|
6691,
|
||||||
|
23575,
|
||||||
|
23577,
|
||||||
|
23579,
|
||||||
|
23581
|
||||||
],
|
],
|
||||||
"slayer gloves": [
|
"slayer gloves": [
|
||||||
6708,
|
6708,
|
||||||
@@ -4889,7 +4912,8 @@
|
|||||||
],
|
],
|
||||||
"seers ring": [
|
"seers ring": [
|
||||||
6731,
|
6731,
|
||||||
11770
|
11770,
|
||||||
|
23624
|
||||||
],
|
],
|
||||||
"archers ring": [
|
"archers ring": [
|
||||||
6733,
|
6733,
|
||||||
@@ -4901,7 +4925,8 @@
|
|||||||
],
|
],
|
||||||
"berserker ring": [
|
"berserker ring": [
|
||||||
6737,
|
6737,
|
||||||
11773
|
11773,
|
||||||
|
23595
|
||||||
],
|
],
|
||||||
"darklight": [
|
"darklight": [
|
||||||
6746,
|
6746,
|
||||||
@@ -5021,6 +5046,10 @@
|
|||||||
6886,
|
6886,
|
||||||
6887
|
6887
|
||||||
],
|
],
|
||||||
|
"mages book": [
|
||||||
|
6889,
|
||||||
|
23652
|
||||||
|
],
|
||||||
"animals bones": [
|
"animals bones": [
|
||||||
6904,
|
6904,
|
||||||
6905,
|
6905,
|
||||||
@@ -5240,6 +5269,10 @@
|
|||||||
7460,
|
7460,
|
||||||
20583
|
20583
|
||||||
],
|
],
|
||||||
|
"barrows gloves": [
|
||||||
|
7462,
|
||||||
|
23593
|
||||||
|
],
|
||||||
"cornflour": [
|
"cornflour": [
|
||||||
7463,
|
7463,
|
||||||
7466
|
7466
|
||||||
@@ -6359,6 +6392,10 @@
|
|||||||
9183,
|
9183,
|
||||||
9463
|
9463
|
||||||
],
|
],
|
||||||
|
"rune crossbow": [
|
||||||
|
9185,
|
||||||
|
23601
|
||||||
|
],
|
||||||
"jade bolts": [
|
"jade bolts": [
|
||||||
9237,
|
9237,
|
||||||
9335
|
9335
|
||||||
@@ -6381,7 +6418,8 @@
|
|||||||
],
|
],
|
||||||
"diamond bolts": [
|
"diamond bolts": [
|
||||||
9243,
|
9243,
|
||||||
9340
|
9340,
|
||||||
|
23649
|
||||||
],
|
],
|
||||||
"dragonstone bolts": [
|
"dragonstone bolts": [
|
||||||
9244,
|
9244,
|
||||||
@@ -6854,6 +6892,10 @@
|
|||||||
10462,
|
10462,
|
||||||
10788
|
10788
|
||||||
],
|
],
|
||||||
|
"avas accumulator": [
|
||||||
|
10499,
|
||||||
|
23609
|
||||||
|
],
|
||||||
"reindeer hat": [
|
"reindeer hat": [
|
||||||
10507,
|
10507,
|
||||||
10722
|
10722
|
||||||
@@ -7022,6 +7064,10 @@
|
|||||||
10822,
|
10822,
|
||||||
10824
|
10824
|
||||||
],
|
],
|
||||||
|
"helm of neitiznot": [
|
||||||
|
10828,
|
||||||
|
23591
|
||||||
|
],
|
||||||
"hard hat": [
|
"hard hat": [
|
||||||
10862,
|
10862,
|
||||||
10883
|
10883
|
||||||
@@ -7052,7 +7098,11 @@
|
|||||||
10925,
|
10925,
|
||||||
10927,
|
10927,
|
||||||
10929,
|
10929,
|
||||||
10931
|
10931,
|
||||||
|
23559,
|
||||||
|
23561,
|
||||||
|
23563,
|
||||||
|
23565
|
||||||
],
|
],
|
||||||
"lumberjack top": [
|
"lumberjack top": [
|
||||||
10939,
|
10939,
|
||||||
@@ -7464,6 +7514,10 @@
|
|||||||
11736,
|
11736,
|
||||||
11737
|
11737
|
||||||
],
|
],
|
||||||
|
"armadyl crossbow": [
|
||||||
|
11785,
|
||||||
|
23611
|
||||||
|
],
|
||||||
"steam battlestaff": [
|
"steam battlestaff": [
|
||||||
11787,
|
11787,
|
||||||
12795
|
12795
|
||||||
@@ -7472,6 +7526,10 @@
|
|||||||
11789,
|
11789,
|
||||||
12796
|
12796
|
||||||
],
|
],
|
||||||
|
"staff of the dead": [
|
||||||
|
11791,
|
||||||
|
23613
|
||||||
|
],
|
||||||
"godsword shards": [
|
"godsword shards": [
|
||||||
11794,
|
11794,
|
||||||
11796,
|
11796,
|
||||||
@@ -7502,6 +7560,10 @@
|
|||||||
11820,
|
11820,
|
||||||
11822
|
11822
|
||||||
],
|
],
|
||||||
|
"bandos tassets": [
|
||||||
|
11834,
|
||||||
|
23646
|
||||||
|
],
|
||||||
"dragon boots": [
|
"dragon boots": [
|
||||||
11840,
|
11840,
|
||||||
22234
|
22234
|
||||||
@@ -7694,7 +7756,8 @@
|
|||||||
],
|
],
|
||||||
"occult necklace": [
|
"occult necklace": [
|
||||||
12002,
|
12002,
|
||||||
19720
|
19720,
|
||||||
|
23654
|
||||||
],
|
],
|
||||||
"soft clay pack": [
|
"soft clay pack": [
|
||||||
12009,
|
12009,
|
||||||
@@ -7736,7 +7799,11 @@
|
|||||||
12625,
|
12625,
|
||||||
12627,
|
12627,
|
||||||
12629,
|
12629,
|
||||||
12631
|
12631,
|
||||||
|
23583,
|
||||||
|
23585,
|
||||||
|
23587,
|
||||||
|
23589
|
||||||
],
|
],
|
||||||
"stamina mix": [
|
"stamina mix": [
|
||||||
12633,
|
12633,
|
||||||
@@ -7836,7 +7903,11 @@
|
|||||||
12695,
|
12695,
|
||||||
12697,
|
12697,
|
||||||
12699,
|
12699,
|
||||||
12701
|
12701,
|
||||||
|
23543,
|
||||||
|
23545,
|
||||||
|
23547,
|
||||||
|
23549
|
||||||
],
|
],
|
||||||
"menagerie": [
|
"menagerie": [
|
||||||
12725,
|
12725,
|
||||||
@@ -7854,6 +7925,10 @@
|
|||||||
12755,
|
12755,
|
||||||
12756
|
12756
|
||||||
],
|
],
|
||||||
|
"rune pouch": [
|
||||||
|
12791,
|
||||||
|
23650
|
||||||
|
],
|
||||||
"nest box": [
|
"nest box": [
|
||||||
12792,
|
12792,
|
||||||
12793,
|
12793,
|
||||||
@@ -7865,6 +7940,14 @@
|
|||||||
12817,
|
12817,
|
||||||
19559
|
19559
|
||||||
],
|
],
|
||||||
|
"spirit shield": [
|
||||||
|
12829,
|
||||||
|
23599
|
||||||
|
],
|
||||||
|
"blessed spirit shield": [
|
||||||
|
12831,
|
||||||
|
23642
|
||||||
|
],
|
||||||
"amulet of the damned": [
|
"amulet of the damned": [
|
||||||
12851,
|
12851,
|
||||||
12853
|
12853
|
||||||
@@ -7917,7 +8000,8 @@
|
|||||||
"dragon defender": [
|
"dragon defender": [
|
||||||
12954,
|
12954,
|
||||||
19722,
|
19722,
|
||||||
20463
|
20463,
|
||||||
|
23597
|
||||||
],
|
],
|
||||||
"bronze set": [
|
"bronze set": [
|
||||||
12960,
|
12960,
|
||||||
@@ -8072,6 +8156,10 @@
|
|||||||
13222,
|
13222,
|
||||||
13224
|
13224
|
||||||
],
|
],
|
||||||
|
"eternal boots": [
|
||||||
|
13235,
|
||||||
|
23644
|
||||||
|
],
|
||||||
"infernal axe": [
|
"infernal axe": [
|
||||||
13241,
|
13241,
|
||||||
13242
|
13242
|
||||||
@@ -8348,11 +8436,16 @@
|
|||||||
13652,
|
13652,
|
||||||
20784
|
20784
|
||||||
],
|
],
|
||||||
|
"heavy ballista": [
|
||||||
|
19481,
|
||||||
|
23630
|
||||||
|
],
|
||||||
"dragon javelin": [
|
"dragon javelin": [
|
||||||
19484,
|
19484,
|
||||||
19486,
|
19486,
|
||||||
19488,
|
19488,
|
||||||
19490
|
19490,
|
||||||
|
23648
|
||||||
],
|
],
|
||||||
"zenyte bracelet": [
|
"zenyte bracelet": [
|
||||||
19492,
|
19492,
|
||||||
@@ -8606,6 +8699,10 @@
|
|||||||
21003,
|
21003,
|
||||||
21205
|
21205
|
||||||
],
|
],
|
||||||
|
"kodai wand": [
|
||||||
|
21006,
|
||||||
|
23626
|
||||||
|
],
|
||||||
"dragon sword": [
|
"dragon sword": [
|
||||||
21009,
|
21009,
|
||||||
21206
|
21206
|
||||||
@@ -8668,7 +8765,8 @@
|
|||||||
"infernal cape": [
|
"infernal cape": [
|
||||||
21287,
|
21287,
|
||||||
21295,
|
21295,
|
||||||
21297
|
21297,
|
||||||
|
23622
|
||||||
],
|
],
|
||||||
"amethyst javelin": [
|
"amethyst javelin": [
|
||||||
21318,
|
21318,
|
||||||
@@ -8730,6 +8828,18 @@
|
|||||||
21739,
|
21739,
|
||||||
21752
|
21752
|
||||||
],
|
],
|
||||||
|
"imbued saradomin cape": [
|
||||||
|
21791,
|
||||||
|
23607
|
||||||
|
],
|
||||||
|
"imbued guthix cape": [
|
||||||
|
21793,
|
||||||
|
23603
|
||||||
|
],
|
||||||
|
"imbued zamorak cape": [
|
||||||
|
21795,
|
||||||
|
23605
|
||||||
|
],
|
||||||
"bracelet of ethereum": [
|
"bracelet of ethereum": [
|
||||||
21816,
|
21816,
|
||||||
21817
|
21817
|
||||||
@@ -8953,6 +9063,10 @@
|
|||||||
22323,
|
22323,
|
||||||
22481
|
22481
|
||||||
],
|
],
|
||||||
|
"ghrazi rapier": [
|
||||||
|
22324,
|
||||||
|
23628
|
||||||
|
],
|
||||||
"scythe of vitur": [
|
"scythe of vitur": [
|
||||||
22325,
|
22325,
|
||||||
22486,
|
22486,
|
||||||
@@ -9017,6 +9131,22 @@
|
|||||||
22552,
|
22552,
|
||||||
22555
|
22555
|
||||||
],
|
],
|
||||||
|
"vestas longsword": [
|
||||||
|
22613,
|
||||||
|
23615
|
||||||
|
],
|
||||||
|
"statiuss warhammer": [
|
||||||
|
22622,
|
||||||
|
23620
|
||||||
|
],
|
||||||
|
"morrigans javelin": [
|
||||||
|
22636,
|
||||||
|
23619
|
||||||
|
],
|
||||||
|
"zuriels staff": [
|
||||||
|
22647,
|
||||||
|
23617
|
||||||
|
],
|
||||||
"dragon hasta": [
|
"dragon hasta": [
|
||||||
22731,
|
22731,
|
||||||
22734,
|
22734,
|
||||||
|
|||||||
@@ -404,7 +404,6 @@ R 42 159 43 159
|
|||||||
R 43 58 45 61
|
R 43 58 45 61
|
||||||
r 24 60
|
r 24 60
|
||||||
r 29 60
|
r 29 60
|
||||||
r 32 75
|
|
||||||
r 44 155
|
r 44 155
|
||||||
r 47 158
|
r 47 158
|
||||||
r 53 76
|
r 53 76
|
||||||
@@ -946,3 +945,7 @@ c 7 4
|
|||||||
// Cerberus
|
// Cerberus
|
||||||
#100
|
#100
|
||||||
R 19 19 21 20
|
R 19 19 21 20
|
||||||
|
|
||||||
|
// Cosmic entity's plane
|
||||||
|
#040404
|
||||||
|
r 32 75
|
||||||
@@ -1 +1 @@
|
|||||||
A6B3A7BFE7B688A08F69B91A7FD5C7184D71147D3DAF74B1262369D85DBB3A03
|
4D9A96A7D57F6B9661273FB645A0510DD0F02C8A9C2E133772065F8AB588614D
|
||||||
@@ -77,14 +77,14 @@ LABEL60:
|
|||||||
iload 5
|
iload 5
|
||||||
iload 6
|
iload 6
|
||||||
if_icmplt LABEL64
|
if_icmplt LABEL64
|
||||||
jump LABEL108
|
jump LABEL119
|
||||||
LABEL64:
|
LABEL64:
|
||||||
iload 1
|
iload 1
|
||||||
iload 5
|
iload 5
|
||||||
cc_find
|
cc_find
|
||||||
iconst 1
|
iconst 1
|
||||||
if_icmpeq LABEL70
|
if_icmpeq LABEL70
|
||||||
jump LABEL103
|
jump LABEL114
|
||||||
LABEL70:
|
LABEL70:
|
||||||
iload 5
|
iload 5
|
||||||
invoke 1358
|
invoke 1358
|
||||||
@@ -96,7 +96,7 @@ LABEL70:
|
|||||||
LABEL77:
|
LABEL77:
|
||||||
iconst 901389
|
iconst 901389
|
||||||
istore 4
|
istore 4
|
||||||
jump LABEL89
|
jump LABEL100
|
||||||
LABEL80:
|
LABEL80:
|
||||||
iload 3
|
iload 3
|
||||||
iconst 0
|
iconst 0
|
||||||
@@ -105,11 +105,24 @@ LABEL80:
|
|||||||
LABEL84:
|
LABEL84:
|
||||||
iconst 16776960
|
iconst 16776960
|
||||||
istore 4
|
istore 4
|
||||||
jump LABEL89
|
jump LABEL100
|
||||||
LABEL87:
|
LABEL87:
|
||||||
|
iconst 105
|
||||||
|
iconst 74
|
||||||
|
iconst 2099
|
||||||
|
iload 5
|
||||||
|
enum
|
||||||
|
iconst 603
|
||||||
|
if_icmpeq LABEL95
|
||||||
|
jump LABEL98
|
||||||
|
LABEL95:
|
||||||
|
iconst 10461087
|
||||||
|
istore 4
|
||||||
|
jump LABEL100
|
||||||
|
LABEL98:
|
||||||
iconst 16711680
|
iconst 16711680
|
||||||
istore 4
|
istore 4
|
||||||
LABEL89:
|
LABEL100:
|
||||||
iload 4
|
iload 4
|
||||||
cc_setcolour
|
cc_setcolour
|
||||||
iconst 85
|
iconst 85
|
||||||
@@ -124,54 +137,54 @@ LABEL89:
|
|||||||
iload 4
|
iload 4
|
||||||
sconst "Iii"
|
sconst "Iii"
|
||||||
cc_setonmouseleave
|
cc_setonmouseleave
|
||||||
LABEL103:
|
LABEL114:
|
||||||
iload 5
|
iload 5
|
||||||
iconst 1
|
iconst 1
|
||||||
add
|
add
|
||||||
istore 5
|
istore 5
|
||||||
jump LABEL60
|
jump LABEL60
|
||||||
LABEL108:
|
LABEL119:
|
||||||
iconst 0
|
iconst 0
|
||||||
invoke 2265
|
invoke 2265
|
||||||
istore 6
|
istore 6
|
||||||
istore 5
|
istore 5
|
||||||
LABEL112:
|
LABEL123:
|
||||||
iload 5
|
iload 5
|
||||||
iload 6
|
iload 6
|
||||||
if_icmplt LABEL116
|
if_icmplt LABEL127
|
||||||
jump LABEL160
|
jump LABEL171
|
||||||
LABEL116:
|
LABEL127:
|
||||||
iload 2
|
iload 2
|
||||||
iload 5
|
iload 5
|
||||||
cc_find
|
cc_find
|
||||||
iconst 1
|
iconst 1
|
||||||
if_icmpeq LABEL122
|
if_icmpeq LABEL133
|
||||||
jump LABEL155
|
jump LABEL166
|
||||||
LABEL122:
|
LABEL133:
|
||||||
iload 5
|
iload 5
|
||||||
invoke 1359
|
invoke 1359
|
||||||
istore 3
|
istore 3
|
||||||
iload 3
|
iload 3
|
||||||
iconst 2
|
iconst 2
|
||||||
if_icmpeq LABEL129
|
if_icmpeq LABEL140
|
||||||
jump LABEL132
|
jump LABEL143
|
||||||
LABEL129:
|
LABEL140:
|
||||||
iconst 901389
|
iconst 901389
|
||||||
istore 4
|
istore 4
|
||||||
jump LABEL141
|
jump LABEL152
|
||||||
LABEL132:
|
LABEL143:
|
||||||
iload 3
|
iload 3
|
||||||
iconst 0
|
iconst 0
|
||||||
if_icmpeq LABEL136
|
if_icmpeq LABEL147
|
||||||
jump LABEL139
|
jump LABEL150
|
||||||
LABEL136:
|
LABEL147:
|
||||||
iconst 16776960
|
iconst 16776960
|
||||||
istore 4
|
istore 4
|
||||||
jump LABEL141
|
jump LABEL152
|
||||||
LABEL139:
|
LABEL150:
|
||||||
iconst 16711680
|
iconst 16711680
|
||||||
istore 4
|
istore 4
|
||||||
LABEL141:
|
LABEL152:
|
||||||
iload 4
|
iload 4
|
||||||
cc_setcolour
|
cc_setcolour
|
||||||
iconst 85
|
iconst 85
|
||||||
@@ -186,13 +199,13 @@ LABEL141:
|
|||||||
iload 4
|
iload 4
|
||||||
sconst "Iii"
|
sconst "Iii"
|
||||||
cc_setonmouseleave
|
cc_setonmouseleave
|
||||||
LABEL155:
|
LABEL166:
|
||||||
iload 5
|
iload 5
|
||||||
iconst 1
|
iconst 1
|
||||||
add
|
add
|
||||||
istore 5
|
istore 5
|
||||||
jump LABEL112
|
jump LABEL123
|
||||||
LABEL160:
|
LABEL171:
|
||||||
sconst "questProgressUpdated"
|
sconst "questProgressUpdated"
|
||||||
runelite_callback
|
runelite_callback
|
||||||
return
|
return
|
||||||
|
|||||||
+9
-24
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, Adam <Adam@sigterm.info>
|
* Copyright (c) 2019, Adam <Adam@sigterm.info>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -30,13 +30,12 @@ import com.google.inject.testing.fieldbinder.Bind;
|
|||||||
import com.google.inject.testing.fieldbinder.BoundFieldModule;
|
import com.google.inject.testing.fieldbinder.BoundFieldModule;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.InventoryID;
|
|
||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
import net.runelite.api.ItemDefinition;
|
import net.runelite.api.ItemDefinition;
|
||||||
import net.runelite.api.ItemContainer;
|
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
@@ -46,7 +45,7 @@ import static org.mockito.Mockito.when;
|
|||||||
import org.mockito.runners.MockitoJUnitRunner;
|
import org.mockito.runners.MockitoJUnitRunner;
|
||||||
|
|
||||||
@RunWith(MockitoJUnitRunner.class)
|
@RunWith(MockitoJUnitRunner.class)
|
||||||
public class BankCalculationTest
|
public class ContainerCalculationTest
|
||||||
{
|
{
|
||||||
@Mock
|
@Mock
|
||||||
@Bind
|
@Bind
|
||||||
@@ -56,12 +55,8 @@ public class BankCalculationTest
|
|||||||
@Bind
|
@Bind
|
||||||
private ItemManager itemManager;
|
private ItemManager itemManager;
|
||||||
|
|
||||||
@Mock
|
|
||||||
@Bind
|
|
||||||
private BankConfig bankConfig;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private BankPlugin bankplugin;
|
private ContainerCalculation containerCalculation;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before()
|
public void before()
|
||||||
@@ -72,9 +67,6 @@ public class BankCalculationTest
|
|||||||
@Test
|
@Test
|
||||||
public void testCalculate()
|
public void testCalculate()
|
||||||
{
|
{
|
||||||
when(bankConfig.showHA())
|
|
||||||
.thenReturn(true);
|
|
||||||
|
|
||||||
Item coins = mock(Item.class);
|
Item coins = mock(Item.class);
|
||||||
when(coins.getId())
|
when(coins.getId())
|
||||||
.thenReturn(ItemID.COINS_995);
|
.thenReturn(ItemID.COINS_995);
|
||||||
@@ -92,13 +84,6 @@ public class BankCalculationTest
|
|||||||
whip
|
whip
|
||||||
).toArray(new Item[0]);
|
).toArray(new Item[0]);
|
||||||
|
|
||||||
ItemContainer bankContainer = mock(ItemContainer.class);
|
|
||||||
when(bankContainer.getItems())
|
|
||||||
.thenReturn(items);
|
|
||||||
|
|
||||||
when(client.getItemContainer(InventoryID.BANK))
|
|
||||||
.thenReturn(bankContainer);
|
|
||||||
|
|
||||||
ItemDefinition whipComp = mock(ItemDefinition.class);
|
ItemDefinition whipComp = mock(ItemDefinition.class);
|
||||||
when(whipComp.getId())
|
when(whipComp.getId())
|
||||||
.thenReturn(ItemID.ABYSSAL_WHIP);
|
.thenReturn(ItemID.ABYSSAL_WHIP);
|
||||||
@@ -107,10 +92,10 @@ public class BankCalculationTest
|
|||||||
when(itemManager.getItemDefinition(ItemID.ABYSSAL_WHIP))
|
when(itemManager.getItemDefinition(ItemID.ABYSSAL_WHIP))
|
||||||
.thenReturn(whipComp);
|
.thenReturn(whipComp);
|
||||||
|
|
||||||
BankCalculation bankCalculation = new BankCalculation(itemManager, bankplugin, client);
|
final ContainerPrices prices = containerCalculation.calculate(items);
|
||||||
bankCalculation.calculate();
|
assertNotNull(prices);
|
||||||
|
|
||||||
long value = bankCalculation.getHaPrice();
|
long value = prices.getHighAlchPrice();
|
||||||
assertTrue(value == Integer.MAX_VALUE);
|
assertTrue(value > Integer.MAX_VALUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>mixins</artifactId>
|
<artifactId>mixins</artifactId>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>runelite-plugin-archetype</artifactId>
|
<artifactId>runelite-plugin-archetype</artifactId>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>script-assembler-plugin</artifactId>
|
<artifactId>script-assembler-plugin</artifactId>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>net.runelite.rs</groupId>
|
<groupId>net.runelite.rs</groupId>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.29-SNAPSHOT</version>
|
<version>1.5.30-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>net.runelite.rs</groupId>
|
<groupId>net.runelite.rs</groupId>
|
||||||
|
|||||||
Reference in New Issue
Block a user