Merge remote-tracking branch 'upstream/master' into master
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
object ProjectVersions {
|
||||
const val launcherVersion = "2.2.0"
|
||||
const val rlVersion = "1.7.4"
|
||||
const val rlVersion = "1.7.5"
|
||||
|
||||
const val openosrsVersion = "4.5.6"
|
||||
|
||||
|
||||
@@ -64,4 +64,5 @@ public class NpcDefinition
|
||||
public boolean rotationFlag = true;
|
||||
public boolean isPet;
|
||||
public Map<Integer, Object> params;
|
||||
public int category;
|
||||
}
|
||||
|
||||
@@ -75,5 +75,6 @@ public class ObjectDefinition
|
||||
private int anInt2112 = 0;
|
||||
private int anInt2113 = 0;
|
||||
private boolean blocksProjectile = true;
|
||||
private boolean randomizeAnimStart;
|
||||
private Map<Integer, Object> params = null;
|
||||
}
|
||||
|
||||
@@ -98,6 +98,10 @@ public class NpcLoader
|
||||
def.rotate90RightAnimation = stream.readUnsignedShort();
|
||||
def.rotate90LeftAnimation = stream.readUnsignedShort();
|
||||
}
|
||||
else if (opcode == 18)
|
||||
{
|
||||
def.category = stream.readUnsignedShort();
|
||||
}
|
||||
else if (opcode >= 30 && opcode < 35)
|
||||
{
|
||||
def.actions[opcode - 30] = stream.readString();
|
||||
|
||||
@@ -306,6 +306,10 @@ public class ObjectLoader
|
||||
{
|
||||
def.setMapAreaId(is.readUnsignedShort());
|
||||
}
|
||||
else if (opcode == 89)
|
||||
{
|
||||
def.setRandomizeAnimStart(true);
|
||||
}
|
||||
else if (opcode == 92)
|
||||
{
|
||||
int varpID = is.readUnsignedShort();
|
||||
|
||||
@@ -11818,5 +11818,46 @@ public final class ItemID
|
||||
public static final int GOLD_SATCHEL_25622 = 25622;
|
||||
public static final int RUNE_SATCHEL_25623 = 25623;
|
||||
public static final int UNSIRED_25624 = 25624;
|
||||
public static final int BARRONITE_MACE_BROKEN = 25625;
|
||||
public static final int COAL_BAG_25627 = 25627;
|
||||
public static final int GEM_BAG_25628 = 25628;
|
||||
public static final int PLANK_SACK_25629 = 25629;
|
||||
public static final int FLAMTAER_BAG_25630 = 25630;
|
||||
public static final int STEAK_SANDWICH = 25631;
|
||||
public static final int IMCANDO_HAMMER_BROKEN = 25633;
|
||||
public static final int BARRONITE_HEAD = 25635;
|
||||
public static final int BARRONITE_HANDLE = 25637;
|
||||
public static final int BARRONITE_GUARD = 25639;
|
||||
public static final int BARRONITE_MACE = 25641;
|
||||
public static final int BARRONITE_MACE_L = 25643;
|
||||
public static final int IMCANDO_HAMMER = 25644;
|
||||
public static final int SIMPLE_LOCKBOX = 25646;
|
||||
public static final int SIMPLE_LOCKBOX_25647 = 25647;
|
||||
public static final int ELABORATE_LOCKBOX = 25648;
|
||||
public static final int ELABORATE_LOCKBOX_25649 = 25649;
|
||||
public static final int ORNATE_LOCKBOX = 25650;
|
||||
public static final int ORNATE_LOCKBOX_25651 = 25651;
|
||||
public static final int RAW_GUPPY = 25652;
|
||||
public static final int GUPPY = 25654;
|
||||
public static final int RUINED_GUPPY = 25656;
|
||||
public static final int RAW_CAVEFISH = 25658;
|
||||
public static final int CAVEFISH = 25660;
|
||||
public static final int RUINED_CAVEFISH = 25662;
|
||||
public static final int RAW_TETRA = 25664;
|
||||
public static final int TETRA = 25666;
|
||||
public static final int RUINED_TETRA = 25668;
|
||||
public static final int RAW_CATFISH = 25670;
|
||||
public static final int CATFISH = 25672;
|
||||
public static final int RUINED_CATFISH = 25674;
|
||||
public static final int BARRONITE_SHARDS = 25676;
|
||||
public static final int BARRONITE_DEPOSIT = 25684;
|
||||
public static final int ANCIENT_GLOBE = 25686;
|
||||
public static final int ANCIENT_LEDGER = 25688;
|
||||
public static final int ANCIENT_ASTROSCOPE = 25690;
|
||||
public static final int ANCIENT_TREATISE = 25692;
|
||||
public static final int ANCIENT_CARCANET = 25694;
|
||||
public static final int MIND_CORE = 25696;
|
||||
public static final int BODY_CORE = 25698;
|
||||
public static final int CHAOS_CORE = 25700;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
@@ -8996,15 +8996,56 @@ public final class NpcID
|
||||
public static final int FISHING_SPOT_10635 = 10635;
|
||||
public static final int GREAT_BLUE_HERON_10636 = 10636;
|
||||
public static final int TINY_TEMPOR_10637 = 10637;
|
||||
public static final int GREGG = 10638;
|
||||
public static final int GREGG_10639 = 10639;
|
||||
public static final int GREGG_10640 = 10640;
|
||||
public static final int GREGG_10641 = 10641;
|
||||
public static final int GREGG_10642 = 10642;
|
||||
public static final int GREGG_10643 = 10643;
|
||||
public static final int CAT_10644 = 10644;
|
||||
public static final int AGGIE_10645 = 10645;
|
||||
public static final int BABY_MOLERAT = 10650;
|
||||
public static final int BABY_MOLERAT_10651 = 10651;
|
||||
public static final int SPIDER_10652 = 10652;
|
||||
public static final int FISHING_SPOT_10653 = 10653;
|
||||
public static final int ANCIENT_GUARDIAN = 10654;
|
||||
public static final int WILLOW = 10655;
|
||||
public static final int MARLEY = 10656;
|
||||
public static final int CHECKAL = 10657;
|
||||
public static final int ATLAS = 10658;
|
||||
public static final int BURNTOF = 10659;
|
||||
public static final int BURNTOF_10660 = 10660;
|
||||
public static final int WILLOW_10661 = 10661;
|
||||
public static final int MARLEY_10662 = 10662;
|
||||
public static final int CHECKAL_10663 = 10663;
|
||||
public static final int BURNTOF_10664 = 10664;
|
||||
public static final int ANCIENT_GUARDIAN_10665 = 10665;
|
||||
public static final int RUBBLE = 10666;
|
||||
public static final int FUSE = 10667;
|
||||
public static final int TINA_10668 = 10668;
|
||||
public static final int ATLAS_10669 = 10669;
|
||||
public static final int RAMARNO = 10670;
|
||||
public static final int TRAMP_10671 = 10671;
|
||||
public static final int MAN_10672 = 10672;
|
||||
public static final int MAN_10673 = 10673;
|
||||
public static final int WOMAN_10674 = 10674;
|
||||
public static final int STRAY_DOG_10675 = 10675;
|
||||
public static final int BARBARIAN_10676 = 10676;
|
||||
public static final int BARBARIAN_10677 = 10677;
|
||||
public static final int BARBARIAN_10678 = 10678;
|
||||
public static final int BARBARIAN_10679 = 10679;
|
||||
public static final int GUARD_10680 = 10680;
|
||||
public static final int AUBURY_10681 = 10681;
|
||||
public static final int RAT_10682 = 10682;
|
||||
public static final int BARAEK_10683 = 10683;
|
||||
public static final int RAMARNO_10684 = 10684;
|
||||
public static final int RAMARNO_10685 = 10685;
|
||||
public static final int FISHING_SPOT_10686 = 10686;
|
||||
public static final int FISHING_SPOT_10687 = 10687;
|
||||
public static final int FISHING_SPOT_10688 = 10688;
|
||||
public static final int CHAOS_GOLEM = 10689;
|
||||
public static final int RUBBLE_10690 = 10690;
|
||||
public static final int BODY_GOLEM = 10691;
|
||||
public static final int RUBBLE_10692 = 10692;
|
||||
public static final int MIND_GOLEM = 10693;
|
||||
public static final int RUBBLE_10694 = 10694;
|
||||
public static final int FLAWED_GOLEM = 10695;
|
||||
public static final int RUBBLE_10696 = 10696;
|
||||
public static final int GHOST_10697 = 10697;
|
||||
public static final int GHOST_10698 = 10698;
|
||||
public static final int GHOST_10699 = 10699;
|
||||
public static final int FROG_10700 = 10700;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
@@ -13596,5 +13596,41 @@ public final class NullItemID
|
||||
public static final int NULL_25607 = 25607;
|
||||
public static final int NULL_25614 = 25614;
|
||||
public static final int NULL_25616 = 25616;
|
||||
public static final int NULL_25626 = 25626;
|
||||
public static final int NULL_25632 = 25632;
|
||||
public static final int NULL_25634 = 25634;
|
||||
public static final int NULL_25636 = 25636;
|
||||
public static final int NULL_25638 = 25638;
|
||||
public static final int NULL_25640 = 25640;
|
||||
public static final int NULL_25642 = 25642;
|
||||
public static final int NULL_25645 = 25645;
|
||||
public static final int NULL_25653 = 25653;
|
||||
public static final int NULL_25655 = 25655;
|
||||
public static final int NULL_25657 = 25657;
|
||||
public static final int NULL_25659 = 25659;
|
||||
public static final int NULL_25661 = 25661;
|
||||
public static final int NULL_25663 = 25663;
|
||||
public static final int NULL_25665 = 25665;
|
||||
public static final int NULL_25667 = 25667;
|
||||
public static final int NULL_25669 = 25669;
|
||||
public static final int NULL_25671 = 25671;
|
||||
public static final int NULL_25673 = 25673;
|
||||
public static final int NULL_25675 = 25675;
|
||||
public static final int NULL_25677 = 25677;
|
||||
public static final int NULL_25678 = 25678;
|
||||
public static final int NULL_25679 = 25679;
|
||||
public static final int NULL_25680 = 25680;
|
||||
public static final int NULL_25681 = 25681;
|
||||
public static final int NULL_25682 = 25682;
|
||||
public static final int NULL_25683 = 25683;
|
||||
public static final int NULL_25685 = 25685;
|
||||
public static final int NULL_25687 = 25687;
|
||||
public static final int NULL_25689 = 25689;
|
||||
public static final int NULL_25691 = 25691;
|
||||
public static final int NULL_25693 = 25693;
|
||||
public static final int NULL_25695 = 25695;
|
||||
public static final int NULL_25697 = 25697;
|
||||
public static final int NULL_25699 = 25699;
|
||||
public static final int NULL_25701 = 25701;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
@@ -1625,9 +1625,23 @@ public final class NullNpcID
|
||||
public static final int NULL_10627 = 10627;
|
||||
public static final int NULL_10629 = 10629;
|
||||
public static final int NULL_10633 = 10633;
|
||||
public static final int NULL_10638 = 10638;
|
||||
public static final int NULL_10639 = 10639;
|
||||
public static final int NULL_10640 = 10640;
|
||||
public static final int NULL_10641 = 10641;
|
||||
public static final int NULL_10642 = 10642;
|
||||
public static final int NULL_10643 = 10643;
|
||||
public static final int NULL_10644 = 10644;
|
||||
public static final int NULL_10645 = 10645;
|
||||
public static final int NULL_10646 = 10646;
|
||||
public static final int NULL_10647 = 10647;
|
||||
public static final int NULL_10648 = 10648;
|
||||
public static final int NULL_10649 = 10649;
|
||||
public static final int NULL_10701 = 10701;
|
||||
public static final int NULL_10702 = 10702;
|
||||
public static final int NULL_10703 = 10703;
|
||||
public static final int NULL_10704 = 10704;
|
||||
public static final int NULL_10705 = 10705;
|
||||
public static final int NULL_10706 = 10706;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
@@ -20155,9 +20155,23 @@ public final class NullObjectID
|
||||
public static final int NULL_41354 = 41354;
|
||||
public static final int NULL_41355 = 41355;
|
||||
public static final int NULL_41356 = 41356;
|
||||
public static final int NULL_41357 = 41357;
|
||||
public static final int NULL_41358 = 41358;
|
||||
public static final int NULL_41359 = 41359;
|
||||
public static final int NULL_41360 = 41360;
|
||||
public static final int NULL_41361 = 41361;
|
||||
public static final int NULL_41362 = 41362;
|
||||
public static final int NULL_41363 = 41363;
|
||||
public static final int NULL_41364 = 41364;
|
||||
public static final int NULL_41365 = 41365;
|
||||
public static final int NULL_41366 = 41366;
|
||||
public static final int NULL_41367 = 41367;
|
||||
public static final int NULL_41368 = 41368;
|
||||
public static final int NULL_41369 = 41369;
|
||||
public static final int NULL_41370 = 41370;
|
||||
public static final int NULL_41371 = 41371;
|
||||
public static final int NULL_41372 = 41372;
|
||||
public static final int NULL_41373 = 41373;
|
||||
public static final int NULL_41374 = 41374;
|
||||
public static final int NULL_41375 = 41375;
|
||||
public static final int NULL_41376 = 41376;
|
||||
@@ -20182,42 +20196,103 @@ public final class NullObjectID
|
||||
public static final int NULL_41395 = 41395;
|
||||
public static final int NULL_41396 = 41396;
|
||||
public static final int NULL_41397 = 41397;
|
||||
public static final int NULL_41398 = 41398;
|
||||
public static final int NULL_41399 = 41399;
|
||||
public static final int NULL_41400 = 41400;
|
||||
public static final int NULL_41401 = 41401;
|
||||
public static final int NULL_41402 = 41402;
|
||||
public static final int NULL_41403 = 41403;
|
||||
public static final int NULL_41404 = 41404;
|
||||
public static final int NULL_41405 = 41405;
|
||||
public static final int NULL_41406 = 41406;
|
||||
public static final int NULL_41407 = 41407;
|
||||
public static final int NULL_41408 = 41408;
|
||||
public static final int NULL_41409 = 41409;
|
||||
public static final int NULL_41410 = 41410;
|
||||
public static final int NULL_41411 = 41411;
|
||||
public static final int NULL_41412 = 41412;
|
||||
public static final int NULL_41413 = 41413;
|
||||
public static final int NULL_41414 = 41414;
|
||||
public static final int NULL_41415 = 41415;
|
||||
public static final int NULL_41416 = 41416;
|
||||
public static final int NULL_41417 = 41417;
|
||||
public static final int NULL_41418 = 41418;
|
||||
public static final int NULL_41419 = 41419;
|
||||
public static final int NULL_41420 = 41420;
|
||||
public static final int NULL_41421 = 41421;
|
||||
public static final int NULL_41422 = 41422;
|
||||
public static final int NULL_41423 = 41423;
|
||||
public static final int NULL_41424 = 41424;
|
||||
public static final int NULL_41425 = 41425;
|
||||
public static final int NULL_41426 = 41426;
|
||||
public static final int NULL_41427 = 41427;
|
||||
public static final int NULL_41428 = 41428;
|
||||
public static final int NULL_41429 = 41429;
|
||||
public static final int NULL_41430 = 41430;
|
||||
public static final int NULL_41431 = 41431;
|
||||
public static final int NULL_41432 = 41432;
|
||||
public static final int NULL_41433 = 41433;
|
||||
public static final int NULL_41437 = 41437;
|
||||
public static final int NULL_41461 = 41461;
|
||||
public static final int NULL_41462 = 41462;
|
||||
public static final int NULL_41463 = 41463;
|
||||
public static final int NULL_41464 = 41464;
|
||||
public static final int NULL_41465 = 41465;
|
||||
public static final int NULL_41466 = 41466;
|
||||
public static final int NULL_41467 = 41467;
|
||||
public static final int NULL_41468 = 41468;
|
||||
public static final int NULL_41469 = 41469;
|
||||
public static final int NULL_41470 = 41470;
|
||||
public static final int NULL_41471 = 41471;
|
||||
public static final int NULL_41472 = 41472;
|
||||
public static final int NULL_41473 = 41473;
|
||||
public static final int NULL_41474 = 41474;
|
||||
public static final int NULL_41475 = 41475;
|
||||
public static final int NULL_41476 = 41476;
|
||||
public static final int NULL_41477 = 41477;
|
||||
public static final int NULL_41478 = 41478;
|
||||
public static final int NULL_41479 = 41479;
|
||||
public static final int NULL_41480 = 41480;
|
||||
public static final int NULL_41485 = 41485;
|
||||
public static final int NULL_41486 = 41486;
|
||||
public static final int NULL_41487 = 41487;
|
||||
public static final int NULL_41488 = 41488;
|
||||
public static final int NULL_41489 = 41489;
|
||||
public static final int NULL_41490 = 41490;
|
||||
public static final int NULL_41491 = 41491;
|
||||
public static final int NULL_41492 = 41492;
|
||||
public static final int NULL_41496 = 41496;
|
||||
public static final int NULL_41497 = 41497;
|
||||
public static final int NULL_41498 = 41498;
|
||||
public static final int NULL_41499 = 41499;
|
||||
public static final int NULL_41500 = 41500;
|
||||
public static final int NULL_41501 = 41501;
|
||||
public static final int NULL_41502 = 41502;
|
||||
public static final int NULL_41503 = 41503;
|
||||
public static final int NULL_41504 = 41504;
|
||||
public static final int NULL_41505 = 41505;
|
||||
public static final int NULL_41506 = 41506;
|
||||
public static final int NULL_41507 = 41507;
|
||||
public static final int NULL_41508 = 41508;
|
||||
public static final int NULL_41509 = 41509;
|
||||
public static final int NULL_41510 = 41510;
|
||||
public static final int NULL_41513 = 41513;
|
||||
public static final int NULL_41514 = 41514;
|
||||
public static final int NULL_41515 = 41515;
|
||||
public static final int NULL_41516 = 41516;
|
||||
public static final int NULL_41517 = 41517;
|
||||
public static final int NULL_41518 = 41518;
|
||||
public static final int NULL_41519 = 41519;
|
||||
public static final int NULL_41520 = 41520;
|
||||
public static final int NULL_41521 = 41521;
|
||||
public static final int NULL_41522 = 41522;
|
||||
public static final int NULL_41523 = 41523;
|
||||
public static final int NULL_41524 = 41524;
|
||||
public static final int NULL_41525 = 41525;
|
||||
public static final int NULL_41526 = 41526;
|
||||
public static final int NULL_41527 = 41527;
|
||||
public static final int NULL_41528 = 41528;
|
||||
public static final int NULL_41529 = 41529;
|
||||
public static final int NULL_41530 = 41530;
|
||||
public static final int NULL_41531 = 41531;
|
||||
public static final int NULL_41532 = 41532;
|
||||
public static final int NULL_41533 = 41533;
|
||||
public static final int NULL_41534 = 41534;
|
||||
public static final int NULL_41535 = 41535;
|
||||
public static final int NULL_41536 = 41536;
|
||||
public static final int NULL_41552 = 41552;
|
||||
public static final int NULL_41553 = 41553;
|
||||
public static final int NULL_41554 = 41554;
|
||||
public static final int NULL_41555 = 41555;
|
||||
public static final int NULL_41556 = 41556;
|
||||
public static final int NULL_41557 = 41557;
|
||||
public static final int NULL_41559 = 41559;
|
||||
public static final int NULL_41560 = 41560;
|
||||
public static final int NULL_41561 = 41561;
|
||||
public static final int NULL_41565 = 41565;
|
||||
public static final int NULL_41566 = 41566;
|
||||
public static final int NULL_41567 = 41567;
|
||||
public static final int NULL_41568 = 41568;
|
||||
public static final int NULL_41569 = 41569;
|
||||
public static final int NULL_41570 = 41570;
|
||||
public static final int NULL_41577 = 41577;
|
||||
public static final int NULL_41578 = 41578;
|
||||
public static final int NULL_41579 = 41579;
|
||||
public static final int NULL_41580 = 41580;
|
||||
public static final int NULL_41585 = 41585;
|
||||
public static final int NULL_41586 = 41586;
|
||||
public static final int NULL_41587 = 41587;
|
||||
public static final int NULL_41591 = 41591;
|
||||
public static final int NULL_41592 = 41592;
|
||||
public static final int NULL_41594 = 41594;
|
||||
public static final int NULL_41595 = 41595;
|
||||
public static final int NULL_41596 = 41596;
|
||||
public static final int NULL_41597 = 41597;
|
||||
public static final int NULL_41598 = 41598;
|
||||
public static final int NULL_41599 = 41599;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
@@ -21188,23 +21188,73 @@ public final class ObjectID
|
||||
public static final int FISHING_ROD_41330 = 41330;
|
||||
public static final int CRATES_41332 = 41332;
|
||||
public static final int WATER_41333 = 41333;
|
||||
public static final int DOOR_41357 = 41357;
|
||||
public static final int DOOR_41358 = 41358;
|
||||
public static final int DOOR_41359 = 41359;
|
||||
public static final int DOOR_41360 = 41360;
|
||||
public static final int DOOR_41361 = 41361;
|
||||
public static final int DOOR_41362 = 41362;
|
||||
public static final int DOOR_41365 = 41365;
|
||||
public static final int DOOR_41366 = 41366;
|
||||
public static final int DOOR_41367 = 41367;
|
||||
public static final int DOOR_41368 = 41368;
|
||||
public static final int CRATE_41369 = 41369;
|
||||
public static final int EASTER_EGGS = 41370;
|
||||
public static final int BASKET_41371 = 41371;
|
||||
public static final int POST_41373 = 41373;
|
||||
public static final int STASH_CHART = 41434;
|
||||
public static final int REWARDS_CHEST_41435 = 41435;
|
||||
public static final int REWARDS_CHEST_41436 = 41436;
|
||||
public static final int STILE_41438 = 41438;
|
||||
public static final int RUINS_ENTRANCE = 41439;
|
||||
public static final int RUINS_ENTRANCE_41440 = 41440;
|
||||
public static final int BLOCKED_ENTRY = 41441;
|
||||
public static final int TRIPWIRE_41442 = 41442;
|
||||
public static final int ROCK_PILE_41443 = 41443;
|
||||
public static final int ROCK_PILE_41444 = 41444;
|
||||
public static final int ROCK_DEBRIS = 41445;
|
||||
public static final int RUINS_EXIT = 41446;
|
||||
public static final int RUINS_EXIT_41447 = 41447;
|
||||
public static final int WILLOWS_BAG = 41448;
|
||||
public static final int WILLOWS_BAG_41449 = 41449;
|
||||
public static final int CRATE_41450 = 41450;
|
||||
public static final int RUBBLE_41451 = 41451;
|
||||
public static final int CRATE_41452 = 41452;
|
||||
public static final int RUBBLE_41453 = 41453;
|
||||
public static final int RUBBLE_41454 = 41454;
|
||||
public static final int BARREL_41455 = 41455;
|
||||
public static final int BUSH_41456 = 41456;
|
||||
public static final int CART_41457 = 41457;
|
||||
public static final int STRUCTURAL_PILLAR = 41458;
|
||||
public static final int BROKEN_PILLAR_41459 = 41459;
|
||||
public static final int STRUCTURAL_PILLAR_41460 = 41460;
|
||||
public static final int SACRED_FORGE = 41481;
|
||||
public static final int BIG_DOOR_41482 = 41482;
|
||||
public static final int BIG_DOOR_41483 = 41483;
|
||||
public static final int BIG_DOOR_41484 = 41484;
|
||||
public static final int BANK_CHEST_41493 = 41493;
|
||||
public static final int TABLE_41494 = 41494;
|
||||
public static final int WORKBENCH_41495 = 41495;
|
||||
public static final int MINE_CART_41511 = 41511;
|
||||
public static final int MINE_CART_41512 = 41512;
|
||||
public static final int VAULT_DOOR = 41537;
|
||||
public static final int TRAP_41538 = 41538;
|
||||
public static final int SECURITY_BARRIER = 41539;
|
||||
public static final int SECURITY_BARRIER_41540 = 41540;
|
||||
public static final int SIMPLE_LOCKBOX = 41541;
|
||||
public static final int ELABORATE_LOCKBOX = 41542;
|
||||
public static final int ORNATE_LOCKBOX = 41543;
|
||||
public static final int EMPTY_PEDESTAL = 41544;
|
||||
public static final int PREPARATION_TABLE = 41545;
|
||||
public static final int ALTAR_41546 = 41546;
|
||||
public static final int ROCKS_41547 = 41547;
|
||||
public static final int ROCKS_41548 = 41548;
|
||||
public static final int ROCKS_41549 = 41549;
|
||||
public static final int ROCKS_41550 = 41550;
|
||||
public static final int BARRONITE_CRUSHER = 41551;
|
||||
public static final int CAVE_41558 = 41558;
|
||||
public static final int ROCK_41562 = 41562;
|
||||
public static final int SMALL_ROCK_41563 = 41563;
|
||||
public static final int ROCK_41564 = 41564;
|
||||
public static final int CHARM_OF_FISHING = 41571;
|
||||
public static final int CHARM_OF_PREPERATION = 41572;
|
||||
public static final int CHARM_OF_DEFENCE = 41573;
|
||||
public static final int CHARM_OF_MINING = 41574;
|
||||
public static final int CHARM_OF_BOOST = 41575;
|
||||
public static final int CHARM_OF_LUCK = 41576;
|
||||
public static final int FERN_41581 = 41581;
|
||||
public static final int FERN_41582 = 41582;
|
||||
public static final int FERN_41583 = 41583;
|
||||
public static final int FERN_41584 = 41584;
|
||||
public static final int WATER_41588 = 41588;
|
||||
public static final int GOLEM_RUBBLE = 41589;
|
||||
public static final int GOLEM_RUBBLE_41590 = 41590;
|
||||
public static final int BARREL_41593 = 41593;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
-2
@@ -42,8 +42,6 @@ public class ArdougneDiaryRequirement extends GenericDiaryRequirement
|
||||
new SkillRequirement(Skill.THIEVING, 5));
|
||||
add("Enter the Combat Training Camp north of W. Ardougne.",
|
||||
new QuestRequirement(Quest.BIOHAZARD));
|
||||
add("Go out fishing on the Fishing Trawler.",
|
||||
new SkillRequirement(Skill.FISHING, 15));
|
||||
|
||||
// MEDIUM
|
||||
add("Enter the Unicorn pen in Ardougne zoo using Fairy rings.",
|
||||
|
||||
+8
-32
@@ -38,7 +38,6 @@ import java.awt.event.KeyListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -53,7 +52,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Experience;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.WorldType;
|
||||
import net.runelite.client.ui.ColorScheme;
|
||||
import net.runelite.client.ui.FontManager;
|
||||
import net.runelite.client.ui.PluginPanel;
|
||||
@@ -118,7 +116,7 @@ public class HiscorePanel extends PluginPanel
|
||||
HiscoreEndpoint.NORMAL, HiscoreEndpoint.IRONMAN, HiscoreEndpoint.HARDCORE_IRONMAN, HiscoreEndpoint.ULTIMATE_IRONMAN, HiscoreEndpoint.DEADMAN, HiscoreEndpoint.LEAGUE
|
||||
};
|
||||
|
||||
private final Client client;
|
||||
private final HiscorePlugin plugin;
|
||||
private final HiscoreConfig config;
|
||||
private final NameAutocompleter nameAutocompleter;
|
||||
private final HiscoreClient hiscoreClient;
|
||||
@@ -138,10 +136,10 @@ public class HiscorePanel extends PluginPanel
|
||||
private boolean loading = false;
|
||||
|
||||
@Inject
|
||||
public HiscorePanel(@Nullable Client client,
|
||||
HiscoreConfig config, NameAutocompleter nameAutocompleter, OkHttpClient okHttpClient)
|
||||
public HiscorePanel(@Nullable Client client, HiscorePlugin plugin, HiscoreConfig config,
|
||||
NameAutocompleter nameAutocompleter, OkHttpClient okHttpClient)
|
||||
{
|
||||
this.client = client;
|
||||
this.plugin = plugin;
|
||||
this.config = config;
|
||||
this.nameAutocompleter = nameAutocompleter;
|
||||
this.hiscoreClient = new HiscoreClient(okHttpClient);
|
||||
@@ -187,7 +185,7 @@ public class HiscorePanel extends PluginPanel
|
||||
|
||||
if (localPlayer != null)
|
||||
{
|
||||
lookup(localPlayer.getName());
|
||||
lookup(localPlayer.getName(), plugin.getLocalHiscoreEndpoint());
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -360,10 +358,10 @@ public class HiscorePanel extends PluginPanel
|
||||
return skillPanel;
|
||||
}
|
||||
|
||||
public void lookup(String username)
|
||||
public void lookup(String username, HiscoreEndpoint endpoint)
|
||||
{
|
||||
searchBar.setText(username);
|
||||
resetEndpoints();
|
||||
tabGroup.select(tabGroup.getTab(ArrayUtils.indexOf(ENDPOINTS, endpoint)));
|
||||
lookup();
|
||||
}
|
||||
|
||||
@@ -720,33 +718,11 @@ public class HiscorePanel extends PluginPanel
|
||||
private void resetEndpoints()
|
||||
{
|
||||
// Select the correct tab based on the world type.
|
||||
HiscoreEndpoint endpoint = selectWorldEndpoint();
|
||||
HiscoreEndpoint endpoint = plugin.getWorldEndpoint();
|
||||
int idx = ArrayUtils.indexOf(ENDPOINTS, endpoint);
|
||||
tabGroup.select(tabGroup.getTab(idx));
|
||||
}
|
||||
|
||||
private HiscoreEndpoint selectWorldEndpoint()
|
||||
{
|
||||
if (client != null)
|
||||
{
|
||||
EnumSet<WorldType> wTypes = client.getWorldType();
|
||||
|
||||
if (wTypes.contains(WorldType.DEADMAN_TOURNAMENT))
|
||||
{
|
||||
return HiscoreEndpoint.TOURNAMENT;
|
||||
}
|
||||
else if (wTypes.contains(WorldType.DEADMAN))
|
||||
{
|
||||
return HiscoreEndpoint.DEADMAN;
|
||||
}
|
||||
else if (wTypes.contains(WorldType.LEAGUE))
|
||||
{
|
||||
return HiscoreEndpoint.LEAGUE;
|
||||
}
|
||||
}
|
||||
return HiscoreEndpoint.NORMAL;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static String formatLevel(int level)
|
||||
{
|
||||
|
||||
+89
-4
@@ -28,20 +28,25 @@ import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ObjectArrays;
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.EnumSet;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Provider;
|
||||
import javax.swing.SwingUtilities;
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.IconID;
|
||||
import net.runelite.api.MenuAction;
|
||||
import net.runelite.api.MenuEntry;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.WorldType;
|
||||
import net.runelite.api.events.ChatMessage;
|
||||
import net.runelite.api.events.MenuEntryAdded;
|
||||
import net.runelite.api.events.MenuOptionClicked;
|
||||
import net.runelite.api.events.VarbitChanged;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
@@ -53,6 +58,7 @@ import net.runelite.client.ui.ClientToolbar;
|
||||
import net.runelite.client.ui.NavigationButton;
|
||||
import net.runelite.client.util.ImageUtil;
|
||||
import net.runelite.client.util.Text;
|
||||
import net.runelite.http.api.hiscore.HiscoreEndpoint;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
@PluginDescriptor(
|
||||
@@ -84,6 +90,9 @@ public class HiscorePlugin extends Plugin
|
||||
private NavigationButton navButton;
|
||||
private HiscorePanel hiscorePanel;
|
||||
|
||||
@Getter
|
||||
private HiscoreEndpoint localHiscoreEndpoint;
|
||||
|
||||
@Provides
|
||||
HiscoreConfig provideConfig(ConfigManager configManager)
|
||||
{
|
||||
@@ -181,6 +190,7 @@ public class HiscorePlugin extends Plugin
|
||||
&& event.getMenuOption().equals(LOOKUP))
|
||||
{
|
||||
final String target;
|
||||
HiscoreEndpoint endpoint = HiscoreEndpoint.NORMAL;
|
||||
if (event.getMenuAction() == MenuAction.RUNELITE_PLAYER)
|
||||
{
|
||||
// The player id is included in the event, so we can use that to get the player name,
|
||||
@@ -195,10 +205,13 @@ public class HiscorePlugin extends Plugin
|
||||
}
|
||||
else
|
||||
{
|
||||
// Determine proper endpoint from player name.
|
||||
// TODO: look at target's world and determine if tournament/dmm endpoint should be used instead.
|
||||
endpoint = findHiscoreEndpointFromPlayerName(event.getMenuTarget());
|
||||
target = Text.removeTags(event.getMenuTarget());
|
||||
}
|
||||
|
||||
lookupPlayer(target);
|
||||
lookupPlayer(target, endpoint);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,10 +227,16 @@ public class HiscorePlugin extends Plugin
|
||||
Matcher m = BOUNTY_PATTERN.matcher(message);
|
||||
if (m.matches())
|
||||
{
|
||||
lookupPlayer(m.group(1));
|
||||
lookupPlayer(m.group(1), HiscoreEndpoint.NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onVarbitChanged(VarbitChanged event)
|
||||
{
|
||||
localHiscoreEndpoint = findHiscoreEndpointFromLocalPlayer();
|
||||
}
|
||||
|
||||
private void insertMenuEntry(MenuEntry newEntry, MenuEntry[] entries)
|
||||
{
|
||||
MenuEntry[] newMenu = ObjectArrays.concat(entries, newEntry);
|
||||
@@ -226,7 +245,7 @@ public class HiscorePlugin extends Plugin
|
||||
client.setMenuEntries(newMenu);
|
||||
}
|
||||
|
||||
private void lookupPlayer(String playerName)
|
||||
private void lookupPlayer(String playerName, HiscoreEndpoint endpoint)
|
||||
{
|
||||
SwingUtilities.invokeLater(() ->
|
||||
{
|
||||
@@ -234,7 +253,73 @@ public class HiscorePlugin extends Plugin
|
||||
{
|
||||
navButton.getOnSelect().run();
|
||||
}
|
||||
hiscorePanel.lookup(playerName);
|
||||
hiscorePanel.lookup(playerName, endpoint);
|
||||
});
|
||||
}
|
||||
|
||||
HiscoreEndpoint getWorldEndpoint()
|
||||
{
|
||||
if (client != null)
|
||||
{
|
||||
EnumSet<WorldType> wTypes = client.getWorldType();
|
||||
|
||||
if (wTypes.contains(WorldType.DEADMAN_TOURNAMENT))
|
||||
{
|
||||
return HiscoreEndpoint.TOURNAMENT;
|
||||
}
|
||||
else if (wTypes.contains(WorldType.DEADMAN))
|
||||
{
|
||||
return HiscoreEndpoint.DEADMAN;
|
||||
}
|
||||
else if (wTypes.contains(WorldType.LEAGUE))
|
||||
{
|
||||
return HiscoreEndpoint.LEAGUE;
|
||||
}
|
||||
}
|
||||
return HiscoreEndpoint.NORMAL;
|
||||
}
|
||||
|
||||
private HiscoreEndpoint findHiscoreEndpointFromLocalPlayer()
|
||||
{
|
||||
final HiscoreEndpoint profile = getWorldEndpoint();
|
||||
if (profile != HiscoreEndpoint.NORMAL)
|
||||
{
|
||||
return profile;
|
||||
}
|
||||
|
||||
if (client != null)
|
||||
{
|
||||
switch (client.getAccountType())
|
||||
{
|
||||
case IRONMAN:
|
||||
return HiscoreEndpoint.IRONMAN;
|
||||
case ULTIMATE_IRONMAN:
|
||||
return HiscoreEndpoint.ULTIMATE_IRONMAN;
|
||||
case HARDCORE_IRONMAN:
|
||||
return HiscoreEndpoint.HARDCORE_IRONMAN;
|
||||
}
|
||||
}
|
||||
return HiscoreEndpoint.NORMAL;
|
||||
}
|
||||
|
||||
private HiscoreEndpoint findHiscoreEndpointFromPlayerName(String name)
|
||||
{
|
||||
if (name.contains(IconID.IRONMAN.toString()))
|
||||
{
|
||||
return HiscoreEndpoint.IRONMAN;
|
||||
}
|
||||
if (name.contains(IconID.ULTIMATE_IRONMAN.toString()))
|
||||
{
|
||||
return HiscoreEndpoint.ULTIMATE_IRONMAN;
|
||||
}
|
||||
if (name.contains(IconID.HARDCORE_IRONMAN.toString()))
|
||||
{
|
||||
return HiscoreEndpoint.HARDCORE_IRONMAN;
|
||||
}
|
||||
if (name.contains(IconID.LEAGUE.toString()))
|
||||
{
|
||||
return HiscoreEndpoint.LEAGUE;
|
||||
}
|
||||
return HiscoreEndpoint.NORMAL;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -26,6 +26,7 @@ package net.runelite.client.plugins.specialcounter;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.inject.Provides;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -314,7 +315,7 @@ public class SpecialCounterPlugin extends Plugin
|
||||
|
||||
for (SpecialWeapon specialWeapon : SpecialWeapon.values())
|
||||
{
|
||||
if (specialWeapon.getItemID() == weapon.getId())
|
||||
if (Arrays.stream(specialWeapon.getItemID()).anyMatch(id -> id == weapon.getId()))
|
||||
{
|
||||
return specialWeapon;
|
||||
}
|
||||
@@ -328,7 +329,7 @@ public class SpecialCounterPlugin extends Plugin
|
||||
|
||||
if (counter == null)
|
||||
{
|
||||
counter = new SpecialCounter(itemManager.getImage(specialWeapon.getItemID()), this, config,
|
||||
counter = new SpecialCounter(itemManager.getImage(specialWeapon.getItemID()[0]), this, config,
|
||||
hit, specialWeapon);
|
||||
infoBoxManager.addInfoBox(counter);
|
||||
specialCounter[specialWeapon.ordinal()] = counter;
|
||||
|
||||
+8
-12
@@ -33,20 +33,16 @@ import net.runelite.api.ItemID;
|
||||
@Getter
|
||||
enum SpecialWeapon
|
||||
{
|
||||
DRAGON_WARHAMMER("Dragon Warhammer", ItemID.DRAGON_WARHAMMER, false, SpecialCounterConfig::dragonWarhammerThreshold),
|
||||
ARCLIGHT("Arclight", ItemID.ARCLIGHT, false, SpecialCounterConfig::arclightThreshold),
|
||||
DARKLIGHT("Darklight", ItemID.DARKLIGHT, false, SpecialCounterConfig::darklightThreshold),
|
||||
BANDOS_GODSWORD("Bandos Godsword", ItemID.BANDOS_GODSWORD, true, SpecialCounterConfig::bandosGodswordThreshold),
|
||||
BANDOS_GODSWORD_OR("Bandos Godsword", ItemID.BANDOS_GODSWORD_OR, true, SpecialCounterConfig::bandosGodswordThreshold),
|
||||
BARRELCHEST_ANCHOR("Barrelchest Anchor", ItemID.BARRELCHEST_ANCHOR, true, (c) -> 0),
|
||||
BONE_DAGGER("Bone Dagger", ItemID.BONE_DAGGER, true, (c) -> 0),
|
||||
BONE_DAGGER_P("Bone Dagger (p)", ItemID.BONE_DAGGER_P, true, (c) -> 0),
|
||||
BONE_DAGGER_P8876("Bone Dagger (p+)", ItemID.BONE_DAGGER_P_8876, true, (c) -> 0),
|
||||
BONE_DAGGER_P8878("Bone Dagger (p++)", ItemID.BONE_DAGGER_P_8878, true, (c) -> 0),
|
||||
DORGESHUUN_CROSSBOW("Dorgeshuun Crossbow", ItemID.DORGESHUUN_CROSSBOW, true, (c) -> 0);
|
||||
DRAGON_WARHAMMER("Dragon Warhammer", new int[]{ItemID.DRAGON_WARHAMMER}, false, SpecialCounterConfig::dragonWarhammerThreshold),
|
||||
ARCLIGHT("Arclight", new int[]{ItemID.ARCLIGHT}, false, SpecialCounterConfig::arclightThreshold),
|
||||
DARKLIGHT("Darklight", new int[]{ItemID.DARKLIGHT}, false, SpecialCounterConfig::darklightThreshold),
|
||||
BANDOS_GODSWORD("Bandos Godsword", new int[]{ItemID.BANDOS_GODSWORD, ItemID.BANDOS_GODSWORD_OR}, true, SpecialCounterConfig::bandosGodswordThreshold),
|
||||
BARRELCHEST_ANCHOR("Barrelchest Anchor", new int[]{ItemID.BARRELCHEST_ANCHOR}, true, (c) -> 0),
|
||||
BONE_DAGGER("Bone Dagger", new int[]{ItemID.BONE_DAGGER, ItemID.BONE_DAGGER_P, ItemID.BONE_DAGGER_P_8876, ItemID.BONE_DAGGER_P_8878}, true, (c) -> 0),
|
||||
DORGESHUUN_CROSSBOW("Dorgeshuun Crossbow", new int[]{ItemID.DORGESHUUN_CROSSBOW}, true, (c) -> 0);
|
||||
|
||||
private final String name;
|
||||
private final int itemID;
|
||||
private final int[] itemID;
|
||||
private final boolean damage;
|
||||
private final Function<SpecialCounterConfig, Integer> threshold;
|
||||
}
|
||||
+1
-11
@@ -42,6 +42,7 @@ public interface TimeTrackingConfig extends Config
|
||||
String STOPWATCHES = "stopwatches";
|
||||
String PREFER_SOONEST = "preferSoonest";
|
||||
String NOTIFY = "notify";
|
||||
String BIRDHOUSE_NOTIFY = "birdHouseNotification";
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "timeFormatMode",
|
||||
@@ -65,17 +66,6 @@ public interface TimeTrackingConfig extends Config
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "birdHouseNotification",
|
||||
name = "Bird house notification",
|
||||
description = "Notify you when all bird houses are full",
|
||||
position = 3
|
||||
)
|
||||
default boolean birdHouseNotification()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "farmingContractInfoBox",
|
||||
name = "Show farming contract infobox",
|
||||
|
||||
+22
-1
@@ -31,24 +31,29 @@ import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.runelite.api.ItemID;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
import net.runelite.client.plugins.timetracking.TabContentPanel;
|
||||
import net.runelite.client.plugins.timetracking.TimeTrackingConfig;
|
||||
import net.runelite.client.plugins.timetracking.TimeablePanel;
|
||||
import net.runelite.client.ui.ColorScheme;
|
||||
import net.runelite.client.ui.DynamicGridLayout;
|
||||
import javax.swing.JToggleButton;
|
||||
|
||||
public class BirdHouseTabPanel extends TabContentPanel
|
||||
{
|
||||
private static final Color COMPLETED_COLOR = ColorScheme.PROGRESS_COMPLETE_COLOR.darker();
|
||||
|
||||
private final ConfigManager configManager;
|
||||
private final ItemManager itemManager;
|
||||
private final BirdHouseTracker birdHouseTracker;
|
||||
private final TimeTrackingConfig config;
|
||||
private final List<TimeablePanel<BirdHouseSpace>> spacePanels;
|
||||
|
||||
BirdHouseTabPanel(ItemManager itemManager, BirdHouseTracker birdHouseTracker, TimeTrackingConfig config)
|
||||
BirdHouseTabPanel(ConfigManager configManager, ItemManager itemManager, BirdHouseTracker birdHouseTracker,
|
||||
TimeTrackingConfig config)
|
||||
{
|
||||
this.configManager = configManager;
|
||||
this.itemManager = itemManager;
|
||||
this.birdHouseTracker = birdHouseTracker;
|
||||
this.config = config;
|
||||
@@ -71,6 +76,17 @@ public class BirdHouseTabPanel extends TabContentPanel
|
||||
first = false;
|
||||
panel.setBorder(null);
|
||||
}
|
||||
|
||||
JToggleButton toggleNotify = panel.getNotifyButton();
|
||||
|
||||
toggleNotify.addActionListener(e ->
|
||||
{
|
||||
if (configManager.getRSProfileKey() != null)
|
||||
{
|
||||
configManager.setRSProfileConfiguration(TimeTrackingConfig.CONFIG_GROUP, TimeTrackingConfig.BIRDHOUSE_NOTIFY, toggleNotify.isSelected());
|
||||
}
|
||||
spacePanels.forEach(p -> p.getNotifyButton().setSelected(toggleNotify.isSelected()));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +101,9 @@ public class BirdHouseTabPanel extends TabContentPanel
|
||||
{
|
||||
long unixNow = Instant.now().getEpochSecond();
|
||||
|
||||
boolean notifications = Boolean.TRUE
|
||||
.equals(configManager.getRSProfileConfiguration(TimeTrackingConfig.CONFIG_GROUP, TimeTrackingConfig.BIRDHOUSE_NOTIFY, boolean.class));
|
||||
|
||||
for (TimeablePanel<BirdHouseSpace> panel : spacePanels)
|
||||
{
|
||||
BirdHouseSpace space = panel.getTimeable();
|
||||
@@ -113,6 +132,8 @@ public class BirdHouseTabPanel extends TabContentPanel
|
||||
panel.getProgress().setVisible(true);
|
||||
}
|
||||
|
||||
panel.getNotifyButton().setSelected(notifications);
|
||||
|
||||
panel.getProgress().setForeground(state.getColor().darker());
|
||||
|
||||
switch (state)
|
||||
|
||||
+2
-2
@@ -84,7 +84,7 @@ public class BirdHouseTracker
|
||||
|
||||
public BirdHouseTabPanel createBirdHouseTabPanel()
|
||||
{
|
||||
return new BirdHouseTabPanel(itemManager, this, config);
|
||||
return new BirdHouseTabPanel(configManager, itemManager, this, config);
|
||||
}
|
||||
|
||||
public void loadFromConfig()
|
||||
@@ -180,7 +180,7 @@ public class BirdHouseTracker
|
||||
summary = SummaryState.COMPLETED;
|
||||
completionTime = 0;
|
||||
|
||||
if (config.birdHouseNotification())
|
||||
if (Boolean.TRUE.equals(configManager.getRSProfileConfiguration(TimeTrackingConfig.CONFIG_GROUP, TimeTrackingConfig.BIRDHOUSE_NOTIFY, boolean.class)))
|
||||
{
|
||||
notifier.notify("Your bird houses are ready to be dismantled.");
|
||||
}
|
||||
|
||||
@@ -75,10 +75,22 @@ public class ContainableFrame extends JFrame
|
||||
javaVersion = javaVersion.substring(0, idx);
|
||||
}
|
||||
String[] s = javaVersion.split("\\.");
|
||||
int major = Integer.parseInt(s[0]), minor = Integer.parseInt(s[1]), patch = Integer.parseInt(s[2]);
|
||||
int major, minor, patch;
|
||||
if (s.length == 3)
|
||||
{
|
||||
major = Integer.parseInt(s[0]);
|
||||
minor = Integer.parseInt(s[1]);
|
||||
patch = Integer.parseInt(s[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
major = Integer.parseInt(s[0]);
|
||||
minor = -1;
|
||||
patch = -1;
|
||||
}
|
||||
if (major == 12 || major == 13 || major == 14)
|
||||
{
|
||||
// These versions are since EOL & do not include JDK-8231564
|
||||
// These versions are since EOL & do not include JDK-8231564, except for 13.0.4+
|
||||
return false;
|
||||
}
|
||||
return major > 11 || (major == 11 && minor > 0) || (major == 11 && minor == 0 && patch >= 8);
|
||||
@@ -138,6 +150,7 @@ public class ContainableFrame extends JFrame
|
||||
/**
|
||||
* Expand frame by specified value. If the frame is going to be expanded outside of screen push the frame to
|
||||
* the side.
|
||||
*
|
||||
* @param value size to expand frame by
|
||||
*/
|
||||
public void expandBy(final int value)
|
||||
@@ -197,6 +210,7 @@ public class ContainableFrame extends JFrame
|
||||
/**
|
||||
* Contract frame by specified value. If new frame size is less than it's minimum size, force the minimum size.
|
||||
* If the frame was pushed from side before, restore it's original position.
|
||||
*
|
||||
* @param value value to contract frame by
|
||||
*/
|
||||
public void contractBy(final int value)
|
||||
|
||||
@@ -1413,12 +1413,14 @@
|
||||
"coal bag": [
|
||||
764,
|
||||
12019,
|
||||
24480
|
||||
24480,
|
||||
25627
|
||||
],
|
||||
"gem bag": [
|
||||
766,
|
||||
12020,
|
||||
24481
|
||||
24481,
|
||||
25628
|
||||
],
|
||||
"phoenix crossbow": [
|
||||
767,
|
||||
@@ -7769,6 +7771,10 @@
|
||||
12851,
|
||||
12853
|
||||
],
|
||||
"flamtaer bag": [
|
||||
12854,
|
||||
25630
|
||||
],
|
||||
"thanksgiving dinner": [
|
||||
12861,
|
||||
12862
|
||||
@@ -9583,6 +9589,10 @@
|
||||
24824,
|
||||
24840
|
||||
],
|
||||
"plank sack": [
|
||||
24882,
|
||||
25629
|
||||
],
|
||||
"oak table": [
|
||||
24887,
|
||||
24891,
|
||||
@@ -9739,5 +9749,26 @@
|
||||
"fish sack barrel": [
|
||||
25585,
|
||||
25587
|
||||
],
|
||||
"barronite mace": [
|
||||
25625,
|
||||
25641,
|
||||
25643
|
||||
],
|
||||
"imcando hammer": [
|
||||
25633,
|
||||
25644
|
||||
],
|
||||
"simple lockbox": [
|
||||
25646,
|
||||
25647
|
||||
],
|
||||
"elaborate lockbox": [
|
||||
25648,
|
||||
25649
|
||||
],
|
||||
"ornate lockbox": [
|
||||
25650,
|
||||
25651
|
||||
]
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 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.hiscore;
|
||||
|
||||
import static net.runelite.client.plugins.hiscore.HiscorePanel.formatLevel;
|
||||
import net.runelite.http.api.hiscore.HiscoreEndpoint;
|
||||
import okhttp3.OkHttpClient;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import org.junit.Test;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class HiscorePanelTest
|
||||
{
|
||||
@Test
|
||||
public void testConstructor()
|
||||
{
|
||||
HiscorePlugin plugin = mock(HiscorePlugin.class);
|
||||
when(plugin.getWorldEndpoint()).thenReturn(HiscoreEndpoint.NORMAL);
|
||||
new HiscorePanel(null, plugin, mock(HiscoreConfig.class),
|
||||
mock(NameAutocompleter.class), mock(OkHttpClient.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFormatLevel()
|
||||
{
|
||||
assertEquals("398", formatLevel(398));
|
||||
assertEquals("5000", formatLevel(5000));
|
||||
assertEquals("7682", formatLevel(7682));
|
||||
assertEquals("12k", formatLevel(12398));
|
||||
assertEquals("219k", formatLevel(219824));
|
||||
}
|
||||
}
|
||||
+5
@@ -258,6 +258,11 @@ public class SpecialCounterPluginTest
|
||||
specialCounterPlugin.onVarbitChanged(new VarbitChanged());
|
||||
specialCounterPlugin.onHitsplatApplied(hitsplat(target, Hitsplat.HitsplatType.DAMAGE_ME));
|
||||
|
||||
// Set up spec weapon as BGS(OR)
|
||||
ItemContainer equipment = mock(ItemContainer.class);
|
||||
when(equipment.getItem(EquipmentInventorySlot.WEAPON.getSlotIdx())).thenReturn(new Item(ItemID.BANDOS_GODSWORD_OR, 1));
|
||||
when(client.getItemContainer(InventoryID.EQUIPMENT)).thenReturn(equipment);
|
||||
|
||||
// Second special attack
|
||||
when(client.getVar(VarPlayer.SPECIAL_ATTACK_PERCENT)).thenReturn(0);
|
||||
specialCounterPlugin.onVarbitChanged(new VarbitChanged());
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 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.ui;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ContainableFrameTest
|
||||
{
|
||||
@Test
|
||||
public void testJdk8231564()
|
||||
{
|
||||
assertTrue(ContainableFrame.jdk8231564("11.0.8"));
|
||||
assertFalse(ContainableFrame.jdk8231564("11.0.7"));
|
||||
assertFalse(ContainableFrame.jdk8231564("1.8.0_261"));
|
||||
assertFalse(ContainableFrame.jdk8231564("12.0.0"));
|
||||
assertFalse(ContainableFrame.jdk8231564("13.0.0"));
|
||||
assertFalse(ContainableFrame.jdk8231564("14.0.0"));
|
||||
assertTrue(ContainableFrame.jdk8231564("15"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user