Merge branch 'runelite' into question_mark_full_stop

# Conflicts:
#	runelite-api/src/main/java/com/openosrs/api/Varbits.java
#	runelite-api/src/main/java/net/runelite/api/kit/KitType.java
#	runelite-client/src/main/java/com/openosrs/client/util/ImageUtil.java
This commit is contained in:
ThatGamerBlue
2021-02-04 06:20:06 +00:00
167 changed files with 7357 additions and 610 deletions

View File

@@ -0,0 +1,42 @@
package com.openosrs.client.game;
public enum Sound
{
FIFTEEN_SECONDS(1, "net/runelite/client/game/sounds/15seconds.wav"),
FIVE_SECONDS(2, "net/runelite/client/game/sounds/5seconds.wav"),
ATTACK_WITH_MAGIC(3, "net/runelite/client/game/sounds/attackmagic.wav"),
ATTACK_WITH_MELEE(4, "net/runelite/client/game/sounds/attackmelee.wav"),
ATTACK_WITH_RANGED(5, "net/runelite/client/game/sounds/attackranged.wav"),
INCOMING(6, "net/runelite/client/game/sounds/incoming.wav"),
MOVE(7, "net/runelite/client/game/sounds/move.wav"),
PRAY_MAGIC(8, "net/runelite/client/game/sounds/praymagic.wav"),
PRAY_MELEE(9, "net/runelite/client/game/sounds/praymelee.wav"),
PRAY_RANGED(10, "net/runelite/client/game/sounds/prayranged.wav"),
REENABLE_PRAYER(11, "net/runelite/client/game/sounds/reenableprayer.wav"),
RUNAWAY(12, "net/runelite/client/game/sounds/runaway.wav"),
LOW_HEATLH(13, "net/runelite/client/game/sounds/lowhealth.wav"),
LOW_PRAYER(14, "net/runelite/client/game/sounds/lowprayer.wav"),
OUT_OF_COMBAT(15, "net/runelite/client/game/sounds/outofcombat.wav"),
RESTORED_SPECIAL_ATTACK(16, "net/runelite/client/game/sounds/restorespec.wav"),
IDLE(17, "net/runelite/client/game/sounds/idle.wav"),
BREAK(18, "net/runelite/client/game/sounds/break.wav");
private final String filePath;
private final int id;
Sound(int id, String filePath)
{
this.id = id;
this.filePath = filePath;
}
public String getFilePath()
{
return this.filePath;
}
public int getId()
{
return this.id;
}
}

View File

@@ -0,0 +1,95 @@
package com.openosrs.client.game;
import com.google.inject.Inject;
import java.io.IOException;
import javax.inject.Singleton;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.BooleanControl;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.FloatControl;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.SourceDataLine;
import javax.sound.sampled.UnsupportedAudioFileException;
import net.runelite.client.config.RuneLiteConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Singleton
public class SoundManager
{
private static final Logger log = LoggerFactory.getLogger(SoundManager.class);
private final RuneLiteConfig runeliteConfig;
@Inject
private SoundManager(RuneLiteConfig runeLiteConfig)
{
this.runeliteConfig = runeLiteConfig;
}
public void playSound(final Sound sound)
{
new Thread(new Runnable()
{
@Override
public void run()
{
try
{
AudioInputStream in = AudioSystem.getAudioInputStream(this.getClass().getClassLoader().getResource(sound.getFilePath()));
AudioFormat outFormat = SoundManager.this.getOutFormat(in.getFormat());
DataLine.Info info = new DataLine.Info(SourceDataLine.class, outFormat);
SourceDataLine line = (SourceDataLine) AudioSystem.getLine(info);
if (line != null)
{
line.open(outFormat, 2200);
if (line.isControlSupported(FloatControl.Type.MASTER_GAIN))
{
int volume = 50;
FloatControl gainControl = (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN);
BooleanControl muteControl = (BooleanControl) line.getControl(BooleanControl.Type.MUTE);
if (volume == 0)
{
muteControl.setValue(true);
}
else
{
muteControl.setValue(false);
gainControl.setValue((float) (Math.log((double) volume / 100.0) / Math.log(10.0) * 20.0));
}
}
line.start();
SoundManager.this.stream(AudioSystem.getAudioInputStream(outFormat, in), line);
line.drain();
line.stop();
}
}
catch (IOException | LineUnavailableException | UnsupportedAudioFileException e)
{
throw new IllegalStateException(e);
}
}
}).start();
}
private AudioFormat getOutFormat(AudioFormat inFormat)
{
int ch = inFormat.getChannels();
float rate = inFormat.getSampleRate();
return new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, rate, 16, ch, ch * 2, rate, false);
}
private void stream(AudioInputStream in, SourceDataLine line) throws IOException
{
byte[] buffer = new byte[2200];
int n = 0;
while (n != -1)
{
line.write(buffer, 0, n);
n = in.read(buffer, 0, buffer.length);
}
}
}

View File

@@ -0,0 +1,906 @@
/*******************************************************************************
* Copyright (c) 2019 openosrs
* Redistributions and modifications of this software are permitted as long as this notice remains in its original unmodified state at the top of this file.
* If there are any questions comments, or feedback about this software, please direct all inquiries directly to the file authors:
* ST0NEWALL#9112
* Macweese#1169 UID 159941566994186240, macweese@pm.me
* openosrs Discord: https://discord.gg/Q7wFtCe
* openosrs website: https://openosrs.com
******************************************************************************/
package com.openosrs.client.game;
import com.google.common.collect.ImmutableMap;
import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
import java.util.stream.Collectors;
import lombok.Getter;
import net.runelite.api.coords.WorldArea;
import net.runelite.api.coords.WorldPoint;
import com.openosrs.client.util.PvPUtil;
/*
* Enums sorted alphabetically by main regions (Kingdoms) and then their sub-regions or notable features
* Example:
* Wilderness
* Mage Bank
*/
public enum WorldLocation
{
/*-
* Ape Atoll
* Crash Island
* Marim
*/
APE_ATOLL_TEMPLE("Ape Atoll Temple", new Location(2784, 2802, 2810, 2770), 0),
APE_ATOLL_GATE("Ape Atoll Gate", new Location(2712, 2761, 2730, 2749), 0),
APE_ATOLL_GLIDER("Ape Atoll Glider", new Location(2707, 2808, 2719, 2797), 0),
APE_ATOLL_TEAKS("Ape Atoll Teak Trees", new Location(2756, 2708, 2791, 2689), 0),
CRASH_ISLAND("Crash Island", new Location(2881, 2749, 2943, 2691), 0),
KRUK_DUNGEON_1("Monkey Madness 2 Dungeon", new Location(2689, 9150, 2815, 9088), 0),
KRUK_DUNGEON_2("Monkey Madness 2 Dungeon", new Location(2689, 9150, 2815, 9088), 1),
KRUK_DUNGEON_3("Monkey Madness 2 Dungeon", new Location(2309, 9277, 2454, 9131), 1),
MARIM_NORTH("North Marim", new Location(2731, 2804, 2783, 2786), 0),
MARIM_SOUTH("South Marim", new Location(2731, 2785, 2783, 2762), 0),
MONKEY_MADNESS_DUNGEON("Monkey Madness 1 Dungeon", new Location(2689, 9150, 2815, 9088), 0),
/*-
* Asgarnia
* Faldor
* Burthorpe
* Edgeville
* Entrana
* Port Sarim
* Rimmington
* Taverly
*/
ASGARNIAN_ICE_DUNGEON_WYVERNS("Asgarnian Ice Dungeon - Skeletal Wyverns", new Location(3022, 9559, 3070, 9537), 0),
ASGARNIAN_ICE_DUNGEON_ICE_MONSTERS("Asgarnian Ice Dungeon - Ice Warriors & Ice Giants", new Location(3043, 9587, 3065, 9570), 0),
ASGARNIAN_ICE_DUNGEON_PIRATES("Asgarnian Ice Dungeon - Pirates", new Location(2986, 9568, 2999, 9585), 0),
BURTHOPRE_GAMES_TELEPORT("Burthorpe Games Tele", new Location(2890, 3557, 2907, 3549), 0),
CRAFTING_GUILD("Crafting Guild", new Location(2921, 3292, 2944, 3275), 0),
EDGEVILLE_MONASTERY("Edgeville Monastery", new Location(3044, 3507, 3060, 3471), 0),
FALADOR_BANK("Fally Bank", new Location(2943, 3372, 2949, 3358), 0),
FALADOR_CENTER("Fally Center", new Location(2959, 3385, 2972, 3374), 0),
FALADOR_EAST_BANK("Fally East Bank", new Location(3008, 3358, 3021, 3353), 0),
FALADOR_FARM("Falador Farm", new Location(3014, 3314, 3067, 3283), 0),
FALADOR_PARK("Fally Park", new Location(2982, 3390, 3025, 3368), 0),
FALADOR_PARTYROOM("Falador Partyroom", new Location(3035, 3386, 3056, 3370), 0),
FALADOR_RESPAWN("Fally Respawn", new Location(2957, 3355, 2998, 3325), 0),
GOBLIN_VILLAGE("Goblin Village", new Location(2948, 3516, 2963, 3493), 0),
HEROES_GUILD("Heroes' Guild", new Location(2881, 3517, 2902, 3504), 0),
HEROES_GUILD_DUNGEON("Heroes' Guild Dungeon", new Location(2885, 9918, 2945, 9882), 0),
ICE_MOUNTAIN("Ice Mountain", new Location(3001, 3508, 3024, 3463), 0),
MIND_ATLAR("Mind Altar", new Location(2970, 3520, 2990, 3509), 0),
MUDSKIPPER_POINT("Mudskipper point", new Location(2980, 3145, 3011, 3104), 0),
PORT_SARIM("Port Sarim", new Location(3024, 3250, 3055, 3192), 0),
PORT_SARIM_JAIL("Port Sarim Jail", new Location(3009, 3193, 3021, 3178), 0),
RIMMINGTON("Rimmington", new Location(2946, 3213, 2970, 3188), 0),
RIMMINGTON_DOCKS("Rimmington Docks", new Location(2905, 3228, 2922, 3222), 0),
RIMMINGTON_MINE("Rimmington Mine", new Location(2968, 3252, 2991, 3230), 0),
RIMMINGTON_PORTAL("Rimmington Portal", new Location(2946, 3228, 2960, 3218), 0),
ROGUES_DEN("Rogue's Den", new Location(3036, 4957, 3067, 4986), 1),
TAVERLY("Taverly", new Location(2880, 3442, 2917, 3409), 0),
TAVERLY_DUNGEON_BLACK_KNGIHTS("Taverly Dungeon - Black Knights", new Location(2883, 9717, 2939, 9667), 0),
TAVERLY_DUNGEON_HILL_GIANTS("Taverly Dungeon - Hill Giants", new Location(2895, 9743, 2920, 9718), 0),
TAVERLY_DUNGEON_BLACK_DRAGONS("Taverly Dungeon - Black Dragons", new Location(2812, 9836, 2846, 9822), 0),
TAVERLY_DUNGEON_HELLHOUNDS("Taverly Dungeon - Hell Hounds", new Location(2847, 9854, 2873, 9822), 0),
TAVERLY_DUNGEON_BLUE_DRAGONS("Taverly Dungeon - Blue Dragons", new Location(2890, 9778, 2923, 9813), 0),
TAVERLY_DUNGEON_BLACK_DEMONS("Taverly Dungeon - Black Demons", new Location(2844, 9800, 2873, 9773), 0),
TAVERLY_DUNGEON_POISON_SPIDERS("Taverly Dungeon - Poison Spiders", new Location(3010, 4756, 3068, 4803), 0),
TAVERLY_DUNGEON_CHAOS_DRUIDS("Taverly Dungeon - Chaos Druids", new Location(2915, 9856, 2944, 9833), 0),
TAVERLY_DUNGEON_LESSER_DEMONS("Taverly Dungeon - Lesser Demons", new Location(2924, 9813, 2946, 9777), 0),
TAVERLY_DUNGEON_MAGIC_AXES("Taverly Dungeon - Magic Axes", new Location(2947, 9798, 2971, 9769), 0),
TAVERLY_DUNGEON_CHAOS_DWARVES("Taverly Dungeon - Chaos Dwarves", new Location(2920, 9776, 2938, 9745), 0),
TAVERLY_DUNGEON_MAIN_CORRIDOR("Taverly Dungeon - Main Corridor", new Location(2880, 9793, 2889, 9850), 0),
TAVERLY_GATE("Taverly Gate", new Location(2931, 3456, 2944, 3444), 0),
TAVERLY_POH_PORTAL("Taverly POH Portal", new Location(2885, 3471, 2899, 3458), 0),
WARRIORS_GUILD("Warriors' Guild", new Location(2838, 3536, 2876, 3555), 0),
WARRIORS_GUILD_BASEMENT("Warriors' Guild Basement (Dragon Defender)", new Location(2904, 9974, 2941, 9956), 0),
/*-
* Entrana
*/
ENTRANA_BALLOON("Entrana Balloon", new Location(2803, 3359, 2815, 3347), 0),
ENTRANA_CHURCH("Entrana Church", new Location(2840, 3356, 2858, 3341), 0),
ENTRANA_DOCKS("Entrana Docks", new Location(2825, 3338, 2847, 3328), 0),
ENTRANA_NORTH("Entrana (North Portion)", new Location(2541, 2875, 2595, 2837), 0),
/*-
* Feldip Hills
* Corsair Cove
* Gu'Tanoth
*/
CORSAIR_COVE("Corsair Cove", new Location(2541, 2875, 2595, 2837), 0),
CORSAIR_RESOURCE_AREA("Corsair Resource Area", new Location(2453, 2905, 2488, 2883), 0),
FELDIP_HILLS_GLIDER("Feldip Hills Glider", new Location(2536, 2975, 2546, 2965), 0),
FELDIP_HILLS_RED_CHINS("Feldip Hills Red Chins", new Location(2525, 2935, 2561, 2902), 0),
GU_TANOTH("Gu'Tanoth", new Location(2497, 3060, 2558, 3008), 0),
MYTHS_GUILD("Myth's Guild", new Location(2470, 2872, 2442, 2834), 0),
/*
* Fossil Island
*/
MUSEUM_CAMP("Fossil Island Museum Camp", new Location(3708, 3797, 3751, 3833), 0),
FOSSIL_ISLAND_HOUSE_ON_THE_HILL("House on the Hill (Fossil Island)", new Location(3747, 3891, 3795, 3855), 0),
FOSSIL_ISLAND_MUSHROOM_FOREST("Fossil Island Mushroom Forest (Herbiboar)", new Location(3670, 3894, 3707, 3814), 0),
FOSSIL_ISLAND_SWAMP_NORTH("Fossil Island Swamp (North half)", new Location(3707, 3758, 3643, 3696), 0),
FOSSIL_ISLAND_SWAMP_SOUTH("Fossil Island Swamp (South half)", new Location(3707, 3813, 3643, 3759), 0),
FOSSIL_ISLAND_VERDANT_VALLEY("Fossil Island Verdant Valley (South East Island)", new Location(3670, 3894, 3707, 3814), 0),
FOSSIL_ISLAND_VOLCANO_BANK("Fossil Island Volcano Bank", new Location(3807, 3818, 3825, 3800), 0),
/*-
* Fremennik Province
* Fremennik Isles (Neitiznot & Jatizo)
* Fremennik Slayer Dungeon
* Lunar Isle
* Miscellania and Etceteria
* Rellekka
* Waterbirth Island
*/
ETCETERIA("Etceteria", new Location(2626, 3904, 2571, 3861), 0),
ETCETERIA_DOCKS("Etceteria Docks", new Location(2571, 3904, 2626, 3861), 0),
FREMENNIK_BASILISK_KNIGHT_DUNGEON("Fremennik Basilisk Knight Dungeon", new Location(2398, 10468, 2496, 10370), 0),
FREMENNIK_SLAYER_DUNGEON("Fremennik Slayer Dungeon", new Location(2771, 10023, 2811, 9989), 0),
FREMENNIK_SLAYER_DUNGEON_BASILISKS("Fremennik Slayer Dungeon - Baslisks", new Location(2734, 10015, 2751, 9988), 0),
FREMENNIK_SLAYER_DUNGEON_ENTRANCE("Fremennik Slayer Dungeon Entrance", new Location(2776, 3604, 2801, 3626), 0),
FREMENNIK_SLAYER_DUNGEON_JELLIES("Fremennik Slayer Dungeon - Jellies", new Location(2694, 10035, 2733, 10016), 0),
FREMENNIK_SLAYER_DUNGEON_KURASKS("Fremennik Slayer Dungeon - Kurasks", new Location(2708, 10007, 2690, 9988), 0),
FREMENNIK_SLAYER_DUNGEON_PYREFIENDS("Fremennik Slayer Dungeon - Pyrefiends", new Location(2752, 10015, 2770, 9988), 0),
FREMENNIK_SLAYER_DUNGEON_TUROTHS("Fremennik Slayer Dungeon - Turoths", new Location(2709, 10015, 2733, 9988), 0),
JATIZSO("Jatizso", new Location(2369, 3826, 2428, 3776), 0),
KELDAGRIM_EAST("Eastern Keldagrim", new Location(2884, 10236, 2943, 10181), 0),
KELDAGRIM_ENTRANCE("Keldagrim Entrance", new Location(2722, 3720, 2738, 3703), 0),
KELDAGRIM_WEST("Western Keldagrim", new Location(2819, 10236, 2875, 10182), 0),
LUNAR_ISLE_CENTRAL("Lunar Isle Central", new Location(2055, 3933, 2112, 3888), 0),
LUNAR_ISLE_EAST("Lunar Isle East", new Location(2113, 3921, 2185, 3888), 0),
LUNAR_ISLE_NORTH("Lunar Isle North", new Location(2063, 3958, 2112, 3934), 0),
LUNAR_ISLE_NORTH_EAST("Lunar Isle North East", new Location(2113, 3958, 2185, 3922), 0),
LUNAR_ISLE_SOUTH("Lunar Isle South", new Location(2057, 3887, 2112, 3843), 0),
LUNAR_ISLE_SOUTHEAST("Lunar Isle SouthEast", new Location(2113, 3887, 2185, 3843), 0),
MISCELLANIA("Miscellania", new Location(2492, 3904, 2570, 3836), 0),
MISCELLANIA_DOCKS("Miscellania Docks", new Location(2623, 3851, 2603, 3840), 0),
MOUNTAIN_CAMP("Mountain Camp", new Location(2789, 3682, 2813, 3658), 0),
NEITIZNOT("Neitiznot", new Location(2300, 3826, 2368, 3776), 0),
PIRATES_COVE("Pirate's Cove", new Location(2186, 3842, 2228, 3785), 0),
RELLEKKA_MAIN_HALL("Rellekka Main Hall", new Location(2652, 3685, 2670, 3658), 0),
RELLEKKA_MARKET("Rellekka Market", new Location(2629, 3682, 2651, 3654), 0),
RELLEKKA_NORTH_DOCKS("Rellekka North Docks", new Location(2640, 3712, 2651, 3706), 0),
RELLEKKA_NORTH_EAST("Rellekka North East", new Location(2652, 3712, 2690, 3686), 0),
RELLEKKA_POH_PORTAL("Rellekka POH Portal", new Location(2662, 3635, 2676, 3624), 0),
RELLEKKA_SOUTH_DOCKS("Rellekka South Docks", new Location(2619, 3699, 2641, 3681), 0),
RELLEKKA_ZONE("Rellekka", new Location(2600, 3708, 2690, 3645), 0),
ROCK_CRABS_EAST("Rock Crabs East (Near Keldagrim)", new Location(2691, 3738, 2730, 3713), 0),
ROCK_CRABS_WEST("Rock Crabs West (North of Rellekka)", new Location(2650, 3738, 2690, 3713), 0),
VORKATH("Vorkath", new Location(2237, 4096, 2301, 4031), 0),
WATERBIRTH_DUNGEON_ROCK_LOBSTERS("Waterbirth Dungeon - Rock Lobsters", new Location(1875, 4380, 1919, 4412), 0),
WATERBIRTH_DUNGEON_DKS_1("DKS", new Location(2886, 4473, 2941, 4424), 0), // One of these is private, not sure which
WATERBIRTH_DUNGEON_DKS_2("DKS", new Location(2886, 4409, 2941, 4361), 0), // One of these is private, not sure which
WATERBIRTH_DUNGEON_ZONE_1("Waterbirth Dungeon", new Location(2435, 10176, 2558, 10112), 0),
WATERBIRTH_DUNGEON_ZONE_2("Waterbirth Dungeon", new Location(1788, 4413, 1966, 4352), 1),
WATERBIRTH_ISLAND("Waterbirth Island", new Location(2494, 3774, 2562, 3710), 0),
/*-
* Great Kourend
* Arceuus
* Battlefront
* Catacombs of Kourend
* Crabclaw Caves
* Forthos Dungeon
* Hosidius
* Kebos Lowlands
* Kingstown
* Kourend Woodland
* Lake Molch
* Lizardman Settlement
* Lovakengj
* Mount Karuulm
* Mount Quidamortem
* Northern Tundras
* Port Piscarilius
* Shayzien
* Wintertodt
*/
ARCEUUS("Arceuus", new Location(1620, 3780, 1739, 3708), 0),
ARCEUUS_BANK("Arceuus Bank", new Location(1620, 3754, 1639, 3735), 0),
ARCEUUS_DENSE_ESSENCE_MINE("Arceuus Dense Essence Mine", new Location(1741, 3880, 1786, 3831), 0),
ARCEUUS_LIBRARY("Arceuus Library", new Location(1605, 3833, 1662, 3781), 0),
BATTLEFRONT("Battlefront Teleport", new Location(1344, 3745, 1362, 3726), 0),
BLAST_MINE("Lovakengj Blast Mine", new Location(1467, 3888, 1513, 3840), 0),
BLOOD_ALTAR("Blood Altar", new Location(1710, 3835, 1737, 3822), 0),
CHASM_OF_FIRE("Chasm of Fire", new Location(1411, 10108, 1468, 10050), 1),
COX("CoX", new Location(1226, 3574, 1270, 3559), 0),
CRAB_CLAW_ISLE("Crab Claw Isle", new Location(1745, 3449, 1795, 3399), 0),
DARK_ALTAR("Arceuus Dark Altar", new Location(1699, 3895, 1734, 3869), 0),
FARMING_GUILD("Farming Guild", new Location(1223, 3718, 1273, 3765), 0),
FISHING_HAMLET("Fishing Hamlet (East of Wintertodt Camp)", new Location(1683, 3969, 1720, 3917), 0),
FOODHALL("Piscarilius Foodhall", new Location(1830, 3762, 1854, 3734), 0),
FORTHOS_RUINS("Forthos Ruins", new Location(1666, 3590, 1684, 3561), 0),
FORTHOS_DUNGEON_ALTAR("Forthos Dungeon - Altar", new Location(1794, 9954, 1804, 9946), 0),
FORTHOS_DUNGEON_GRUBBY_CHEST("Forthos Dungeon - Grubby Chest", new Location(1793, 9928, 1799, 9922), 0),
FORTHOS_DUNGEON_LADDER_EAST("Forthos Dungeon - East Ladder", new Location(1825, 9978, 1835, 9969), 0),
FORTHOS_DUNGEON_LADDER_WEST("Forthos Dungeon - West Ladder", new Location(1795, 9972, 1805, 9958), 0),
FORTHOS_DUNGEON_RED_DRAGONS("Forthos Dungeon - Red Dragons", new Location(1807, 9944, 1828, 9933), 0),
FORTHOS_DUNGEON_SARACHNIS("Forthos Dungeon - Sarachnis", new Location(1829, 9890, 1854, 9913), 0),
FORTHOS_DUNGEON_SPIDERS("Forthos Dungeon - Red Spiders", new Location(1830, 9968, 1848, 9947), 0),
FORTHOS_DUNGEON_UNDEAD_DRUIDS_1("Forthos Dungeon - Undead Druids", new Location(1795, 9944, 1806, 9933), 0),
FORTHOS_DUNGEON_UNDEAD_DRUIDS_2("Forthos Dungeon - Undead Druids", new Location(1806, 9973, 1814, 9958), 0),
FORTHOS_DUNGEON_ZONE("Forthos Dungeon", new Location(1789, 9985, 1858, 9914), 0),
HOSIDIUS_BANK("Hosidius Bank", new Location(1743, 3603, 1753, 3594), 0),
HOSIDIUS_FRUIT_STALLS("Hosidius Fruit Stalls", new Location(1790, 3614, 1806, 3603), 0),
HOSIDIUS_KITCHEN("Hosidius Kitchen (Bank)", new Location(1671, 3625, 1687, 3610), 0),
HOSIDIUS_PLOW_FIELD("Hosidius Plow Fields", new Location(1761, 3558, 1781, 3519), 0),
HOSIDIUS_POH_PORTAL("Hosidius POH Portal", new Location(1735, 3522, 1747, 3511), 0),
HOSIDIUS_SQUARE("Hosidius Square", new Location(1754, 3607, 1772, 3589), 0),
HOSIDIUS_VINERY("Hosidius Vinery", new Location(1799, 3573, 1816, 3537), 0),
HOSIDIUS_ZONE("Hosidius", new Location(1737, 3627, 1789, 3582), 0),
KOUREND_CASTLE("Kourend Castle", new Location(1592, 3700, 1692, 3646), 0),
KOUREND_CATACOMBS_ABYSSAL_DEMONS("Kourend Catacombs - Abyssal Demons", new Location(1667, 10101, 1683, 10082), 0),
KOUREND_CATACOMBS_BLACK_DEMONS("Kourend Catacombs - Black Demons", new Location(1713, 10073, 1724, 10086), 0),
KOUREND_CATACOMBS_BRUTAL_BLACK_DRAGONS("Kourend Catacombs - Brutal Black Dragons", new Location(1604, 10105, 1635, 10068), 0),
KOUREND_CATACOMBS_CENTER("Kourend Catacombs Center", new Location(1655, 10055, 1670, 10038), 0),
KOUREND_CATACOMBS_DUST_DEVILS("Kourend Catacombs - Dust Devils", new Location(1704, 10037, 1734, 9985), 0),
KOUREND_CATACOMBS_GREATER_DEMONS("Kourend Catacombs - Greater Demons", new Location(1684, 10105, 1724, 10087), 0),
KOUREND_CATACOMBS_NECHRYAELS("Kourend Catacombs - Nechryaels", new Location(1684, 10086, 1712, 10073), 0),
KOUREND_CATACOMBS_SOUTH("Kourend Catacombs - South", new Location(1639, 10014, 1702, 9985), 0),
KOUREND_CATACOMBS_SOUTH_WEST("Kourend Catacombs South-West Corner", new Location(1596, 10028, 1634, 9984), 0),
KOUREND_CATACOMBS_STEEL_DRAGONS("Kourend Catacombs - Steel Dragons", new Location(1599, 10066, 1630, 10029), 0),
KOUREND_CATACOMBS_ZONE("Kourend Catacombs", new Location(1595, 10106, 1735, 9984), 0),
LANDS_END("Land's End", new Location(1481, 3448, 1527, 3396), 0),
LAKE_MOLCH("Lake Molch", new Location(1357, 3643, 1377, 3624), 0),
LIZARDMAN_SHAMANS("Lizardman Shamans", new Location(1414, 3726, 1461, 3688), 0),
LOVAKENGJ("Lovakengj", new Location(1425, 3810, 1520, 3730), 0),
MOUNT_KARUULM("Mount Karuulm", new Location(1287, 3829, 1331, 3787), 0),
PISCARILIUS_ANGLERFISH("Piscarilius Angler Fishing Spot", new Location(1807, 3779, 1842, 3766), 0),
PISCARILIUS_BANK("Piscarilius Bank", new Location(1793, 3794, 1812, 3782), 0),
PISCARILIUS_PORT("Port Piscarilius", new Location(1788, 3712, 1849, 3673), 0),
PISCARILIUS_ZONE("Piscarilius", new Location(1740, 3814, 1854, 3713), 0),
SANDCRABS_BANK("Sandcrabs Bank", new Location(1706, 3475, 1730, 3455), 0),
SANDCRABS_NORTH("Sandcrabs (East of Vinery)", new Location(1848, 3572, 1884, 3532), 0),
SANDCRABS_SOUTH_1("Sandcrabs (South of Tithe Farm)", new Location(1796, 3468, 1849, 3436), 0),
SANDCRABS_SOUTH_2("Sandcrabs (South Coast)", new Location(1745, 3474, 1795, 3450), 0),
SANDCRABS_SOUTH_EAST("Sandcrabs (East of Tithe Farm)", new Location(1850, 3529, 1884, 3465), 0),
SHAYZIEN_BANK("Shayzien Bank", new Location(1494, 3622, 1515, 3611), 0),
SHAYZIEN_CRYPTS_ENTRANCE("Shayzien Crypts Entrance", new Location(1474, 3570, 1502, 3535), 0),
SHAYZIEN_INFIRMARY("Shayzien Infirmary", new Location(1565, 3574, 1590, 3604), 0),
SHAYZIEN_ZONE("Shayzien", new Location(1472, 3644, 1591, 3521), 0),
SOUL_ALTAR("Soul Altar", new Location(1804, 3869, 1834, 3841), 0),
SULPHUR_MINE("Lovakengj Sulphur Mine", new Location(1415, 3888, 1466, 3840), 0),
SULPHUR_MINE_BANK("Lovakengj Sulphur Mine Bank", new Location(1430, 3838, 1443, 3817), 0),
TITHE_FARM("Tithe Farm", new Location(1794, 3480, 1841, 3517), 0),
WINTERTODT_CAMP("Wintertodt Camp", new Location(1616, 3963, 1645, 3932), 0),
WINTERTODT_ENTRANCE("Wintertodt Entrance", new Location(1617, 3986, 1641, 3964), 0),
WINTERTODT_NORTHEAST("Wintertodt NorthEast", new Location(1630, 4027, 1651, 4008), 0),
WINTERTODT_NORTHWEST("Wintertodt NorthWest", new Location(1608, 4028, 1629, 4008), 0),
WINDERTODT_SOUTH_EAST("Windertodt South East", new Location(1630, 4007, 1651, 3987), 0),
WINTERTODT_SOUTHWEST("Wintertodt SouthWest", new Location(1608, 4007, 1629, 3987), 0),
WOODCUTTING_GUILD_BANK("Woodcutting Guild Bank", new Location(1588, 3481, 1594, 3473), 0),
WOODCUTTING_GUILD_EAST("Woodcutting Guild (East Portion)", new Location(1623, 3519, 1657, 3488), 0),
WOODCUTTING_GUILD_WEST("Woodcutting Guild (Redwoods)", new Location(1562, 3503, 1586, 3476), 0),
WOODCUTTING_GUILD_ZONE("Woodcutting Guild", new Location(1560, 3520, 1659, 3471), 0),
/*-
* Kandarin
* Ardougne
* Battlefield
* Camelot
* Catherby
* Fishing Guild & McGrubor's Woods
* Observatory
* Ourania
* Piscatoris Fishing Colony
* Port Khazard
* Seers' Village
* Tree Gnome Stronghold
* Tree Gnome Village
* Witchaven
* Yanille
*/
ARDOUGNE_CASTLE("Ardy Castle", new Location(2567, 3311, 2591, 3283), 0),
ARDOUGNE_DOCKS("Ardy Docks", new Location(2660, 3284, 2689, 3264), 0),
ARDOUGNE_MONASTERY("Ardougne Monastery", new Location(2587, 3227, 2623, 3202), 0),
ARDOUGNE_NORTH_BANK("Ardy North Bank", new Location(2611, 3336, 2622, 3329), 0),
ARDOUGNE_SOUTH_BANK("Ardy South Bank", new Location(2645, 3288, 2659, 3279), 0),
ARDOUGNE_STALLS("Ardy Stalls", new Location(2651, 3318, 2673, 3293), 0),
ARDOUGNE_ZOO("Ardy Zoo", new Location(2598, 3288, 2636, 3265), 0),
BARBARIAN_OUTPOST("Barbarian Outpost", new Location(2517, 3580, 2557, 3540), 0),
BAXTORIAN_WATERFALL_DUNGEON("Waterfall Dungeon (Baxtorian Falls)", new Location(2556, 9861, 2594, 9918), 0),
CAMELOT_CASTLE("Camelot Castle", new Location(2743, 3481, 2775, 3468), 0),
CASTLE_WARS_BANK("Castle Wars Bank", new Location(2435, 3100, 2448, 3078), 0),
CASTLE_WARS_ZONE("Castle Wars", new Location(2435, 3127, 2474, 3074), 0),
CATHERBY("Catherby", new Location(2791, 3457, 2833, 3436), 0),
CATHERBY_DOCKS("Catherby Docks", new Location(2790, 3432, 2808, 3409), 0),
CATHERBY_FISHING_SPOTS("Catherby Fishing Spots", new Location(2834, 3441, 2862, 3425), 0),
CATHERBY_FARMING_PATCH("Catherby Farming Patch", new Location(2791, 3472, 2833, 3458), 0),
EAGLES_PEAK("Eagles' Peak", new Location(2308, 3495, 2350, 3479), 0),
FALCONRY_HUNTING_AREA("Falconry Hunting Area", new Location(2365, 3621, 2390, 3572), 0),
FISHING_GUILD("Fishing Guild", new Location(2627, 3426, 2579, 3391), 0),
FISHING_PLATFORM("Fishing Platform", new Location(2763, 3290, 2792, 3273), 0),
GNOME_AGILITY("Gnome Agility", new Location(2469, 3441, 2489, 3412), 0),
GNOME_BALL("Gnome Ball", new Location(2384, 3495, 2408, 3479), 0),
GRAND_TREE("Grand Tree", new Location(2442, 3515, 2490, 3478), 0),
KRAKEN_COVE_DUNGEON("Kraken Dungeon", new Location(2303, 10047, 2240, 9983), 0),
KRAKEN_COVE_ENTRANCE("Kraken Cove Entrance", new Location(2262, 3623, 2295, 3596), 0),
LEGENDS_GUILD("Legends' Guild", new Location(2716, 3388, 2741, 3346), 0),
LEGENDS_GUILD_DUNGEON("Legends' Guild Dungeon", new Location(2690, 9784, 2740, 9730), 0),
LIGHTHOUSE("Lighthouse", new Location(2494, 3649, 2524, 3616), 0),
MCGRUBORS_WOODS("McGrubor's Woods", new Location(2624, 3501, 2647, 3481), 0),
NIEVE("Nieve", new Location(2430, 3425, 2435, 3419), 0),
NIGHTMARE_ZONE("Nightmare Zone", new Location(2599, 3119, 2614, 3111), 0),
OBSERVATORY("Observatory", new Location(2429, 3198, 2452, 3149), 0),
OBSERVATORY_DUNGEON("Obsvervatory Dungeon", new Location(2305, 9406, 2366, 9344), 0),
OTTOS_GROTTO("Barbarian Fishing", new Location(2491, 3519, 2527, 3488), 0),
OURANIA_CAVE("ZMI", new Location(3006, 5567, 3072, 5634), 0),
THE_OUTPOST("The Outpost", new Location(2428, 3356, 2443, 3338), 0),
PISCATORIS_FISHING_COLONY("Piscatoris Fishing Colony", new Location(2302, 3708, 2364, 3653), 0),
PORT_KHAZARD("Port Khazard", new Location(2624, 3182, 2680, 3143), 0),
RANGING_GUILD("Ranging Guild", new Location(2650, 3445, 2685, 3411), 0),
RED_SALAMANDERS("Red Salamanders", new Location(2441, 3229, 2464, 3204), 0),
SEERS_VILLAGE("Seers Village", new Location(2688, 3498, 2742, 3468), 0),
SINCLAIR_MANSION("Sinclair Mansion", new Location(2723, 3584, 2756, 3552), 0),
SMOKE_DEVIL_DUNGEON("CW Smoke Devil Dungeon", new Location(2379, 9467, 2427, 9415), 0),
SMOKE_DEVIL_DUNGEON_BOSS("CW Smoke Dungeon (Boss Room)", new Location(2347, 9462, 2377, 9438), 0),
SMOKE_DEVIL_DUNGEON_ENTRANCE("Smoke Devil Dungeon Entrance", new Location(2430, 3425, 2435, 3419), 0),
TRAINING_GROUND("Training Ground (Caged Ogres)", new Location(2501, 3387, 2534, 3358), 0),
TREE_GNOME_VILLAGE("Tree Gnome Village", new Location(2514, 3175, 2547, 3158), 0),
WEST_ARDOUGNE("West Ardy", new Location(2452, 3336, 2557, 3265), 0),
WITCHAVEN("Witchaven", new Location(2704, 3267, 2741, 3295), 0),
WITCHAVEN_DUNGEON("Witchaven Dungeon", new Location(2750, 9665, 2690, 9719), 0),
WIZARDS_GUILD("Wizards Guild", new Location(2585, 3092, 2596, 3082), 0),
WHITE_WOLF_MOUNTAIN_GNOME_GLIDER("White Wolf Mountain Gnome Glider", new Location(2838, 3509, 2852, 3496), 0),
YANILLE_AGILITY_DUNGEON("Yanille Agilty Dungeon", new Location(2559, 9536, 2624, 9475), 0),
YANILE_BANK("Yanile Bank", new Location(2608, 3097, 2616, 3087), 0),
YANILLE_EAST("Yanille East", new Location(2576, 3110, 2621, 3071), 0),
YANILLE_POH_PORTAL("Yanille POH Portal", new Location(2537, 3108, 2551, 3091), 0),
YANILLE_WEST("Yanille West", new Location(2532, 3110, 2575, 3071), 0),
/*-
* Karamja
* Brimhaven
* Cairn Isle
* Crandor & Karamja Dungeon
* Kharazi Jungle
* Mor Ul Rel (TzHaar City)
* Musa Point
* Shilo Village
* Ship Yard
* Tai Bwo Wannai
*/
BRIMHAVEN_AGILITY_ARENA("Brimhaven Agility Arena", new Location(2757, 9594, 2809, 9541), 3),
BRIMHAVEN_DOCKS("Brimhaven Docks", new Location(2758, 3241, 2777, 3220), 0),
BRIMHAVEN_DUNGEON("Brimhaven Dungeon - Main Corridor", new Location(2690, 9572, 2714, 9556), 0),
BRIMHAVEN_DUNGEON_BLACK_DEMONS("Brimhaven Dungeon - Black Demons", new Location(2694, 9495, 2726, 9475), 0),
BRIMHAVEN_DUNGEON_BRONZE_DRAGONS("Brimhaven Dungeon - Bronze Dragons", new Location(2727, 9504, 2750, 9475), 0),
BRIMHAVEN_DUNGEON_DOGS("Brimhaven Dungeon - Dogs", new Location(2653, 9530, 2675, 9509), 0),
BRIMHAVEN_DUNGEON_FIRE_GIANTS("Brimhaven Dungeon - Fire Giants", new Location(2638, 9506, 2673, 9476), 0),
BRIMHAVEN_DUNGEON_METAL_DRAGONS_SLAYER("Brimhaven Dungeon - Metal Dragons (Slayer Only)", new Location(2626, 9469, 2685, 9409), 0),
BRIMHAVEN_DUNGEON_METAL_DRAGONS("Brimhaven Dungeon - Metal Dragons", new Location(2693, 9469, 2748, 9412), 0),
BRIMHAVEN_DUNGEON_MOSS_GIANTS("Brimhaven Dungeon - Moss Giants", new Location(2630, 9575, 2670, 9531), 0),
BRIMHAVEN_DUNGEON_RED_DRAGONS("Brimhaven Dungeon - Red Dragons", new Location(2686, 9553, 2726, 9496), 0),
BRIMHAVEN_POH_PORTAL("Brimhaven POH Portal", new Location(2749, 3184, 2765, 3170), 0),
CAIRN_ISLE("Cairn Isle", new Location(2752, 2993, 2775, 2963), 0),
CRANDOR("Crandor", new Location(2813, 3310, 2864, 3231), 0),
HARDWOOD_GROVE("Hardwood Grove", new Location(2815, 3092, 2830, 3073), 0),
KARAMBWAN_FISHING_SPOT("Karambwan Fishing Spot", new Location(2896, 3116, 2920, 3104), 0),
KARAMJA_DOCKS("Karamja Docks", new Location(2813, 3310, 2864, 3231), 0),
KARAMJA_GLORY_TELEPORT("Karamja Glory Tele", new Location(2910, 3177, 2934, 3156), 0),
KARAMJA_GNOME_GLIDER("Karamja Gnome Glider", new Location(2961, 2960, 2984, 2983), 0),
KARAMJA_SHIP_YARD("Karamja Ship Yard", new Location(2949, 3066, 3004, 3016), 0),
KARAMJA_VOLCANO("Karamja Volcano", new Location(2828, 3194, 2866, 3157), 0),
KARAMJA_VOLCANO_DUNGEON("Karamja Dungeon", new Location(2827, 9589, 2866, 9549), 0),
KARAMJA_VOLCANO_DUNGEON_ELVARG("Karamja Dungeon (Elvarg)", new Location(2826, 9661, 2868, 9603), 0),
KHARAZI_JUNGLE_EAST("Kharazi Jungle (Eastern Section)", new Location(2905, 2930, 2976, 2883), 0),
KHARAZI_JUNGLE_CENTER("Kharazi Jungle (Middle Section)", new Location(2816, 2930, 2905, 2883), 0),
KHARAZI_JUNGLE_WEST("Kharazi Jungle (Western Section)", new Location(2756, 2930, 2816, 2883), 0),
MOR_UL_REK_BANK("TzHaar Bank (Inferno)", new Location(2534, 5146, 2547, 5133), 0),
NATURE_ALTAR("Nature Altar", new Location(2841, 3025, 2846, 3020), 0),
SHILO_VILLAGE_NORTH("Shilo Village North", new Location(2817, 3006, 2878, 2973), 0),
SHILO_VILLAGE_SOUTH("Shilo Village South", new Location(2816, 2972, 2879, 2944), 0),
TAI_BWO_WANNAI("Tai Bwo Wannai", new Location(2770, 3105, 2830, 3050), 0),
TZHAAR_BANK("TzHaar Bank (Jad)", new Location(2437, 5184, 2452, 5172), 0),
TZHAAR_EXIT("Tzhaar City Exit", new Location(2471, 5179, 2490, 5162), 0),
TZHAAR_FIGHT_PITS("TzHaar Fight Pit", new Location(2396, 5183, 2403, 5174), 0),
TZHAAR_INNER_SOUTH_EAST("Tzhaar Inner City South-East", new Location(2499, 5112, 2559, 5057), 0),
TZHAAR_INNER_SOUTH_WEST("Tzhaar Inner City South-West", new Location(2444, 5112, 2499, 5058), 0),
/*-
* Kharidian Desert
* Agility Pyramid
* Al Kharid
* Bandit Camp (Desert)
* Bedabin Camp
* Citharede Abbey
* Duel Arena
* Nardah
* Pollnivneach
* Smoke Dungeon
* Sophanem
* Uzer
*/
AGILITY_PYRAMID("Agility Pyramid", new Location(3334, 2864, 3386, 2819), 0),
AL_KHARID_BANK("Al Kharid Bank", new Location(3265, 3173, 3272, 3161), 0),
AL_KHARID_GATE("Al Kharid Gate", new Location(3263, 3232, 3271, 3223), 0),
AL_KHARID_GLIDER("Al Kharid_Glider", new Location(3276, 3214, 3283, 3209), 0),
AL_KHARID_MINE("Al Kharid Mine", new Location(3295, 3316, 3303, 3278), 0),
AL_KHARID_PALACE("Al Kharid Palace", new Location(3281, 3178, 3304, 3158), 0),
BEDABIN_CAMP("Bedabin Camp", new Location(3157, 3052, 3188, 3019), 0),
CITHAREDE_ABBEY("Citharede Abbey", new Location(3355, 3190, 3425, 3150), 0),
DESERT_BANDIT_CAMP("Desert Bandit Camp", new Location(3154, 2993, 3189, 2963), 0),
DESERT_QUARRY("Desert Granite Quarry", new Location(3156, 2928, 3184, 2897), 0),
DUEL_ARENA("Duel Arena", new Location(3338, 3252, 3391, 3204), 0), // This polygon is deliberately offset
DUEL_ARENA_BANK("Duel Arena Bank", new Location(3379, 3274, 3386, 3265), 0),
DUEL_ARENA_PALM_TREES("Duel Arena Palm Trees", new Location(3340, 3280, 3354, 3264), 0),
DUEL_ARENA_TELEPORT("Duel Arena Tele", new Location(3308, 3246, 3326, 3225), 0),
FIRE_ALTAR("Fire Altar", new Location(3301, 3256, 3307, 3250), 0),
KALPHITE_LAIR("Kalphite Lair Entrance", new Location(3205, 3124, 3253, 3082), 0),
NARDAH_BANK("Nardah Bank", new Location(3417, 2902, 3437, 2883), 0),
NARDAH_ZONE("Nardah", new Location(3397, 2942, 3453, 2882), 0),
POLLNIVNEACH("Pollnivneach", new Location(3331, 2990, 3379, 2945), 0),
POLLNIVNEACH_POH_PORTAL("Pollnivneach POH Portal", new Location(3333, 3008, 3346, 2995), 0),
POLLNIVNEACH_SMOKE_DUNGEON("Pollnivneach Smoke Dungeon", new Location(3199, 9404, 3327, 9345), 0),
POLLNIVNEACH_SMOKE_DUNGEON_ENTRANCE("Pollnivneach Smoke Dungeon Entrance", new Location(3303, 2967, 3314, 2955), 0),
RUINS_OF_UZER("Uzer", new Location(3463, 3114, 3506, 3075), 0),
SHANTAY_PASS("Shantay Pass", new Location(3293, 3137, 3312, 3116), 0),
SOPHANEM("Sophanem", new Location(3272, 2811, 3324, 2751), 0),
/*-
* Misthalin
* Barbarian Village
* Digsite
* Draynor Village
* Edgeville
* Grand Exchange
* Lumbridge
* Lumbridge Swamp
* Paterdomus
* Silvarea
* Varrock
* Wizards' Tower
*/
BARB_VILLAGE("Barb Village", new Location(3071, 3448, 3092, 3405), 0),
COOKS_GUILD("Cooks Guild", new Location(3135, 3455, 3155, 3427), 0),
CHAMPIONS_GUILD("Champoins' Guild", new Location(3184, 3364, 3199, 3348), 0),
DARK_WIZARDS("Varrock Dark Wizards", new Location(3220, 3377, 3235, 3361), 0),
DIGSITE("Digsite", new Location(3340, 3435, 3380, 3390), 0),
DIGSITE_EXAM_CENTER("Digsite Exam Center", new Location(3357, 3339, 3367, 3331), 0),
DRAYNOR_MANOR("Draynor Manor", new Location(3089, 3375, 3127, 3350), 0),
DRAYNOR_SEWERS("Draynor Sewers", new Location(3077, 9699, 3135, 9642), 0),
DRYANOR_VILLAGE("Dryanor Village", new Location(3074, 3283, 3112, 3241), 0),
EDGEVILLE_BANK("Edge Bank", new Location(3090, 3499, 3099, 3487), 0),
EDGEVILLE_DUNGEON("Edgeville Dungeon - Main Corridor (Paddewwa Tele)", new Location(3091, 9890, 3105, 9866), 0),
EDGEVILLE_DUNGEON_HILLGIANTS("Varrock Underground - Hill Giants", new Location(3095, 9854, 3125, 9821), 0),
EDGEVILLE_DUNGEON_HOB_GOBLINS("Edgeville Dungeon - Hob Goblins", new Location(3115, 9880, 3143, 9857), 0),
EDGEVILLE_DUNGEON_SLAYER_MASTER("Edgeville Dungeon - Slayer Master", new Location(3128, 9917, 3151, 9881), 0),
GRAND_EXCHANGE("Grand Exchange", new Location(3155, 3499, 3174, 3480), 0),
GRAND_EXCHANGE_AGILITY_SHORTCUT("GE Agility Shortcut", new Location(3136, 3518, 3143, 3511), 0),
GRAND_EXCHANGE_ENTRANCE("GE Entrance", new Location(3159, 3472, 3170, 3460), 0),
HAM_DUNGEON("H.A.M. Dungeon", new Location(3138, 9660, 3191, 9604), 0),
HAM_ENTRANCE("H.A.M. Hideout", new Location(3159, 3254, 3172, 3243), 0),
LUMBERYARD("Lumberyard", new Location(3289, 3520, 3327, 3488), 0),
LUMBRIDGE_BASEMENT("Lumbridge Basement", new Location(3206, 9626, 3221, 9613), 0),
LUMBRIDGE_CASTLE("Lumbridge Castle", new Location(3201, 3235, 3225, 3201), 0),
LUMBRIDGE_SWAMP("Lumby Swamp", new Location(3135, 3203, 3245, 3140), 0),
LUMBRIDGE_SWAMP_CAVES("Lumbridge Swamp Caves", new Location(3142, 9598, 3260, 9537), 0),
PATERDOMUS("Priest in Peril Temple", new Location(3404, 3495, 3419, 3481), 0),
SENNTISTEN_TELEPORT("Senntisten Tele", new Location(3305, 3342, 3319, 3328), 0),
SILVAREA("Rag and Bone Man", new Location(3350, 3505, 3378, 3492), 0),
STRONGHOLD_OF_SECURITY_FLOOR_1("Stronghold of Security - Floor 1 (Minatours)", new Location(1855, 5246, 1917, 5183), 0),
STRONGHOLD_OF_SECURITY_FLOOR_2("Stronghold of Security - Floor 2 (Flesh Crawlers)", new Location(1983, 5246, 2049, 5183), 0),
STRONGHOLD_OF_SECURITY_FLOOR_3("Stronghold of Security - Floor 3 (Catablepons)", new Location(2113, 5310, 2178, 5248), 0),
STRONGHOLD_OF_SECURITY_FLOOR_4("Stronghold of Security - Floor 4 (Ankous)", new Location(2302, 5249, 2367, 5185), 0),
VARROCK_CHURCH("Varrock Church", new Location(3249, 3488, 3259, 3471), 0),
VARROCK_BANK_EAST("Varrock East Bank", new Location(3246, 3428, 3261, 3412), 0),
VARROCK_BANK_WEST("Varrock West Bank", new Location(3172, 3450, 3197, 3425), 0),
VARROCK_MAGIC_SHOP("Varrock Magic Shop", new Location(3249, 3405, 3256, 3398), 0),
VARROCK_MINE("Varrock Mine", new Location(3278, 3372, 3294, 3355), 0),
VARROCK_MOSS_GIANTS("Varrock Sewers - Moss Giants", new Location(3190, 9910, 3153, 9876), 0),
VARROCK_MUSEUM("Varrock Museum", new Location(3249, 3455, 3267, 3442), 0),
VARROCK_PALACE("Varrock Palace", new Location(3198, 3502, 3228, 3455), 0),
VARROCK_SEWERS("Varrock Sewers", new Location(3200, 9918, 3285, 9857), 0),
VARROCK_SQUARE("Varrock Square", new Location(3201, 3444, 3229, 3412), 0),
WIZARDS_TOWER("Wizards Tower", new Location(3093, 3171, 3121, 3146), 0),
/*-
* Morytania
* Abandoned Mine
* Barrows
* Burgh de Rott
* Canifis
* Darkmeyer
* Fenkenstrain's Castle
* Hallowvale
* Haunted Woods
* Meiyerditch
* Mort'ton
* Mort Myre Swamp
* Port Phasmatys
* Slepe
* The Sisterhood Sanctuary (Nightmare Dungeon)
*/
ABANDONED_MINE("Haunted Mine", new Location(3426, 3260, 3459, 3205), 0),
BARROWS("Barrows", new Location(3546, 3314, 3583, 3268), 0),
BARROWS_CRYPT("Barrows Crypt", new Location(3523, 9723, 3580, 9666), 0),
BURGH_DE_ROTT("Burgh de Rott", new Location(3474, 3247, 3535, 3189), 0),
CANIFIS_BANK("Canifis Bank", new Location(3508, 3483, 3516, 3474), 0),
CANIFIS_ZONE("Canifis", new Location(3472, 3506, 3519, 3467), 0),
CROMBWICK_MANOR("Crombwick Manor in Slepe", new Location(3710, 3377, 3742, 3341), 0),
DARKMEYER_BANK("Darkmeyer Bank", new Location(3600, 3370, 3610, 3364), 0),
DARKMEYER_ZONE("Darkmeyer", new Location(3592, 3392, 3662, 3331), 0),
FENKENSTRAINS_CASTLE("Fenkenstrain's Castle", new Location(3533, 3568, 3564, 3534), 0),
ECTOFUNTUS("Ectofuntus", new Location(3651, 3528, 3668, 3510), 0),
HALLOWED_SEPULCHER_ENTRANCE("Hallowed Sepulcher Entrance", new Location(3649, 3389, 3659, 3379), 0),
HALLOWED_SEPULCHER_LOBBY("Hallowed Sepulcher Lobby", new Location(2383, 5996, 2417, 5963), 0),
MORT_TON("Mort'ton", new Location(3473, 3301, 3504, 3271), 0),
MORYTANIA_FARM_PATCH("Morytania Farming Patch", new Location(3596, 3531, 3607, 3520), 0),
MORYTANIA_SWAMP_NORTH("Northern half of Morytania Swamp", new Location(3412, 3450, 3481, 3410), 0),
MORYTANIA_SWAMP_SOUTH("Southern half of Morytania Swamp", new Location(3412, 3410, 3481, 3370), 0),
NATURE_GROTTO("Nature Grotto", new Location(3410, 3356, 3461, 3322), 0),
NIGHTMARE_BOSS("The Nightmare", new Location(3798, 9769, 3818, 9749), 1),
PORT_PHASMATYS_BANK("Port Phasmatys Bank", new Location(3686, 3471, 3699, 3461), 0),
PORT_PHASMATYS_DOCKS("Port Phasmatys Docks", new Location(3689, 3512, 3711, 3481), 0),
PORT_PHASMATYS_PUB("Port Phasmatys Pub", new Location(3671, 3499, 3681, 3489), 0),
PORT_PHASMATYS_SOUTH_GATE("Port Phasmatys South Gate", new Location(3663, 3455, 3674, 3445), 0),
SALVE_GRAVEYARD("Salve Graveyard", new Location(3425, 3468, 3438, 3457), 0),
SISTERHOOD_SANCTUARY("Sisterhood Sanctuary (Slepe Dungeon)", new Location(3720, 9832, 3898, 9690), 1),
SLAYER_TOWER("Slayer Tower", new Location(3403, 3579, 3454, 3530), 0),
SLEPE("Slepe", new Location(3692, 3381, 3750, 3293), 0),
SWAMP_LIZARDS("Swamp Lizards", new Location(3521, 3451, 3568, 3426), 0),
VER_SINHAZA("ToB", new Location(3640, 3236, 3685, 3202), 0),
/*-
* Tirannwn
* Arandar
* Gwenith
* Iowerth Dungeon
* Isafdar
* Lletya
* Mynydd
* Poison Waste
* Port Tyras
* Prifddinas
* Tyras Camp
* Zul-Andra
*/
LLETYA("Lletya", new Location(2312, 3196, 2362, 3145), 0),
ELF_CAMP("Elf Camp", new Location(2212, 3265, 2182, 3237), 0),
GWENTIH("Gwenith", new Location(2187, 3425, 2220, 3393), 0),
PRIFDDINAS("Prifddinas", new Location(3221, 6056, 3241, 6039), 0), // Fallback if there are gaps
PRIFDDINAS_BANK_NORTH("Prifddinas North Bank", new Location(3254, 6113, 3260, 6101), 0),
PRIFDDINAS_BANK_SOUTH("Prifddinas South Bank", new Location(3288, 6067, 3304, 6052), 0),
PRIFDDINAS_CITY_CENTER("Prifddinas Center", new Location(3246, 6100, 3281, 6065), 0),
PRIFDDINAS_CITY_E("Eastern Part of Prifddinas", new Location(3282, 6100, 3305, 6065), 0),
PRIFDDINAS_CITY_N("Northern Part of Prifddinas", new Location(3246, 6124, 3281, 6101), 0),
PRIFDDINAS_CITY_NE("North-Eastern Prifddinas", new Location(3282, 6136, 3319, 6101), 0),
PRIFDDINAS_CITY_NW("North-Western Prifddinas", new Location(3208, 6135, 3245, 6101), 0),
PRIFDDINAS_CITY_S("Southern Part of Prifddinas", new Location(3246, 6064, 3281, 6040), 0),
PRIFDDINAS_CITY_SE("South-Eastern Prifddinas", new Location(3282, 6039, 3321, 6023), 0),
PRIFDDINAS_CITY_SW("South-Western Prifddinas", new Location(3207, 6064, 3245, 6023), 0),
PRIFDDINAS_CITY_W("Western Part of Prifddinas", new Location(3222, 6100, 3245, 6065), 0),
PRIFDDINAS_GATE_EAST("Prifddinas East Gate (Arandar / Elven Pass)", new Location(2297, 3334, 2323, 3305), 0),
PRIFDDINAS_GATE_EAST_INSIDE("Prifddinas East Gate", new Location(3306, 6100, 3319, 6064), 0),
PRIFDDINAS_GATE_NORTH("Prifddinas North Gate", new Location(2230, 3387, 2249, 3384), 0),
PRIFDDINAS_GATE_NORTH_INSIDE("Prifddinas North Gate", new Location(3246, 6136, 3281, 6125), 0),
PRIFDDINAS_GATE_SOUTH("Prifddinas South Gate", new Location(2229, 3270, 2252, 3251), 0),
PRIFDDINAS_GATE_SOUTH_INSIDE("Prifddinas South Gate", new Location(3246, 6039, 3281, 6024), 0),
PRIFDDINAS_GATE_WEST("Prifddinas West Gate (Docks)", new Location(2154, 3338, 2182, 3317), 0),
PRIFDDINAS_GATE_WEST_INSIDE("Prifddinas West Gate", new Location(3207, 6100, 3221, 6065), 0),
PRIFDDINAS_GAUNTLET_PORTAL("Prifddinas Gauntlet Portal", new Location(3224, 6112, 3243, 6087), 0),
PRIFDDINAS_POH_PORTAL("Prifddinas POH Portal", new Location(3230, 6081, 3247, 6067), 0),
PRIFDDINAS_RED_CHINS("Prifddinas Red Chins", new Location(2255, 3418, 2283, 3397), 0),
PRIFDDINAS_SLAYER_CAVE_ENTRANCE("Prifddinas Slayer Cave Entrance", new Location(3221, 6056, 3241, 6039), 0),
PRIFDDINAS_ZALCANO_ENTRANCE("Prifddinas Zalcano Entrance", new Location(3277, 6065, 3287, 6053), 0),
TYRAS_CAMP("Tyras Camp", new Location(2168, 3163, 2201, 3134), 0),
TYRAS_DOCKS("Port Tyras", new Location(2135, 3133, 2167, 3110), 0),
ZALCANO("Zalcano", new Location(3019, 6074, 3048, 6035), 0),
GAUNTLET_LOBBY("Gauntlet Lobby", new Location(3025, 6130, 3040, 6115), 1),
ZUL_ANDRA("Zul-Andra", new Location(2182, 3070, 2214, 3042), 0),
/*-
* Troll Country
* Death Plateau
* God Wars Dungeon
* Ice Path
* Troll Stronghold
* Trollheim
* Trollweiss Mountain
* Weiss
*/
DEATH_PLATEAU("Death Plateau", new Location(2838, 3610, 2880, 3580), 0),
GOD_WARS_DUNGEON("GWD", new Location(2820, 5375, 2944, 5253), 2),
GOD_WARS_DUNGEON_ENTRANCE("GWD Entrance", new Location(2904, 3756, 2921, 3742), 0),
TROLL_STRONGHOLD("Troll Stronghold", new Location(2836, 3698, 2862, 3659), 0),
TROLLHEIM_TELEPORT("Trollheim Tele", new Location(2882, 3685, 2899, 3669), 0),
WEISS("Weiss", new Location(2837, 3967, 2890, 3914), 0),
/*
* Dungeons, Caves, Islands and other miscellaneous areas
*/
ABYSS("Abyss", new Location(3010, 4862, 3068, 4804), 0),
ABYSSAL_AREA("Abyssal Area", new Location(3008, 4926, 3071, 4864), 0),
ABYSSAL_NEXUS("Abyssal Nexus", new Location(3010, 4803, 3068, 4756), 0),
BLAST_FURNACE("Blast Furnace", new Location(1934, 4974, 1958, 4955), 0),
CAVE_HORROR_ENTRANCE("Mos Le'Harmless Cave Entrance (Cave Horrors)", new Location(3737, 2986, 3759, 2961), 0),
COSMIC_ALTAR("Zanaris Cosmic Altar", new Location(2400, 4387, 2425, 4367), 0),
DWARVEN_MINE_CAMP("Dwarven Mine - North Exit", new Location(3013, 9854, 3033, 9820), 0),
DWARVEN_MINE_CART("Dwarven Mine - Cart Transport", new Location(2988, 9849, 3006, 9821), 0),
DWARVEN_MINE_FALADOR("Dwarven Mine - Falador Exit", new Location(3030, 9788, 3062, 9758), 0),
GORAK_PLANE("Gorak Plane", new Location(3006, 5377, 3070, 5313), 0),
FISHER_REALM("Fisher Realm (Fairy Ring BJR)", new Location(2622, 4738, 2688, 4667), 0),
HARMONY("Harmony Island", new Location(3778, 2879, 3835, 2816), 0),
MINING_GUILD("Mining Guild", new Location(3008, 9756, 3061, 9698), 0),
MOLE_LAIR("Mole Lair", new Location(1730, 5246, 1787, 5131), 0),
MOS_LE_HARMLESS("Mos Le'Harmless", new Location(3649, 3005, 3709, 2958), 0),
MOS_LE_HARMLESS_DOCKS("Mos Le'Harmless Docks", new Location(3664, 2957, 3692, 2929), 0),
MOTHERLODE_MINE("Motherlode Mine", new Location(3713, 5695, 3777, 5632), 0),
PEST_CONTROL("Pest Control", new Location(2630, 2679, 2682, 2627), 0),
PURO_PURO("Puro-Puro", new Location(2561, 4349, 2622, 4289), 0),
SORCERESS_GARDEN("Sorceress's Garden", new Location(2884, 5499, 2938, 5444), 0),
TROUBLE_BREWING("Trouble Brewing", new Location(3774, 3024, 3843, 2942), 0),
ZANARIS_BANK("Zanaris Bank", new Location(2374, 4468, 2390, 4451), 0),
ZANARIS("Zanaris", new Location(2398, 4478, 2460, 4419), 0),
/*
* Wilderness Locations
*/
ANNAKARL_TELEPORT("GDZ", new Location(3279, 3895, 3296, 3875), 0),
AXE_HUT("Axe Hut", new Location(3187, 3962, 3194, 3957), 0),
BANDIT_CAMP("Bandit Camp", new Location(3017, 3712, 3059, 3681), 0),
BLACK_SALAMANDERS("Black Salamanders", new Location(3291, 3677, 3301, 3664), 0),
CALLISTO("Callisto", new Location(3266, 3863, 3315, 3827), 0),
CEMETERY("Cemetery", new Location(2956, 3767, 2996, 3736), 0),
CHAOS_ALTAR_PRAYER("Chaos Altar", new Location(2945, 3826, 2970, 3813), 0),
CHAOS_ALTAR_RUNECRAFT("Chaos Runecrafting Altar", new Location(3055, 3596, 3067, 3585), 0),
CHAOS_FANATIC("Chaos Fanatic", new Location(2971, 3854, 2992, 3834), 0),
CHAOS_TEMPLE("Chaos Temple", new Location(3220, 3632, 3255, 3593), 0),
BLACK_CHINCHOMPAS("Chins", new Location(3128, 3792, 3160, 3754), 0),
CORP_CAVE("Corp Cave", new Location(3201, 3684, 3219, 3672), 0),
CRAZY_ARCHAEOLOGIST("Crazy Archaeologist", new Location(2952, 3709, 2985, 3678), 0),
DARK_CRAB_TELEPORT("Dark Crab Tele", new Location(3343, 3800, 3355, 3780), 0),
DARK_WARRIORS("Dark Warriors", new Location(3014, 3648, 3046, 3616), 0),
DEEP_WILDERNESS_DUNGEON("Deep Wilderness Dungeon", new Location(3038, 10330, 3053, 10305), 0),
DEEP_WILDERNESS_DUNGEON_ENTRANCE("Deep Wild Dungeon", new Location(3042, 3929, 3051, 3920), 0),
DEEP_WILDERNESS_DUNGEON_FIRE_GIANTS("Deep Wilderness Dungeon Fire Giants", new Location(3035, 10349, 3060, 10331), 0),
DEEP_WILDERNESS_DUNGEON_WINES("Deep Wilderness Dungeon Wines", new Location(3013, 10365, 3060, 10350), 0),
DWARVES("Dwarves", new Location(3230, 3805, 3264, 3779), 0),
EDGEVILLE_DUNGEON_EARTH_WARRIORS("Edgeville Dungeon - Earth Warriors", new Location(3114, 9999, 3129, 9960), 0),
EDGEVILLE_DUNGEON_CHAOS_DRUIDS("Edgeville Dungeon - Chaos Druids", new Location(3104, 9944, 3135, 9923), 0),
EDGEVILLE_DUNGEON_SPIDERS("Edgeville Dungeon - Spiders", new Location(3104, 9959, 3135, 9945), 0),
EDGEVILLE_DUNGEON_BLACK_DEMONS("Edgeville Dungeon - Black Demons", new Location(3077, 9966, 3103, 9941), 0),
// is this label description intuitive?
ENTS("Ents", new Location(3300, 3627, 3320, 3584), 0),
FEROX_ENCLAVE("Ferox Enclave", new Location(3119, 3646, 3160, 3616), 0),
GLORY_HILL("Glory Hill", new Location(3331, 3890, 3348, 3866), 0),
GLORY_HOLE("Glory Hole", new Location(3352, 3897, 3386, 3869), 0),
CARRALLANGAR_GRAVES("Graves", new Location(3128, 3686, 3181, 3658), 0),
GREEN_DRAGONS_EAST("East Drags", new Location(3326, 3704, 3365, 3671), 0),
GREEN_DRAGONS_GRAVEYARD("Graveyard Drags", new Location(3129, 3717, 3172, 3691), 0),
GREEN_DRAGONS_WEST("West Drags", new Location(2960, 3627, 2992, 3598), 0),
HOBGOBLINS("Hobgoblins", new Location(3073, 3775, 3104, 3745), 0),
ICE_GATE("Ice Gate", new Location(2945, 3913, 2978, 3878), 0),
ICE_ROCK("Ice Rock", new Location(2957, 3942, 2984, 3929), 0),
KBD_CAGE("KBD CAGE", new Location(3007, 3855, 3021, 3839), 0),
LAVA_DRAGON_GAP("Gap", new Location(3238, 3855, 3258, 3841), 0),
LAVA_DRAGON_ISLE("Lava Drags", new Location(3175, 3857, 3221, 3805), 0),
LAVA_MAZE_DUNGEON("Lava Maze Dungeon", new Location(3075, 10239, 3008, 10291), 0),
LAVA_MAZE_TELE("Lava Maze Tele", new Location(3019, 3842, 3044, 3812), 0),
MAGE_ARENA("Mage Arena", new Location(3088, 3949, 3123, 3919), 0),
MAGE_BANK("Mage Bank", new Location(3082, 3960, 3103, 3952), 0),
MAGE_BANK_SAFE_ZONE("Mage Bank Safe Zone", new Location(2526, 4727, 2550, 4707), 0),
NEW_GATE("New Gate", new Location(3348, 3890, 3325, 3911), 0),
OBELISK_13("13s Port", new Location(3152, 3624, 3160, 3616), 0),
OBELISK_19("19s", new Location(3220, 3672, 3234, 3660), 0),
// OBELISK_27("27 GWDs Portal", new Location(3031, 3736, 3039, 3728), 0),
OBELISK_35("36 Port", new Location(3097, 3804, 3115, 3785), 0),
OBELISK_44("44s", new Location(2973, 3870, 2987, 3859), 0),
OBELISK_50("50 ports", new Location(3301, 3923, 3315, 3909), 0),
OLD_GATE("Old Gate", new Location(3211, 3906, 3238, 3882), 0),
PIRATE_HUT("Pirate Hut", new Location(3037, 3959, 3045, 3948), 0),
POISON_SPIDERS("Poison Spiders", new Location(3282, 3803, 3302, 3785), 0),
REV_CAVE_AGILITY_65("Rev Cave Green Dragon Agility Jump", new Location(3216, 10090, 3226, 10080), 0),
REV_CAVE_AGILITY_75_1("Rev Cave 75 Agility Jump", new Location(3195, 10200, 3212, 10190), 0),
REV_CAVE_AGILITY_75_2("Rev Cave 75 Agility Jump (North of Ankous)", new Location(3173, 10214, 3186, 10205), 0),
REV_CAVE_AGILITY_89("Rev Cave 89 Agility Jump", new Location(3233, 10148, 3244, 10140), 0),
REV_CAVE_ANKOUS("Rev Cave Ankous", new Location(3160, 10204, 3191, 10177), 0),
REV_CAVE_BLACK_DEMONS("Rev Cave Black Demons", new Location(3158, 10171, 3187, 10145), 0),
REV_CAVE_BLACK_DRAGS("Rev Cave Black Drags", new Location(3223, 10216, 3254, 10190), 0),
REV_CAVE_CORRIDOR_NORTH("Revenant Cave Corridor", new Location(3255, 10213, 3263, 10191), 0),
REV_CAVE_CORRIDOR_SOUTH("Rev Cave Green Dragon Corridor", new Location(3238, 10106, 3252, 10077), 0),
REV_CAVE_ENTRANCE_NORTH("Rev Entrance", new Location(3118, 3837, 3142, 3818), 0),
REV_CAVE_ENTRANCE_SOUTH("South Rev Entrance", new Location(3071, 3660, 3092, 3645), 0),
REV_CAVE_EXIT_NORTH("Rev Cave North Exit", new Location(3238, 10236, 3243, 10231), 0),
REV_CAVE_EXIT_SOUTH("Rev Cave South Exit", new Location(3190, 10062, 3215, 10052), 0),
REV_CAVE_GREATER_DEMONS("Rev Cave Greater Demons", new Location(3210, 10140, 3240, 10115), 0),
REV_CAVE_GREEN_DRAGONS_1("Rev Cave Green Dragons", new Location(3215, 10078, 3234, 10052), 0),
REV_CAVE_GREEN_DRAGONS_2("Rev Cave Green Dragons", new Location(3200, 10106, 3231, 10091), 0),
REV_CAVE_HELL_HOUNDS("Rev Cave Hell Hounds", new Location(3190, 10078, 3210, 10063), 0),
REV_CAVE_ICE_GIANTS("Rev Cave Ice Giants", new Location(3200, 10173, 3221, 10155), 0),
REV_CAVE_LESSER_DEMONS("Rev Cave Lesser Demons", new Location(3143, 10125, 3176, 10104), 0),
REVENANT_DARK_BEAST("Revenant Dark Beast", new Location(3244, 10154, 3260, 10136), 0),
REVENANT_MAIN_CHAMBER("Main Rev Chamber", new Location(3227, 10187, 3261, 10157), 0),
ROGUE_CASTLE("Rogue Castle", new Location(3275, 3947, 3299, 3920), 0),
RUNE_ROCKS("Rune Rocks", new Location(3055, 3890, 3072, 3876), 0),
SCORPIA("Scorpia", new Location(3216, 3949, 3248, 3935), 0),
SPERM_HILL("Sperm Hill", new Location(3282, 3687, 3300, 3677), 0),
SPIDER_HILL("Spider Hill", new Location(3156, 3896, 3182, 3871), 0),
VENENATIS("Venenatis", new Location(3298, 3759, 3353, 3722), 0),
VETTION("Vet'tion", new Location(3183, 3796, 3227, 3765), 0),
VOLCANO("Volcano", new Location(3345, 3957, 3390, 3916), 0),
WEB("Web", new Location(3153, 3961, 3163, 3948), 0),
WILDY_AGILITY_COURSE("Wildy Agility Course", new Location(2988, 3967, 3008, 3906), 0),
WILDERNESS_GOD_WARS_DUNGEON("God Wars Dungeon", new Location(3010, 3745, 3027, 3727), 0),
WILDERNESS_GOD_WARS("Wildy GWD Chamber", new Location(3012, 10168, 3068, 10113), 0),
WILDERNESS_LEVER("Lever", new Location(3149, 3933, 3162, 3917), 0),
WILDERNESS_RESOURCE_AREA("Resource Area", new Location(3174, 3946, 3195, 3923), 0),
ZAMORAK_MAGE("Zammy Mage", new Location(3099, 3561, 3107, 3553), 0);
@Getter
private final String name;
@Getter
private final WorldArea worldArea;
@Getter
private final Location location;
@Getter
private static final Map<WorldArea, String> LOCATION_MAP;
static
{
ImmutableMap.Builder<WorldArea, String> builder = ImmutableMap.builder();
for (WorldLocation value : values())
{
builder.put(value.getWorldArea(), value.getName());
}
LOCATION_MAP = builder.build();
}
/**
* Creates a location used to get the name of a location by a WorldPoint
*
* @param name - The name that is used to represent the area in overlays etc
* @param location - A Location made out of 4 points on the world map
* @param plane - The plane of the World Area
*/
WorldLocation(String name, Location location, int plane)
{
this.name = name;
this.location = location;
this.worldArea = new WorldArea(location.x, location.y, location.width, location.height, plane);
}
/**
* Returns all locations that aren't in the wild
*
* @return - A Collection of non-wilderness WorldLocations
*/
public static Collection<WorldLocation> getNonWildernessLocations()
{
return Arrays.stream(WorldLocation.values()).filter(loc ->
PvPUtil.getWildernessLevelFrom(loc.worldArea.toWorldPoint()) < 0).collect(Collectors.toList());
}
/**
* Returns only the WorldLocations that are in the wilderness
*
* @return - A Collection of WorldLocations in the wilderness
*/
public static Collection<WorldLocation> getWildernessLocations()
{
return Arrays.stream(WorldLocation.values()).filter(loc ->
PvPUtil.getWildernessLevelFrom(loc.worldArea.toWorldPoint()) > 0).collect(Collectors.toList());
}
/**
* Returns the WorldLocation that a WorldPoint is in, or the closest WorldLocation to the point
*
* @param worldPoint - the WorldPoint to find the WorldLocation of
* @return - Containing location or closest location if it isn't in any
*/
public static String location(WorldPoint worldPoint)
{
int dist = 128; // x2 Region lengths
String s = "";
WorldArea closestArea = null;
for (Map.Entry<WorldArea, String> entry : LOCATION_MAP.entrySet())
{
final WorldArea worldArea = entry.getKey();
if (worldArea.toWorldPointList().contains(worldPoint))
{
s = entry.getValue();
return s;
}
final int distTo = worldArea.distanceTo(worldPoint);
if (distTo < dist)
{
dist = distTo;
closestArea = worldArea;
}
}
if (closestArea == null)
{
return s;
}
if (worldPoint.getY() > closestArea.toWorldPoint().getY() + closestArea.getHeight())
{
s = s + "N";
}
if (worldPoint.getY() < closestArea.toWorldPoint().getY())
{
s = s + "S";
}
if (worldPoint.getX() < closestArea.toWorldPoint().getX())
{
s = s + "W";
}
if (worldPoint.getX() > (closestArea.toWorldPoint().getX() + closestArea.getWidth()))
{
s = s + "E";
}
s = s + " of ";
s = s + LOCATION_MAP.get(closestArea);
if (s.startsWith(" of "))
{
s = s.substring(3);
}
return s;
}
public static class Location
{
@Getter
private final int x;
@Getter
private final int y;
@Getter
private final int x1;
@Getter
private final int y1;
final int width;
final int height;
Location(int x, int y, int x1, int y1)
{
this.x = Math.min(x, x1);
this.y = Math.min(y, y1);
this.x1 = Math.max(x, x1);
this.y1 = Math.max(y, y1);
this.width = Math.abs(x1 - x);
this.height = Math.abs(y1 - y);
}
@Override
public String toString()
{
return "Location{" +
"x=" + x +
", y=" + y +
", width=" + width +
", height=" + height +
'}';
}
}
@Override
public String toString()
{
return "WorldLocation{" +
"name='" + name + '\'' +
", worldArea=" + worldArea +
'}';
}
}

View File

@@ -1,13 +1,24 @@
package com.openosrs.client.ui.overlay;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Polygon;
import net.runelite.api.Client;
import net.runelite.api.Perspective;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.Stroke;
import java.awt.image.BufferedImage;
import java.util.List;
import net.runelite.api.*;
import net.runelite.api.Point;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldArea;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.vars.InterfaceTab;
import net.runelite.api.widgets.Widget;
public class OverlayUtil extends net.runelite.client.ui.overlay.OverlayUtil
{
@@ -39,4 +50,92 @@ public class OverlayUtil extends net.runelite.client.ui.overlay.OverlayUtil
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha));
graphics.fill(poly);
}
public static Rectangle renderPrayerOverlay(Graphics2D graphics, Client client, Prayer prayer, Color color)
{
Widget widget = client.getWidget(prayer.getWidgetInfo());
if (widget == null || client.getVar(VarClientInt.INVENTORY_TAB) != InterfaceTab.PRAYER.getId())
{
return null;
}
Rectangle bounds = widget.getBounds();
renderPolygon(graphics, rectangleToPolygon(bounds), color);
return bounds;
}
private static Polygon rectangleToPolygon(Rectangle rect)
{
int[] xpoints = {rect.x, rect.x + rect.width, rect.x + rect.width, rect.x};
int[] ypoints = {rect.y, rect.y, rect.y + rect.height, rect.y + rect.height};
return new Polygon(xpoints, ypoints, 4);
}
public static void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint, boolean shadows, int yOffset)
{
graphics.setFont(new Font("Arial", fontStyle, fontSize));
if (canvasPoint != null)
{
final Point canvasCenterPoint = new Point(
canvasPoint.getX(),
canvasPoint.getY() + yOffset);
final Point canvasCenterPoint_shadow = new Point(
canvasPoint.getX() + 1,
canvasPoint.getY() + 1 + yOffset);
if (shadows)
{
renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
}
renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
}
}
public static void setProgressIcon(Graphics2D graphics, Point point, BufferedImage currentPhaseIcon, int totalWidth, int bgPadding, int currentPosX, Color colorIconBackground, int overlayIconDistance, Color colorIconBorder, Color colorIconBorderFill)
{
graphics.setStroke(new BasicStroke(2));
graphics.setColor(colorIconBackground);
graphics.fillOval(
point.getX() - totalWidth / 2 + currentPosX - bgPadding,
point.getY() - currentPhaseIcon.getHeight() / 2 - overlayIconDistance - bgPadding,
currentPhaseIcon.getWidth() + bgPadding * 2,
currentPhaseIcon.getHeight() + bgPadding * 2);
graphics.setColor(colorIconBorder);
graphics.drawOval(
point.getX() - totalWidth / 2 + currentPosX - bgPadding,
point.getY() - currentPhaseIcon.getHeight() / 2 - overlayIconDistance - bgPadding,
currentPhaseIcon.getWidth() + bgPadding * 2,
currentPhaseIcon.getHeight() + bgPadding * 2);
graphics.drawImage(
currentPhaseIcon,
point.getX() - totalWidth / 2 + currentPosX,
point.getY() - currentPhaseIcon.getHeight() / 2 - overlayIconDistance,
null);
graphics.setColor(colorIconBorderFill);
}
public static List<WorldPoint> getHitSquares(WorldPoint npcLoc, int npcSize, int thickness, boolean includeUnder)
{
List<WorldPoint> little = new WorldArea(npcLoc, npcSize, npcSize).toWorldPointList();
List<WorldPoint> big = new WorldArea(npcLoc.getX() - thickness, npcLoc.getY() - thickness, npcSize + (thickness * 2), npcSize + (thickness * 2), npcLoc.getPlane()).toWorldPointList();
if (!includeUnder)
{
big.removeIf(little::contains);
}
return big;
}
public static void renderFilledPolygon(Graphics2D graphics, Shape poly, Color color)
{
graphics.setColor(color);
final Stroke originalStroke = graphics.getStroke();
graphics.setStroke(new BasicStroke(2));
graphics.draw(poly);
graphics.fill(poly);
graphics.setStroke(originalStroke);
}
}

View File

@@ -0,0 +1,135 @@
/*
* Copyright (c) 2019. PKLite - All Rights Reserved
* Unauthorized modification, distribution, or possession of this source file, via any medium is strictly prohibited.
* Proprietary and confidential. Refer to PKLite License file for more information on
* full terms of this copyright and to determine what constitutes authorized use.
* Written by PKLite(ST0NEWALL, others) <stonewall@thots.cc.usa>, 2019
*
*/
package com.openosrs.client.util;
import net.runelite.api.Client;
import net.runelite.api.InventoryID;
import net.runelite.api.Item;
import net.runelite.api.ItemComposition;
import net.runelite.api.Player;
import net.runelite.api.Varbits;
import net.runelite.api.WorldType;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.geometry.Cuboid;
import net.runelite.client.game.ItemManager;
import net.runelite.client.util.QuantityFormatter;
import org.apache.commons.lang3.ArrayUtils;
import java.awt.Polygon;
import java.util.Comparator;
import java.util.Objects;
import java.util.TreeMap;
public class PvPUtil
{
private static final Polygon NOT_WILDERNESS_BLACK_KNIGHTS = new Polygon( // this is black knights castle
new int[]{2994, 2995, 2996, 2996, 2994, 2994, 2997, 2998, 2998, 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3005,
3005, 3019, 3020, 3022, 3023, 3024, 3025, 3026, 3026, 3027, 3027, 3028, 3028, 3029, 3029, 3030, 3030, 3031,
3031, 3032, 3033, 3034, 3035, 3036, 3037, 3037},
new int[]{3525, 3526, 3527, 3529, 3529, 3534, 3534, 3535, 3536, 3537, 3538, 3539, 3540, 3541, 3542, 3543, 3544,
3545, 3545, 3546, 3546, 3545, 3544, 3543, 3543, 3542, 3541, 3540, 3539, 3537, 3536, 3535, 3534, 3533, 3532,
3531, 3530, 3529, 3528, 3527, 3526, 3526, 3525},
43
);
private static final Cuboid MAIN_WILDERNESS_CUBOID = new Cuboid(2944, 3525, 0, 3391, 4351, 3);
private static final Cuboid GOD_WARS_WILDERNESS_CUBOID = new Cuboid(3008, 10112, 0, 3071, 10175, 3);
private static final Cuboid WILDERNESS_UNDERGROUND_CUBOID = new Cuboid(2944, 9920, 0, 3391, 10879, 3);
/**
* Gets the wilderness level based on a world point
* Java reimplementation of clientscript 384 [proc,wilderness_level]
*
* @param point the point in the world to get the wilderness level for
* @return the int representing the wilderness level
*/
public static int getWildernessLevelFrom(WorldPoint point)
{
if (MAIN_WILDERNESS_CUBOID.contains(point))
{
if (NOT_WILDERNESS_BLACK_KNIGHTS.contains(point.getX(), point.getY()))
{
return 0;
}
return ((point.getY() - 3520) / 8) + 1; // calc(((coordz(coord) - (55 * 64)) / 8) + 1)
}
else if (GOD_WARS_WILDERNESS_CUBOID.contains(point))
{
return ((point.getY() - 9920) / 8) - 1; // calc(((coordz(coord) - (155 * 64)) / 8) - 1)
}
else if (WILDERNESS_UNDERGROUND_CUBOID.contains(point))
{
return ((point.getY() - 9920) / 8) + 1; // calc(((coordz(coord) - (155 * 64)) / 8) + 1)
}
return 0;
}
/**
* Determines if another player is attackable based off of wilderness level and combat levels
*
* @param client The client of the local player
* @param player the player to determine attackability
* @return returns true if the player is attackable, false otherwise
*/
public static boolean isAttackable(Client client, Player player)
{
int wildernessLevel = 0;
if (WorldType.isDeadmanWorld(client.getWorldType()))
{
return true;
}
if (WorldType.isPvpWorld(client.getWorldType()))
{
wildernessLevel += 15;
}
if (client.getVar(Varbits.IN_WILDERNESS) == 1)
{
wildernessLevel += getWildernessLevelFrom(client.getLocalPlayer().getWorldLocation());
}
return wildernessLevel != 0 && Math.abs(client.getLocalPlayer().getCombatLevel() - player.getCombatLevel()) <= wildernessLevel;
}
public static int calculateRisk(Client client, ItemManager itemManager)
{
if (client.getItemContainer(InventoryID.EQUIPMENT) == null)
{
return 0;
}
if (client.getItemContainer(InventoryID.INVENTORY).getItems() == null)
{
return 0;
}
Item[] items = ArrayUtils.addAll(Objects.requireNonNull(client.getItemContainer(InventoryID.EQUIPMENT)).getItems(),
Objects.requireNonNull(client.getItemContainer(InventoryID.INVENTORY)).getItems());
TreeMap<Integer, Item> priceMap = new TreeMap<>(Comparator.comparingInt(Integer::intValue));
int wealth = 0;
for (Item i : items)
{
int value = (itemManager.getItemPrice(i.getId()) * i.getQuantity());
final ItemComposition itemComposition = itemManager.getItemComposition(i.getId());
if (!itemComposition.isTradeable() && value == 0)
{
value = itemComposition.getPrice() * i.getQuantity();
priceMap.put(value, i);
}
else
{
value = itemManager.getItemPrice(i.getId()) * i.getQuantity();
if (i.getId() > 0 && value > 0)
{
priceMap.put(value, i);
}
}
wealth += value;
}
return Integer.parseInt(QuantityFormatter.quantityToRSDecimalStack(priceMap.keySet().stream().mapToInt(Integer::intValue).sum()));
}
}

View File

@@ -0,0 +1,832 @@
package com.openosrs.client.util;
import java.util.HashMap;
import net.runelite.api.ItemID;
public class WeaponMap
{
public static HashMap<Integer, WeaponStyle> StyleMap = new HashMap<>();
static
{
//Melee
StyleMap.put(ItemID._3RD_AGE_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID._3RD_AGE_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID._3RD_AGE_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ABYSSAL_BLUDGEON, WeaponStyle.MELEE);
StyleMap.put(ItemID.ABYSSAL_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.ABYSSAL_DAGGER_P, WeaponStyle.MELEE);
StyleMap.put(ItemID.ABYSSAL_DAGGER_P_13269, WeaponStyle.MELEE);
StyleMap.put(ItemID.ABYSSAL_DAGGER_P_13271, WeaponStyle.MELEE);
StyleMap.put(ItemID.ABYSSAL_TENTACLE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ABYSSAL_WHIP, WeaponStyle.MELEE);
StyleMap.put(ItemID.ABYSSAL_WHIP_20405, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_2H_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_BATTLEAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_CANE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_CLAWS, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_DAGGERP, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_DAGGERP_5676, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_DAGGERP_5694, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_HALBERD, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_HASTA, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_SCIMITAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_SPEARP, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_SPEARP_5712, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_SPEARP_5726, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.ADAMANT_WARHAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.ALE_OF_THE_GODS, WeaponStyle.MELEE);
StyleMap.put(ItemID.ANCIENT_MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ANGER_BATTLEAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ANGER_MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ANGER_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.ANGER_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.AMYS_SAW, WeaponStyle.MELEE);
StyleMap.put(ItemID.ARCEUUS_BANNER, WeaponStyle.MELEE);
StyleMap.put(ItemID.ARCLIGHT, WeaponStyle.MELEE);
StyleMap.put(ItemID.ARMADYL_GODSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.ARMADYL_GODSWORD_20593, WeaponStyle.MELEE);
StyleMap.put(ItemID.ARMADYL_GODSWORD_22665, WeaponStyle.MELEE);
StyleMap.put(ItemID.ARMADYL_GODSWORD_OR, WeaponStyle.MELEE);
StyleMap.put(ItemID.ASSORTED_FLOWERS, WeaponStyle.MELEE);
StyleMap.put(ItemID.BANDOS_GODSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.BANDOS_GODSWORD_20782, WeaponStyle.MELEE);
StyleMap.put(ItemID.BANDOS_GODSWORD_21060, WeaponStyle.MELEE);
StyleMap.put(ItemID.BANDOS_GODSWORD_OR, WeaponStyle.MELEE);
StyleMap.put(ItemID.BARBTAIL_HARPOON, WeaponStyle.MELEE);
StyleMap.put(ItemID.BARRELCHEST_ANCHOR, WeaponStyle.MELEE);
StyleMap.put(ItemID.BEACH_BOXING_GLOVES, WeaponStyle.MELEE);
StyleMap.put(ItemID.BEACH_BOXING_GLOVES_11706, WeaponStyle.MELEE);
StyleMap.put(ItemID.BIRTHDAY_BALLOONS, WeaponStyle.MELEE);
StyleMap.put(ItemID.BIRTHDAY_CAKE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_2H_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_BATTLEAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_CANE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_CLAWS, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_DAGGERP, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_DAGGERP_5682, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_DAGGERP_5700, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_FLOWERS, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_HALBERD, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_SALAMANDER, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_SCIMITAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_SPEARP, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_SPEARP_5734, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_SPEARP_5736, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLACK_WARHAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLADE_OF_SAELDOR, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLADE_OF_SAELDOR_C, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLADE_OF_SAELDOR_INACTIVE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLESSED_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLISTERWOOD_SICKLE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLUE_FLOWERS, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLUE_FLOWERS_8936, WeaponStyle.MELEE);
StyleMap.put(ItemID.BLURITE_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.BONE_CLUB, WeaponStyle.MELEE);
StyleMap.put(ItemID.BONE_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.BONE_DAGGER_P, WeaponStyle.MELEE);
StyleMap.put(ItemID.BONE_DAGGER_P_8876, WeaponStyle.MELEE);
StyleMap.put(ItemID.BONE_DAGGER_P_8878, WeaponStyle.MELEE);
StyleMap.put(ItemID.BONE_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.BOXING_GLOVES, WeaponStyle.MELEE);
StyleMap.put(ItemID.BOXING_GLOVES_7673, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRINE_SABRE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_2H_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_BATTLEAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_CLAWS, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_DAGGERP, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_DAGGERP_5670, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_DAGGERP_5688, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_HALBERD, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_HASTA, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_SCIMITAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_SPEARP, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_SPEARP_5704, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_SPEARP_5718, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRONZE_WARHAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.BRUMA_TORCH, WeaponStyle.MELEE);
StyleMap.put(ItemID.BUTTERFLY_NET, WeaponStyle.MELEE);
StyleMap.put(ItemID.CANDY_CANE, WeaponStyle.MELEE);
StyleMap.put(ItemID.CATTLEPROD, WeaponStyle.MELEE);
StyleMap.put(ItemID.CHAOTIC_HANDEGG, WeaponStyle.MELEE);
StyleMap.put(ItemID.CLEAVER, WeaponStyle.MELEE);
StyleMap.put(ItemID.CORRUPTED_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.CORRUPTED_HALBERD_ATTUNED, WeaponStyle.MELEE);
StyleMap.put(ItemID.CORRUPTED_HALBERD_BASIC, WeaponStyle.MELEE);
StyleMap.put(ItemID.CORRUPTED_HALBERD_PERFECTED, WeaponStyle.MELEE);
StyleMap.put(ItemID.CORRUPTED_HARPOON, WeaponStyle.MELEE);
StyleMap.put(ItemID.CORRUPTED_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.CORRUPTED_SCEPTRE, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRIER_BELL, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_AXE_23862, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_AXE_INACTIVE, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_110, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_110_I, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_210, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_210_I, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_24125, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_310, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_310_I, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_410, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_410_I, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_510, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_510_I, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_610, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_610_I, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_710, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_710_I, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_810, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_810_I, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_910, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_910_I, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_ATTUNED, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_BASIC, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_FULL, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_FULL_I, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_INACTIVE, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HALBERD_PERFECTED, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HARPOON, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HARPOON_23864, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_HARPOON_INACTIVE, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_PICKAXE_23863, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_PICKAXE_INACTIVE, WeaponStyle.MELEE);
StyleMap.put(ItemID.CRYSTAL_SCEPTRE, WeaponStyle.MELEE);
StyleMap.put(ItemID.CURSED_GOBLIN_HAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.DARKLIGHT, WeaponStyle.MELEE);
StyleMap.put(ItemID.DARK_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.DECORATIVE_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.DECORATIVE_SWORD_4503, WeaponStyle.MELEE);
StyleMap.put(ItemID.DECORATIVE_SWORD_4508, WeaponStyle.MELEE);
StyleMap.put(ItemID.DHAROKS_GREATAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.DHAROKS_GREATAXE_0, WeaponStyle.MELEE);
StyleMap.put(ItemID.DHAROKS_GREATAXE_100, WeaponStyle.MELEE);
StyleMap.put(ItemID.DHAROKS_GREATAXE_25, WeaponStyle.MELEE);
StyleMap.put(ItemID.DHAROKS_GREATAXE_50, WeaponStyle.MELEE);
StyleMap.put(ItemID.DHAROKS_GREATAXE_75, WeaponStyle.MELEE);
StyleMap.put(ItemID.DINHS_BULWARK, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_2H_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_2H_SWORD_20559, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_BATTLEAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_CANE, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_CLAWS, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_CLAWS_20784, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_DAGGER_20407, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_DAGGERP, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_DAGGERP_5680, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_DAGGERP_5698, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_HALBERD, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_HARPOON, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_HASTA, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_HASTAKP, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_HASTAP, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_HASTAP_22737, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_HASTAP_22740, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_HUNTER_LANCE, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_PICKAXE_12797, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_PICKAXE_OR, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_SCIMITAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_SCIMITAR_20406, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_SCIMITAR_OR, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_SPEARP, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_SPEARP_5716, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_SPEARP_5730, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_WARHAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.DRAGON_WARHAMMER_20785, WeaponStyle.MELEE);
StyleMap.put(ItemID.EASTER_BASKET, WeaponStyle.MELEE);
StyleMap.put(ItemID.EGG_WHISK, WeaponStyle.MELEE);
StyleMap.put(ItemID.ELDER_MAUL, WeaponStyle.MELEE);
StyleMap.put(ItemID.ELDER_MAUL_21205, WeaponStyle.MELEE);
StyleMap.put(ItemID.ENCHANTED_LYRE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ENCHANTED_LYRE1, WeaponStyle.MELEE);
StyleMap.put(ItemID.ENCHANTED_LYRE2, WeaponStyle.MELEE);
StyleMap.put(ItemID.ENCHANTED_LYRE3, WeaponStyle.MELEE);
StyleMap.put(ItemID.ENCHANTED_LYRE4, WeaponStyle.MELEE);
StyleMap.put(ItemID.ENCHANTED_LYRE5, WeaponStyle.MELEE);
StyleMap.put(ItemID.EVENT_RPG, WeaponStyle.MELEE);
StyleMap.put(ItemID.EXCALIBUR, WeaponStyle.MELEE);
StyleMap.put(ItemID.EXCALIBUR_8280, WeaponStyle.MELEE);
StyleMap.put(ItemID.FLAMTAER_HAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.FREMENNIK_BLADE, WeaponStyle.MELEE);
StyleMap.put(ItemID.FROZEN_ABYSSAL_WHIP, WeaponStyle.MELEE);
StyleMap.put(ItemID.GADDERHAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.GHRAZI_RAPIER, WeaponStyle.MELEE);
StyleMap.put(ItemID.GHRAZI_RAPIER_23628, WeaponStyle.MELEE);
StyleMap.put(ItemID.GILDED_2H_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.GILDED_HASTA, WeaponStyle.MELEE);
StyleMap.put(ItemID.GILDED_SCIMITAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.GILDED_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.GLOWING_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.GOLDEN_TENCH, WeaponStyle.MELEE);
StyleMap.put(ItemID.GRANITE_HAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.GRANITE_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.GRANITE_MAUL, WeaponStyle.MELEE);
StyleMap.put(ItemID.GRANITE_MAUL_12848, WeaponStyle.MELEE);
StyleMap.put(ItemID.GRANITE_MAUL_20557, WeaponStyle.MELEE);
StyleMap.put(ItemID.GRANITE_MAUL_24225, WeaponStyle.MELEE);
StyleMap.put(ItemID.GRANITE_MAUL_24227, WeaponStyle.MELEE);
StyleMap.put(ItemID.GREEN_BANNER, WeaponStyle.MELEE);
StyleMap.put(ItemID.GUTHANS_WARSPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.GUTHANS_WARSPEAR_0, WeaponStyle.MELEE);
StyleMap.put(ItemID.GUTHANS_WARSPEAR_100, WeaponStyle.MELEE);
StyleMap.put(ItemID.GUTHANS_WARSPEAR_25, WeaponStyle.MELEE);
StyleMap.put(ItemID.GUTHANS_WARSPEAR_50, WeaponStyle.MELEE);
StyleMap.put(ItemID.GUTHANS_WARSPEAR_75, WeaponStyle.MELEE);
StyleMap.put(ItemID.HALBERD, WeaponStyle.MELEE);
StyleMap.put(ItemID.HARRYS_CUTLASS, WeaponStyle.MELEE);
StyleMap.put(ItemID.HAM_JOINT, WeaponStyle.MELEE);
StyleMap.put(ItemID.HAND_FAN, WeaponStyle.MELEE);
StyleMap.put(ItemID.HILL_GIANT_CLUB, WeaponStyle.MELEE);
StyleMap.put(ItemID.HOLY_HANDEGG, WeaponStyle.MELEE);
StyleMap.put(ItemID.HOSIDIUS_BANNER, WeaponStyle.MELEE);
StyleMap.put(ItemID.INFERNAL_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.INFERNAL_AXE_UNCHARGED, WeaponStyle.MELEE);
StyleMap.put(ItemID.INFERNAL_HARPOON, WeaponStyle.MELEE);
StyleMap.put(ItemID.INFERNAL_HARPOON_UNCHARGED, WeaponStyle.MELEE);
StyleMap.put(ItemID.INFERNAL_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.INFERNAL_PICKAXE_UNCHARGED, WeaponStyle.MELEE);
StyleMap.put(ItemID.INQUISITORS_MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_2H_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_BATTLEAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_CLAWS, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_DAGGERP, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_DAGGERP_5668, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_DAGGERP_5686, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_HALBERD, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_HASTA, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_SCIMITAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_SPEARP, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_SPEARP_5706, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_SPEARP_5720, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.IRON_WARHAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.JADE_MACHETE, WeaponStyle.MELEE);
StyleMap.put(ItemID.KATANA, WeaponStyle.MELEE);
StyleMap.put(ItemID.KITCHEN_KNIFE, WeaponStyle.MELEE);
StyleMap.put(ItemID.KERIS, WeaponStyle.MELEE);
StyleMap.put(ItemID.LARGE_SPADE, WeaponStyle.MELEE);
StyleMap.put(ItemID.LEAFBLADED_BATTLEAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.LEAFBLADED_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.LEAFBLADED_SPEAR_4159, WeaponStyle.MELEE);
StyleMap.put(ItemID.LEAFBLADED_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.LOVAKENGJ_BANNER, WeaponStyle.MELEE);
StyleMap.put(ItemID.LUCKY_CUTLASS, WeaponStyle.MELEE);
StyleMap.put(ItemID.LYRE, WeaponStyle.MELEE);
StyleMap.put(ItemID.MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.MACHETE, WeaponStyle.MELEE);
StyleMap.put(ItemID.MAGIC_BUTTERFLY_NET, WeaponStyle.MELEE);
StyleMap.put(ItemID.MAGIC_SECATEURS, WeaponStyle.MELEE);
StyleMap.put(ItemID.MAGIC_SECATEURS_NZ, WeaponStyle.MELEE);
StyleMap.put(ItemID.MAPLE_BLACKJACK, WeaponStyle.MELEE);
StyleMap.put(ItemID.MAPLE_BLACKJACKD, WeaponStyle.MELEE);
StyleMap.put(ItemID.MAPLE_BLACKJACKO, WeaponStyle.MELEE);
StyleMap.put(ItemID.MEAT_TENDERISER, WeaponStyle.MELEE);
StyleMap.put(ItemID.MERFOLK_TRIDENT, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_2H_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_BATTLEAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_CLAWS, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_DAGGERP, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_DAGGERP_5674, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_DAGGERP_5692, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_HALBERD, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_HASTA, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_SCIMITAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_SPEARP, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_SPEARP_5710, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_SPEARP_5724, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.MITHRIL_WARHAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.MIXED_FLOWERS, WeaponStyle.MELEE);
StyleMap.put(ItemID.MOUSE_TOY, WeaponStyle.MELEE);
StyleMap.put(ItemID.NEW_CRYSTAL_HALBERD_FULL, WeaponStyle.MELEE);
StyleMap.put(ItemID.NEW_CRYSTAL_HALBERD_FULL_I, WeaponStyle.MELEE);
StyleMap.put(ItemID.NEW_CRYSTAL_HALBERD_FULL_16893, WeaponStyle.MELEE);
StyleMap.put(ItemID.NEW_CRYSTAL_HALBERD_FULL_I_16892, WeaponStyle.MELEE);
StyleMap.put(ItemID.NOOSE_WAND, WeaponStyle.MELEE);
StyleMap.put(ItemID.NUNCHAKU, WeaponStyle.MELEE);
StyleMap.put(ItemID.OAK_BLACKJACK, WeaponStyle.MELEE);
StyleMap.put(ItemID.OAK_BLACKJACKD, WeaponStyle.MELEE);
StyleMap.put(ItemID.OAK_BLACKJACKO, WeaponStyle.MELEE);
StyleMap.put(ItemID.OILY_FISHING_ROD, WeaponStyle.MELEE);
StyleMap.put(ItemID.OILY_PEARL_FISHING_ROD, WeaponStyle.MELEE);
StyleMap.put(ItemID.OPAL_MACHETE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ORANGE_FLOWERS, WeaponStyle.MELEE);
StyleMap.put(ItemID.ORANGE_SALAMANDER, WeaponStyle.MELEE);
StyleMap.put(ItemID.PEACEFUL_HANDEGG, WeaponStyle.MELEE);
StyleMap.put(ItemID.PET_ROCK, WeaponStyle.MELEE);
StyleMap.put(ItemID.PISCARILIUS_BANNER, WeaponStyle.MELEE);
StyleMap.put(ItemID.PROP_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.PURPLE_FLOWERS, WeaponStyle.MELEE);
StyleMap.put(ItemID.RAPIER, WeaponStyle.MELEE);
StyleMap.put(ItemID.RAT_POLE, WeaponStyle.MELEE);
StyleMap.put(ItemID.RAT_POLE_6774, WeaponStyle.MELEE);
StyleMap.put(ItemID.RAT_POLE_6775, WeaponStyle.MELEE);
StyleMap.put(ItemID.RAT_POLE_6776, WeaponStyle.MELEE);
StyleMap.put(ItemID.RAT_POLE_6777, WeaponStyle.MELEE);
StyleMap.put(ItemID.RAT_POLE_6778, WeaponStyle.MELEE);
StyleMap.put(ItemID.RAT_POLE_6779, WeaponStyle.MELEE);
StyleMap.put(ItemID.RED_FLOWERS, WeaponStyle.MELEE);
StyleMap.put(ItemID.RED_FLOWERS_8938, WeaponStyle.MELEE);
StyleMap.put(ItemID.RED_SALAMANDER, WeaponStyle.MELEE);
StyleMap.put(ItemID.RED_TOPAZ_MACHETE, WeaponStyle.MELEE);
StyleMap.put(ItemID.ROCK_HAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.ROYAL_SCEPTRE, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUBBER_CHICKEN, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUBBER_CHICKEN_22666, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_2H_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_BATTLEAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_BATTLEAXE_20552, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_CANE, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_CLAWS, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_DAGGERP, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_DAGGERP_5678, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_DAGGERP_5696, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_HALBERD, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_HASTA, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_SCIMITAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_SCIMITAR_20402, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_SCIMITAR_23330, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_SCIMITAR_23332, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_SCIMITAR_23334, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_SPEARP, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_SPEARP_5714, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_SPEARP_5728, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.RUNE_WARHAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.SARADOMINS_BLESSED_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.SARADOMIN_GODSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.SARADOMIN_GODSWORD_OR, WeaponStyle.MELEE);
StyleMap.put(ItemID.SARADOMIN_MJOLNIR, WeaponStyle.MELEE);
StyleMap.put(ItemID.SARADOMIN_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.SARAS_BLESSED_SWORD_FULL, WeaponStyle.MELEE);
StyleMap.put(ItemID.SCYTHE, WeaponStyle.MELEE);
StyleMap.put(ItemID.SCYTHE_OF_VITUR, WeaponStyle.MELEE);
StyleMap.put(ItemID.SCYTHE_OF_VITUR_22664, WeaponStyle.MELEE);
StyleMap.put(ItemID.SCYTHE_OF_VITUR_UNCHARGED, WeaponStyle.MELEE);
StyleMap.put(ItemID.SEVERED_LEG_24792, WeaponStyle.MELEE);
StyleMap.put(ItemID.SHADOW_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.SHAYZIEN_BANNER, WeaponStyle.MELEE);
StyleMap.put(ItemID.SILVERLIGHT, WeaponStyle.MELEE);
StyleMap.put(ItemID.SILVERLIGHT_6745, WeaponStyle.MELEE);
StyleMap.put(ItemID.SILVERLIGHT_8279, WeaponStyle.MELEE);
StyleMap.put(ItemID.SILVER_SICKLE, WeaponStyle.MELEE);
StyleMap.put(ItemID.SILVER_SICKLE_B, WeaponStyle.MELEE);
StyleMap.put(ItemID.SNOWBALL, WeaponStyle.MELEE);
StyleMap.put(ItemID.SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.STALE_BAGUETTE, WeaponStyle.MELEE);
StyleMap.put(ItemID.STATIUSS_WARHAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.STATIUSS_WARHAMMER_23620, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_2H_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_BATTLEAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_CLAWS, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_DAGGERP, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_DAGGERP_5672, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_DAGGERP_5690, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_HALBERD, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_HASTA, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_SCIMITAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_SPEARP, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_SPEARP_5708, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_SPEARP_5722, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.STEEL_WARHAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.STONE_BOWL, WeaponStyle.MELEE);
StyleMap.put(ItemID.SWAMP_LIZARD, WeaponStyle.MELEE);
StyleMap.put(ItemID.SWIFT_BLADE, WeaponStyle.MELEE);
StyleMap.put(ItemID.TOKTZXILAK, WeaponStyle.MELEE);
StyleMap.put(ItemID.TOKTZXILAK_20554, WeaponStyle.MELEE);
StyleMap.put(ItemID.TOKTZXILEK, WeaponStyle.MELEE);
StyleMap.put(ItemID.TORAGS_HAMMERS, WeaponStyle.MELEE);
StyleMap.put(ItemID.TORAGS_HAMMERS_0, WeaponStyle.MELEE);
StyleMap.put(ItemID.TORAGS_HAMMERS_100, WeaponStyle.MELEE);
StyleMap.put(ItemID.TORAGS_HAMMERS_25, WeaponStyle.MELEE);
StyleMap.put(ItemID.TORAGS_HAMMERS_50, WeaponStyle.MELEE);
StyleMap.put(ItemID.TORAGS_HAMMERS_75, WeaponStyle.MELEE);
StyleMap.put(ItemID.TRAINING_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.TRAILBLAZER_AXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.TRAILBLAZER_BANNER, WeaponStyle.MELEE);
StyleMap.put(ItemID.TRAILBLAZER_CANE, WeaponStyle.MELEE);
StyleMap.put(ItemID.TRAILBLAZER_HARPOON, WeaponStyle.MELEE);
StyleMap.put(ItemID.TRAILBLAZER_PICKAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.TROLLWEISS, WeaponStyle.MELEE);
StyleMap.put(ItemID.TWISTED_BANNER, WeaponStyle.MELEE);
StyleMap.put(ItemID.TZHAARKETEM, WeaponStyle.MELEE);
StyleMap.put(ItemID.TZHAARKETOM, WeaponStyle.MELEE);
StyleMap.put(ItemID.TZHAARKETOM_T, WeaponStyle.MELEE);
StyleMap.put(ItemID.VERACS_FLAIL, WeaponStyle.MELEE);
StyleMap.put(ItemID.VERACS_FLAIL_0, WeaponStyle.MELEE);
StyleMap.put(ItemID.VERACS_FLAIL_100, WeaponStyle.MELEE);
StyleMap.put(ItemID.VERACS_FLAIL_25, WeaponStyle.MELEE);
StyleMap.put(ItemID.VERACS_FLAIL_50, WeaponStyle.MELEE);
StyleMap.put(ItemID.VERACS_FLAIL_75, WeaponStyle.MELEE);
StyleMap.put(ItemID.VESTAS_BLIGHTED_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.VESTAS_LONGSWORD_INACTIVE, WeaponStyle.MELEE);
StyleMap.put(ItemID.VESTAS_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.VESTAS_LONGSWORD_23615, WeaponStyle.MELEE);
StyleMap.put(ItemID.VESTAS_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.VIGGORAS_CHAINMACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.VIGGORAS_CHAINMACE_U, WeaponStyle.MELEE);
StyleMap.put(ItemID.VOLCANIC_ABYSSAL_WHIP, WeaponStyle.MELEE);
StyleMap.put(ItemID.WESTERN_BANNER_1, WeaponStyle.MELEE);
StyleMap.put(ItemID.WESTERN_BANNER_2, WeaponStyle.MELEE);
StyleMap.put(ItemID.WESTERN_BANNER_3, WeaponStyle.MELEE);
StyleMap.put(ItemID.WESTERN_BANNER_4, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_2H_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_BATTLEAXE, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_CLAWS, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_DAGGER, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_DAGGERP, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_DAGGERP_6595, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_DAGGERP_6597, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_FLOWERS, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_HALBERD, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_LONGSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_MACE, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_SCIMITAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.WHITE_WARHAMMER, WeaponStyle.MELEE);
StyleMap.put(ItemID.WILDERNESS_SWORD_1, WeaponStyle.MELEE);
StyleMap.put(ItemID.WILDERNESS_SWORD_2, WeaponStyle.MELEE);
StyleMap.put(ItemID.WILDERNESS_SWORD_3, WeaponStyle.MELEE);
StyleMap.put(ItemID.WILDERNESS_SWORD_4, WeaponStyle.MELEE);
StyleMap.put(ItemID.WILLOW_BLACKJACK, WeaponStyle.MELEE);
StyleMap.put(ItemID.WILLOW_BLACKJACKD, WeaponStyle.MELEE);
StyleMap.put(ItemID.WILLOW_BLACKJACKO, WeaponStyle.MELEE);
StyleMap.put(ItemID.WOLFBANE, WeaponStyle.MELEE);
StyleMap.put(ItemID.WOODEN_SPOON, WeaponStyle.MELEE);
StyleMap.put(ItemID.WOODEN_SWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.YELLOW_FLOWERS, WeaponStyle.MELEE);
StyleMap.put(ItemID.ZAMORAKIAN_HASTA, WeaponStyle.MELEE);
StyleMap.put(ItemID.ZAMORAKIAN_SPEAR, WeaponStyle.MELEE);
StyleMap.put(ItemID.ZAMORAK_GODSWORD, WeaponStyle.MELEE);
StyleMap.put(ItemID.ZAMORAK_GODSWORD_OR, WeaponStyle.MELEE);
StyleMap.put(ItemID.ZOMBIE_HEAD, WeaponStyle.MELEE);
//Ranged
StyleMap.put(ItemID._3RD_AGE_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.ADAMANT_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.ADAMANT_DART, WeaponStyle.RANGE);
StyleMap.put(ItemID.ADAMANT_DARTP, WeaponStyle.RANGE);
StyleMap.put(ItemID.ADAMANT_DARTP_5633, WeaponStyle.RANGE);
StyleMap.put(ItemID.ADAMANT_DARTP_5640, WeaponStyle.RANGE);
StyleMap.put(ItemID.ADAMANT_KNIFE, WeaponStyle.RANGE);
StyleMap.put(ItemID.ADAMANT_KNIFEP, WeaponStyle.RANGE);
StyleMap.put(ItemID.ADAMANT_KNIFEP_5659, WeaponStyle.RANGE);
StyleMap.put(ItemID.ADAMANT_KNIFEP_5666, WeaponStyle.RANGE);
StyleMap.put(ItemID.ADAMANT_THROWNAXE, WeaponStyle.RANGE);
StyleMap.put(ItemID.ARMADYL_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.ARMADYL_CROSSBOW_23611, WeaponStyle.RANGE);
StyleMap.put(ItemID.BLACK_CHINCHOMPA, WeaponStyle.RANGE);
StyleMap.put(ItemID.BLACK_DART, WeaponStyle.RANGE);
StyleMap.put(ItemID.BLACK_DARTP, WeaponStyle.RANGE);
StyleMap.put(ItemID.BLACK_DARTP_5631, WeaponStyle.RANGE);
StyleMap.put(ItemID.BLACK_DARTP_5638, WeaponStyle.RANGE);
StyleMap.put(ItemID.BLACK_KNIFE, WeaponStyle.RANGE);
StyleMap.put(ItemID.BLACK_KNIFEP, WeaponStyle.RANGE);
StyleMap.put(ItemID.BLACK_KNIFEP_5658, WeaponStyle.RANGE);
StyleMap.put(ItemID.BLACK_KNIFEP_5665, WeaponStyle.RANGE);
StyleMap.put(ItemID.BLURITE_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.BRONZE_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.BRONZE_DART, WeaponStyle.RANGE);
StyleMap.put(ItemID.BRONZE_DARTP, WeaponStyle.RANGE);
StyleMap.put(ItemID.BRONZE_DARTP_5628, WeaponStyle.RANGE);
StyleMap.put(ItemID.BRONZE_DARTP_5635, WeaponStyle.RANGE);
StyleMap.put(ItemID.BRONZE_KNIFE, WeaponStyle.RANGE);
StyleMap.put(ItemID.BRONZE_KNIFEP, WeaponStyle.RANGE);
StyleMap.put(ItemID.BRONZE_KNIFEP_5654, WeaponStyle.RANGE);
StyleMap.put(ItemID.BRONZE_KNIFEP_5661, WeaponStyle.RANGE);
StyleMap.put(ItemID.BRONZE_THROWNAXE, WeaponStyle.RANGE);
StyleMap.put(ItemID.CHINCHOMPA, WeaponStyle.RANGE);
StyleMap.put(ItemID.CHINCHOMPA_10033, WeaponStyle.RANGE);
StyleMap.put(ItemID.COMP_OGRE_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.CORRUPTED_BOW_ATTUNED, WeaponStyle.RANGE);
StyleMap.put(ItemID.CORRUPTED_BOW_BASIC, WeaponStyle.RANGE);
StyleMap.put(ItemID.CORRUPTED_BOW_PERFECTED, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRAWS_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRAWS_BOW_U, WeaponStyle.RANGE);
StyleMap.put(ItemID.CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_110, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_110_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_210, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_210_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_310, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_310_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_410, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_410_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_510, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_510_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_610, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_610_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_710, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_710_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_810, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_810_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_910, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_910_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_24123, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_ATTUNED, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_BASIC, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_FULL, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_FULL_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_INACTIVE, WeaponStyle.RANGE);
StyleMap.put(ItemID.CRYSTAL_BOW_PERFECTED, WeaponStyle.RANGE);
StyleMap.put(ItemID.CURSED_GOBLIN_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.DARK_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.DARK_BOW_12765, WeaponStyle.RANGE);
StyleMap.put(ItemID.DARK_BOW_12766, WeaponStyle.RANGE);
StyleMap.put(ItemID.DARK_BOW_12767, WeaponStyle.RANGE);
StyleMap.put(ItemID.DARK_BOW_12768, WeaponStyle.RANGE);
StyleMap.put(ItemID.DARK_BOW_20408, WeaponStyle.RANGE);
StyleMap.put(ItemID.DART, WeaponStyle.RANGE);
StyleMap.put(ItemID.DORGESHUUN_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.DRAGON_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.DRAGON_DART, WeaponStyle.RANGE);
StyleMap.put(ItemID.DRAGON_DARTP, WeaponStyle.RANGE);
StyleMap.put(ItemID.DRAGON_DARTP_11233, WeaponStyle.RANGE);
StyleMap.put(ItemID.DRAGON_DARTP_11234, WeaponStyle.RANGE);
StyleMap.put(ItemID.DRAGON_HUNTER_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.DRAGON_KNIFE, WeaponStyle.RANGE);
StyleMap.put(ItemID.DRAGON_KNIFEP, WeaponStyle.RANGE);
StyleMap.put(ItemID.DRAGON_KNIFEP_22808, WeaponStyle.RANGE);
StyleMap.put(ItemID.DRAGON_KNIFEP_22810, WeaponStyle.RANGE);
StyleMap.put(ItemID.DRAGON_THROWNAXE, WeaponStyle.RANGE);
StyleMap.put(ItemID.HEAVY_BALLISTA, WeaponStyle.RANGE);
StyleMap.put(ItemID.HEAVY_BALLISTA_23630, WeaponStyle.RANGE);
StyleMap.put(ItemID.HOLY_WATER, WeaponStyle.RANGE);
StyleMap.put(ItemID.HUNTERS_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.IRON_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.IRON_DART, WeaponStyle.RANGE);
StyleMap.put(ItemID.IRON_DARTP, WeaponStyle.RANGE);
StyleMap.put(ItemID.IRON_DARTP_5629, WeaponStyle.RANGE);
StyleMap.put(ItemID.IRON_DARTP_5636, WeaponStyle.RANGE);
StyleMap.put(ItemID.IRON_KNIFE, WeaponStyle.RANGE);
StyleMap.put(ItemID.IRON_KNIFEP, WeaponStyle.RANGE);
StyleMap.put(ItemID.IRON_KNIFEP_5655, WeaponStyle.RANGE);
StyleMap.put(ItemID.IRON_KNIFEP_5662, WeaponStyle.RANGE);
StyleMap.put(ItemID.IRON_THROWNAXE, WeaponStyle.RANGE);
StyleMap.put(ItemID.KARILS_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.KARILS_CROSSBOW_0, WeaponStyle.RANGE);
StyleMap.put(ItemID.KARILS_CROSSBOW_100, WeaponStyle.RANGE);
StyleMap.put(ItemID.KARILS_CROSSBOW_25, WeaponStyle.RANGE);
StyleMap.put(ItemID.KARILS_CROSSBOW_50, WeaponStyle.RANGE);
StyleMap.put(ItemID.KARILS_CROSSBOW_75, WeaponStyle.RANGE);
StyleMap.put(ItemID.LIGHT_BALLISTA, WeaponStyle.RANGE);
StyleMap.put(ItemID.LONGBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.MAGIC_COMP_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.MAGIC_LONGBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.MAGIC_SHORTBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.MAGIC_SHORTBOW_20558, WeaponStyle.RANGE);
StyleMap.put(ItemID.MAGIC_SHORTBOW_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.MAPLE_LONGBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.MAPLE_SHORTBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.MITHRIL_DART, WeaponStyle.RANGE);
StyleMap.put(ItemID.MITHRIL_DARTP, WeaponStyle.RANGE);
StyleMap.put(ItemID.MITHRIL_DARTP_5632, WeaponStyle.RANGE);
StyleMap.put(ItemID.MITHRIL_DARTP_5639, WeaponStyle.RANGE);
StyleMap.put(ItemID.MITHRIL_KNIFE, WeaponStyle.RANGE);
StyleMap.put(ItemID.MITHRIL_KNIFEP, WeaponStyle.RANGE);
StyleMap.put(ItemID.MITHRIL_KNIFEP_5657, WeaponStyle.RANGE);
StyleMap.put(ItemID.MITHRIL_KNIFEP_5664, WeaponStyle.RANGE);
StyleMap.put(ItemID.MITHRIL_THROWNAXE, WeaponStyle.RANGE);
StyleMap.put(ItemID.MITHRIL_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.MONKEY_TALISMAN, WeaponStyle.RANGE);
StyleMap.put(ItemID.MORRIGANS_JAVELIN, WeaponStyle.RANGE);
StyleMap.put(ItemID.MORRIGANS_JAVELIN_23619, WeaponStyle.RANGE);
StyleMap.put(ItemID.MORRIGANS_THROWING_AXE, WeaponStyle.RANGE);
StyleMap.put(ItemID.MUD_PIE, WeaponStyle.RANGE);
StyleMap.put(ItemID.NEW_CRYSTAL_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.NEW_CRYSTAL_BOW_4213, WeaponStyle.RANGE);
StyleMap.put(ItemID.NEW_CRYSTAL_BOW_16888, WeaponStyle.RANGE);
StyleMap.put(ItemID.NEW_CRYSTAL_BOW_I, WeaponStyle.RANGE);
StyleMap.put(ItemID.NEW_CRYSTAL_BOW_I_16889, WeaponStyle.RANGE);
StyleMap.put(ItemID.OAK_LONGBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.OAK_SHORTBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.OGRE_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.PHOENIX_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.RED_CHINCHOMPA, WeaponStyle.RANGE);
StyleMap.put(ItemID.RED_CHINCHOMPA_10034, WeaponStyle.RANGE);
StyleMap.put(ItemID.RUNE_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.RUNE_CROSSBOW_23601, WeaponStyle.RANGE);
StyleMap.put(ItemID.RUNE_DART, WeaponStyle.RANGE);
StyleMap.put(ItemID.RUNE_DARTP, WeaponStyle.RANGE);
StyleMap.put(ItemID.RUNE_DARTP_5634, WeaponStyle.RANGE);
StyleMap.put(ItemID.RUNE_DARTP_5641, WeaponStyle.RANGE);
StyleMap.put(ItemID.RUNE_KNIFE, WeaponStyle.RANGE);
StyleMap.put(ItemID.RUNE_KNIFEP, WeaponStyle.RANGE);
StyleMap.put(ItemID.RUNE_KNIFEP_5660, WeaponStyle.RANGE);
StyleMap.put(ItemID.RUNE_KNIFEP_5667, WeaponStyle.RANGE);
StyleMap.put(ItemID.RUNE_THROWNAXE, WeaponStyle.RANGE);
StyleMap.put(ItemID.SEERCULL, WeaponStyle.RANGE);
StyleMap.put(ItemID.SHORTBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.SIGNED_OAK_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.STARTER_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.STEEL_CROSSBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.STEEL_DART, WeaponStyle.RANGE);
StyleMap.put(ItemID.STEEL_DARTP, WeaponStyle.RANGE);
StyleMap.put(ItemID.STEEL_DARTP_5630, WeaponStyle.RANGE);
StyleMap.put(ItemID.STEEL_DARTP_5637, WeaponStyle.RANGE);
StyleMap.put(ItemID.STEEL_KNIFE, WeaponStyle.RANGE);
StyleMap.put(ItemID.STEEL_KNIFEP, WeaponStyle.RANGE);
StyleMap.put(ItemID.STEEL_KNIFEP_5656, WeaponStyle.RANGE);
StyleMap.put(ItemID.STEEL_KNIFEP_5663, WeaponStyle.RANGE);
StyleMap.put(ItemID.STEEL_THROWNAXE, WeaponStyle.RANGE);
StyleMap.put(ItemID.TOKTZXILUL, WeaponStyle.RANGE);
StyleMap.put(ItemID.TOXIC_BLOWPIPE, WeaponStyle.RANGE);
StyleMap.put(ItemID.TOXIC_BLOWPIPE_EMPTY, WeaponStyle.RANGE);
StyleMap.put(ItemID.TRAINING_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.TWISTED_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.WILLOW_COMP_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.WILLOW_LONGBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.WILLOW_SHORTBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.YEW_COMP_BOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.YEW_LONGBOW, WeaponStyle.RANGE);
StyleMap.put(ItemID.YEW_SHORTBOW, WeaponStyle.RANGE);
//Magic
StyleMap.put(ItemID._3RD_AGE_WAND, WeaponStyle.MAGIC);
StyleMap.put(ItemID.AHRIMS_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.AHRIMS_STAFF_0, WeaponStyle.MAGIC);
StyleMap.put(ItemID.AHRIMS_STAFF_100, WeaponStyle.MAGIC);
StyleMap.put(ItemID.AHRIMS_STAFF_25, WeaponStyle.MAGIC);
StyleMap.put(ItemID.AHRIMS_STAFF_50, WeaponStyle.MAGIC);
StyleMap.put(ItemID.AHRIMS_STAFF_75, WeaponStyle.MAGIC);
StyleMap.put(ItemID.AHRIMS_STAFF_23653, WeaponStyle.MAGIC);
StyleMap.put(ItemID.AIR_BATTLESTAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ANCIENT_CROZIER, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ANCIENT_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.APPRENTICE_WAND, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ARMADYL_CROZIER, WeaponStyle.MAGIC);
StyleMap.put(ItemID.BANDOS_CROZIER, WeaponStyle.MAGIC);
StyleMap.put(ItemID.BATTLESTAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.BEGINNER_WAND, WeaponStyle.MAGIC);
StyleMap.put(ItemID.BLISTERWOOD_FLAIL, WeaponStyle.MAGIC);
StyleMap.put(ItemID.BROKEN_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.BRYOPHYTAS_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.BRYOPHYTAS_STAFF_UNCHARGED, WeaponStyle.MAGIC);
StyleMap.put(ItemID.CORRUPTED_STAFF_ATTUNED, WeaponStyle.MAGIC);
StyleMap.put(ItemID.CORRUPTED_STAFF_BASIC, WeaponStyle.MAGIC);
StyleMap.put(ItemID.CORRUPTED_STAFF_PERFECTED, WeaponStyle.MAGIC);
StyleMap.put(ItemID.CRYSTAL_STAFF_ATTUNED, WeaponStyle.MAGIC);
StyleMap.put(ItemID.CRYSTAL_STAFF_BASIC, WeaponStyle.MAGIC);
StyleMap.put(ItemID.CRYSTAL_STAFF_PERFECTED, WeaponStyle.MAGIC);
StyleMap.put(ItemID.CURSED_GOBLIN_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.DAWNBRINGER, WeaponStyle.MAGIC);
StyleMap.put(ItemID.DRAMEN_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.DUST_BATTLESTAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.EARTH_BATTLESTAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ELDRITCH_NIGHTMARE_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.FIRE_BATTLESTAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.GUTHIX_CROZIER, WeaponStyle.MAGIC);
StyleMap.put(ItemID.GUTHIX_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.HARMONISED_NIGHTMARE_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.IBANS_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.IBANS_STAFF_1410, WeaponStyle.MAGIC);
StyleMap.put(ItemID.IBANS_STAFF_U, WeaponStyle.MAGIC);
StyleMap.put(ItemID.IVANDIS_FLAIL, WeaponStyle.MAGIC);
StyleMap.put(ItemID.KODAI_WAND, WeaponStyle.MAGIC);
StyleMap.put(ItemID.KODAI_WAND_23626, WeaponStyle.MAGIC);
StyleMap.put(ItemID.LAVA_BATTLESTAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.LAVA_BATTLESTAFF_21198, WeaponStyle.MAGIC);
StyleMap.put(ItemID.LUNAR_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MAGIC_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MASTER_WAND, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MASTER_WAND_20560, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MIST_BATTLESTAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MUD_BATTLESTAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_AIR_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_DUST_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_EARTH_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_FIRE_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_LAVA_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_LAVA_STAFF_21200, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_MIST_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_MUD_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_SMOKE_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_STEAM_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_STEAM_STAFF_12796, WeaponStyle.MAGIC);
StyleMap.put(ItemID.MYSTIC_WATER_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.NIGHTMARE_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.PHARAOHS_SCEPTRE, WeaponStyle.MAGIC);
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_1, WeaponStyle.MAGIC);
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_2, WeaponStyle.MAGIC);
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_3, WeaponStyle.MAGIC);
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_4, WeaponStyle.MAGIC);
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_5, WeaponStyle.MAGIC);
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_6, WeaponStyle.MAGIC);
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_7, WeaponStyle.MAGIC);
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_8, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ROD_OF_IVANDIS_1, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ROD_OF_IVANDIS_10, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ROD_OF_IVANDIS_2, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ROD_OF_IVANDIS_3, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ROD_OF_IVANDIS_4, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ROD_OF_IVANDIS_5, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ROD_OF_IVANDIS_6, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ROD_OF_IVANDIS_7, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ROD_OF_IVANDIS_8, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ROD_OF_IVANDIS_9, WeaponStyle.MAGIC);
StyleMap.put(ItemID.SANGUINESTI_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.SANGUINESTI_STAFF_UNCHARGED, WeaponStyle.MAGIC);
StyleMap.put(ItemID.SARADOMIN_CROZIER, WeaponStyle.MAGIC);
StyleMap.put(ItemID.SARADOMIN_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.SKULL_SCEPTRE, WeaponStyle.MAGIC);
StyleMap.put(ItemID.SKULL_SCEPTRE_I, WeaponStyle.MAGIC);
StyleMap.put(ItemID.SLAYERS_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.SLAYERS_STAFF_E, WeaponStyle.MAGIC);
StyleMap.put(ItemID.SMOKE_BATTLESTAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STAFF_OF_AIR, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STAFF_OF_BALANCE, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STAFF_OF_BOB_THE_CAT, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STAFF_OF_EARTH, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STAFF_OF_FIRE, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STAFF_OF_LIGHT, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STAFF_OF_THE_DEAD, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STAFF_OF_THE_DEAD_23613, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STAFF_OF_WATER, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STARTER_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STEAM_BATTLESTAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.STEAM_BATTLESTAFF_12795, WeaponStyle.MAGIC);
StyleMap.put(ItemID.TEACHER_WAND, WeaponStyle.MAGIC);
StyleMap.put(ItemID.THAMMARONS_SCEPTRE, WeaponStyle.MAGIC);
StyleMap.put(ItemID.THAMMARONS_SCEPTRE_U, WeaponStyle.MAGIC);
StyleMap.put(ItemID.TOKTZMEJTAL, WeaponStyle.MAGIC);
StyleMap.put(ItemID.TOXIC_STAFF_OF_THE_DEAD, WeaponStyle.MAGIC);
StyleMap.put(ItemID.TOXIC_STAFF_UNCHARGED, WeaponStyle.MAGIC);
StyleMap.put(ItemID.TRIDENT_OF_THE_SEAS, WeaponStyle.MAGIC);
StyleMap.put(ItemID.TRIDENT_OF_THE_SEAS_E, WeaponStyle.MAGIC);
StyleMap.put(ItemID.TRIDENT_OF_THE_SEAS_FULL, WeaponStyle.MAGIC);
StyleMap.put(ItemID.TRIDENT_OF_THE_SWAMP, WeaponStyle.MAGIC);
StyleMap.put(ItemID.TRIDENT_OF_THE_SWAMP_E, WeaponStyle.MAGIC);
StyleMap.put(ItemID.UNCHARGED_TOXIC_TRIDENT, WeaponStyle.MAGIC);
StyleMap.put(ItemID.UNCHARGED_TOXIC_TRIDENT_E, WeaponStyle.MAGIC);
StyleMap.put(ItemID.UNCHARGED_TRIDENT, WeaponStyle.MAGIC);
StyleMap.put(ItemID.UNCHARGED_TRIDENT_E, WeaponStyle.MAGIC);
StyleMap.put(ItemID.VOID_KNIGHT_MACE, WeaponStyle.MAGIC);
StyleMap.put(ItemID.VOID_KNIGHT_MACE_BROKEN, WeaponStyle.MAGIC);
StyleMap.put(ItemID.VOLATILE_NIGHTMARE_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.WAND, WeaponStyle.MAGIC);
StyleMap.put(ItemID.WATER_BATTLESTAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.WHITE_MAGIC_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ZAMORAK_CROZIER, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ZAMORAK_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ZURIELS_STAFF, WeaponStyle.MAGIC);
StyleMap.put(ItemID.ZURIELS_STAFF_23617, WeaponStyle.MAGIC);
//what the fuck...
StyleMap.put(ItemID.GNOMEBALL, WeaponStyle.MAGIC);
}
}

View File

@@ -0,0 +1,6 @@
package com.openosrs.client.util;
public enum WeaponStyle
{
MAGIC, RANGE, MELEE
}

View File

@@ -94,7 +94,7 @@ import org.slf4j.LoggerFactory;
@Slf4j
public class RuneLite
{
public static final File RUNELITE_DIR = new File(System.getProperty("user.home"), ".runelite");
public static final File RUNELITE_DIR = new File(System.getProperty("user.home"), ".openosrs");
public static final File CACHE_DIR = new File(RUNELITE_DIR, "cache");
public static final File PLUGINS_DIR = new File(RUNELITE_DIR, "plugins");
public static final File PROFILES_DIR = new File(RUNELITE_DIR, "profiles");
@@ -334,7 +334,7 @@ public class RuneLite
oprsExternalPluginManager.startExternalPluginManager();
// Update external plugins
//oprsExternalPluginManager.update(); //TODO: Re-enable after fixing actions for new repo
oprsExternalPluginManager.update(); //TODO: Re-enable after fixing actions for new repo
// Load the plugins, but does not start them yet.
// This will initialize configuration

View File

@@ -25,6 +25,7 @@
package net.runelite.client;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.google.gson.Gson;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.name.Names;
@@ -58,6 +59,7 @@ import net.runelite.client.plugins.PluginManager;
import net.runelite.client.task.Scheduler;
import net.runelite.client.util.DeferredEventBus;
import net.runelite.client.util.ExecutorServiceExceptionLogger;
import net.runelite.http.api.RuneLiteAPI;
import net.runelite.http.api.chat.ChatClient;
import okhttp3.OkHttpClient;
import org.slf4j.Logger;
@@ -95,6 +97,8 @@ public class RuneLiteModule extends AbstractModule
bind(PluginManager.class);
bind(SessionManager.class);
bind(Gson.class).toInstance(RuneLiteAPI.GSON);
bind(Callbacks.class).to(Hooks.class);
bind(EventBus.class)

View File

@@ -64,6 +64,7 @@ public class SessionManager
private final WSClient wsClient;
private final File sessionFile;
private final AccountClient accountClient;
private final Gson gson;
@Inject
private SessionManager(
@@ -71,13 +72,15 @@ public class SessionManager
ConfigManager configManager,
EventBus eventBus,
WSClient wsClient,
OkHttpClient okHttpClient)
OkHttpClient okHttpClient,
Gson gson)
{
this.configManager = configManager;
this.eventBus = eventBus;
this.wsClient = wsClient;
this.sessionFile = sessionfile;
this.accountClient = new AccountClient(okHttpClient);
this.gson = gson;
eventBus.register(this);
}
@@ -94,7 +97,7 @@ public class SessionManager
try (FileInputStream in = new FileInputStream(sessionFile))
{
session = new Gson().fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), AccountSession.class);
session = gson.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), AccountSession.class);
log.debug("Loaded session for {}", session.getUsername());
}
@@ -124,7 +127,7 @@ public class SessionManager
try (Writer fw = new OutputStreamWriter(new FileOutputStream(sessionFile), StandardCharsets.UTF_8))
{
new Gson().toJson(accountSession, fw);
gson.toJson(accountSession, fw);
log.debug("Saved session to {}", sessionFile);
}

View File

@@ -24,6 +24,8 @@
*/
package net.runelite.client.config;
import com.openosrs.client.OpenOSRS;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -48,4 +50,11 @@ public @interface ConfigItem
boolean secret() default false;
String section() default "";
/*
OpenOSRS Lazy Helpers tm
*/
Class<?> enumClass() default OpenOSRS.class;
String unhide() default "";
String hide() default "";
}

View File

@@ -394,7 +394,7 @@ public class ConfigManager
parent.mkdirs();
File tempFile = new File(parent, RuneLite.DEFAULT_CONFIG_FILE.getName() + ".tmp");
File tempFile = File.createTempFile("runelite", null, parent);
try (FileOutputStream out = new FileOutputStream(tempFile))
{

View File

@@ -40,4 +40,12 @@ public @interface ConfigSection
int position();
boolean closedByDefault() default false;
/*
OpenOSRS Lazy Helpers tm
*/
String keyName() default "";
String section() default "";
boolean hidden() default false;
String unhide() default "";
}

View File

@@ -159,7 +159,7 @@ public class Keybind
String mod = "";
if (modifiers != 0)
{
mod = getModifiersExText(modifiers);
mod = InputEvent.getModifiersExText(modifiers);
}
if (mod.isEmpty() && key.isEmpty())
@@ -177,33 +177,6 @@ public class Keybind
return mod;
}
public static String getModifiersExText(int modifiers)
{
StringBuilder buf = new StringBuilder();
if ((modifiers & InputEvent.META_DOWN_MASK) != 0)
{
buf.append("Meta+");
}
if ((modifiers & InputEvent.CTRL_DOWN_MASK) != 0)
{
buf.append("Ctrl+");
}
if ((modifiers & InputEvent.ALT_DOWN_MASK) != 0)
{
buf.append("Alt+");
}
if ((modifiers & InputEvent.SHIFT_DOWN_MASK) != 0)
{
buf.append("Shift+");
}
if (buf.length() > 0)
{
buf.setLength(buf.length() - 1); // remove trailing '+'
}
return buf.toString();
}
@Nullable
public static Integer getModifierForKeyCode(int keyCode)
{

View File

@@ -42,8 +42,12 @@ public @interface Units
String MINUTES = " mins";
String PERCENT = "%";
String PIXELS = "px";
String POINTS = "pt";
String SECONDS = "s";
String TICKS = " ticks";
String LEVELS = " lvls";
String FPS = " fps";
String GP = " GP";
String value();
}

View File

@@ -24,18 +24,32 @@
*/
package net.runelite.client.externalplugins;
import java.lang.invoke.MethodHandles;
import java.net.URL;
import java.net.URLClassLoader;
import lombok.Getter;
import lombok.Setter;
import net.runelite.client.util.ReflectUtil;
class ExternalPluginClassLoader extends URLClassLoader
class ExternalPluginClassLoader extends URLClassLoader implements ReflectUtil.PrivateLookupableClassLoader
{
@Getter
private final ExternalPluginManifest manifest;
@Getter
@Setter
private MethodHandles.Lookup lookup;
ExternalPluginClassLoader(ExternalPluginManifest manifest, URL[] urls)
{
super(urls, ExternalPluginClassLoader.class.getClassLoader());
this.manifest = manifest;
ReflectUtil.installLookupHelper(this);
}
@Override
public Class<?> defineClass0(String name, byte[] b, int off, int len) throws ClassFormatError
{
return super.defineClass(name, b, off, len);
}
}

View File

@@ -25,6 +25,7 @@
package net.runelite.client.externalplugins;
import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
@@ -59,11 +60,13 @@ import okio.BufferedSource;
public class ExternalPluginClient
{
private final OkHttpClient okHttpClient;
private final Gson gson;
@Inject
private ExternalPluginClient(OkHttpClient okHttpClient)
private ExternalPluginClient(OkHttpClient okHttpClient, Gson gson)
{
this.okHttpClient = okHttpClient;
this.gson = gson;
}
public List<ExternalPluginManifest> downloadManifest() throws IOException, VerificationException
@@ -94,7 +97,7 @@ public class ExternalPluginClient
throw new VerificationException("Unable to verify external plugin manifest");
}
return RuneLiteAPI.GSON.fromJson(new String(data, StandardCharsets.UTF_8),
return gson.fromJson(new String(data, StandardCharsets.UTF_8),
new TypeToken<List<ExternalPluginManifest>>()
{
}.getType());
@@ -156,7 +159,7 @@ public class ExternalPluginClient
Request request = new Request.Builder()
.url(url)
.post(RequestBody.create(RuneLiteAPI.JSON, RuneLiteAPI.GSON.toJson(plugins)))
.post(RequestBody.create(RuneLiteAPI.JSON, gson.toJson(plugins)))
.build();
okHttpClient.newCall(request).enqueue(new Callback()
@@ -190,7 +193,7 @@ public class ExternalPluginClient
}
// CHECKSTYLE:OFF
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(res.body().byteStream()), new TypeToken<Map<String, Integer>>(){}.getType());
return gson.fromJson(new InputStreamReader(res.body().byteStream()), new TypeToken<Map<String, Integer>>(){}.getType());
// CHECKSTYLE:ON
}
catch (JsonSyntaxException ex)

View File

@@ -237,7 +237,7 @@ public enum AgilityShortcut
@Getter
private final int level;
/**
* Brief description of the shortcut (e.g. 'Rocks', 'Stepping Stones', 'Jump')
* Brief description of the shortcut. (e.g. 'Rocks', 'Stepping Stones', 'Jump')
*/
@Getter
private final String description;

View File

@@ -26,33 +26,25 @@ package net.runelite.client.menus;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.LinkedHashMultimap;
import com.google.common.collect.Multimap;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
import net.runelite.api.IconID;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.NPCComposition;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.events.MenuOptionClicked;
import net.runelite.api.events.NpcActionChanged;
import net.runelite.api.events.PlayerMenuOptionClicked;
import net.runelite.api.events.PlayerMenuOptionsChanged;
import net.runelite.api.events.WidgetMenuOptionClicked;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.eventbus.EventBus;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.util.Text;
@Singleton
@Slf4j
@@ -64,16 +56,13 @@ public class MenuManager
private static final int IDX_LOWER = 4;
private static final int IDX_UPPER = 8;
private static final Pattern BOUNTY_EMBLEM_TAG_AND_TIER_REGEXP = Pattern.compile(String.format("%s[1-9]0?", IconID.BOUNTY_HUNTER_EMBLEM.toString()));
private final Client client;
private final EventBus eventBus;
//Maps the indexes that are being used to the menu option.
private final Map<Integer, String> playerMenuIndexMap = new HashMap<>();
//Used to manage custom non-player menu options
private final Multimap<Integer, WidgetMenuOption> managedMenuOptions = HashMultimap.create();
private final Set<String> npcMenuOptions = new HashSet<>();
private final Multimap<Integer, WidgetMenuOption> managedMenuOptions = LinkedHashMultimap.create();
@Inject
@VisibleForTesting
@@ -123,7 +112,7 @@ public class MenuManager
@Subscribe
public void onMenuEntryAdded(MenuEntryAdded event)
{
if (client.getSpellSelected())
if (client.getSpellSelected() || event.getType() != MenuAction.CC_OP.getId())
{
return;
}
@@ -200,45 +189,12 @@ public class MenuManager
addPlayerMenuItem(newIdx, menuText);
}
@Subscribe
public void onNpcActionChanged(NpcActionChanged event)
{
NPCComposition composition = event.getNpcComposition();
for (String npcOption : npcMenuOptions)
{
addNpcOption(composition, npcOption);
}
}
private void addNpcOption(NPCComposition composition, String npcOption)
{
String[] actions = composition.getActions();
int unused = -1;
for (int i = 0; i < actions.length; ++i)
{
if (actions[i] == null && unused == -1)
{
unused = i;
}
else if (actions[i] != null && actions[i].equals(npcOption))
{
return;
}
}
if (unused == -1)
{
return;
}
actions[unused] = npcOption;
}
@Subscribe
public void onMenuOptionClicked(MenuOptionClicked event)
{
if (event.getMenuAction() != MenuAction.RUNELITE
&& event.getMenuAction() != MenuAction.RUNELITE_PLAYER)
if (event.getMenuAction() != MenuAction.RUNELITE)
{
return; // not a managed widget option or custom player option
return;
}
int widgetId = event.getWidgetId();
@@ -254,23 +210,9 @@ public class MenuManager
customMenu.setMenuTarget(event.getMenuTarget());
customMenu.setWidget(curMenuOption.getWidget());
eventBus.post(customMenu);
return; // don't continue because it's not a player option
return;
}
}
// removes bounty hunter emblem tag and tier from player name, e.g:
// "username<img=20>5<col=40ff00> (level-42)" -> "username<col=40ff00> (level-42)"
String target = BOUNTY_EMBLEM_TAG_AND_TIER_REGEXP.matcher(event.getMenuTarget()).replaceAll("");
// removes tags and level from player names for example:
// <col=ffffff>username<col=40ff00> (level-42) or <col=ffffff><img=2>username</col>
String username = Text.removeTags(target).split("[(]")[0].trim();
PlayerMenuOptionClicked playerMenuOptionClicked = new PlayerMenuOptionClicked();
playerMenuOptionClicked.setMenuOption(event.getMenuOption());
playerMenuOptionClicked.setMenuTarget(username);
eventBus.post(playerMenuOptionClicked);
}
private void addPlayerMenuItem(int playerOptionIndex, String menuText)

View File

@@ -33,11 +33,11 @@ import net.runelite.client.util.ColorUtil;
public final class WidgetMenuOption
{
/**
* The left hand text to be displayed on the menu option. Ex. the menuOption of "Drop Bones" is "Drop"
* The left hand text to be displayed on the menu option. (ex. the menuOption of "Drop Bones" is "Drop")
*/
private String menuOption;
/**
* The right hand text to be displayed on the menu option Ex. the menuTarget of "Drop Bones" is "Bones"
* The right hand text to be displayed on the menu option. (ex. the menuTarget of "Drop Bones" is "Bones")
*/
private String menuTarget;
/**

View File

@@ -34,6 +34,7 @@ import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import net.runelite.api.Varbits;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.ui.FontManager;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPanel;
@@ -82,6 +83,7 @@ public class BarrowsBrotherSlainOverlay extends OverlayPanel
panelComponent.getChildren().add(LineComponent.builder()
.left(brother.getName())
.right(slain)
.rightFont(FontManager.getDefaultFont())
.rightColor(brotherSlain ? Color.GREEN : Color.RED)
.build());
}

View File

@@ -45,6 +45,7 @@ import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldPoint;
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
import static net.runelite.client.plugins.cluescrolls.clues.Enemy.*;
import net.runelite.client.plugins.cluescrolls.clues.emote.Emote;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.*;
import static net.runelite.client.plugins.cluescrolls.clues.emote.Emote.BULL_ROARER;
@@ -53,7 +54,7 @@ import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.*;
import static net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit.SHANTAY_PASS;
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.*;
import static net.runelite.client.plugins.cluescrolls.clues.Enemy.*;
import net.runelite.client.ui.FontManager;
import net.runelite.client.ui.overlay.OverlayUtil;
import net.runelite.client.ui.overlay.components.LineComponent;
import net.runelite.client.ui.overlay.components.PanelComponent;
@@ -258,6 +259,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
panelComponent.getChildren().add(LineComponent.builder()
.left("STASH Unit:")
.right(stashUnitBuilt ? UNICODE_CHECK_MARK : UNICODE_BALLOT_X)
.rightFont(FontManager.getDefaultFont())
.rightColor(stashUnitBuilt ? Color.GREEN : Color.RED)
.build());
}
@@ -292,6 +294,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
.left(requirement.getCollectiveName(client))
.leftColor(TITLED_CONTENT_COLOR)
.right(combinedFulfilled ? UNICODE_CHECK_MARK : UNICODE_BALLOT_X)
.rightFont(FontManager.getDefaultFont())
.rightColor(equipmentFulfilled ? Color.GREEN : (combinedFulfilled ? Color.ORANGE : Color.RED))
.build());
}

View File

@@ -41,6 +41,7 @@ import net.runelite.client.plugins.cluescrolls.clues.item.AnyRequirementCollecti
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
import net.runelite.client.plugins.cluescrolls.clues.item.RangeItemRequirement;
import net.runelite.client.plugins.cluescrolls.clues.item.SingleItemRequirement;
import net.runelite.client.ui.FontManager;
import net.runelite.client.ui.overlay.OverlayUtil;
import net.runelite.client.ui.overlay.components.LineComponent;
import net.runelite.client.ui.overlay.components.PanelComponent;
@@ -134,6 +135,7 @@ public class FaloTheBardClue extends ClueScroll implements TextClueScroll, NpcCl
.left(requirement.getCollectiveName(plugin.getClient()))
.leftColor(TITLED_CONTENT_COLOR)
.right(inventoryFulfilled ? "\u2713" : "\u2717")
.rightFont(FontManager.getDefaultFont())
.rightColor(inventoryFulfilled ? Color.GREEN : Color.RED)
.build());
}

View File

@@ -25,6 +25,11 @@
package net.runelite.client.plugins.cluescrolls.clues;
import com.google.common.collect.ImmutableSet;
import java.awt.Color;
import java.awt.Graphics2D;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
@@ -34,25 +39,21 @@ import net.runelite.api.ItemID;
import net.runelite.api.NPC;
import net.runelite.api.Point;
import net.runelite.api.TileObject;
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin;
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.CLICKBOX_BORDER_COLOR;
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.CLICKBOX_FILL_COLOR;
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.CLICKBOX_HOVER_BORDER_COLOR;
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.IMAGE_Z_OFFSET;
import net.runelite.client.plugins.cluescrolls.clues.item.AnyRequirementCollection;
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.*;
import net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirement;
import static net.runelite.client.plugins.cluescrolls.clues.item.ItemRequirements.*;
import net.runelite.client.plugins.cluescrolls.clues.item.SingleItemRequirement;
import net.runelite.client.ui.FontManager;
import net.runelite.client.ui.overlay.OverlayUtil;
import net.runelite.client.ui.overlay.components.LineComponent;
import net.runelite.client.ui.overlay.components.PanelComponent;
import net.runelite.client.ui.overlay.components.TitleComponent;
import java.awt.Color;
import java.awt.Graphics2D;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR;
import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.IMAGE_Z_OFFSET;
@Getter
public class SkillChallengeClue extends ClueScroll implements NpcClueScroll, NamedObjectClueScroll
@@ -379,6 +380,7 @@ public class SkillChallengeClue extends ClueScroll implements NpcClueScroll, Nam
.left(requirement.getCollectiveName(plugin.getClient()))
.leftColor(TITLED_CONTENT_COLOR)
.right(combinedFulfilled ? "\u2713" : "\u2717")
.rightFont(FontManager.getDefaultFont())
.rightColor(equipmentFulfilled || (combinedFulfilled && !requireEquipped) ? Color.GREEN : (combinedFulfilled ? Color.ORANGE : Color.RED))
.build());
}

View File

@@ -32,6 +32,7 @@ import javax.swing.JButton;
import lombok.Getter;
import net.runelite.client.config.Keybind;
import net.runelite.client.config.ModifierlessKeybind;
import net.runelite.client.ui.FontManager;
class HotkeyButton extends JButton
{
@@ -40,6 +41,7 @@ class HotkeyButton extends JButton
public HotkeyButton(Keybind value, boolean modifierless)
{
setFont(FontManager.getDefaultFont().deriveFont(12.f));
setValue(value);
addMouseListener(new MouseAdapter()
{

View File

@@ -32,7 +32,6 @@ import java.util.List;
import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
import net.runelite.http.api.RuneLiteAPI;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.MediaType;
@@ -47,11 +46,13 @@ public class CrowdsourcingManager
{
private static final String CROWDSOURCING_BASE = "https://crowdsource.runescape.wiki/runelite";
private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
private static final Gson GSON = RuneLiteAPI.GSON;
@Inject
private OkHttpClient okHttpClient;
@Inject
private Gson gson;
private List<Object> data = new ArrayList<>();
public void storeEvent(Object event)
@@ -77,7 +78,7 @@ public class CrowdsourcingManager
Request r = new Request.Builder()
.url(CROWDSOURCING_BASE)
.post(RequestBody.create(JSON, GSON.toJson(temp)))
.post(RequestBody.create(JSON, gson.toJson(temp)))
.build();
okHttpClient.newCall(r).enqueue(new Callback()

View File

@@ -470,7 +470,7 @@ enum DiscordGameEventType
private int priority;
/**
* Marks this event as root event, e.g event that should be used for total time tracking
* Marks this event as root event. (eg. event that should be used for total time tracking)
*/
private boolean root;

View File

@@ -128,7 +128,6 @@ public class GrandExchangePlugin extends Plugin
private static final String BUY_LIMIT_GE_TEXT = "<br>Buy limit: ";
private static final String BUY_LIMIT_KEY = "buylimit";
private static final Gson GSON = new Gson();
private static final Duration BUY_LIMIT_RESET = Duration.ofHours(4);
static final String SEARCH_GRAND_EXCHANGE = "Search Grand Exchange";
@@ -183,6 +182,9 @@ public class GrandExchangePlugin extends Plugin
@Inject
private ConfigManager configManager;
@Inject
private Gson gson;
private Widget grandExchangeText;
private Widget grandExchangeItem;
private String grandExchangeExamine;
@@ -253,12 +255,12 @@ public class GrandExchangePlugin extends Plugin
{
return null;
}
return GSON.fromJson(offer, SavedOffer.class);
return gson.fromJson(offer, SavedOffer.class);
}
private void setOffer(int slot, SavedOffer offer)
{
configManager.setRSProfileConfiguration("geoffer", Integer.toString(slot), GSON.toJson(offer));
configManager.setRSProfileConfiguration("geoffer", Integer.toString(slot), gson.toJson(offer));
}
private void deleteOffer(int slot)

View File

@@ -51,6 +51,7 @@ import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.events.MenuOptionClicked;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.EventBus;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.game.chatbox.ChatboxPanelManager;
import net.runelite.client.plugins.Plugin;
@@ -72,8 +73,6 @@ public class GroundMarkerPlugin extends Plugin
private static final String WALK_HERE = "Walk here";
private static final String REGION_PREFIX = "region_";
private static final Gson GSON = new Gson();
@Getter(AccessLevel.PACKAGE)
private final List<ColorTileMarker> points = new ArrayList<>();
@@ -98,7 +97,16 @@ public class GroundMarkerPlugin extends Plugin
@Inject
private ChatboxPanelManager chatboxPanelManager;
private void savePoints(int regionId, Collection<GroundMarkerPoint> points)
@Inject
private EventBus eventBus;
@Inject
private GroundMarkerSharingManager sharingManager;
@Inject
private Gson gson;
void savePoints(int regionId, Collection<GroundMarkerPoint> points)
{
if (points == null || points.isEmpty())
{
@@ -106,11 +114,11 @@ public class GroundMarkerPlugin extends Plugin
return;
}
String json = GSON.toJson(points);
String json = gson.toJson(points);
configManager.setConfiguration(CONFIG_GROUP, REGION_PREFIX + regionId, json);
}
private Collection<GroundMarkerPoint> getPoints(int regionId)
Collection<GroundMarkerPoint> getPoints(int regionId)
{
String json = configManager.getConfiguration(CONFIG_GROUP, REGION_PREFIX + regionId);
if (Strings.isNullOrEmpty(json))
@@ -119,7 +127,7 @@ public class GroundMarkerPlugin extends Plugin
}
// CHECKSTYLE:OFF
return GSON.fromJson(json, new TypeToken<List<GroundMarkerPoint>>(){}.getType());
return gson.fromJson(json, new TypeToken<List<GroundMarkerPoint>>(){}.getType());
// CHECKSTYLE:ON
}
@@ -129,7 +137,7 @@ public class GroundMarkerPlugin extends Plugin
return configManager.getConfig(GroundMarkerConfig.class);
}
private void loadPoints()
void loadPoints()
{
points.clear();
@@ -181,14 +189,18 @@ public class GroundMarkerPlugin extends Plugin
{
overlayManager.add(overlay);
overlayManager.add(minimapOverlay);
sharingManager.addMenuOptions();
loadPoints();
eventBus.register(sharingManager);
}
@Override
public void shutDown()
{
eventBus.unregister(sharingManager);
overlayManager.remove(overlay);
overlayManager.remove(minimapOverlay);
sharingManager.removeMenuOptions();
points.clear();
}

View File

@@ -0,0 +1,243 @@
/*
* Copyright (c) 2021, 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.groundmarkers;
import com.google.common.base.Strings;
import com.google.common.util.concurrent.Runnables;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import java.awt.Toolkit;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.ChatMessageType;
import net.runelite.api.Client;
import net.runelite.api.events.WidgetMenuOptionClicked;
import static net.runelite.api.widgets.WidgetInfo.WORLD_MAP_OPTION;
import net.runelite.client.chat.ChatMessageManager;
import net.runelite.client.chat.QueuedMessage;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.game.chatbox.ChatboxPanelManager;
import net.runelite.client.menus.MenuManager;
import net.runelite.client.menus.WidgetMenuOption;
@Slf4j
class GroundMarkerSharingManager
{
private static final WidgetMenuOption EXPORT_MARKERS_OPTION = new WidgetMenuOption("Export", "Ground Markers", WORLD_MAP_OPTION);
private static final WidgetMenuOption IMPORT_MARKERS_OPTION = new WidgetMenuOption("Import", "Ground Markers", WORLD_MAP_OPTION);
private final GroundMarkerPlugin plugin;
private final Client client;
private final MenuManager menuManager;
private final ChatMessageManager chatMessageManager;
private final ChatboxPanelManager chatboxPanelManager;
private final Gson gson;
@Inject
private GroundMarkerSharingManager(GroundMarkerPlugin plugin, Client client, MenuManager menuManager,
ChatMessageManager chatMessageManager, ChatboxPanelManager chatboxPanelManager, Gson gson)
{
this.plugin = plugin;
this.client = client;
this.menuManager = menuManager;
this.chatMessageManager = chatMessageManager;
this.chatboxPanelManager = chatboxPanelManager;
this.gson = gson;
}
void addMenuOptions()
{
menuManager.addManagedCustomMenu(EXPORT_MARKERS_OPTION);
menuManager.addManagedCustomMenu(IMPORT_MARKERS_OPTION);
}
void removeMenuOptions()
{
menuManager.removeManagedCustomMenu(EXPORT_MARKERS_OPTION);
menuManager.removeManagedCustomMenu(IMPORT_MARKERS_OPTION);
}
private boolean widgetMenuClickedEquals(final WidgetMenuOptionClicked event, final WidgetMenuOption target)
{
return event.getMenuTarget().equals(target.getMenuTarget()) &&
event.getMenuOption().equals(target.getMenuOption());
}
@Subscribe
public void onWidgetMenuOptionClicked(WidgetMenuOptionClicked event)
{
// ensure that the option clicked is the export markers option
if (event.getWidget() != WORLD_MAP_OPTION)
{
return;
}
if (widgetMenuClickedEquals(event, EXPORT_MARKERS_OPTION))
{
exportGroundMarkers();
}
else if (widgetMenuClickedEquals(event, IMPORT_MARKERS_OPTION))
{
promptForImport();
}
}
private void exportGroundMarkers()
{
int[] regions = client.getMapRegions();
if (regions == null)
{
return;
}
List<GroundMarkerPoint> activePoints = Arrays.stream(regions)
.mapToObj(regionId -> plugin.getPoints(regionId).stream())
.flatMap(Function.identity())
.collect(Collectors.toList());
if (activePoints.isEmpty())
{
sendChatMessage("You have no ground markers to export.");
return;
}
final String exportDump = gson.toJson(activePoints);
log.debug("Exported ground markers: {}", exportDump);
Toolkit.getDefaultToolkit()
.getSystemClipboard()
.setContents(new StringSelection(exportDump), null);
sendChatMessage(activePoints.size() + " ground markers were copied to your clipboard.");
}
private void promptForImport()
{
final String clipboardText;
try
{
clipboardText = Toolkit.getDefaultToolkit()
.getSystemClipboard()
.getData(DataFlavor.stringFlavor)
.toString();
}
catch (IOException | UnsupportedFlavorException ex)
{
sendChatMessage("Unable to read system clipboard.");
log.warn("error reading clipboard", ex);
return;
}
log.debug("Clipboard contents: {}", clipboardText);
if (Strings.isNullOrEmpty(clipboardText))
{
sendChatMessage("You do not have any ground markers copied in your clipboard.");
return;
}
List<GroundMarkerPoint> importPoints;
try
{
// CHECKSTYLE:OFF
importPoints = gson.fromJson(clipboardText, new TypeToken<List<GroundMarkerPoint>>(){}.getType());
// CHECKSTYLE:ON
}
catch (JsonSyntaxException e)
{
log.debug("Malformed JSON for clipboard import", e);
sendChatMessage("You do not have any ground markers copied in your clipboard.");
return;
}
if (importPoints.isEmpty())
{
sendChatMessage("You do not have any ground markers copied in your clipboard.");
return;
}
chatboxPanelManager.openTextMenuInput("Are you sure you want to import " + importPoints.size() + " ground markers?")
.option("Yes", () -> importGroundMarkers(importPoints))
.option("No", Runnables::doNothing)
.build();
}
private void importGroundMarkers(Collection<GroundMarkerPoint> importPoints)
{
// regions being imported may not be loaded on client,
// so need to import each bunch directly into the config
// first, collate the list of unique region ids in the import
Map<Integer, List<GroundMarkerPoint>> regionGroupedPoints = importPoints.stream()
.collect(Collectors.groupingBy(GroundMarkerPoint::getRegionId));
// now import each region into the config
regionGroupedPoints.forEach((regionId, groupedPoints) ->
{
// combine imported points with existing region points
log.debug("Importing {} points to region {}", groupedPoints.size(), regionId);
Collection<GroundMarkerPoint> regionPoints = plugin.getPoints(regionId);
List<GroundMarkerPoint> mergedList = new ArrayList<>(regionPoints.size() + groupedPoints.size());
// add existing points
mergedList.addAll(regionPoints);
// add new points
for (GroundMarkerPoint point : groupedPoints)
{
// filter out duplicates
if (!mergedList.contains(point))
{
mergedList.add(point);
}
}
plugin.savePoints(regionId, mergedList);
});
// reload points from config
log.debug("Reloading points after import");
plugin.loadPoints();
sendChatMessage(importPoints.size() + " ground markers were imported from the clipboard.");
}
private void sendChatMessage(final String message)
{
chatMessageManager.queue(QueuedMessage.builder()
.type(ChatMessageType.CONSOLE)
.runeLiteFormattedMessage(message)
.build());
}
}

View File

@@ -38,9 +38,10 @@ import net.runelite.api.ChatMessageType;
import net.runelite.api.Client;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.Player;
import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.events.PlayerMenuOptionClicked;
import net.runelite.api.events.MenuOptionClicked;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe;
@@ -174,11 +175,30 @@ public class HiscorePlugin extends Plugin
}
@Subscribe
public void onPlayerMenuOptionClicked(PlayerMenuOptionClicked event)
public void onMenuOptionClicked(MenuOptionClicked event)
{
if (event.getMenuOption().equals(LOOKUP))
if ((event.getMenuAction() == MenuAction.RUNELITE || event.getMenuAction() == MenuAction.RUNELITE_PLAYER)
&& event.getMenuOption().equals(LOOKUP))
{
lookupPlayer(Text.removeTags(event.getMenuTarget()));
final String target;
if (event.getMenuAction() == MenuAction.RUNELITE_PLAYER)
{
// The player id is included in the event, so we can use that to get the player name,
// which avoids having to parse out the combat level and any icons preceding the name.
Player player = client.getCachedPlayers()[event.getId()];
if (player == null)
{
return;
}
target = player.getName();
}
else
{
target = Text.removeTags(event.getMenuTarget());
}
lookupPlayer(target);
}
}

View File

@@ -27,6 +27,7 @@ package net.runelite.client.plugins.idlenotifier;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.Range;
import net.runelite.client.config.Units;
@ConfigGroup("idlenotifier")
@@ -110,10 +111,36 @@ public interface IdleNotifierConfig extends Config
return 0;
}
@ConfigItem(
keyName = "lowEnergy",
name = "Low Energy Threshold",
description = "The amount of energy points remaining to send a notification at. A value of 100 will disable notification.",
position = 8
)
@Units(Units.PERCENT)
@Range(max = 100)
default int getLowEnergyThreshold()
{
return 100;
}
@ConfigItem(
keyName = "highEnergy",
name = "High Energy Threshold",
description = "The amount of energy points reached to send a notification. A value of 0 will disable notification.",
position = 9
)
@Units(Units.PERCENT)
@Range(max = 100)
default int getHighEnergyThreshold()
{
return 0;
}
@ConfigItem(
keyName = "oxygen",
name = "Oxygen Threshold",
position = 8,
position = 10,
description = "The amount of remaining oxygen to send a notification at. A value of 0 will disable notification."
)
@Units(Units.PERCENT)
@@ -125,7 +152,7 @@ public interface IdleNotifierConfig extends Config
@ConfigItem(
keyName = "spec",
name = "Spec Threshold",
position = 9,
position = 11,
description = "The amount of special attack energy reached to send a notification at. A value of 0 will disable notification."
)
@Units(Units.PERCENT)

View File

@@ -93,6 +93,8 @@ public class IdleNotifierPlugin extends Plugin
private boolean notifyPosition = false;
private boolean notifyHitpoints = true;
private boolean notifyPrayer = true;
private boolean shouldNotifyLowEnergy = false;
private boolean shouldNotifyHighEnergy = false;
private boolean notifyOxygen = true;
private boolean notifyIdleLogout = true;
private boolean notify6HourLogout = true;
@@ -471,6 +473,16 @@ public class IdleNotifierPlugin extends Plugin
notifier.notify("[" + local.getName() + "] has low prayer!");
}
if (checkLowEnergy())
{
notifier.notify("[" + local.getName() + "] has low run energy!");
}
if (checkHighEnergy())
{
notifier.notify("[" + local.getName() + "] has restored run energy!");
}
if (checkLowOxygen())
{
notifier.notify("[" + local.getName() + "] has low oxygen!");
@@ -572,6 +584,52 @@ public class IdleNotifierPlugin extends Plugin
return false;
}
private boolean checkLowEnergy()
{
if (config.getLowEnergyThreshold() >= 100)
{
return false;
}
if (client.getEnergy() <= config.getLowEnergyThreshold())
{
if (shouldNotifyLowEnergy)
{
shouldNotifyLowEnergy = false;
return true;
}
}
else
{
shouldNotifyLowEnergy = true;
}
return false;
}
private boolean checkHighEnergy()
{
if (config.getHighEnergyThreshold() == 0)
{
return false;
}
if (client.getEnergy() >= config.getHighEnergyThreshold())
{
if (shouldNotifyHighEnergy)
{
shouldNotifyHighEnergy = false;
return true;
}
}
else
{
shouldNotifyHighEnergy = true;
}
return false;
}
private boolean checkInteractionIdle(Duration waitDuration, Player local)
{
if (lastInteract == null)

View File

@@ -28,20 +28,74 @@ import java.awt.Color;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.ConfigSection;
import net.runelite.client.config.Range;
@ConfigGroup("inventorytags")
@ConfigGroup(InventoryTagsConfig.GROUP)
public interface InventoryTagsConfig extends Config
{
enum DisplayMode
{
OUTLINE,
UNDERLINE
}
String GROUP = "inventorytags";
@ConfigSection(
name = "Tag display mode",
description = "How tags are displayed in the inventory",
position = 0
)
String tagStyleSection = "tagStyleSection";
@ConfigItem(
position = 0,
keyName = "showTagOutline",
name = "Outline",
description = "Configures whether or not item tags show be outlined",
section = tagStyleSection
)
default boolean showTagOutline()
{
return true;
}
@ConfigItem(
position = 1,
keyName = "tagUnderline",
name = "Underline",
description = "Configures whether or not item tags should be underlined",
section = tagStyleSection
)
default boolean showTagUnderline()
{
return false;
}
@ConfigItem(
position = 2,
keyName = "tagFill",
name = "Fill",
description = "Configures whether or not item tags should be filled",
section = tagStyleSection
)
default boolean showTagFill()
{
return false;
}
@Range(
max = 255
)
@ConfigItem(
position = 3,
keyName = "fillOpacity",
name = "Fill opacity",
description = "Configures the opacity of the tag \"Fill\"",
section = tagStyleSection
)
default int fillOpacity()
{
return 50;
}
@ConfigItem(
position = 1,
keyName = "groupColor1",
name = "Group 1 Color",
description = "Color of the Tag"
@@ -52,7 +106,7 @@ public interface InventoryTagsConfig extends Config
}
@ConfigItem(
position = 1,
position = 2,
keyName = "groupColor2",
name = "Group 2 Color",
description = "Color of the Tag"
@@ -63,7 +117,7 @@ public interface InventoryTagsConfig extends Config
}
@ConfigItem(
position = 2,
position = 3,
keyName = "groupColor3",
name = "Group 3 Color",
description = "Color of the Tag"
@@ -74,7 +128,7 @@ public interface InventoryTagsConfig extends Config
}
@ConfigItem(
position = 3,
position = 4,
keyName = "groupColor4",
name = "Group 4 Color",
description = "Color of the Tag"
@@ -85,7 +139,7 @@ public interface InventoryTagsConfig extends Config
}
@ConfigItem(
position = 4,
position = 5,
keyName = "groupColor5",
name = "Group 5 Color",
description = "Color of the Tag"
@@ -96,7 +150,7 @@ public interface InventoryTagsConfig extends Config
}
@ConfigItem(
position = 5,
position = 6,
keyName = "groupColor6",
name = "Group 6 Color",
description = "Color of the Tag"
@@ -105,15 +159,4 @@ public interface InventoryTagsConfig extends Config
{
return new Color(0, 255, 255);
}
@ConfigItem(
position = 6,
keyName = "displayMode",
name = "Display mode",
description = "How tags are displayed in the inventory"
)
default DisplayMode getDisplayMode()
{
return DisplayMode.OUTLINE;
}
}

View File

@@ -24,21 +24,26 @@
*/
package net.runelite.client.plugins.inventorytags;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import javax.inject.Inject;
import net.runelite.api.widgets.WidgetItem;
import net.runelite.client.game.ItemManager;
import net.runelite.client.plugins.inventorytags.InventoryTagsConfig.DisplayMode;
import net.runelite.client.ui.overlay.WidgetItemOverlay;
import net.runelite.client.util.ColorUtil;
import net.runelite.client.util.ImageUtil;
public class InventoryTagsOverlay extends WidgetItemOverlay
{
private final ItemManager itemManager;
private final InventoryTagsPlugin plugin;
private final InventoryTagsConfig config;
private final Cache<Long, Image> fillCache;
@Inject
private InventoryTagsOverlay(ItemManager itemManager, InventoryTagsPlugin plugin, InventoryTagsConfig config)
@@ -48,6 +53,10 @@ public class InventoryTagsOverlay extends WidgetItemOverlay
this.config = config;
showOnEquipment();
showOnInventory();
fillCache = CacheBuilder.newBuilder()
.concurrencyLevel(1)
.maximumSize(32)
.build();
}
@Override
@@ -57,16 +66,22 @@ public class InventoryTagsOverlay extends WidgetItemOverlay
if (group != null)
{
final Color color = plugin.getGroupNameColor(group);
final DisplayMode displayMode = config.getDisplayMode();
if (color != null)
{
Rectangle bounds = widgetItem.getCanvasBounds();
if (displayMode == DisplayMode.OUTLINE)
if (config.showTagOutline())
{
final BufferedImage outline = itemManager.getItemOutline(itemId, widgetItem.getQuantity(), color);
graphics.drawImage(outline, (int) bounds.getX(), (int) bounds.getY(), null);
}
else
if (config.showTagFill())
{
final Image image = getFillImage(color, widgetItem.getId(), widgetItem.getQuantity());
graphics.drawImage(image, (int) bounds.getX(), (int) bounds.getY(), null);
}
if (config.showTagUnderline())
{
int heightOffSet = (int) bounds.getY() + (int) bounds.getHeight() + 2;
graphics.setColor(color);
@@ -75,4 +90,22 @@ public class InventoryTagsOverlay extends WidgetItemOverlay
}
}
}
private Image getFillImage(Color color, int itemId, int qty)
{
long key = (((long) itemId) << 32) | qty;
Image image = fillCache.getIfPresent(key);
if (image == null)
{
final Color fillColor = ColorUtil.colorWithAlpha(color, config.fillOpacity());
image = ImageUtil.fillImage(itemManager.getImage(itemId, qty, false), fillColor);
fillCache.put(key, image);
}
return image;
}
void invalidateCache()
{
fillCache.invalidateAll();
}
}

View File

@@ -39,6 +39,7 @@ import net.runelite.api.events.WidgetMenuOptionClicked;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.events.ConfigChanged;
import net.runelite.client.menus.MenuManager;
import net.runelite.client.menus.WidgetMenuOption;
import net.runelite.client.plugins.Plugin;
@@ -147,6 +148,15 @@ public class InventoryTagsPlugin extends Plugin
editorMode = false;
}
@Subscribe
public void onConfigChanged(ConfigChanged configChanged)
{
if (configChanged.getGroup().equals(InventoryTagsConfig.GROUP))
{
overlay.invalidateCache();
}
}
@Subscribe
public void onWidgetMenuOptionClicked(final WidgetMenuOptionClicked event)
{

View File

@@ -215,7 +215,7 @@ public class ItemStatChanges
add(new GauntletPotion(), EGNIOL_POTION_1, EGNIOL_POTION_2, EGNIOL_POTION_3, EGNIOL_POTION_4);
// Soul Wars
add(combo(2, heal(HITPOINTS, perc(.20, 2)), heal(RUN_ENERGY, 100)), BANDAGES_25202);
add(combo(2, heal(HITPOINTS, perc(.15, 1)), heal(RUN_ENERGY, 100)), BANDAGES_25202);
add(combo(6, boost(ATTACK, perc(.15, 5)), boost(STRENGTH, perc(.15, 5)), boost(DEFENCE, perc(.15, 5)), boost(RANGED, perc(.15, 5)), boost(MAGIC, perc(.15, 5)), heal(PRAYER, perc(.25, 8))), POTION_OF_POWER1, POTION_OF_POWER2, POTION_OF_POWER3, POTION_OF_POWER4);
log.debug("{} items; {} behaviours loaded", effects.size(), new HashSet<>(effects.values()).size());

View File

@@ -52,7 +52,7 @@ public abstract class Stat
public abstract int getValue(Client client);
/**
* Get the base stat maximum, ie. the bottom half of the stat fraction.
* Get the base stat maximum. (ie. the bottom half of the stat fraction)
*/
public abstract int getMaximum(Client client);
}

View File

@@ -145,7 +145,8 @@ public class LootTrackerPlugin extends Plugin
// Chest loot handling
private static final String CHEST_LOOTED_MESSAGE = "You find some treasure in the chest!";
private static final Pattern LARRAN_LOOTED_PATTERN = Pattern.compile("You have opened Larran's (big|small) chest .*");
private static final String STONE_CHEST_LOOTED_MESSAGE = "You steal some loot from the chest.";
// Used by Stone Chest, Isle of Souls chest, Dark Chest
private static final String OTHER_CHEST_LOOTED_MESSAGE = "You steal some loot from the chest.";
private static final String DORGESH_KAAN_CHEST_LOOTED_MESSAGE = "You find treasure inside!";
private static final String GRUBBY_CHEST_LOOTED_MESSAGE = "You have opened the Grubby Chest";
private static final Pattern HAM_CHEST_LOOTED_PATTERN = Pattern.compile("Your (?<key>[a-z]+) key breaks in the lock.*");
@@ -161,6 +162,8 @@ public class LootTrackerPlugin extends Plugin
put(10835, "Dorgesh-Kaan Chest").
put(10834, "Dorgesh-Kaan Chest").
put(7323, "Grubby Chest").
put(8593, "Isle of Souls Chest").
put(7827, "Dark Chest").
build();
// Shade chest loot handling
@@ -186,6 +189,11 @@ public class LootTrackerPlugin extends Plugin
put(ObjectID.SILVER_CHEST_4128, "Silver key crimson").
put(ObjectID.SILVER_CHEST_4129, "Silver key black").
put(ObjectID.SILVER_CHEST_4130, "Silver key purple").
put(ObjectID.GOLD_CHEST, "Gold key red").
put(ObjectID.GOLD_CHEST_41213, "Gold key brown").
put(ObjectID.GOLD_CHEST_41214, "Gold key crimson").
put(ObjectID.GOLD_CHEST_41215, "Gold key black").
put(ObjectID.GOLD_CHEST_41216, "Gold key purple").
build();
// Hallow Sepulchre Coffin handling
@@ -625,7 +633,7 @@ public class LootTrackerPlugin extends Plugin
final String message = event.getMessage();
if (message.equals(CHEST_LOOTED_MESSAGE) || message.equals(STONE_CHEST_LOOTED_MESSAGE)
if (message.equals(CHEST_LOOTED_MESSAGE) || message.equals(OTHER_CHEST_LOOTED_MESSAGE)
|| message.equals(DORGESH_KAAN_CHEST_LOOTED_MESSAGE) || message.startsWith(GRUBBY_CHEST_LOOTED_MESSAGE)
|| LARRAN_LOOTED_PATTERN.matcher(message).matches())
{

View File

@@ -466,6 +466,7 @@ public class MusicPlugin extends Plugin
public void update()
{
handle.setNoClickThrough(false);
handle.setOnDragListener((JavaScriptCallback) this::drag);
handle.setOnDragCompleteListener((JavaScriptCallback) this::drag);
handle.setHasListener(true);
@@ -511,6 +512,9 @@ public class MusicPlugin extends Plugin
int level = (x * channel.max) / getWidth();
level = Ints.constrainToRange(level, 0, channel.max);
channel.setLevel(level);
int percent = (int) Math.round((level * 100.0 / channel.getMax()));
sliderTooltip = new Tooltip(channel.getName() + ": " + percent + "%");
}
protected int getWidth()

View File

@@ -36,6 +36,7 @@ import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.OverlayUtil;
import net.runelite.client.util.Text;
public class NpcMinimapOverlay extends Overlay
{
@@ -56,7 +57,7 @@ public class NpcMinimapOverlay extends Overlay
{
for (NPC npc : plugin.getHighlightedNpcs())
{
renderNpcOverlay(graphics, npc, npc.getName(), config.getHighlightColor());
renderNpcOverlay(graphics, npc, Text.removeTags(npc.getName()), config.getHighlightColor());
}
return null;

View File

@@ -88,7 +88,6 @@ public class ObjectIndicatorsPlugin extends Plugin
private static final String MARK = "Mark object";
private static final String UNMARK = "Unmark object";
private final Gson GSON = new Gson();
@Getter(AccessLevel.PACKAGE)
private final List<ColorTileObject> objects = new ArrayList<>();
private final Map<Integer, Set<ObjectPoint>> points = new HashMap<>();
@@ -108,6 +107,9 @@ public class ObjectIndicatorsPlugin extends Plugin
@Inject
private ObjectIndicatorsConfig config;
@Inject
private Gson gson;
@Provides
ObjectIndicatorsConfig provideConfig(ConfigManager configManager)
{
@@ -428,7 +430,7 @@ public class ObjectIndicatorsPlugin extends Plugin
}
else
{
final String json = GSON.toJson(points);
final String json = gson.toJson(points);
configManager.setConfiguration(CONFIG_GROUP, "region_" + id, json);
}
}
@@ -442,7 +444,7 @@ public class ObjectIndicatorsPlugin extends Plugin
return null;
}
Set<ObjectPoint> points = GSON.fromJson(json, new TypeToken<Set<ObjectPoint>>()
Set<ObjectPoint> points = gson.fromJson(json, new TypeToken<Set<ObjectPoint>>()
{
}.getType());
// Prior to multiloc support the plugin would mark objects named "null", which breaks

View File

@@ -88,6 +88,9 @@ public class ScreenMarkerPlugin extends Plugin
@Inject
private ScreenMarkerCreationOverlay overlay;
@Inject
private Gson gson;
@Getter
@Inject
private ColorPickerManager colorPickerManager;
@@ -266,7 +269,6 @@ public class ScreenMarkerPlugin extends Plugin
return;
}
final Gson gson = new Gson();
final String json = gson
.toJson(screenMarkers.stream().map(ScreenMarkerOverlay::getMarker).collect(Collectors.toList()));
configManager.setConfiguration(CONFIG_GROUP, CONFIG_KEY, json);
@@ -279,7 +281,6 @@ public class ScreenMarkerPlugin extends Plugin
return Stream.empty();
}
final Gson gson = new Gson();
final List<ScreenMarker> screenMarkerData = gson.fromJson(json, new TypeToken<ArrayList<ScreenMarker>>()
{
}.getType());

View File

@@ -99,7 +99,7 @@ public class SlayerPlugin extends Plugin
//Chat messages
private static final Pattern CHAT_GEM_PROGRESS_MESSAGE = Pattern.compile("^(?:You're assigned to kill|You have received a new Slayer assignment from .*:) (?:[Tt]he )?(?<name>.+?)(?: (?:in|on|south of) (?:the )?(?<location>[^;]+))?(?:; only | \\()(?<amount>\\d+)(?: more to go\\.|\\))$");
private static final String CHAT_GEM_COMPLETE_MESSAGE = "You need something new to hunt.";
private static final Pattern CHAT_COMPLETE_MESSAGE = Pattern.compile("(?:\\d+,)*\\d+");
private static final Pattern CHAT_COMPLETE_MESSAGE = Pattern.compile("You've completed (?:at least )?(?<tasks>[\\d,]+) (?:Wilderness )?tasks?(?: and received \\d+ points, giving you a total of (?<points>[\\d,]+)| and reached the maximum amount of Slayer points \\((?<points2>[\\d,]+)\\))?");
private static final String CHAT_CANCEL_MESSAGE = "Your task has been cancelled.";
private static final String CHAT_CANCEL_MESSAGE_JAD = "You no longer have a slayer task as you left the fight cave.";
private static final String CHAT_CANCEL_MESSAGE_ZUK = "You no longer have a slayer task as you left the Inferno.";
@@ -450,6 +450,7 @@ public class SlayerPlugin extends Plugin
expeditiousChargeCount = Integer.parseInt(mExpeditious.group(1));
config.expeditious(expeditiousChargeCount);
}
if (chatMsg.startsWith(CHAT_BRACELET_SLAUGHTER_CHARGE))
{
Matcher mSlaughter = CHAT_BRACELET_SLAUGHTER_CHARGE_REGEX.matcher(chatMsg);
@@ -466,35 +467,25 @@ public class SlayerPlugin extends Plugin
{
Matcher mComplete = CHAT_COMPLETE_MESSAGE.matcher(chatMsg);
List<String> matches = new ArrayList<>();
while (mComplete.find())
if (mComplete.find())
{
matches.add(mComplete.group(0).replaceAll(",", ""));
}
String mTasks = mComplete.group("tasks");
String mPoints = mComplete.group("points");
if (mPoints == null)
{
mPoints = mComplete.group("points2");
}
int streak = -1, points = -1;
switch (matches.size())
{
case 0:
streak = 1;
break;
case 1:
streak = Integer.parseInt(matches.get(0));
break;
case 3:
streak = Integer.parseInt(matches.get(0));
points = Integer.parseInt(matches.get(2));
break;
default:
log.warn("Unreachable default case for message ending in '; return to Slayer master'");
}
if (streak != -1)
{
config.streak(streak);
}
if (points != -1)
{
config.points(points);
if (mTasks != null)
{
int streak = Integer.parseInt(mTasks.replace(",", ""));
config.streak(streak);
}
if (mPoints != null)
{
int points = Integer.parseInt(mPoints.replace(",", ""));
config.points(points);
}
}
setTask("", 0, 0);

View File

@@ -60,7 +60,7 @@ import net.runelite.client.ws.WSClient;
@PluginDescriptor(
name = "Special Attack Counter",
description = "Track DWH, Arclight, Darklight, and BGS special attacks used on NPCs",
description = "Track special attacks used on NPCs",
tags = {"combat", "npcs", "overlay"},
enabledByDefault = false
)

View File

@@ -37,7 +37,13 @@ enum SpecialWeapon
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);
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);
private final String name;
private final int itemID;

View File

@@ -39,7 +39,7 @@ import net.runelite.client.ui.overlay.OverlayPriority;
import net.runelite.client.ui.overlay.components.ComponentOrientation;
import net.runelite.client.ui.overlay.components.ImageComponent;
public class TeamCapesOverlay extends OverlayPanel
class TeamCapesOverlay extends OverlayPanel
{
private final TeamCapesPlugin plugin;
private final TeamCapesConfig config;

View File

@@ -25,21 +25,24 @@
package net.runelite.client.plugins.teamcapes;
import com.google.inject.Provides;
import java.time.temporal.ChronoUnit;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.inject.Inject;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.Player;
import net.runelite.api.events.PlayerChanged;
import net.runelite.api.events.PlayerDespawned;
import net.runelite.client.callback.ClientThread;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.task.Schedule;
import net.runelite.client.ui.overlay.OverlayManager;
@PluginDescriptor(
@@ -48,19 +51,26 @@ import net.runelite.client.ui.overlay.OverlayManager;
tags = {"overlay", "players"},
enabledByDefault = false
)
@Slf4j
public class TeamCapesPlugin extends Plugin
{
@Inject
private Client client;
@Inject
private ClientThread clientThread;
@Inject
private OverlayManager overlayManager;
@Inject
private TeamCapesOverlay overlay;
// Hashmap of team capes: Key is the teamCape #, Value is the count of teamcapes in the area.
private Map<Integer, Integer> teams = new HashMap<>();
// Team number -> Number of players
@Getter(AccessLevel.PACKAGE)
private Map<Integer, Integer> teams = new LinkedHashMap<>();
// Player -> Team number
private final Map<Player, Integer> playerTeam = new HashMap<>();
@Provides
TeamCapesConfig provideConfig(ConfigManager configManager)
@@ -72,6 +82,8 @@ public class TeamCapesPlugin extends Plugin
protected void startUp() throws Exception
{
overlayManager.add(overlay);
clientThread.invokeLater(() -> client.getPlayers().forEach(this::update));
}
@Override
@@ -79,48 +91,61 @@ public class TeamCapesPlugin extends Plugin
{
overlayManager.remove(overlay);
teams.clear();
playerTeam.clear();
}
@Schedule(
period = 1800,
unit = ChronoUnit.MILLIS
)
public void update()
@Subscribe
public void onPlayerChanged(PlayerChanged playerChanged)
{
if (client.getGameState() != GameState.LOGGED_IN)
Player player = playerChanged.getPlayer();
update(player);
}
private void update(Player player)
{
int oldTeam = playerTeam.getOrDefault(player, 0);
if (oldTeam == player.getTeam())
{
return;
}
List<Player> players = client.getPlayers();
teams.clear();
for (Player player : players)
log.debug("{} has changed teams: {} -> {}", player.getName(), oldTeam, player.getTeam());
if (oldTeam > 0)
{
int team = player.getTeam();
if (team > 0)
{
if (teams.containsKey(team))
{
teams.put(team, teams.get(team) + 1);
}
else
{
teams.put(team, 1);
}
}
teams.computeIfPresent(oldTeam, (key, value) -> value > 1 ? value - 1 : null);
playerTeam.remove(player);
}
if (player.getTeam() > 0)
{
teams.merge(player.getTeam(), 1, Integer::sum);
playerTeam.put(player, player.getTeam());
}
sort();
}
@Subscribe
public void onPlayerDespawned(PlayerDespawned playerDespawned)
{
Player player = playerDespawned.getPlayer();
Integer team = playerTeam.remove(player);
if (team != null)
{
teams.computeIfPresent(team, (key, value) -> value > 1 ? value - 1 : null);
sort();
}
}
private void sort()
{
// Sort teams by value in descending order and then by key in ascending order, limited to 5 entries
teams = teams.entrySet().stream()
.sorted(
Comparator.comparing(Map.Entry<Integer, Integer>::getValue, Comparator.reverseOrder())
.thenComparingInt(Map.Entry::getKey)
)
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
.sorted(
Comparator.comparing(Map.Entry<Integer, Integer>::getValue, Comparator.reverseOrder())
.thenComparingInt(Map.Entry::getKey)
)
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
}
public Map<Integer, Integer> getTeams()
{
return teams;
}
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright (c) 2020, cgati <https://github.com/cgati>
* 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.tearsofguthix;
import java.awt.Color;
import net.runelite.client.config.Alpha;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.util.ColorUtil;
@ConfigGroup("tearsofguthix")
public interface TearsOfGuthixConfig extends Config
{
@ConfigItem(
keyName = "showGreenTearsTimer",
name = "Enable Green Tears Timer",
description = "Configures whether to display a timer for green tears or not",
position = 1
)
default boolean showGreenTearsTimer()
{
return true;
}
@Alpha
@ConfigItem(
keyName = "blueTearsColor",
name = "Blue Tears Color",
description = "Color of Blue Tears timer",
position = 2
)
default Color getBlueTearsColor()
{
return ColorUtil.colorWithAlpha(Color.CYAN, 100);
}
@Alpha
@ConfigItem(
keyName = "greenTearsColor",
name = "Green Tears Color",
description = "Color of Green Tears timer",
position = 3
)
default Color getGreenTearsColor()
{
return ColorUtil.colorWithAlpha(Color.GREEN, 100);
}
}

View File

@@ -36,17 +36,18 @@ import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.ProgressPieComponent;
import net.runelite.client.util.ColorUtil;
class TearsOfGuthixOverlay extends Overlay
{
private static final Color CYAN_ALPHA = new Color(Color.CYAN.getRed(), Color.CYAN.getGreen(), Color.CYAN.getBlue(), 100);
private static final Color GREEN_ALPHA = new Color(Color.GREEN.getRed(), Color.GREEN.getGreen(), Color.GREEN.getBlue(), 100);
private static final Duration MAX_TIME = Duration.ofSeconds(9);
private final TearsOfGuthixConfig config;
private final TearsOfGuthixPlugin plugin;
@Inject
private TearsOfGuthixOverlay(TearsOfGuthixPlugin plugin)
private TearsOfGuthixOverlay(TearsOfGuthixConfig config, TearsOfGuthixPlugin plugin)
{
this.config = config;
this.plugin = plugin;
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_SCENE);
@@ -55,8 +56,24 @@ class TearsOfGuthixOverlay extends Overlay
@Override
public Dimension render(Graphics2D graphics)
{
if (plugin.getStreams().isEmpty())
{
return null;
}
Color blueTearsFill = config.getBlueTearsColor();
Color greenTearsFill = config.getGreenTearsColor();
Color blueTearsBorder = ColorUtil.colorWithAlpha(blueTearsFill, 255);
Color greenTearsBorder = ColorUtil.colorWithAlpha(greenTearsFill, 255);
plugin.getStreams().forEach((object, timer) ->
{
if ((object.getId() == ObjectID.GREEN_TEARS || object.getId() == ObjectID.GREEN_TEARS_6666)
&& !config.showGreenTearsTimer())
{
return;
}
final Point position = object.getCanvasLocation(100);
if (position == null)
@@ -70,14 +87,14 @@ class TearsOfGuthixOverlay extends Overlay
if (object.getId() == ObjectID.BLUE_TEARS ||
object.getId() == ObjectID.BLUE_TEARS_6665)
{
progressPie.setFill(CYAN_ALPHA);
progressPie.setBorderColor(Color.CYAN);
progressPie.setFill(blueTearsFill);
progressPie.setBorderColor(blueTearsBorder);
}
else if (object.getId() == ObjectID.GREEN_TEARS ||
object.getId() == ObjectID.GREEN_TEARS_6666)
{
progressPie.setFill(GREEN_ALPHA);
progressPie.setBorderColor(Color.GREEN);
progressPie.setFill(greenTearsFill);
progressPie.setBorderColor(greenTearsBorder);
}
progressPie.setPosition(position);

View File

@@ -28,6 +28,7 @@ import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import javax.inject.Inject;
import com.google.inject.Provides;
import lombok.Getter;
import net.runelite.api.Client;
import net.runelite.api.DecorativeObject;
@@ -35,6 +36,7 @@ import net.runelite.api.ObjectID;
import net.runelite.api.events.DecorativeObjectDespawned;
import net.runelite.api.events.DecorativeObjectSpawned;
import net.runelite.api.events.GameStateChanged;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
@@ -61,6 +63,12 @@ public class TearsOfGuthixPlugin extends Plugin
@Getter
private final Map<DecorativeObject, Instant> streams = new HashMap<>();
@Provides
TearsOfGuthixConfig provideConfig(ConfigManager configManager)
{
return configManager.getConfig(TearsOfGuthixConfig.class);
}
@Override
protected void startUp()
{

View File

@@ -40,6 +40,7 @@ public interface TimeTrackingConfig extends Config
String BOTANIST = "botanist";
String TIMERS = "timers";
String STOPWATCHES = "stopwatches";
String PREFER_SOONEST = "preferSoonest";
@ConfigItem(
keyName = "timeFormatMode",
@@ -120,6 +121,17 @@ public interface TimeTrackingConfig extends Config
return 10;
}
@ConfigItem(
keyName = PREFER_SOONEST,
name = "Prefer soonest completion",
description = "When displaying completion times on the overview, prefer showing the soonest any patch will complete.",
position = 7
)
default boolean preferSoonest()
{
return false;
}
@ConfigItem(
keyName = "activeTab",
name = "Active Tab",

View File

@@ -51,6 +51,7 @@ import net.runelite.client.events.RuneScapeProfileChanged;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import static net.runelite.client.plugins.timetracking.TimeTrackingConfig.CONFIG_GROUP;
import static net.runelite.client.plugins.timetracking.TimeTrackingConfig.PREFER_SOONEST;
import static net.runelite.client.plugins.timetracking.TimeTrackingConfig.STOPWATCHES;
import static net.runelite.client.plugins.timetracking.TimeTrackingConfig.TIMERS;
import net.runelite.client.plugins.timetracking.clocks.ClockManager;
@@ -173,6 +174,10 @@ public class TimeTrackingPlugin extends Plugin
{
clockManager.loadStopwatches();
}
else if (e.getKey().equals(PREFER_SOONEST))
{
farmingTracker.loadCompletionTimes();
}
}
@Subscribe

View File

@@ -53,6 +53,9 @@ public class ClockManager
@Inject
private Notifier notifier;
@Inject
private Gson gson;
@Getter
private final List<Timer> timers = new CopyOnWriteArrayList<>();
@@ -183,7 +186,6 @@ public class ClockManager
if (!Strings.isNullOrEmpty(timersJson))
{
final Gson gson = new Gson();
final List<Timer> timers = gson.fromJson(timersJson, new TypeToken<ArrayList<Timer>>()
{
}.getType());
@@ -200,7 +202,6 @@ public class ClockManager
if (!Strings.isNullOrEmpty(stopwatchesJson))
{
final Gson gson = new Gson();
final List<Stopwatch> stopwatches = gson.fromJson(stopwatchesJson, new TypeToken<ArrayList<Stopwatch>>()
{
}.getType());
@@ -227,14 +228,12 @@ public class ClockManager
void saveTimers()
{
final Gson gson = new Gson();
final String json = gson.toJson(timers);
configManager.setConfiguration(TimeTrackingConfig.CONFIG_GROUP, TimeTrackingConfig.TIMERS, json);
}
void saveStopwatches()
{
final Gson gson = new Gson();
final String json = gson.toJson(stopwatches);
configManager.setConfiguration(TimeTrackingConfig.CONFIG_GROUP, TimeTrackingConfig.STOPWATCHES, json);
}

View File

@@ -407,7 +407,7 @@ public class FarmingTracker
{
for (Map.Entry<Tab, Set<FarmingPatch>> tab : farmingWorld.getTabs().entrySet())
{
long maxCompletionTime = 0;
long extremumCompletionTime = config.preferSoonest() ? Long.MAX_VALUE : 0;
boolean allUnknown = true;
boolean allEmpty = true;
@@ -426,7 +426,15 @@ public class FarmingTracker
allEmpty = false;
// update max duration if this patch takes longer to grow
maxCompletionTime = Math.max(maxCompletionTime, prediction.getDoneEstimate());
if (config.preferSoonest())
{
extremumCompletionTime = Math.min(extremumCompletionTime, prediction.getDoneEstimate());
}
else
{
extremumCompletionTime = Math.max(extremumCompletionTime, prediction.getDoneEstimate());
}
}
}
@@ -443,7 +451,7 @@ public class FarmingTracker
state = SummaryState.EMPTY;
completionTime = -1L;
}
else if (maxCompletionTime <= Instant.now().getEpochSecond())
else if (extremumCompletionTime <= Instant.now().getEpochSecond())
{
state = SummaryState.COMPLETED;
completionTime = 0;
@@ -451,7 +459,7 @@ public class FarmingTracker
else
{
state = SummaryState.IN_PROGRESS;
completionTime = maxCompletionTime;
completionTime = extremumCompletionTime;
}
summaries.put(tab.getKey(), state);
completionTimes.put(tab.getKey(), completionTime);

View File

@@ -67,7 +67,6 @@ public class WikiSearchChatboxTextInput extends ChatboxTextInput
private static final int PREDICTION_DEBOUNCE_DELAY_MS = 200;
private final ChatboxPanelManager chatboxPanelManager;
private final Gson gson = new Gson();
private Future<?> runningRequest = null;
private List<String> predictions = ImmutableList.of();
@@ -78,7 +77,7 @@ public class WikiSearchChatboxTextInput extends ChatboxTextInput
@Inject
public WikiSearchChatboxTextInput(ChatboxPanelManager chatboxPanelManager, ClientThread clientThread,
ScheduledExecutorService scheduledExecutorService, @Named("developerMode") final boolean developerMode,
OkHttpClient okHttpClient)
OkHttpClient okHttpClient, Gson gson)
{
super(chatboxPanelManager, clientThread);
this.chatboxPanelManager = chatboxPanelManager;

View File

@@ -47,10 +47,10 @@ import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.ChatMessageType;
import net.runelite.api.ChatPlayer;
import net.runelite.api.FriendsChatMember;
import net.runelite.api.FriendsChatManager;
import net.runelite.api.Client;
import net.runelite.api.Friend;
import net.runelite.api.FriendsChatManager;
import net.runelite.api.FriendsChatMember;
import net.runelite.api.GameState;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
@@ -60,10 +60,11 @@ import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.GameTick;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.events.PlayerMenuOptionClicked;
import net.runelite.api.events.MenuOptionClicked;
import net.runelite.api.events.VarbitChanged;
import net.runelite.api.events.WorldListLoad;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.callback.ClientThread;
import net.runelite.client.chat.ChatColorType;
import net.runelite.client.chat.ChatMessageBuilder;
import net.runelite.client.chat.ChatMessageManager;
@@ -111,6 +112,9 @@ public class WorldHopperPlugin extends Plugin
@Inject
private Client client;
@Inject
private ClientThread clientThread;
@Inject
private ConfigManager configManager;
@@ -162,7 +166,7 @@ public class WorldHopperPlugin extends Plugin
@Override
public void hotkeyPressed()
{
hop(true);
clientThread.invoke(() -> hop(true));
}
};
private final HotkeyListener nextKeyListener = new HotkeyListener(() -> config.nextKey())
@@ -170,7 +174,7 @@ public class WorldHopperPlugin extends Plugin
@Override
public void hotkeyPressed()
{
hop(false);
clientThread.invoke(() -> hop(false));
}
};
@@ -304,7 +308,7 @@ public class WorldHopperPlugin extends Plugin
void hopTo(World world)
{
hop(world.getId());
clientThread.invoke(() -> hop(world.getId()));
}
void addToFavorites(World world)
@@ -408,9 +412,9 @@ public class WorldHopperPlugin extends Plugin
}
@Subscribe
public void onPlayerMenuOptionClicked(PlayerMenuOptionClicked event)
public void onMenuOptionClicked(MenuOptionClicked event)
{
if (!event.getMenuOption().equals(HOP_TO))
if (event.getMenuAction() != MenuAction.RUNELITE || !event.getMenuOption().equals(HOP_TO))
{
return;
}
@@ -613,6 +617,8 @@ public class WorldHopperPlugin extends Plugin
private void hop(int worldId)
{
assert client.isClientThread();
WorldResult worldResult = worldService.getWorlds();
// Don't try to hop if the world doesn't exist
World world = worldResult.findWorld(worldId);

View File

@@ -370,10 +370,7 @@ class WorldSwitcherPanel extends PluginPanel
private WorldTableRow buildRow(World world, boolean stripe, boolean current, boolean favorite)
{
WorldTableRow row = new WorldTableRow(world, current, favorite, plugin.getStoredPing(world),
world1 ->
{
plugin.hopTo(world1);
},
plugin::hopTo,
(world12, add) ->
{
if (add)

View File

@@ -55,6 +55,7 @@ enum MinigameLocation
PYRAMID_PLUNDER("Pyramid Plunder", new WorldPoint(3288, 2787, 0)),
RANGING_GUILD("Ranging Guild", new WorldPoint(2671, 3419, 0)),
ROGUES_DEN("Rogues' Den", new WorldPoint(2905, 3537, 0)),
SHADES_OF_MORTTON("Shades of Mort'ton", new WorldPoint(3505, 3315, 0)),
SORCERESSS_GARDEN("Sorceress's Garden", new WorldPoint(3285, 3180, 0)),
TROUBLE_BREWING("Trouble Brewing", new WorldPoint(3811, 3021, 0)),
VOLCANIC_MINE("Volcanic Mine", new WorldPoint(3812, 3810, 0)),

View File

@@ -186,7 +186,7 @@ public class WorldMapPlugin extends Plugin
{
case AGILITY:
{
int newAgilityLevel = statChanged.getLevel();
int newAgilityLevel = statChanged.getBoostedLevel();
if (newAgilityLevel != agilityLevel)
{
agilityLevel = newAgilityLevel;
@@ -196,7 +196,7 @@ public class WorldMapPlugin extends Plugin
}
case WOODCUTTING:
{
int newWoodcutLevel = statChanged.getLevel();
int newWoodcutLevel = statChanged.getBoostedLevel();
if (newWoodcutLevel != woodcuttingLevel)
{
woodcuttingLevel = newWoodcutLevel;

View File

@@ -89,11 +89,22 @@ public interface XpGlobesConfig extends Config
return false;
}
@ConfigItem(
keyName = "showVirtualLevel",
name = "Show virtual level",
description = "Shows virtual level if over 99 in a skill and Hide maxed skill is not checked",
position = 5
)
default boolean showVirtualLevel()
{
return false;
}
@ConfigItem(
keyName = "enableCustomArcColor",
name = "Enable custom arc color",
description = "Enables the custom coloring of the globe's arc instead of using the skill's default color.",
position = 5
position = 6
)
default boolean enableCustomArcColor()
{
@@ -105,7 +116,7 @@ public interface XpGlobesConfig extends Config
keyName = "Progress arc color",
name = "Progress arc color",
description = "Change the color of the progress arc in the xp orb",
position = 6
position = 7
)
default Color progressArcColor()
{
@@ -117,7 +128,7 @@ public interface XpGlobesConfig extends Config
keyName = "Progress orb outline color",
name = "Progress orb outline color",
description = "Change the color of the progress orb outline",
position = 7
position = 8
)
default Color progressOrbOutLineColor()
{
@@ -129,7 +140,7 @@ public interface XpGlobesConfig extends Config
keyName = "Progress orb background color",
name = "Progress orb background color",
description = "Change the color of the progress orb background",
position = 8
position = 9
)
default Color progressOrbBackgroundColor()
{
@@ -140,7 +151,7 @@ public interface XpGlobesConfig extends Config
keyName = "Progress arc width",
name = "Progress arc width",
description = "Change the stroke width of the progress arc",
position = 9
position = 10
)
@Units(Units.PIXELS)
default int progressArcStrokeWidth()
@@ -152,7 +163,7 @@ public interface XpGlobesConfig extends Config
keyName = "Orb size",
name = "Size of orbs",
description = "Change the size of the xp orbs",
position = 10
position = 11
)
@Units(Units.PIXELS)
default int xpOrbSize()
@@ -164,7 +175,7 @@ public interface XpGlobesConfig extends Config
keyName = "Orb duration",
name = "Duration of orbs",
description = "Change the duration the xp orbs are visible",
position = 11
position = 12
)
@Units(Units.SECONDS)
default int xpOrbDuration()

View File

@@ -106,9 +106,17 @@ public class XpGlobesPlugin extends Plugin
return;
}
if (config.hideMaxed() && currentLevel >= Experience.MAX_REAL_LEVEL)
if (currentLevel >= Experience.MAX_REAL_LEVEL)
{
return;
if (config.hideMaxed())
{
return;
}
if (config.showVirtualLevel())
{
currentLevel = Experience.getLevelForXp(currentXp);
}
}
if (cachedGlobe != null)

View File

@@ -159,8 +159,8 @@ class XpState
}
/**
* Update number of actions performed for skill (e.g amount of kills in this case) if last interacted
* NPC died
* Update number of actions performed for skill if last interacted NPC died.
* (eg. amount of kills in this case)
* @param skill skill to update actions for
* @param npc npc that just died
* @param npcHealth max health of npc that just died

View File

@@ -24,17 +24,25 @@
*/
package net.runelite.client.ui;
import javax.swing.text.StyleContext;
import java.awt.Font;
import java.awt.FontFormatException;
import java.awt.GraphicsEnvironment;
import java.io.IOException;
import javax.swing.text.StyleContext;
import lombok.Getter;
public class FontManager
{
@Getter
private static final Font runescapeFont;
@Getter
private static final Font runescapeSmallFont;
@Getter
private static final Font runescapeBoldFont;
@Getter
private static final Font defaultFont;
@Getter
private static final Font defaultBoldFont;
static
{
@@ -48,7 +56,7 @@ public class FontManager
ge.registerFont(font);
runescapeFont = StyleContext.getDefaultStyleContext()
.getFont(font.getName(), Font.PLAIN, 16);
.getFont(font.getName(), Font.PLAIN, 16);
ge.registerFont(runescapeFont);
Font smallFont = Font.createFont(Font.TRUETYPE_FONT,
@@ -57,16 +65,16 @@ public class FontManager
ge.registerFont(smallFont);
runescapeSmallFont = StyleContext.getDefaultStyleContext()
.getFont(smallFont.getName(), Font.PLAIN, 16);
.getFont(smallFont.getName(), Font.PLAIN, 16);
ge.registerFont(runescapeSmallFont);
Font boldFont = Font.createFont(Font.TRUETYPE_FONT,
FontManager.class.getResourceAsStream("runescape_bold.ttf"))
.deriveFont(Font.BOLD, 16);
FontManager.class.getResourceAsStream("runescape_bold.ttf"))
.deriveFont(Font.BOLD, 16);
ge.registerFont(boldFont);
runescapeBoldFont = StyleContext.getDefaultStyleContext()
.getFont(boldFont.getName(), Font.BOLD, 16);
.getFont(boldFont.getName(), Font.BOLD, 16);
ge.registerFont(runescapeBoldFont);
}
catch (FontFormatException ex)
@@ -77,20 +85,8 @@ public class FontManager
{
throw new RuntimeException("Font file not found.", ex);
}
}
public static Font getRunescapeFont()
{
return runescapeFont;
}
public static Font getRunescapeSmallFont()
{
return runescapeSmallFont;
}
public static Font getRunescapeBoldFont()
{
return runescapeBoldFont;
defaultFont = new Font(Font.DIALOG, Font.PLAIN, 16);
defaultBoldFont = new Font(Font.DIALOG, Font.BOLD, 16);
}
}

View File

@@ -29,6 +29,7 @@ package net.runelite.client.ui.components;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
@@ -125,7 +126,7 @@ public class IconTextField extends JPanel
textField.addMouseListener(hoverEffect);
innerTxt.addMouseListener(hoverEffect);
clearButton = createRHSButton(ColorScheme.PROGRESS_ERROR_COLOR, Color.PINK);
clearButton = createRHSButton(ColorScheme.PROGRESS_ERROR_COLOR, Color.PINK, FontManager.getRunescapeBoldFont());
clearButton.setText("×");
clearButton.addActionListener(evt ->
{
@@ -192,7 +193,7 @@ public class IconTextField extends JPanel
}
});
suggestionButton = createRHSButton(ColorScheme.LIGHT_GRAY_COLOR, ColorScheme.MEDIUM_GRAY_COLOR);
suggestionButton = createRHSButton(ColorScheme.LIGHT_GRAY_COLOR, ColorScheme.MEDIUM_GRAY_COLOR, FontManager.getDefaultBoldFont());
suggestionButton.setText("");
suggestionButton.addActionListener(e ->
{
@@ -237,11 +238,11 @@ public class IconTextField extends JPanel
add(rhsButtons, BorderLayout.EAST);
}
private JButton createRHSButton(Color fg, Color rollover)
private JButton createRHSButton(Color fg, Color rollover, Font font)
{
JButton b = new JButton();
b.setPreferredSize(new Dimension(30, 0));
b.setFont(FontManager.getRunescapeBoldFont());
b.setFont(font);
b.setBorder(null);
b.setRolloverEnabled(true);
SwingUtil.removeButtonDecorations(b);

View File

@@ -28,6 +28,7 @@ import com.google.common.base.MoreObjects;
import com.google.common.base.Strings;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Point;
@@ -50,6 +51,10 @@ public class LineComponent implements LayoutableRenderableEntity
@Builder.Default
private Color rightColor = Color.WHITE;
private Font leftFont;
private Font rightFont;
@Builder.Default
private Point preferredLocation = new Point();
@@ -67,13 +72,16 @@ public class LineComponent implements LayoutableRenderableEntity
final String left = MoreObjects.firstNonNull(this.left, "");
final String right = MoreObjects.firstNonNull(this.right, "");
final FontMetrics metrics = graphics.getFontMetrics();
final Font leftFont = MoreObjects.firstNonNull(this.leftFont, graphics.getFont());
final Font rightFont = MoreObjects.firstNonNull(this.rightFont, graphics.getFont());
final FontMetrics lfm = graphics.getFontMetrics(leftFont), rfm = graphics.getFontMetrics(rightFont);
final int fmHeight = Math.max(lfm.getHeight(), rfm.getHeight());
final int baseX = preferredLocation.x;
final int baseY = preferredLocation.y + metrics.getHeight();
final int baseY = preferredLocation.y + fmHeight;
int x = baseX;
int y = baseY;
final int leftFullWidth = getLineWidth(left, metrics);
final int rightFullWidth = getLineWidth(right, metrics);
final int leftFullWidth = getLineWidth(left, lfm);
final int rightFullWidth = getLineWidth(right, rfm);
final TextComponent textComponent = new TextComponent();
if (preferredSize.width < leftFullWidth + rightFullWidth)
@@ -87,8 +95,8 @@ public class LineComponent implements LayoutableRenderableEntity
leftSmallWidth -= rightSmallWidth;
}
final String[] leftSplitLines = lineBreakText(left, leftSmallWidth, metrics);
final String[] rightSplitLines = lineBreakText(right, rightSmallWidth, metrics);
final String[] leftSplitLines = lineBreakText(left, leftSmallWidth, lfm);
final String[] rightSplitLines = lineBreakText(right, rightSmallWidth, rfm);
int lineCount = Math.max(leftSplitLines.length, rightSplitLines.length);
@@ -100,19 +108,21 @@ public class LineComponent implements LayoutableRenderableEntity
textComponent.setPosition(new Point(x, y));
textComponent.setText(leftText);
textComponent.setColor(leftColor);
textComponent.setFont(leftFont);
textComponent.render(graphics);
}
if (i < rightSplitLines.length)
{
final String rightText = rightSplitLines[i];
textComponent.setPosition(new Point(x + preferredSize.width - getLineWidth(rightText, metrics), y));
textComponent.setPosition(new Point(x + preferredSize.width - getLineWidth(rightText, rfm), y));
textComponent.setText(rightText);
textComponent.setColor(rightColor);
textComponent.setFont(rightFont);
textComponent.render(graphics);
}
y += metrics.getHeight();
y += fmHeight;
}
final Dimension dimension = new Dimension(preferredSize.width, y - baseY);
@@ -126,6 +136,7 @@ public class LineComponent implements LayoutableRenderableEntity
textComponent.setPosition(new Point(x, y));
textComponent.setText(left);
textComponent.setColor(leftColor);
textComponent.setFont(leftFont);
textComponent.render(graphics);
}
@@ -134,10 +145,11 @@ public class LineComponent implements LayoutableRenderableEntity
textComponent.setPosition(new Point(x + preferredSize.width - rightFullWidth, y));
textComponent.setText(right);
textComponent.setColor(rightColor);
textComponent.setFont(rightFont);
textComponent.render(graphics);
}
y += metrics.getHeight();
y += fmHeight;
final Dimension dimension = new Dimension(preferredSize.width, y - baseY);
bounds.setLocation(preferredLocation);

View File

@@ -26,10 +26,12 @@ package net.runelite.client.ui.overlay.components;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
import lombok.Setter;
import net.runelite.client.ui.overlay.RenderableEntity;
import net.runelite.client.util.ColorUtil;
@@ -45,10 +47,22 @@ public class TextComponent implements RenderableEntity
private Point position = new Point();
private Color color = Color.WHITE;
private boolean outline;
/**
* The text font.
*/
@Nullable
private Font font;
@Override
public Dimension render(Graphics2D graphics)
{
Font originalFont = null;
if (font != null)
{
originalFont = graphics.getFont();
graphics.setFont(font);
}
final FontMetrics fontMetrics = graphics.getFontMetrics();
if (COL_TAG_PATTERN_W_LOOKAHEAD.matcher(text).find())
@@ -105,6 +119,14 @@ public class TextComponent implements RenderableEntity
graphics.drawString(text, position.x, position.y);
}
return new Dimension(fontMetrics.stringWidth(text), fontMetrics.getHeight());
int width = fontMetrics.stringWidth(text);
int height = fontMetrics.getHeight();
if (originalFont != null)
{
graphics.setFont(originalFont);
}
return new Dimension(width, height);
}
}

View File

@@ -26,6 +26,7 @@
package net.runelite.client.util;
import com.google.common.base.Strings;
import com.google.gson.Gson;
import java.awt.Toolkit;
import java.awt.TrayIcon;
import java.awt.datatransfer.Clipboard;
@@ -54,7 +55,6 @@ import net.runelite.api.GameState;
import net.runelite.api.WorldType;
import net.runelite.client.Notifier;
import static net.runelite.client.RuneLite.SCREENSHOT_DIR;
import net.runelite.http.api.RuneLiteAPI;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.HttpUrl;
@@ -75,6 +75,7 @@ public class ImageCapture
private final Client client;
private final Notifier notifier;
private final OkHttpClient okHttpClient;
private final Gson gson;
private final String imgurClientId;
@Inject
@@ -82,12 +83,14 @@ public class ImageCapture
final Client client,
final Notifier notifier,
final OkHttpClient okHttpClient,
final Gson gson,
@Named("runelite.imgur.client.id") final String imgurClientId
)
{
this.client = client;
this.notifier = notifier;
this.okHttpClient = okHttpClient;
this.gson = gson;
this.imgurClientId = imgurClientId;
}
@@ -204,7 +207,7 @@ public class ImageCapture
*/
private void uploadScreenshot(File screenshotFile, boolean notify) throws IOException
{
String json = RuneLiteAPI.GSON.toJson(new ImageUploadRequest(screenshotFile));
String json = gson.toJson(new ImageUploadRequest(screenshotFile));
Request request = new Request.Builder()
.url(IMGUR_IMAGE_UPLOAD_URL)
@@ -225,8 +228,8 @@ public class ImageCapture
{
try (InputStream in = response.body().byteStream())
{
ImageUploadResponse imageUploadResponse = RuneLiteAPI.GSON
.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), ImageUploadResponse.class);
ImageUploadResponse imageUploadResponse =
gson.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), ImageUploadResponse.class);
if (imageUploadResponse.isSuccess())
{

View File

@@ -397,8 +397,9 @@ public class ImageUtil
{
for (int y = 0; y < filledImage.getHeight(); y++)
{
final Color pixelColor = new Color(image.getRGB(x, y), true);
if (pixelColor.getAlpha() == 0)
int pixel = image.getRGB(x, y);
int a = pixel >>> 24;
if (a == 0)
{
continue;
}

View File

@@ -182,7 +182,7 @@ public class QuantityFormatter
}
/**
* Calculates, given a string with a value denominator (ex. 20K)
* Calculates, given a string with a value denominator (for example, 20K)
* the multiplier that the denominator represents (in this case 1000).
*
* @param string The string to check.

View File

@@ -25,6 +25,8 @@
*/
package net.runelite.client.util;
import com.google.common.io.ByteStreams;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -36,7 +38,7 @@ public class ReflectUtil
{
}
public static MethodHandles.Lookup privateLookupIn(Class clazz)
public static MethodHandles.Lookup privateLookupIn(Class<?> clazz)
{
try
{
@@ -44,7 +46,16 @@ public class ReflectUtil
// we need to access it via reflection. This is preferred way because it's Java 9+ public api and is
// likely to not change
final Method privateLookupIn = MethodHandles.class.getMethod("privateLookupIn", Class.class, MethodHandles.Lookup.class);
return (MethodHandles.Lookup) privateLookupIn.invoke(null, clazz, MethodHandles.lookup());
MethodHandles.Lookup caller;
if (clazz.getClassLoader() instanceof PrivateLookupableClassLoader)
{
caller = ((PrivateLookupableClassLoader) clazz.getClassLoader()).getLookup();
}
else
{
caller = MethodHandles.lookup();
}
return (MethodHandles.Lookup) privateLookupIn.invoke(null, clazz, caller);
}
catch (InvocationTargetException | IllegalAccessException e)
{
@@ -69,4 +80,51 @@ public class ReflectUtil
}
}
}
public interface PrivateLookupableClassLoader
{
// define class is protected final so this needs a different name to become public
Class<?> defineClass0(String name, byte[] b, int off, int len) throws ClassFormatError;
MethodHandles.Lookup getLookup();
void setLookup(MethodHandles.Lookup lookup);
}
/**
* Allows private Lookups to be created for classes in this ClassLoader
* <p>
* Due to JDK-8173978 it is impossible to create get a lookup with module scoped permissions when teleporting
* between modules. Since external plugins are loaded in a separate classloader to us they are contained in unique
* unnamed modules. Since we (via LambdaMetafactory) are creating a hidden class in that module, we require module
* scoped access to it, and since the methods can be private, we also require private access. The only way to get
* MODULE|PRIVATE is to either 1) invokedynamic in that class, 2) call MethodHandles.lookup() from that class, or
* 3) call privateLookupIn with an existing lookup with PRIVATE|MODULE created from a class in the same module.
* Our solution is to make classloaders call this method which will define a class in the classloader's unnamed
* module that calls MethodHandles.lookup() and stores it in the classloader for later use.
*/
public static void installLookupHelper(PrivateLookupableClassLoader cl)
{
try
{
String name = PrivateLookupHelper.class.getName();
byte[] classData = ByteStreams.toByteArray(ReflectUtil.class.getResourceAsStream("/" + name.replace('.', '/') + ".class"));
Class<?> clazz = cl.defineClass0(name, classData, 0, classData.length);
// force <clinit> to run
clazz.getConstructor().newInstance();
}
catch (IOException | ReflectiveOperationException e)
{
throw new RuntimeException("unable to install lookup helper", e);
}
}
public static class PrivateLookupHelper
{
static
{
PrivateLookupableClassLoader pcl = (PrivateLookupableClassLoader) PrivateLookupHelper.class.getClassLoader();
pcl.setLookup(MethodHandles.lookup());
}
}
}

View File

@@ -2727,6 +2727,10 @@
2464,
8936
],
"black dhide vambraces": [
2491,
25494
],
"blue dhide chaps": [
2493,
7382,
@@ -2743,7 +2747,8 @@
2497,
12383,
12387,
20424
20424,
25493
],
"blue dhide body": [
2499,
@@ -2761,7 +2766,8 @@
2503,
12381,
12385,
20423
20423,
25492
],
"dragon chainbody": [
2513,
@@ -7760,7 +7766,15 @@
],
"toxic blowpipe": [
12924,
12926
12926,
25484,
25485,
25486,
25487,
25488,
25489,
25490,
25491
],
"serpentine helm": [
12929,
@@ -9240,21 +9254,24 @@
23887,
23888,
23971,
23973
23973,
25495
],
"crystal body": [
23889,
23890,
23891,
23975,
23977
23977,
25496
],
"crystal legs": [
23892,
23893,
23894,
23979,
23981
23981,
25497
],
"crystal staff": [
23898,
@@ -9623,10 +9640,6 @@
25319,
25338
],
"gnome child": [
25320,
25321
],
"soul cape": [
25344,
25346
@@ -9635,5 +9648,25 @@
25380,
25383,
25386
],
"bronze coffin": [
25459,
25469
],
"steel coffin": [
25461,
25470
],
"black coffin": [
25463,
25471
],
"silver coffin": [
25465,
25472
],
"gold coffin": [
25467,
25473
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 958 B

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 969 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 697 B

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 745 B

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 952 B

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 985 B

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 910 B

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 998 B

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 977 B

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 881 B

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 697 B

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 B

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 697 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 890 B

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 904 B

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 B

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 848 B

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 800 B

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 363 B

Some files were not shown because too many files have changed in this diff Show More