Merge remote-tracking branch 'upstream/master'
@@ -26,7 +26,7 @@ public class GenerateClasses
|
||||
)
|
||||
.withTarget(new Target()
|
||||
.withPackageName("net.runelite.client.database.data")
|
||||
.withDirectory("runelite-client/src/main/java/net/runelite/client/database/data")
|
||||
.withDirectory("runelite-client/src/main/java/")
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ package net.runelite.client.database.data;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.impl.CatalogImpl;
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.jooq.impl.CatalogImpl;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -26,7 +26,7 @@ import org.jooq.impl.CatalogImpl;
|
||||
public class DefaultCatalog extends CatalogImpl
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 836257769;
|
||||
private static final long serialVersionUID = -102989253;
|
||||
|
||||
/**
|
||||
* The reference instance of <code></code>
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
package net.runelite.client.database.data;
|
||||
|
||||
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.tables.Loottrackerevents;
|
||||
import net.runelite.client.database.data.tables.Loottrackerlink;
|
||||
import net.runelite.client.database.data.tables.Loottrackerloot;
|
||||
import net.runelite.client.database.data.tables.TmorphSets;
|
||||
import net.runelite.client.database.data.tables.User;
|
||||
import org.jooq.Index;
|
||||
import org.jooq.OrderField;
|
||||
@@ -20,7 +21,7 @@ import org.jooq.impl.Internal;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -33,11 +34,13 @@ public class Indexes
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public static final Index PRIMARY_KEY_B = Indexes0.PRIMARY_KEY_B;
|
||||
public static final Index FK_LOOTTRACKERDROP_INDEX_6 = Indexes0.FK_LOOTTRACKERDROP_INDEX_6;
|
||||
public static final Index FK_LOOTTRACKEREVENT_INDEX_6 = Indexes0.FK_LOOTTRACKEREVENT_INDEX_6;
|
||||
public static final Index FK_LOOTTRACKERLOOT_INDEX_6 = Indexes0.FK_LOOTTRACKERLOOT_INDEX_6;
|
||||
public static final Index PRIMARY_KEY_6B = Indexes0.PRIMARY_KEY_6B;
|
||||
public static final Index FK_USER_INDEX_6 = Indexes0.FK_USER_INDEX_6;
|
||||
public static final Index PRIMARY_KEY_6 = Indexes0.PRIMARY_KEY_6;
|
||||
public static final Index TMORPH_SETS_SET_NAME_UINDEX = Indexes0.TMORPH_SETS_SET_NAME_UINDEX;
|
||||
public static final Index PRIMARY_KEY_2 = Indexes0.PRIMARY_KEY_2;
|
||||
public static final Index UN_USERNAME_INDEX_2 = Indexes0.UN_USERNAME_INDEX_2;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// [#1459] distribute members to avoid static initialisers > 64kb
|
||||
@@ -46,10 +49,12 @@ public class Indexes
|
||||
private static class Indexes0
|
||||
{
|
||||
public static Index PRIMARY_KEY_B = Internal.createIndex("PRIMARY_KEY_B", Loottrackerevents.LOOTTRACKEREVENTS, new OrderField[]{Loottrackerevents.LOOTTRACKEREVENTS.UNIQUEID}, true);
|
||||
public static Index FK_LOOTTRACKERDROP_INDEX_6 = Internal.createIndex("FK_LOOTTRACKERDROP_INDEX_6", Loottrackerlink.LOOTTRACKERLINK, new OrderField[]{Loottrackerlink.LOOTTRACKERLINK.DROPUNIQUEID}, false);
|
||||
public static Index FK_LOOTTRACKEREVENT_INDEX_6 = Internal.createIndex("FK_LOOTTRACKEREVENT_INDEX_6", Loottrackerlink.LOOTTRACKERLINK, new OrderField[]{Loottrackerlink.LOOTTRACKERLINK.EVENTUNIQUEID}, false);
|
||||
public static Index FK_LOOTTRACKERLOOT_INDEX_6 = Internal.createIndex("FK_LOOTTRACKERLOOT_INDEX_6", Loottrackerlink.LOOTTRACKERLINK, new OrderField[]{Loottrackerlink.LOOTTRACKERLINK.DROPUNIQUEID}, false);
|
||||
public static Index PRIMARY_KEY_6B = Internal.createIndex("PRIMARY_KEY_6B", Loottrackerlink.LOOTTRACKERLINK, new OrderField[]{Loottrackerlink.LOOTTRACKERLINK.LINKUNIQUEID}, true);
|
||||
public static Index FK_USER_INDEX_6 = Internal.createIndex("FK_USER_INDEX_6", Loottrackerlink.LOOTTRACKERLINK, new OrderField[]{Loottrackerlink.LOOTTRACKERLINK.USERUNIQUEID}, false);
|
||||
public static Index PRIMARY_KEY_6 = Internal.createIndex("PRIMARY_KEY_6", Loottrackerloot.LOOTTRACKERLOOT, new OrderField[]{Loottrackerloot.LOOTTRACKERLOOT.UNIQUEID}, true);
|
||||
public static Index TMORPH_SETS_SET_NAME_UINDEX = Internal.createIndex("TMORPH_SETS_SET_NAME_UINDEX", TmorphSets.TMORPH_SETS, new OrderField[]{TmorphSets.TMORPH_SETS.SET_NAME}, true);
|
||||
public static Index PRIMARY_KEY_2 = Internal.createIndex("PRIMARY_KEY_2", User.USER, new OrderField[]{User.USER.UNIQUEID}, true);
|
||||
public static Index UN_USERNAME_INDEX_2 = Internal.createIndex("UN_USERNAME_INDEX_2", User.USER, new OrderField[]{User.USER.USERNAME}, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package net.runelite.client.database.data;
|
||||
|
||||
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.tables.Loottrackerevents;
|
||||
import net.runelite.client.database.data.tables.Loottrackerlink;
|
||||
import net.runelite.client.database.data.tables.Loottrackerloot;
|
||||
@@ -25,7 +25,7 @@ import org.jooq.impl.Internal;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -42,17 +42,17 @@ public class Keys
|
||||
// UNIQUE and PRIMARY KEY definitions
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public static final UniqueKey<LoottrackereventsRecord> PK_EVENTUNIQUEID = UniqueKeys0.PK_EVENTUNIQUEID;
|
||||
public static final UniqueKey<LoottrackerlinkRecord> PK_LOOTTRACKERLINK = UniqueKeys0.PK_LOOTTRACKERLINK;
|
||||
public static final UniqueKey<LoottrackerlootRecord> PK_LOOTUNIQUEID = UniqueKeys0.PK_LOOTUNIQUEID;
|
||||
public static final UniqueKey<LoottrackereventsRecord> PK_LOOTTRACKEREVENTS = UniqueKeys0.PK_LOOTTRACKEREVENTS;
|
||||
public static final UniqueKey<LoottrackerlootRecord> PK_LOOTTRACKERDROPS = UniqueKeys0.PK_LOOTTRACKERDROPS;
|
||||
public static final UniqueKey<UserRecord> PK_USER = UniqueKeys0.PK_USER;
|
||||
public static final UniqueKey<UserRecord> UN_USERNAME = UniqueKeys0.UN_USERNAME;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// FOREIGN KEY definitions
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public static final ForeignKey<LoottrackerlinkRecord, LoottrackereventsRecord> FK_LOOTTRACKEREVENT = ForeignKeys0.FK_LOOTTRACKEREVENT;
|
||||
public static final ForeignKey<LoottrackerlinkRecord, LoottrackerlootRecord> FK_LOOTTRACKERLOOT = ForeignKeys0.FK_LOOTTRACKERLOOT;
|
||||
public static final ForeignKey<LoottrackerlinkRecord, LoottrackerlootRecord> FK_LOOTTRACKERDROP = ForeignKeys0.FK_LOOTTRACKERDROP;
|
||||
public static final ForeignKey<LoottrackerlinkRecord, UserRecord> FK_USER = ForeignKeys0.FK_USER;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
@@ -61,16 +61,16 @@ public class Keys
|
||||
|
||||
private static class UniqueKeys0
|
||||
{
|
||||
public static final UniqueKey<LoottrackereventsRecord> PK_EVENTUNIQUEID = Internal.createUniqueKey(Loottrackerevents.LOOTTRACKEREVENTS, "PK_EVENTUNIQUEID", Loottrackerevents.LOOTTRACKEREVENTS.UNIQUEID);
|
||||
public static final UniqueKey<LoottrackerlinkRecord> PK_LOOTTRACKERLINK = Internal.createUniqueKey(Loottrackerlink.LOOTTRACKERLINK, "PK_LOOTTRACKERLINK", Loottrackerlink.LOOTTRACKERLINK.LINKUNIQUEID);
|
||||
public static final UniqueKey<LoottrackerlootRecord> PK_LOOTUNIQUEID = Internal.createUniqueKey(Loottrackerloot.LOOTTRACKERLOOT, "PK_LOOTUNIQUEID", Loottrackerloot.LOOTTRACKERLOOT.UNIQUEID);
|
||||
public static final UniqueKey<LoottrackereventsRecord> PK_LOOTTRACKEREVENTS = Internal.createUniqueKey(Loottrackerevents.LOOTTRACKEREVENTS, "PK_LOOTTRACKEREVENTS", Loottrackerevents.LOOTTRACKEREVENTS.UNIQUEID);
|
||||
public static final UniqueKey<LoottrackerlootRecord> PK_LOOTTRACKERDROPS = Internal.createUniqueKey(Loottrackerloot.LOOTTRACKERLOOT, "PK_LOOTTRACKERDROPS", Loottrackerloot.LOOTTRACKERLOOT.UNIQUEID);
|
||||
public static final UniqueKey<UserRecord> PK_USER = Internal.createUniqueKey(User.USER, "PK_USER", User.USER.UNIQUEID);
|
||||
public static final UniqueKey<UserRecord> UN_USERNAME = Internal.createUniqueKey(User.USER, "UN_USERNAME", User.USER.USERNAME);
|
||||
}
|
||||
|
||||
private static class ForeignKeys0
|
||||
{
|
||||
public static final ForeignKey<LoottrackerlinkRecord, LoottrackereventsRecord> FK_LOOTTRACKEREVENT = Internal.createForeignKey(net.runelite.client.database.data.Keys.PK_EVENTUNIQUEID, Loottrackerlink.LOOTTRACKERLINK, "FK_LOOTTRACKEREVENT", Loottrackerlink.LOOTTRACKERLINK.EVENTUNIQUEID);
|
||||
public static final ForeignKey<LoottrackerlinkRecord, LoottrackerlootRecord> FK_LOOTTRACKERLOOT = Internal.createForeignKey(net.runelite.client.database.data.Keys.PK_LOOTUNIQUEID, Loottrackerlink.LOOTTRACKERLINK, "FK_LOOTTRACKERLOOT", Loottrackerlink.LOOTTRACKERLINK.DROPUNIQUEID);
|
||||
public static final ForeignKey<LoottrackerlinkRecord, UserRecord> FK_USER = Internal.createForeignKey(net.runelite.client.database.data.Keys.PK_USER, Loottrackerlink.LOOTTRACKERLINK, "FK_USER", Loottrackerlink.LOOTTRACKERLINK.DROPUNIQUEID);
|
||||
public static final ForeignKey<LoottrackerlinkRecord, LoottrackereventsRecord> FK_LOOTTRACKEREVENT = Internal.createForeignKey(net.runelite.client.database.data.Keys.PK_LOOTTRACKEREVENTS, Loottrackerlink.LOOTTRACKERLINK, "FK_LOOTTRACKEREVENT", Loottrackerlink.LOOTTRACKERLINK.EVENTUNIQUEID);
|
||||
public static final ForeignKey<LoottrackerlinkRecord, LoottrackerlootRecord> FK_LOOTTRACKERDROP = Internal.createForeignKey(net.runelite.client.database.data.Keys.PK_LOOTTRACKERDROPS, Loottrackerlink.LOOTTRACKERLINK, "FK_LOOTTRACKERDROP", Loottrackerlink.LOOTTRACKERLINK.DROPUNIQUEID);
|
||||
public static final ForeignKey<LoottrackerlinkRecord, UserRecord> FK_USER = Internal.createForeignKey(net.runelite.client.database.data.Keys.PK_USER, Loottrackerlink.LOOTTRACKERLINK, "FK_USER", Loottrackerlink.LOOTTRACKERLINK.USERUNIQUEID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,11 @@ package net.runelite.client.database.data;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.tables.Loottrackerevents;
|
||||
import net.runelite.client.database.data.tables.Loottrackerlink;
|
||||
import net.runelite.client.database.data.tables.Loottrackerloot;
|
||||
import net.runelite.client.database.data.tables.TmorphSets;
|
||||
import net.runelite.client.database.data.tables.User;
|
||||
import org.jooq.Catalog;
|
||||
import org.jooq.Table;
|
||||
@@ -23,7 +24,7 @@ import org.jooq.impl.SchemaImpl;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -31,7 +32,7 @@ import org.jooq.impl.SchemaImpl;
|
||||
public class Public extends SchemaImpl
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1499404561;
|
||||
private static final long serialVersionUID = 1268129010;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>PUBLIC</code>
|
||||
@@ -53,6 +54,11 @@ public class Public extends SchemaImpl
|
||||
*/
|
||||
public final Loottrackerloot LOOTTRACKERLOOT = net.runelite.client.database.data.tables.Loottrackerloot.LOOTTRACKERLOOT;
|
||||
|
||||
/**
|
||||
* The table <code>PUBLIC.TMORPH_SETS</code>.
|
||||
*/
|
||||
public final TmorphSets TMORPH_SETS = net.runelite.client.database.data.tables.TmorphSets.TMORPH_SETS;
|
||||
|
||||
/**
|
||||
* The table <code>PUBLIC.USER</code>.
|
||||
*/
|
||||
@@ -67,9 +73,6 @@ public class Public extends SchemaImpl
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Catalog getCatalog()
|
||||
{
|
||||
@@ -90,6 +93,7 @@ public class Public extends SchemaImpl
|
||||
Loottrackerevents.LOOTTRACKEREVENTS,
|
||||
Loottrackerlink.LOOTTRACKERLINK,
|
||||
Loottrackerloot.LOOTTRACKERLOOT,
|
||||
TmorphSets.TMORPH_SETS,
|
||||
User.USER);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
package net.runelite.client.database.data;
|
||||
|
||||
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.tables.Loottrackerevents;
|
||||
import net.runelite.client.database.data.tables.Loottrackerlink;
|
||||
import net.runelite.client.database.data.tables.Loottrackerloot;
|
||||
import net.runelite.client.database.data.tables.TmorphSets;
|
||||
import net.runelite.client.database.data.tables.User;
|
||||
|
||||
|
||||
@@ -17,7 +18,7 @@ import net.runelite.client.database.data.tables.User;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -28,20 +29,25 @@ public class Tables
|
||||
/**
|
||||
* The table <code>PUBLIC.LOOTTRACKEREVENTS</code>.
|
||||
*/
|
||||
public static final Loottrackerevents LOOTTRACKEREVENTS = net.runelite.client.database.data.tables.Loottrackerevents.LOOTTRACKEREVENTS;
|
||||
public static final Loottrackerevents LOOTTRACKEREVENTS = Loottrackerevents.LOOTTRACKEREVENTS;
|
||||
|
||||
/**
|
||||
* The table <code>PUBLIC.LOOTTRACKERLINK</code>.
|
||||
*/
|
||||
public static final Loottrackerlink LOOTTRACKERLINK = net.runelite.client.database.data.tables.Loottrackerlink.LOOTTRACKERLINK;
|
||||
public static final Loottrackerlink LOOTTRACKERLINK = Loottrackerlink.LOOTTRACKERLINK;
|
||||
|
||||
/**
|
||||
* The table <code>PUBLIC.LOOTTRACKERLOOT</code>.
|
||||
*/
|
||||
public static final Loottrackerloot LOOTTRACKERLOOT = net.runelite.client.database.data.tables.Loottrackerloot.LOOTTRACKERLOOT;
|
||||
public static final Loottrackerloot LOOTTRACKERLOOT = Loottrackerloot.LOOTTRACKERLOOT;
|
||||
|
||||
/**
|
||||
* The table <code>PUBLIC.TMORPH_SETS</code>.
|
||||
*/
|
||||
public static final TmorphSets TMORPH_SETS = TmorphSets.TMORPH_SETS;
|
||||
|
||||
/**
|
||||
* The table <code>PUBLIC.USER</code>.
|
||||
*/
|
||||
public static final User USER = net.runelite.client.database.data.tables.User.USER;
|
||||
public static final User USER = User.USER;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.sql.Timestamp;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.Indexes;
|
||||
import net.runelite.client.database.data.Keys;
|
||||
import net.runelite.client.database.data.Public;
|
||||
@@ -18,6 +18,7 @@ import org.jooq.ForeignKey;
|
||||
import org.jooq.Index;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Row4;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
@@ -32,7 +33,7 @@ import org.jooq.impl.TableImpl;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -40,7 +41,7 @@ import org.jooq.impl.TableImpl;
|
||||
public class Loottrackerevents extends TableImpl<LoottrackereventsRecord>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -824670812;
|
||||
private static final long serialVersionUID = 1578403652;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>PUBLIC.LOOTTRACKEREVENTS</code>
|
||||
@@ -59,22 +60,22 @@ public class Loottrackerevents extends TableImpl<LoottrackereventsRecord>
|
||||
/**
|
||||
* The column <code>PUBLIC.LOOTTRACKEREVENTS.UNIQUEID</code>.
|
||||
*/
|
||||
public final TableField<LoottrackereventsRecord, UUID> UNIQUEID = createField("UNIQUEID", org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
public final TableField<LoottrackereventsRecord, UUID> UNIQUEID = createField(DSL.name("UNIQUEID"), org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.LOOTTRACKEREVENTS.EVENTID</code>.
|
||||
*/
|
||||
public final TableField<LoottrackereventsRecord, String> EVENTID = createField("EVENTID", org.jooq.impl.SQLDataType.VARCHAR(255).nullable(false), this, "");
|
||||
public final TableField<LoottrackereventsRecord, String> EVENTID = createField(DSL.name("EVENTID"), org.jooq.impl.SQLDataType.VARCHAR(255).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.LOOTTRACKEREVENTS.TYPE</code>.
|
||||
*/
|
||||
public final TableField<LoottrackereventsRecord, String> TYPE = createField("TYPE", org.jooq.impl.SQLDataType.VARCHAR(255).nullable(false), this, "");
|
||||
public final TableField<LoottrackereventsRecord, String> TYPE = createField(DSL.name("TYPE"), org.jooq.impl.SQLDataType.VARCHAR(255).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.LOOTTRACKEREVENTS.TIME</code>.
|
||||
*/
|
||||
public final TableField<LoottrackereventsRecord, Timestamp> TIME = createField("TIME", org.jooq.impl.SQLDataType.TIMESTAMP.precision(6).nullable(false), this, "");
|
||||
public final TableField<LoottrackereventsRecord, Timestamp> TIME = createField(DSL.name("TIME"), org.jooq.impl.SQLDataType.TIMESTAMP.precision(6).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create a <code>PUBLIC.LOOTTRACKEREVENTS</code> table reference
|
||||
@@ -115,54 +116,36 @@ public class Loottrackerevents extends TableImpl<LoottrackereventsRecord>
|
||||
super(child, key, LOOTTRACKEREVENTS);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Schema getSchema()
|
||||
{
|
||||
return Public.PUBLIC;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<Index> getIndexes()
|
||||
{
|
||||
return Arrays.<Index>asList(Indexes.PRIMARY_KEY_B);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UniqueKey<LoottrackereventsRecord> getPrimaryKey()
|
||||
{
|
||||
return Keys.PK_EVENTUNIQUEID;
|
||||
return Keys.PK_LOOTTRACKEREVENTS;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<UniqueKey<LoottrackereventsRecord>> getKeys()
|
||||
{
|
||||
return Arrays.<UniqueKey<LoottrackereventsRecord>>asList(Keys.PK_EVENTUNIQUEID);
|
||||
return Arrays.<UniqueKey<LoottrackereventsRecord>>asList(Keys.PK_LOOTTRACKEREVENTS);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Loottrackerevents as(String alias)
|
||||
{
|
||||
return new Loottrackerevents(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Loottrackerevents as(Name alias)
|
||||
{
|
||||
@@ -186,4 +169,14 @@ public class Loottrackerevents extends TableImpl<LoottrackereventsRecord>
|
||||
{
|
||||
return new Loottrackerevents(name, null);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row4 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row4<UUID, String, String, Timestamp> fieldsRow()
|
||||
{
|
||||
return (Row4) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ package net.runelite.client.database.data.tables;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.Indexes;
|
||||
import net.runelite.client.database.data.Keys;
|
||||
import net.runelite.client.database.data.Public;
|
||||
@@ -17,10 +17,10 @@ import org.jooq.ForeignKey;
|
||||
import org.jooq.Index;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Row4;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.UniqueKey;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.jooq.impl.TableImpl;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -39,7 +39,7 @@ import org.jooq.impl.TableImpl;
|
||||
public class Loottrackerlink extends TableImpl<LoottrackerlinkRecord>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1145289106;
|
||||
private static final long serialVersionUID = -1694278583;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>PUBLIC.LOOTTRACKERLINK</code>
|
||||
@@ -58,22 +58,22 @@ public class Loottrackerlink extends TableImpl<LoottrackerlinkRecord>
|
||||
/**
|
||||
* The column <code>PUBLIC.LOOTTRACKERLINK.LINKUNIQUEID</code>.
|
||||
*/
|
||||
public final TableField<LoottrackerlinkRecord, UUID> LINKUNIQUEID = createField("LINKUNIQUEID", org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
public final TableField<LoottrackerlinkRecord, UUID> LINKUNIQUEID = createField(DSL.name("LINKUNIQUEID"), org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.LOOTTRACKERLINK.EVENTUNIQUEID</code>.
|
||||
*/
|
||||
public final TableField<LoottrackerlinkRecord, UUID> EVENTUNIQUEID = createField("EVENTUNIQUEID", org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
public final TableField<LoottrackerlinkRecord, UUID> EVENTUNIQUEID = createField(DSL.name("EVENTUNIQUEID"), org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.LOOTTRACKERLINK.DROPUNIQUEID</code>.
|
||||
*/
|
||||
public final TableField<LoottrackerlinkRecord, UUID> DROPUNIQUEID = createField("DROPUNIQUEID", org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
public final TableField<LoottrackerlinkRecord, UUID> DROPUNIQUEID = createField(DSL.name("DROPUNIQUEID"), org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.LOOTTRACKERLINK.USERUNIQUEID</code>.
|
||||
*/
|
||||
public final TableField<LoottrackerlinkRecord, UUID> USERUNIQUEID = createField("USERUNIQUEID", org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
public final TableField<LoottrackerlinkRecord, UUID> USERUNIQUEID = createField(DSL.name("USERUNIQUEID"), org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create a <code>PUBLIC.LOOTTRACKERLINK</code> table reference
|
||||
@@ -114,49 +114,22 @@ public class Loottrackerlink extends TableImpl<LoottrackerlinkRecord>
|
||||
super(child, key, LOOTTRACKERLINK);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Schema getSchema()
|
||||
{
|
||||
return Public.PUBLIC;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<Index> getIndexes()
|
||||
{
|
||||
return Arrays.<Index>asList(Indexes.FK_LOOTTRACKEREVENT_INDEX_6, Indexes.FK_LOOTTRACKERLOOT_INDEX_6, Indexes.PRIMARY_KEY_6B);
|
||||
return Arrays.<Index>asList(Indexes.FK_LOOTTRACKERDROP_INDEX_6, Indexes.FK_LOOTTRACKEREVENT_INDEX_6, Indexes.FK_USER_INDEX_6);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UniqueKey<LoottrackerlinkRecord> getPrimaryKey()
|
||||
{
|
||||
return Keys.PK_LOOTTRACKERLINK;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<UniqueKey<LoottrackerlinkRecord>> getKeys()
|
||||
{
|
||||
return Arrays.<UniqueKey<LoottrackerlinkRecord>>asList(Keys.PK_LOOTTRACKERLINK);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<ForeignKey<LoottrackerlinkRecord, ?>> getReferences()
|
||||
{
|
||||
return Arrays.<ForeignKey<LoottrackerlinkRecord, ?>>asList(Keys.FK_LOOTTRACKEREVENT, Keys.FK_LOOTTRACKERLOOT, Keys.FK_USER);
|
||||
return Arrays.<ForeignKey<LoottrackerlinkRecord, ?>>asList(Keys.FK_LOOTTRACKEREVENT, Keys.FK_LOOTTRACKERDROP, Keys.FK_USER);
|
||||
}
|
||||
|
||||
public Loottrackerevents loottrackerevents()
|
||||
@@ -166,7 +139,7 @@ public class Loottrackerlink extends TableImpl<LoottrackerlinkRecord>
|
||||
|
||||
public Loottrackerloot loottrackerloot()
|
||||
{
|
||||
return new Loottrackerloot(this, Keys.FK_LOOTTRACKERLOOT);
|
||||
return new Loottrackerloot(this, Keys.FK_LOOTTRACKERDROP);
|
||||
}
|
||||
|
||||
public User user()
|
||||
@@ -174,18 +147,12 @@ public class Loottrackerlink extends TableImpl<LoottrackerlinkRecord>
|
||||
return new User(this, Keys.FK_USER);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Loottrackerlink as(String alias)
|
||||
{
|
||||
return new Loottrackerlink(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Loottrackerlink as(Name alias)
|
||||
{
|
||||
@@ -209,4 +176,14 @@ public class Loottrackerlink extends TableImpl<LoottrackerlinkRecord>
|
||||
{
|
||||
return new Loottrackerlink(name, null);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row4 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row4<UUID, UUID, UUID, UUID> fieldsRow()
|
||||
{
|
||||
return (Row4) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ package net.runelite.client.database.data.tables;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.Indexes;
|
||||
import net.runelite.client.database.data.Keys;
|
||||
import net.runelite.client.database.data.Public;
|
||||
@@ -17,6 +17,7 @@ import org.jooq.ForeignKey;
|
||||
import org.jooq.Index;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Row3;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
@@ -31,7 +32,7 @@ import org.jooq.impl.TableImpl;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -39,7 +40,7 @@ import org.jooq.impl.TableImpl;
|
||||
public class Loottrackerloot extends TableImpl<LoottrackerlootRecord>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1952959378;
|
||||
private static final long serialVersionUID = 1461948279;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>PUBLIC.LOOTTRACKERLOOT</code>
|
||||
@@ -58,17 +59,17 @@ public class Loottrackerloot extends TableImpl<LoottrackerlootRecord>
|
||||
/**
|
||||
* The column <code>PUBLIC.LOOTTRACKERLOOT.UNIQUEID</code>.
|
||||
*/
|
||||
public final TableField<LoottrackerlootRecord, UUID> UNIQUEID = createField("UNIQUEID", org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
public final TableField<LoottrackerlootRecord, UUID> UNIQUEID = createField(DSL.name("UNIQUEID"), org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.LOOTTRACKERLOOT.ITEMID</code>.
|
||||
*/
|
||||
public final TableField<LoottrackerlootRecord, Integer> ITEMID = createField("ITEMID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
public final TableField<LoottrackerlootRecord, Integer> ITEMID = createField(DSL.name("ITEMID"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.LOOTTRACKERLOOT.QUANTITY</code>.
|
||||
*/
|
||||
public final TableField<LoottrackerlootRecord, Integer> QUANTITY = createField("QUANTITY", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
public final TableField<LoottrackerlootRecord, Integer> QUANTITY = createField(DSL.name("QUANTITY"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create a <code>PUBLIC.LOOTTRACKERLOOT</code> table reference
|
||||
@@ -109,54 +110,36 @@ public class Loottrackerloot extends TableImpl<LoottrackerlootRecord>
|
||||
super(child, key, LOOTTRACKERLOOT);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Schema getSchema()
|
||||
{
|
||||
return Public.PUBLIC;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<Index> getIndexes()
|
||||
{
|
||||
return Arrays.<Index>asList(Indexes.PRIMARY_KEY_6);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UniqueKey<LoottrackerlootRecord> getPrimaryKey()
|
||||
{
|
||||
return Keys.PK_LOOTUNIQUEID;
|
||||
return Keys.PK_LOOTTRACKERDROPS;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<UniqueKey<LoottrackerlootRecord>> getKeys()
|
||||
{
|
||||
return Arrays.<UniqueKey<LoottrackerlootRecord>>asList(Keys.PK_LOOTUNIQUEID);
|
||||
return Arrays.<UniqueKey<LoottrackerlootRecord>>asList(Keys.PK_LOOTTRACKERDROPS);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Loottrackerloot as(String alias)
|
||||
{
|
||||
return new Loottrackerloot(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Loottrackerloot as(Name alias)
|
||||
{
|
||||
@@ -180,4 +163,14 @@ public class Loottrackerloot extends TableImpl<LoottrackerlootRecord>
|
||||
{
|
||||
return new Loottrackerloot(name, null);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row3 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row3<UUID, Integer, Integer> fieldsRow()
|
||||
{
|
||||
return (Row3) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package net.runelite.client.database.data.tables;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.Indexes;
|
||||
import net.runelite.client.database.data.Public;
|
||||
import net.runelite.client.database.data.tables.records.TmorphSetsRecord;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.ForeignKey;
|
||||
import org.jooq.Index;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Row10;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.jooq.impl.TableImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@SuppressWarnings({"all", "unchecked", "rawtypes"})
|
||||
public class TmorphSets extends TableImpl<TmorphSetsRecord>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -2027086786;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>PUBLIC.TMORPH_SETS</code>
|
||||
*/
|
||||
public static final TmorphSets TMORPH_SETS = new TmorphSets();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public Class<TmorphSetsRecord> getRecordType()
|
||||
{
|
||||
return TmorphSetsRecord.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.TMORPH_SETS.SET_NAME</code>.
|
||||
*/
|
||||
public final TableField<TmorphSetsRecord, String> SET_NAME = createField(DSL.name("SET_NAME"), org.jooq.impl.SQLDataType.VARCHAR(255).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.TMORPH_SETS.HELMET</code>.
|
||||
*/
|
||||
public final TableField<TmorphSetsRecord, Integer> HELMET = createField(DSL.name("HELMET"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.TMORPH_SETS.CAPE</code>.
|
||||
*/
|
||||
public final TableField<TmorphSetsRecord, Integer> CAPE = createField(DSL.name("CAPE"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.TMORPH_SETS.AMULET</code>.
|
||||
*/
|
||||
public final TableField<TmorphSetsRecord, Integer> AMULET = createField(DSL.name("AMULET"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.TMORPH_SETS.WEAPON</code>.
|
||||
*/
|
||||
public final TableField<TmorphSetsRecord, Integer> WEAPON = createField(DSL.name("WEAPON"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.TMORPH_SETS.TORSO</code>.
|
||||
*/
|
||||
public final TableField<TmorphSetsRecord, Integer> TORSO = createField(DSL.name("TORSO"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.TMORPH_SETS.SHIELD</code>.
|
||||
*/
|
||||
public final TableField<TmorphSetsRecord, Integer> SHIELD = createField(DSL.name("SHIELD"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.TMORPH_SETS.LEGS</code>.
|
||||
*/
|
||||
public final TableField<TmorphSetsRecord, Integer> LEGS = createField(DSL.name("LEGS"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.TMORPH_SETS.HANDS</code>.
|
||||
*/
|
||||
public final TableField<TmorphSetsRecord, Integer> HANDS = createField(DSL.name("HANDS"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.TMORPH_SETS.BOOTS</code>.
|
||||
*/
|
||||
public final TableField<TmorphSetsRecord, Integer> BOOTS = createField(DSL.name("BOOTS"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create a <code>PUBLIC.TMORPH_SETS</code> table reference
|
||||
*/
|
||||
public TmorphSets()
|
||||
{
|
||||
this(DSL.name("TMORPH_SETS"), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>PUBLIC.TMORPH_SETS</code> table reference
|
||||
*/
|
||||
public TmorphSets(String alias)
|
||||
{
|
||||
this(DSL.name(alias), TMORPH_SETS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an aliased <code>PUBLIC.TMORPH_SETS</code> table reference
|
||||
*/
|
||||
public TmorphSets(Name alias)
|
||||
{
|
||||
this(alias, TMORPH_SETS);
|
||||
}
|
||||
|
||||
private TmorphSets(Name alias, Table<TmorphSetsRecord> aliased)
|
||||
{
|
||||
this(alias, aliased, null);
|
||||
}
|
||||
|
||||
private TmorphSets(Name alias, Table<TmorphSetsRecord> aliased, Field<?>[] parameters)
|
||||
{
|
||||
super(alias, null, aliased, parameters, DSL.comment(""));
|
||||
}
|
||||
|
||||
public <O extends Record> TmorphSets(Table<O> child, ForeignKey<O, TmorphSetsRecord> key)
|
||||
{
|
||||
super(child, key, TMORPH_SETS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Schema getSchema()
|
||||
{
|
||||
return Public.PUBLIC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Index> getIndexes()
|
||||
{
|
||||
return Arrays.<Index>asList(Indexes.TMORPH_SETS_SET_NAME_UINDEX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSets as(String alias)
|
||||
{
|
||||
return new TmorphSets(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSets as(Name alias)
|
||||
{
|
||||
return new TmorphSets(alias, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public TmorphSets rename(String name)
|
||||
{
|
||||
return new TmorphSets(DSL.name(name), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
@Override
|
||||
public TmorphSets rename(Name name)
|
||||
{
|
||||
return new TmorphSets(name, null);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row10 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row10<String, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer> fieldsRow()
|
||||
{
|
||||
return (Row10) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ package net.runelite.client.database.data.tables;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.Indexes;
|
||||
import net.runelite.client.database.data.Keys;
|
||||
import net.runelite.client.database.data.Public;
|
||||
@@ -17,6 +17,7 @@ import org.jooq.ForeignKey;
|
||||
import org.jooq.Index;
|
||||
import org.jooq.Name;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Row2;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
@@ -31,7 +32,7 @@ import org.jooq.impl.TableImpl;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -39,7 +40,7 @@ import org.jooq.impl.TableImpl;
|
||||
public class User extends TableImpl<UserRecord>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 270848699;
|
||||
private static final long serialVersionUID = -668009102;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>PUBLIC.USER</code>
|
||||
@@ -58,12 +59,12 @@ public class User extends TableImpl<UserRecord>
|
||||
/**
|
||||
* The column <code>PUBLIC.USER.UNIQUEID</code>.
|
||||
*/
|
||||
public final TableField<UserRecord, UUID> UNIQUEID = createField("UNIQUEID", org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
public final TableField<UserRecord, UUID> UNIQUEID = createField(DSL.name("UNIQUEID"), org.jooq.impl.SQLDataType.UUID.nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>PUBLIC.USER.USERNAME</code>.
|
||||
*/
|
||||
public final TableField<UserRecord, String> USERNAME = createField("USERNAME", org.jooq.impl.SQLDataType.VARCHAR(12).nullable(false), this, "");
|
||||
public final TableField<UserRecord, String> USERNAME = createField(DSL.name("USERNAME"), org.jooq.impl.SQLDataType.VARCHAR(12).nullable(false), this, "");
|
||||
|
||||
/**
|
||||
* Create a <code>PUBLIC.USER</code> table reference
|
||||
@@ -104,54 +105,36 @@ public class User extends TableImpl<UserRecord>
|
||||
super(child, key, USER);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Schema getSchema()
|
||||
{
|
||||
return Public.PUBLIC;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<Index> getIndexes()
|
||||
{
|
||||
return Arrays.<Index>asList(Indexes.PRIMARY_KEY_2);
|
||||
return Arrays.<Index>asList(Indexes.PRIMARY_KEY_2, Indexes.UN_USERNAME_INDEX_2);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UniqueKey<UserRecord> getPrimaryKey()
|
||||
{
|
||||
return Keys.PK_USER;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<UniqueKey<UserRecord>> getKeys()
|
||||
{
|
||||
return Arrays.<UniqueKey<UserRecord>>asList(Keys.PK_USER);
|
||||
return Arrays.<UniqueKey<UserRecord>>asList(Keys.PK_USER, Keys.UN_USERNAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public User as(String alias)
|
||||
{
|
||||
return new User(DSL.name(alias), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public User as(Name alias)
|
||||
{
|
||||
@@ -175,4 +158,14 @@ public class User extends TableImpl<UserRecord>
|
||||
{
|
||||
return new User(name, null);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row2 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row2<UUID, String> fieldsRow()
|
||||
{
|
||||
return (Row2) super.fieldsRow();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ package net.runelite.client.database.data.tables.records;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.tables.Loottrackerevents;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Record1;
|
||||
@@ -21,7 +21,7 @@ import org.jooq.impl.UpdatableRecordImpl;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -29,7 +29,7 @@ import org.jooq.impl.UpdatableRecordImpl;
|
||||
public class LoottrackereventsRecord extends UpdatableRecordImpl<LoottrackereventsRecord> implements Record4<UUID, String, String, Timestamp>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -1505143967;
|
||||
private static final long serialVersionUID = -1418522415;
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.LOOTTRACKEREVENTS.UNIQUEID</code>.
|
||||
@@ -99,9 +99,6 @@ public class LoottrackereventsRecord extends UpdatableRecordImpl<Loottrackereven
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Record1<UUID> key()
|
||||
{
|
||||
@@ -112,135 +109,90 @@ public class LoottrackereventsRecord extends UpdatableRecordImpl<Loottrackereven
|
||||
// Record4 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Row4<UUID, String, String, Timestamp> fieldsRow()
|
||||
{
|
||||
return (Row4) super.fieldsRow();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Row4<UUID, String, String, Timestamp> valuesRow()
|
||||
{
|
||||
return (Row4) super.valuesRow();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<UUID> field1()
|
||||
{
|
||||
return Loottrackerevents.LOOTTRACKEREVENTS.UNIQUEID;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<String> field2()
|
||||
{
|
||||
return Loottrackerevents.LOOTTRACKEREVENTS.EVENTID;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<String> field3()
|
||||
{
|
||||
return Loottrackerevents.LOOTTRACKEREVENTS.TYPE;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<Timestamp> field4()
|
||||
{
|
||||
return Loottrackerevents.LOOTTRACKEREVENTS.TIME;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID component1()
|
||||
{
|
||||
return getUniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String component2()
|
||||
{
|
||||
return getEventid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String component3()
|
||||
{
|
||||
return getType();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Timestamp component4()
|
||||
{
|
||||
return getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID value1()
|
||||
{
|
||||
return getUniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String value2()
|
||||
{
|
||||
return getEventid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String value3()
|
||||
{
|
||||
return getType();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Timestamp value4()
|
||||
{
|
||||
return getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackereventsRecord value1(UUID value)
|
||||
{
|
||||
@@ -248,9 +200,6 @@ public class LoottrackereventsRecord extends UpdatableRecordImpl<Loottrackereven
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackereventsRecord value2(String value)
|
||||
{
|
||||
@@ -258,9 +207,6 @@ public class LoottrackereventsRecord extends UpdatableRecordImpl<Loottrackereven
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackereventsRecord value3(String value)
|
||||
{
|
||||
@@ -268,9 +214,6 @@ public class LoottrackereventsRecord extends UpdatableRecordImpl<Loottrackereven
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackereventsRecord value4(Timestamp value)
|
||||
{
|
||||
@@ -278,9 +221,6 @@ public class LoottrackereventsRecord extends UpdatableRecordImpl<Loottrackereven
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackereventsRecord values(UUID value1, String value2, String value3, Timestamp value4)
|
||||
{
|
||||
|
||||
@@ -5,13 +5,12 @@ package net.runelite.client.database.data.tables.records;
|
||||
|
||||
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.tables.Loottrackerlink;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Record1;
|
||||
import org.jooq.Record4;
|
||||
import org.jooq.Row4;
|
||||
import org.jooq.impl.UpdatableRecordImpl;
|
||||
import org.jooq.impl.TableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
@@ -20,15 +19,15 @@ import org.jooq.impl.UpdatableRecordImpl;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@SuppressWarnings({"all", "unchecked", "rawtypes"})
|
||||
public class LoottrackerlinkRecord extends UpdatableRecordImpl<LoottrackerlinkRecord> implements Record4<UUID, UUID, UUID, UUID>
|
||||
public class LoottrackerlinkRecord extends TableRecordImpl<LoottrackerlinkRecord> implements Record4<UUID, UUID, UUID, UUID>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1985117517;
|
||||
private static final long serialVersionUID = -1701074584;
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.LOOTTRACKERLINK.LINKUNIQUEID</code>.
|
||||
@@ -94,152 +93,94 @@ public class LoottrackerlinkRecord extends UpdatableRecordImpl<LoottrackerlinkRe
|
||||
return (UUID) get(3);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Record1<UUID> key()
|
||||
{
|
||||
return (Record1) super.key();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record4 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Row4<UUID, UUID, UUID, UUID> fieldsRow()
|
||||
{
|
||||
return (Row4) super.fieldsRow();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Row4<UUID, UUID, UUID, UUID> valuesRow()
|
||||
{
|
||||
return (Row4) super.valuesRow();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<UUID> field1()
|
||||
{
|
||||
return Loottrackerlink.LOOTTRACKERLINK.LINKUNIQUEID;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<UUID> field2()
|
||||
{
|
||||
return Loottrackerlink.LOOTTRACKERLINK.EVENTUNIQUEID;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<UUID> field3()
|
||||
{
|
||||
return Loottrackerlink.LOOTTRACKERLINK.DROPUNIQUEID;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<UUID> field4()
|
||||
{
|
||||
return Loottrackerlink.LOOTTRACKERLINK.USERUNIQUEID;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID component1()
|
||||
{
|
||||
return getLinkuniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID component2()
|
||||
{
|
||||
return getEventuniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID component3()
|
||||
{
|
||||
return getDropuniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID component4()
|
||||
{
|
||||
return getUseruniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID value1()
|
||||
{
|
||||
return getLinkuniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID value2()
|
||||
{
|
||||
return getEventuniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID value3()
|
||||
{
|
||||
return getDropuniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID value4()
|
||||
{
|
||||
return getUseruniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackerlinkRecord value1(UUID value)
|
||||
{
|
||||
@@ -247,9 +188,6 @@ public class LoottrackerlinkRecord extends UpdatableRecordImpl<LoottrackerlinkRe
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackerlinkRecord value2(UUID value)
|
||||
{
|
||||
@@ -257,9 +195,6 @@ public class LoottrackerlinkRecord extends UpdatableRecordImpl<LoottrackerlinkRe
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackerlinkRecord value3(UUID value)
|
||||
{
|
||||
@@ -267,9 +202,6 @@ public class LoottrackerlinkRecord extends UpdatableRecordImpl<LoottrackerlinkRe
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackerlinkRecord value4(UUID value)
|
||||
{
|
||||
@@ -277,9 +209,6 @@ public class LoottrackerlinkRecord extends UpdatableRecordImpl<LoottrackerlinkRe
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackerlinkRecord values(UUID value1, UUID value2, UUID value3, UUID value4)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ package net.runelite.client.database.data.tables.records;
|
||||
|
||||
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.tables.Loottrackerloot;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Record1;
|
||||
@@ -20,7 +20,7 @@ import org.jooq.impl.UpdatableRecordImpl;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -28,7 +28,7 @@ import org.jooq.impl.UpdatableRecordImpl;
|
||||
public class LoottrackerlootRecord extends UpdatableRecordImpl<LoottrackerlootRecord> implements Record3<UUID, Integer, Integer>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -1894768090;
|
||||
private static final long serialVersionUID = 693470968;
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.LOOTTRACKERLOOT.UNIQUEID</code>.
|
||||
@@ -82,9 +82,6 @@ public class LoottrackerlootRecord extends UpdatableRecordImpl<LoottrackerlootRe
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Record1<UUID> key()
|
||||
{
|
||||
@@ -95,108 +92,72 @@ public class LoottrackerlootRecord extends UpdatableRecordImpl<LoottrackerlootRe
|
||||
// Record3 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Row3<UUID, Integer, Integer> fieldsRow()
|
||||
{
|
||||
return (Row3) super.fieldsRow();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Row3<UUID, Integer, Integer> valuesRow()
|
||||
{
|
||||
return (Row3) super.valuesRow();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<UUID> field1()
|
||||
{
|
||||
return Loottrackerloot.LOOTTRACKERLOOT.UNIQUEID;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<Integer> field2()
|
||||
{
|
||||
return Loottrackerloot.LOOTTRACKERLOOT.ITEMID;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<Integer> field3()
|
||||
{
|
||||
return Loottrackerloot.LOOTTRACKERLOOT.QUANTITY;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID component1()
|
||||
{
|
||||
return getUniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Integer component2()
|
||||
{
|
||||
return getItemid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Integer component3()
|
||||
{
|
||||
return getQuantity();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID value1()
|
||||
{
|
||||
return getUniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Integer value2()
|
||||
{
|
||||
return getItemid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Integer value3()
|
||||
{
|
||||
return getQuantity();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackerlootRecord value1(UUID value)
|
||||
{
|
||||
@@ -204,9 +165,6 @@ public class LoottrackerlootRecord extends UpdatableRecordImpl<LoottrackerlootRe
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackerlootRecord value2(Integer value)
|
||||
{
|
||||
@@ -214,9 +172,6 @@ public class LoottrackerlootRecord extends UpdatableRecordImpl<LoottrackerlootRe
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackerlootRecord value3(Integer value)
|
||||
{
|
||||
@@ -224,9 +179,6 @@ public class LoottrackerlootRecord extends UpdatableRecordImpl<LoottrackerlootRe
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoottrackerlootRecord values(UUID value1, Integer value2, Integer value3)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,503 @@
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package net.runelite.client.database.data.tables.records;
|
||||
|
||||
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.tables.TmorphSets;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Record10;
|
||||
import org.jooq.Row10;
|
||||
import org.jooq.impl.TableRecordImpl;
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@SuppressWarnings({"all", "unchecked", "rawtypes"})
|
||||
public class TmorphSetsRecord extends TableRecordImpl<TmorphSetsRecord> implements Record10<String, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 546214401;
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.TMORPH_SETS.SET_NAME</code>.
|
||||
*/
|
||||
public void setSetName(String value)
|
||||
{
|
||||
set(0, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>PUBLIC.TMORPH_SETS.SET_NAME</code>.
|
||||
*/
|
||||
public String getSetName()
|
||||
{
|
||||
return (String) get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.TMORPH_SETS.HELMET</code>.
|
||||
*/
|
||||
public void setHelmet(Integer value)
|
||||
{
|
||||
set(1, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>PUBLIC.TMORPH_SETS.HELMET</code>.
|
||||
*/
|
||||
public Integer getHelmet()
|
||||
{
|
||||
return (Integer) get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.TMORPH_SETS.CAPE</code>.
|
||||
*/
|
||||
public void setCape(Integer value)
|
||||
{
|
||||
set(2, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>PUBLIC.TMORPH_SETS.CAPE</code>.
|
||||
*/
|
||||
public Integer getCape()
|
||||
{
|
||||
return (Integer) get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.TMORPH_SETS.AMULET</code>.
|
||||
*/
|
||||
public void setAmulet(Integer value)
|
||||
{
|
||||
set(3, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>PUBLIC.TMORPH_SETS.AMULET</code>.
|
||||
*/
|
||||
public Integer getAmulet()
|
||||
{
|
||||
return (Integer) get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.TMORPH_SETS.WEAPON</code>.
|
||||
*/
|
||||
public void setWeapon(Integer value)
|
||||
{
|
||||
set(4, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>PUBLIC.TMORPH_SETS.WEAPON</code>.
|
||||
*/
|
||||
public Integer getWeapon()
|
||||
{
|
||||
return (Integer) get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.TMORPH_SETS.TORSO</code>.
|
||||
*/
|
||||
public void setTorso(Integer value)
|
||||
{
|
||||
set(5, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>PUBLIC.TMORPH_SETS.TORSO</code>.
|
||||
*/
|
||||
public Integer getTorso()
|
||||
{
|
||||
return (Integer) get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.TMORPH_SETS.SHIELD</code>.
|
||||
*/
|
||||
public void setShield(Integer value)
|
||||
{
|
||||
set(6, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>PUBLIC.TMORPH_SETS.SHIELD</code>.
|
||||
*/
|
||||
public Integer getShield()
|
||||
{
|
||||
return (Integer) get(6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.TMORPH_SETS.LEGS</code>.
|
||||
*/
|
||||
public void setLegs(Integer value)
|
||||
{
|
||||
set(7, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>PUBLIC.TMORPH_SETS.LEGS</code>.
|
||||
*/
|
||||
public Integer getLegs()
|
||||
{
|
||||
return (Integer) get(7);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.TMORPH_SETS.HANDS</code>.
|
||||
*/
|
||||
public void setHands(Integer value)
|
||||
{
|
||||
set(8, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>PUBLIC.TMORPH_SETS.HANDS</code>.
|
||||
*/
|
||||
public Integer getHands()
|
||||
{
|
||||
return (Integer) get(8);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.TMORPH_SETS.BOOTS</code>.
|
||||
*/
|
||||
public void setBoots(Integer value)
|
||||
{
|
||||
set(9, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>PUBLIC.TMORPH_SETS.BOOTS</code>.
|
||||
*/
|
||||
public Integer getBoots()
|
||||
{
|
||||
return (Integer) get(9);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record10 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Row10<String, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer> fieldsRow()
|
||||
{
|
||||
return (Row10) super.fieldsRow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Row10<String, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer> valuesRow()
|
||||
{
|
||||
return (Row10) super.valuesRow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<String> field1()
|
||||
{
|
||||
return TmorphSets.TMORPH_SETS.SET_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Integer> field2()
|
||||
{
|
||||
return TmorphSets.TMORPH_SETS.HELMET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Integer> field3()
|
||||
{
|
||||
return TmorphSets.TMORPH_SETS.CAPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Integer> field4()
|
||||
{
|
||||
return TmorphSets.TMORPH_SETS.AMULET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Integer> field5()
|
||||
{
|
||||
return TmorphSets.TMORPH_SETS.WEAPON;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Integer> field6()
|
||||
{
|
||||
return TmorphSets.TMORPH_SETS.TORSO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Integer> field7()
|
||||
{
|
||||
return TmorphSets.TMORPH_SETS.SHIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Integer> field8()
|
||||
{
|
||||
return TmorphSets.TMORPH_SETS.LEGS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Integer> field9()
|
||||
{
|
||||
return TmorphSets.TMORPH_SETS.HANDS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Field<Integer> field10()
|
||||
{
|
||||
return TmorphSets.TMORPH_SETS.BOOTS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String component1()
|
||||
{
|
||||
return getSetName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component2()
|
||||
{
|
||||
return getHelmet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component3()
|
||||
{
|
||||
return getCape();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component4()
|
||||
{
|
||||
return getAmulet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component5()
|
||||
{
|
||||
return getWeapon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component6()
|
||||
{
|
||||
return getTorso();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component7()
|
||||
{
|
||||
return getShield();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component8()
|
||||
{
|
||||
return getLegs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component9()
|
||||
{
|
||||
return getHands();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer component10()
|
||||
{
|
||||
return getBoots();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String value1()
|
||||
{
|
||||
return getSetName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value2()
|
||||
{
|
||||
return getHelmet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value3()
|
||||
{
|
||||
return getCape();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value4()
|
||||
{
|
||||
return getAmulet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value5()
|
||||
{
|
||||
return getWeapon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value6()
|
||||
{
|
||||
return getTorso();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value7()
|
||||
{
|
||||
return getShield();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value8()
|
||||
{
|
||||
return getLegs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value9()
|
||||
{
|
||||
return getHands();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer value10()
|
||||
{
|
||||
return getBoots();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSetsRecord value1(String value)
|
||||
{
|
||||
setSetName(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSetsRecord value2(Integer value)
|
||||
{
|
||||
setHelmet(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSetsRecord value3(Integer value)
|
||||
{
|
||||
setCape(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSetsRecord value4(Integer value)
|
||||
{
|
||||
setAmulet(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSetsRecord value5(Integer value)
|
||||
{
|
||||
setWeapon(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSetsRecord value6(Integer value)
|
||||
{
|
||||
setTorso(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSetsRecord value7(Integer value)
|
||||
{
|
||||
setShield(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSetsRecord value8(Integer value)
|
||||
{
|
||||
setLegs(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSetsRecord value9(Integer value)
|
||||
{
|
||||
setHands(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSetsRecord value10(Integer value)
|
||||
{
|
||||
setBoots(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TmorphSetsRecord values(String value1, Integer value2, Integer value3, Integer value4, Integer value5, Integer value6, Integer value7, Integer value8, Integer value9, Integer value10)
|
||||
{
|
||||
value1(value1);
|
||||
value2(value2);
|
||||
value3(value3);
|
||||
value4(value4);
|
||||
value5(value5);
|
||||
value6(value6);
|
||||
value7(value7);
|
||||
value8(value8);
|
||||
value9(value9);
|
||||
value10(value10);
|
||||
return this;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Constructors
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create a detached TmorphSetsRecord
|
||||
*/
|
||||
public TmorphSetsRecord()
|
||||
{
|
||||
super(TmorphSets.TMORPH_SETS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised TmorphSetsRecord
|
||||
*/
|
||||
public TmorphSetsRecord(String setName, Integer helmet, Integer cape, Integer amulet, Integer weapon, Integer torso, Integer shield, Integer legs, Integer hands, Integer boots)
|
||||
{
|
||||
super(TmorphSets.TMORPH_SETS);
|
||||
|
||||
set(0, setName);
|
||||
set(1, helmet);
|
||||
set(2, cape);
|
||||
set(3, amulet);
|
||||
set(4, weapon);
|
||||
set(5, torso);
|
||||
set(6, shield);
|
||||
set(7, legs);
|
||||
set(8, hands);
|
||||
set(9, boots);
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ package net.runelite.client.database.data.tables.records;
|
||||
|
||||
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Generated;
|
||||
import javax.annotation.processing.Generated;
|
||||
import net.runelite.client.database.data.tables.User;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.Record1;
|
||||
@@ -20,7 +20,7 @@ import org.jooq.impl.UpdatableRecordImpl;
|
||||
@Generated(
|
||||
value = {
|
||||
"http://www.jooq.org",
|
||||
"jOOQ version:3.11.12"
|
||||
"jOOQ version:3.12.3"
|
||||
},
|
||||
comments = "This class is generated by jOOQ"
|
||||
)
|
||||
@@ -28,7 +28,7 @@ import org.jooq.impl.UpdatableRecordImpl;
|
||||
public class UserRecord extends UpdatableRecordImpl<UserRecord> implements Record2<UUID, String>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 628808107;
|
||||
private static final long serialVersionUID = 2077804101;
|
||||
|
||||
/**
|
||||
* Setter for <code>PUBLIC.USER.UNIQUEID</code>.
|
||||
@@ -66,9 +66,6 @@ public class UserRecord extends UpdatableRecordImpl<UserRecord> implements Recor
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Record1<UUID> key()
|
||||
{
|
||||
@@ -79,81 +76,54 @@ public class UserRecord extends UpdatableRecordImpl<UserRecord> implements Recor
|
||||
// Record2 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Row2<UUID, String> fieldsRow()
|
||||
{
|
||||
return (Row2) super.fieldsRow();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Row2<UUID, String> valuesRow()
|
||||
{
|
||||
return (Row2) super.valuesRow();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<UUID> field1()
|
||||
{
|
||||
return User.USER.UNIQUEID;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Field<String> field2()
|
||||
{
|
||||
return User.USER.USERNAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID component1()
|
||||
{
|
||||
return getUniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String component2()
|
||||
{
|
||||
return getUsername();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UUID value1()
|
||||
{
|
||||
return getUniqueid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String value2()
|
||||
{
|
||||
return getUsername();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UserRecord value1(UUID value)
|
||||
{
|
||||
@@ -161,9 +131,6 @@ public class UserRecord extends UpdatableRecordImpl<UserRecord> implements Recor
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UserRecord value2(String value)
|
||||
{
|
||||
@@ -171,9 +138,6 @@ public class UserRecord extends UpdatableRecordImpl<UserRecord> implements Recor
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UserRecord values(UUID value1, String value2)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ import net.runelite.client.util.ImageUtil;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@RequiredArgsConstructor
|
||||
@Singleton
|
||||
class Hydra
|
||||
class AlchemicalHydra
|
||||
{
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@RequiredArgsConstructor
|
||||
@@ -61,7 +61,7 @@ class Hydra
|
||||
if (image == null)
|
||||
{
|
||||
BufferedImage tmp = spriteManager.getSprite(spriteID, 0);
|
||||
image = tmp == null ? null : ImageUtil.resizeImage(tmp, HydraOverlay.IMGSIZE, HydraOverlay.IMGSIZE);
|
||||
image = tmp == null ? null : ImageUtil.resizeImage(tmp, AlchemicalHydraOverlay.IMGSIZE, AlchemicalHydraOverlay.IMGSIZE);
|
||||
}
|
||||
|
||||
return image;
|
||||
@@ -70,7 +70,7 @@ class Hydra
|
||||
|
||||
private final NPC npc;
|
||||
|
||||
private HydraPhase phase = HydraPhase.ONE;
|
||||
private AlchemicalHydraPhase phase = AlchemicalHydraPhase.ONE;
|
||||
|
||||
private int attackCount = 0;
|
||||
private int nextSwitch = phase.getAttacksPerSwitch();
|
||||
@@ -84,14 +84,14 @@ class Hydra
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private boolean weakened = false;
|
||||
|
||||
void changePhase(HydraPhase newPhase)
|
||||
void changePhase(AlchemicalHydraPhase newPhase)
|
||||
{
|
||||
phase = newPhase;
|
||||
nextSpecial = 3;
|
||||
attackCount = 0;
|
||||
weakened = false;
|
||||
|
||||
if (newPhase == HydraPhase.FOUR)
|
||||
if (newPhase == AlchemicalHydraPhase.FOUR)
|
||||
{
|
||||
weakened = true;
|
||||
switchStyles();
|
||||
@@ -101,9 +101,9 @@ class Hydra
|
||||
|
||||
private void switchStyles()
|
||||
{
|
||||
nextAttack = lastAttack == Hydra.AttackStyle.MAGIC
|
||||
? Hydra.AttackStyle.RANGED
|
||||
: Hydra.AttackStyle.MAGIC;
|
||||
nextAttack = lastAttack == AlchemicalHydra.AttackStyle.MAGIC
|
||||
? AlchemicalHydra.AttackStyle.RANGED
|
||||
: AlchemicalHydra.AttackStyle.MAGIC;
|
||||
}
|
||||
|
||||
void handleAttack(int id)
|
||||
@@ -32,7 +32,7 @@ import net.runelite.client.config.ConfigItem;
|
||||
import net.runelite.client.config.ConfigSection;
|
||||
|
||||
@ConfigGroup("betterHydra")
|
||||
public interface HydraConfig extends Config
|
||||
public interface AlchemicalHydraConfig extends Config
|
||||
{
|
||||
@ConfigSection(
|
||||
keyName = "features",
|
||||
@@ -47,11 +47,11 @@ import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||
import net.runelite.client.util.ImageUtil;
|
||||
|
||||
@Singleton
|
||||
class HydraOverlay extends Overlay
|
||||
class AlchemicalHydraOverlay extends Overlay
|
||||
{
|
||||
static final int IMGSIZE = 36;
|
||||
|
||||
private final HydraPlugin plugin;
|
||||
private final AlchemicalHydraPlugin plugin;
|
||||
private final Client client;
|
||||
private final SpriteManager spriteManager;
|
||||
private final PanelComponent panelComponent = new PanelComponent();
|
||||
@@ -71,7 +71,7 @@ class HydraOverlay extends Overlay
|
||||
private int stunTicks;
|
||||
|
||||
@Inject
|
||||
HydraOverlay(final HydraPlugin plugin, final Client client, final SpriteManager spriteManager)
|
||||
AlchemicalHydraOverlay(final AlchemicalHydraPlugin plugin, final Client client, final SpriteManager spriteManager)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
this.client = client;
|
||||
@@ -83,7 +83,7 @@ class HydraOverlay extends Overlay
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics2D)
|
||||
{
|
||||
final Hydra hydra = plugin.getHydra();
|
||||
final AlchemicalHydra hydra = plugin.getHydra();
|
||||
panelComponent.getChildren().clear();
|
||||
|
||||
if (hydra == null)
|
||||
@@ -125,9 +125,9 @@ class HydraOverlay extends Overlay
|
||||
panelComponent.getChildren().add(stunComponent);
|
||||
}
|
||||
|
||||
private void addSpecOverlay(final Hydra hydra)
|
||||
private void addSpecOverlay(final AlchemicalHydra hydra)
|
||||
{
|
||||
final HydraPhase phase = hydra.getPhase();
|
||||
final AlchemicalHydraPhase phase = hydra.getPhase();
|
||||
final int nextSpec = hydra.getNextSpecialRelative();
|
||||
|
||||
if (nextSpec > 3)
|
||||
@@ -152,7 +152,7 @@ class HydraOverlay extends Overlay
|
||||
panelComponent.getChildren().add(specComponent);
|
||||
}
|
||||
|
||||
private void addPrayOverlay(final Hydra hydra)
|
||||
private void addPrayOverlay(final AlchemicalHydra hydra)
|
||||
{
|
||||
final Prayer nextPrayer = hydra.getNextAttack().getPrayer();
|
||||
final int nextSwitch = hydra.getNextSwitch();
|
||||
@@ -37,7 +37,7 @@ import net.runelite.client.util.ImageUtil;
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@RequiredArgsConstructor
|
||||
enum HydraPhase
|
||||
enum AlchemicalHydraPhase
|
||||
{
|
||||
ONE(3, AnimationID.HYDRA_1_1, AnimationID.HYDRA_1_2, ProjectileID.HYDRA_POISON, 0, SpriteID.BIG_ASS_GUTHIX_SPELL, new WorldPoint(1371, 10263, 0)),
|
||||
TWO(3, AnimationID.HYDRA_2_1, AnimationID.HYDRA_2_2, 0, AnimationID.HYDRA_LIGHTNING, SpriteID.BIG_SPEC_TRANSFER, new WorldPoint(1371, 10272, 0)),
|
||||
@@ -61,7 +61,7 @@ enum HydraPhase
|
||||
if (specImage == null)
|
||||
{
|
||||
BufferedImage tmp = spriteManager.getSprite(specImageID, 0);
|
||||
specImage = tmp == null ? null : ImageUtil.resizeImage(tmp, HydraOverlay.IMGSIZE, HydraOverlay.IMGSIZE);
|
||||
specImage = tmp == null ? null : ImageUtil.resizeImage(tmp, AlchemicalHydraOverlay.IMGSIZE, AlchemicalHydraOverlay.IMGSIZE);
|
||||
}
|
||||
|
||||
return specImage;
|
||||
@@ -56,7 +56,7 @@ import net.runelite.client.events.ConfigChanged;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.plugins.PluginType;
|
||||
import net.runelite.client.plugins.alchemicalhydra.Hydra.AttackStyle;
|
||||
import net.runelite.client.plugins.alchemicalhydra.AlchemicalHydra.AttackStyle;
|
||||
import net.runelite.client.ui.overlay.OverlayManager;
|
||||
|
||||
@PluginDescriptor(
|
||||
@@ -68,7 +68,7 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
||||
)
|
||||
@Slf4j
|
||||
@Singleton
|
||||
public class HydraPlugin extends Plugin
|
||||
public class AlchemicalHydraPlugin extends Plugin
|
||||
{
|
||||
private static final int[] HYDRA_REGIONS = {
|
||||
5279, 5280,
|
||||
@@ -80,7 +80,7 @@ public class HydraPlugin extends Plugin
|
||||
private Map<LocalPoint, Projectile> poisonProjectiles = new HashMap<>();
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private Hydra hydra;
|
||||
private AlchemicalHydra hydra;
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean counting;
|
||||
@@ -101,21 +101,21 @@ public class HydraPlugin extends Plugin
|
||||
private EventBus eventBus;
|
||||
|
||||
@Inject
|
||||
private HydraConfig config;
|
||||
private AlchemicalHydraConfig config;
|
||||
|
||||
@Inject
|
||||
private HydraOverlay overlay;
|
||||
private AlchemicalHydraOverlay overlay;
|
||||
|
||||
@Inject
|
||||
private HydraSceneOverlay sceneOverlay;
|
||||
private AlchemicalHydraSceneOverlay sceneOverlay;
|
||||
|
||||
@Inject
|
||||
private OverlayManager overlayManager;
|
||||
|
||||
@Provides
|
||||
HydraConfig provideConfig(ConfigManager configManager)
|
||||
AlchemicalHydraConfig provideConfig(ConfigManager configManager)
|
||||
{
|
||||
return configManager.getConfig(HydraConfig.class);
|
||||
return configManager.getConfig(AlchemicalHydraConfig.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -235,7 +235,7 @@ public class HydraPlugin extends Plugin
|
||||
{
|
||||
if (npc.getId() == NpcID.ALCHEMICAL_HYDRA)
|
||||
{
|
||||
hydra = new Hydra(npc);
|
||||
hydra = new AlchemicalHydra(npc);
|
||||
addFightSubscriptions();
|
||||
break;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ public class HydraPlugin extends Plugin
|
||||
}
|
||||
|
||||
eventBus.unregister("npcSpawned");
|
||||
hydra = new Hydra(event.getNpc());
|
||||
hydra = new AlchemicalHydra(event.getNpc());
|
||||
addFightSubscriptions();
|
||||
addOverlays();
|
||||
}
|
||||
@@ -266,23 +266,23 @@ public class HydraPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
HydraPhase phase = hydra.getPhase();
|
||||
AlchemicalHydraPhase phase = hydra.getPhase();
|
||||
|
||||
if (actor.getAnimation() == phase.getDeathAnim2() &&
|
||||
phase != HydraPhase.THREE // Else log's gonna say "Tried some weird shit"
|
||||
phase != AlchemicalHydraPhase.THREE // Else log's gonna say "Tried some weird shit"
|
||||
|| actor.getAnimation() == phase.getDeathAnim1() &&
|
||||
phase == HydraPhase.THREE) // We want the pray to switch ye ok ty
|
||||
phase == AlchemicalHydraPhase.THREE) // We want the pray to switch ye ok ty
|
||||
{
|
||||
switch (phase)
|
||||
{
|
||||
case ONE:
|
||||
hydra.changePhase(HydraPhase.TWO);
|
||||
hydra.changePhase(AlchemicalHydraPhase.TWO);
|
||||
return;
|
||||
case TWO:
|
||||
hydra.changePhase(HydraPhase.THREE);
|
||||
hydra.changePhase(AlchemicalHydraPhase.THREE);
|
||||
return;
|
||||
case THREE:
|
||||
hydra.changePhase(HydraPhase.FOUR);
|
||||
hydra.changePhase(AlchemicalHydraPhase.FOUR);
|
||||
return;
|
||||
case FOUR:
|
||||
hydra = null;
|
||||
@@ -47,7 +47,7 @@ import net.runelite.client.ui.overlay.OverlayLayer;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
|
||||
@Singleton
|
||||
class HydraSceneOverlay extends Overlay
|
||||
class AlchemicalHydraSceneOverlay extends Overlay
|
||||
{
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private Color poisonBorder;
|
||||
@@ -61,11 +61,11 @@ class HydraSceneOverlay extends Overlay
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private Color badFountain;
|
||||
|
||||
private final HydraPlugin plugin;
|
||||
private final AlchemicalHydraPlugin plugin;
|
||||
private final Client client;
|
||||
|
||||
@Inject
|
||||
public HydraSceneOverlay(final Client client, final HydraPlugin plugin)
|
||||
public AlchemicalHydraSceneOverlay(final Client client, final AlchemicalHydraPlugin plugin)
|
||||
{
|
||||
setPosition(OverlayPosition.DYNAMIC);
|
||||
setLayer(OverlayLayer.UNDER_WIDGETS);
|
||||
@@ -76,7 +76,7 @@ class HydraSceneOverlay extends Overlay
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
Hydra hydra = plugin.getHydra();
|
||||
AlchemicalHydra hydra = plugin.getHydra();
|
||||
final Map<LocalPoint, Projectile> poisonProjectiles = plugin.getPoisonProjectiles();
|
||||
|
||||
if (plugin.isCounting() && !poisonProjectiles.isEmpty())
|
||||
@@ -119,7 +119,7 @@ class HydraSceneOverlay extends Overlay
|
||||
graphics.fill(poisonTiles);
|
||||
}
|
||||
|
||||
private void drawFountain(Graphics2D graphics, Hydra hydra)
|
||||
private void drawFountain(Graphics2D graphics, AlchemicalHydra hydra)
|
||||
{
|
||||
Collection<WorldPoint> fountainWorldPoint = WorldPoint.toLocalInstance(client, hydra.getPhase().getFountain()); // thanks
|
||||
if (fountainWorldPoint.size() > 1) // for
|
||||
@@ -1,118 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018, https://openosrs.com
|
||||
* 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.hydra;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.client.ui.FontManager;
|
||||
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.OverlayPriority;
|
||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||
|
||||
@Singleton
|
||||
public class BabyHydraOverlay extends Overlay
|
||||
{
|
||||
private final BabyHydraPlugin plugin;
|
||||
|
||||
@Inject
|
||||
private Client client;
|
||||
|
||||
@Inject
|
||||
private BabyHydraOverlay(final BabyHydraPlugin plugin)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||
setPosition(OverlayPosition.DYNAMIC);
|
||||
setPriority(OverlayPriority.MED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
for (NPC hydra : client.getNpcs())
|
||||
{
|
||||
if (hydra == null || hydra.getName() == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (hydra.getName().equalsIgnoreCase("Hydra") && plugin.getHydras().containsKey(hydra.getIndex()))
|
||||
{
|
||||
int val = plugin.getHydras().get(hydra.getIndex());
|
||||
if (val != 0)
|
||||
{
|
||||
if (plugin.isBoldText())
|
||||
{
|
||||
graphics.setFont(FontManager.getRunescapeBoldFont());
|
||||
}
|
||||
if (plugin.getHydraattacks().containsKey(hydra.getIndex()))
|
||||
{
|
||||
int attack = plugin.getHydraattacks().get(hydra.getIndex());
|
||||
|
||||
Point textLocation = hydra.getCanvasTextLocation(graphics, "TEMP!!", hydra.getLogicalHeight() + 100);
|
||||
|
||||
if (textLocation != null && attack == 8261)
|
||||
{
|
||||
if (val == 3)
|
||||
{
|
||||
OverlayUtil.renderTextLocation(graphics, textLocation, "MAGE", Color.BLUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayUtil.renderTextLocation(graphics, textLocation, "RANGE", Color.GREEN);
|
||||
}
|
||||
}
|
||||
else if (textLocation != null && attack == 8262)
|
||||
{
|
||||
if (val == 3)
|
||||
{
|
||||
OverlayUtil.renderTextLocation(graphics, textLocation, "RANGE", Color.GREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayUtil.renderTextLocation(graphics, textLocation, "MAGE", Color.BLUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
Point hydraPoint = hydra.getCanvasTextLocation(graphics, Integer.toString(val), hydra.getLogicalHeight() + 40);
|
||||
if (hydraPoint != null)
|
||||
{
|
||||
OverlayUtil.renderTextLocation(graphics, hydraPoint, Integer.toString(val), Color.WHITE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
graphics.setFont(FontManager.getRunescapeFont());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,253 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018, https://openosrs.com
|
||||
* 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.hydra;
|
||||
|
||||
import com.google.inject.Provides;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.events.AnimationChanged;
|
||||
import net.runelite.api.events.NpcDespawned;
|
||||
import net.runelite.api.events.NpcSpawned;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.events.ConfigChanged;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.plugins.PluginType;
|
||||
import net.runelite.client.ui.overlay.OverlayManager;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Hydra Helper",
|
||||
description = "Overlays for small hydras",
|
||||
tags = {"Hydra", "Helper", "you", "probably", "want", "the", "other", "one"},
|
||||
type = PluginType.PVM,
|
||||
enabledByDefault = false
|
||||
)
|
||||
@Singleton
|
||||
public class BabyHydraPlugin extends Plugin
|
||||
{
|
||||
@Inject
|
||||
private OverlayManager overlayManager;
|
||||
|
||||
@Inject
|
||||
private BabyHydraConfig config;
|
||||
|
||||
@Inject
|
||||
private BabyHydraOverlay hydraOverlay;
|
||||
|
||||
@Inject
|
||||
private BabyHydraPrayOverlay hydraPrayOverlay;
|
||||
|
||||
@Inject
|
||||
private BabyHydraIndicatorOverlay hydraIndicatorOverlay;
|
||||
|
||||
@Inject
|
||||
private Client client;
|
||||
|
||||
@Provides
|
||||
BabyHydraConfig provideConfig(ConfigManager configManager)
|
||||
{
|
||||
return configManager.getConfig(BabyHydraConfig.class);
|
||||
}
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private Map<Integer, Integer> hydras = new HashMap<>();
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private Map<Integer, Integer> hydraattacks = new HashMap<>();
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private NPC hydra;
|
||||
|
||||
private boolean TextIndicator;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean BoldText;
|
||||
private boolean PrayerHelper;
|
||||
|
||||
@Override
|
||||
protected void startUp()
|
||||
{
|
||||
updateConfig();
|
||||
|
||||
if (this.TextIndicator)
|
||||
{
|
||||
overlayManager.add(hydraOverlay);
|
||||
}
|
||||
if (this.PrayerHelper)
|
||||
{
|
||||
overlayManager.add(hydraPrayOverlay);
|
||||
overlayManager.add(hydraIndicatorOverlay);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void shutDown()
|
||||
{
|
||||
overlayManager.remove(hydraOverlay);
|
||||
overlayManager.remove(hydraPrayOverlay);
|
||||
overlayManager.remove(hydraIndicatorOverlay);
|
||||
hydras.clear();
|
||||
hydraattacks.clear();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onConfigChanged(ConfigChanged event)
|
||||
{
|
||||
if (!event.getGroup().equals("hydra"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
updateConfig();
|
||||
|
||||
if (event.getKey().equals("textindicators"))
|
||||
{
|
||||
if (Boolean.parseBoolean(event.getNewValue()))
|
||||
{
|
||||
overlayManager.add(hydraOverlay);
|
||||
}
|
||||
else
|
||||
{
|
||||
overlayManager.remove(hydraOverlay);
|
||||
}
|
||||
}
|
||||
else if (event.getKey().equals("prayerhelper"))
|
||||
{
|
||||
if (Boolean.parseBoolean(event.getNewValue()))
|
||||
{
|
||||
overlayManager.add(hydraPrayOverlay);
|
||||
overlayManager.add(hydraIndicatorOverlay);
|
||||
}
|
||||
else
|
||||
{
|
||||
overlayManager.remove(hydraPrayOverlay);
|
||||
overlayManager.remove(hydraIndicatorOverlay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onNpcSpawned(NpcSpawned event)
|
||||
{
|
||||
NPC hydra = event.getNpc();
|
||||
if (hydra.getCombatLevel() != 0 && hydra.getName() != null && hydra.getName().equalsIgnoreCase("Hydra") && !hydras.containsKey(hydra.getIndex()))
|
||||
{
|
||||
hydras.put(hydra.getIndex(), 3);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onNpcDespawned(NpcDespawned event)
|
||||
{
|
||||
NPC hydra = event.getNpc();
|
||||
if (hydra.getCombatLevel() != 0 && hydra.getName() != null && hydra.getName().equalsIgnoreCase("Hydra"))
|
||||
{
|
||||
hydras.remove(hydra.getIndex());
|
||||
hydraattacks.remove(hydra.getIndex());
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onAnimationChanged(AnimationChanged event)
|
||||
{
|
||||
Actor monster = event.getActor();
|
||||
Actor local = client.getLocalPlayer();
|
||||
if (!(monster instanceof NPC) || local == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
NPC hydra = (NPC) monster;
|
||||
|
||||
if (hydra.getCombatLevel() == 0 || hydra.getName() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hydra.getName().equalsIgnoreCase("Hydra") || !hydras.containsKey(hydra.getIndex()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (hydra.getAnimation() != 8261 && hydra.getAnimation() != 8262)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (hydra.getInteracting() != null && hydra.getInteracting() == local)
|
||||
{
|
||||
this.hydra = hydra;
|
||||
}
|
||||
|
||||
if (hydraattacks.containsKey(hydra.getIndex()))
|
||||
{
|
||||
int lastattack = hydraattacks.get(hydra.getIndex());
|
||||
hydraattacks.replace(hydra.getIndex(), hydra.getAnimation());
|
||||
|
||||
if (lastattack != hydra.getAnimation())
|
||||
{
|
||||
hydras.replace(hydra.getIndex(), 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
int currval = hydras.get(hydra.getIndex());
|
||||
if (currval == 1)
|
||||
{
|
||||
hydras.replace(hydra.getIndex(), 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
hydras.replace(hydra.getIndex(), currval - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hydraattacks.put(hydra.getIndex(), hydra.getAnimation());
|
||||
int currval = hydras.get(hydra.getIndex());
|
||||
if (currval == 1)
|
||||
{
|
||||
hydras.replace(hydra.getIndex(), 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
hydras.replace(hydra.getIndex(), currval - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateConfig()
|
||||
{
|
||||
this.TextIndicator = config.TextIndicator();
|
||||
this.BoldText = config.BoldText();
|
||||
this.PrayerHelper = config.PrayerHelper();
|
||||
}
|
||||
}
|
||||
@@ -1,137 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018, https://openosrs.com
|
||||
* 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.hydra;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Prayer;
|
||||
import net.runelite.api.SpriteID;
|
||||
import net.runelite.client.game.SpriteManager;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||
import net.runelite.client.ui.overlay.components.ComponentConstants;
|
||||
import net.runelite.client.ui.overlay.components.ImageComponent;
|
||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||
|
||||
@Singleton
|
||||
public class BabyHydraPrayOverlay extends Overlay
|
||||
{
|
||||
private final BabyHydraPlugin plugin;
|
||||
|
||||
private static final Color NOT_ACTIVATED_BACKGROUND_COLOR = new Color(150, 0, 0, 150);
|
||||
private BufferedImage prayMage;
|
||||
private BufferedImage prayRanged;
|
||||
private final PanelComponent imagePanelComponent = new PanelComponent();
|
||||
|
||||
@Inject
|
||||
private SpriteManager spriteManager;
|
||||
|
||||
@Inject
|
||||
private Client client;
|
||||
|
||||
@Inject
|
||||
private BabyHydraPrayOverlay(final BabyHydraPlugin plugin, final SpriteManager spriteManager)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
this.spriteManager = spriteManager;
|
||||
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
||||
setPriority(OverlayPriority.HIGH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
if (prayMage == null)
|
||||
{
|
||||
prayMage = spriteManager.getSprite(SpriteID.PRAYER_PROTECT_FROM_MAGIC, 0);
|
||||
}
|
||||
if (prayRanged == null)
|
||||
{
|
||||
prayRanged = spriteManager.getSprite(SpriteID.PRAYER_PROTECT_FROM_MISSILES, 0);
|
||||
}
|
||||
|
||||
if (plugin.getHydra() != null && plugin.getHydras().containsKey(plugin.getHydra().getIndex()))
|
||||
{
|
||||
int val = plugin.getHydras().get(plugin.getHydra().getIndex());
|
||||
if (val != 0 && plugin.getHydraattacks().containsKey(plugin.getHydra().getIndex()))
|
||||
{
|
||||
int attack = plugin.getHydraattacks().get(plugin.getHydra().getIndex());
|
||||
if (attack == 8261)
|
||||
{
|
||||
if (val == 3)
|
||||
{
|
||||
imagePanelComponent.getChildren().clear();
|
||||
imagePanelComponent.getChildren().add(new ImageComponent(prayMage));
|
||||
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MAGIC)
|
||||
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
||||
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||
|
||||
return imagePanelComponent.render(graphics);
|
||||
}
|
||||
else
|
||||
{
|
||||
imagePanelComponent.getChildren().clear();
|
||||
imagePanelComponent.getChildren().add(new ImageComponent(prayRanged));
|
||||
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MISSILES)
|
||||
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
||||
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||
|
||||
return imagePanelComponent.render(graphics);
|
||||
}
|
||||
}
|
||||
else if (attack == 8262)
|
||||
{
|
||||
if (val == 3)
|
||||
{
|
||||
imagePanelComponent.getChildren().clear();
|
||||
imagePanelComponent.getChildren().add(new ImageComponent(prayRanged));
|
||||
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MISSILES)
|
||||
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
||||
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||
|
||||
return imagePanelComponent.render(graphics);
|
||||
}
|
||||
else
|
||||
{
|
||||
imagePanelComponent.getChildren().clear();
|
||||
imagePanelComponent.getChildren().add(new ImageComponent(prayMage));
|
||||
imagePanelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MAGIC)
|
||||
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
||||
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||
|
||||
return imagePanelComponent.render(graphics);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (c) 2020, Dutta64 <https://github.com/dutta64>
|
||||
* 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.hydra;
|
||||
|
||||
import java.awt.Graphics2D;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.Point;
|
||||
|
||||
public class Hydra
|
||||
{
|
||||
static final int MAX_ATTACK_COUNT = 3;
|
||||
|
||||
private final NPC npc;
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private int attackCount;
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private HydraAnimation hydraAnimation;
|
||||
|
||||
public Hydra(final NPC npc)
|
||||
{
|
||||
this.npc = npc;
|
||||
this.attackCount = MAX_ATTACK_COUNT;
|
||||
this.hydraAnimation = null;
|
||||
}
|
||||
|
||||
void updateAttackCount()
|
||||
{
|
||||
attackCount = attackCount == 1 ? MAX_ATTACK_COUNT : --attackCount;
|
||||
}
|
||||
|
||||
void resetAttackCount()
|
||||
{
|
||||
attackCount = MAX_ATTACK_COUNT;
|
||||
}
|
||||
|
||||
Point getCanvasTextLocation(final Graphics2D graphics, final String text, final int zOffset)
|
||||
{
|
||||
return npc.getCanvasTextLocation(graphics, text, zOffset);
|
||||
}
|
||||
|
||||
int getLogicalHeight()
|
||||
{
|
||||
return npc.getLogicalHeight();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2020, Dutta64 <https://github.com/dutta64>
|
||||
* 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.hydra;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.Objects;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public enum HydraAnimation
|
||||
{
|
||||
RANGE(8261, "RANGE", new Color(0, 255, 0)),
|
||||
MAGIC(8262, "MAGIC", new Color(52, 152, 219)),
|
||||
POISON(8263, "POISON", new Color(255, 0, 0)); // Not used currently
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private final int id;
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private final String text;
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private final Color color;
|
||||
|
||||
public static HydraAnimation fromId(final int id)
|
||||
{
|
||||
for (final HydraAnimation hydraAnimation : HydraAnimation.values())
|
||||
{
|
||||
if (Objects.equals(hydraAnimation.id, id))
|
||||
{
|
||||
return hydraAnimation;
|
||||
}
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
/*
|
||||
* Copyright (c) 2018, https://openosrs.com
|
||||
* Copyright (c) 2020, Dutta64 <https://github.com/dutta64>
|
||||
* 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.hydra;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.client.ui.FontManager;
|
||||
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.OverlayPriority;
|
||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||
|
||||
@Singleton
|
||||
public class HydraAttackCounterOverlay extends Overlay
|
||||
{
|
||||
private final HydraPlugin hydraPlugin;
|
||||
|
||||
private final Client client;
|
||||
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private Map<Integer, Hydra> hydras;
|
||||
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private boolean isBoldAttackCounterOverlay;
|
||||
|
||||
@Inject
|
||||
private HydraAttackCounterOverlay(final HydraPlugin hydraPlugin, final Client client)
|
||||
{
|
||||
this.hydraPlugin = hydraPlugin;
|
||||
this.client = client;
|
||||
this.hydras = new HashMap<>();
|
||||
this.isBoldAttackCounterOverlay = false;
|
||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||
setPosition(OverlayPosition.DYNAMIC);
|
||||
setPriority(OverlayPriority.MED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(final Graphics2D graphics)
|
||||
{
|
||||
if (!hydraPlugin.isPlayerAtHydraRegion())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
for (final NPC npc : client.getNpcs())
|
||||
{
|
||||
final Hydra hydra = hydras.get(npc.getIndex());
|
||||
|
||||
if (hydra == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isBoldAttackCounterOverlay)
|
||||
{
|
||||
graphics.setFont(FontManager.getRunescapeBoldFont());
|
||||
}
|
||||
else
|
||||
{
|
||||
graphics.setFont(FontManager.getRunescapeFont());
|
||||
}
|
||||
|
||||
renderAnimationAttackType(graphics, hydra);
|
||||
renderAttackCount(graphics, hydra);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void renderAnimationAttackType(final Graphics2D graphics, final Hydra hydra)
|
||||
{
|
||||
final HydraAnimation hydraAnimation = hydra.getHydraAnimation();
|
||||
|
||||
if (hydraAnimation == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final int heightOffset = 100;
|
||||
|
||||
final Point textLocation = hydra.getCanvasTextLocation(graphics, "TEMP!",
|
||||
hydra.getLogicalHeight() + heightOffset);
|
||||
|
||||
if (textLocation == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final boolean attackCountIsMax = hydra.getAttackCount() == Hydra.MAX_ATTACK_COUNT;
|
||||
|
||||
switch (hydraAnimation)
|
||||
{
|
||||
case RANGE:
|
||||
if (attackCountIsMax)
|
||||
{
|
||||
OverlayUtil.renderTextLocation(graphics, textLocation, HydraAnimation.MAGIC.getText(),
|
||||
HydraAnimation.MAGIC.getColor());
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayUtil.renderTextLocation(graphics, textLocation, HydraAnimation.RANGE.getText(),
|
||||
HydraAnimation.RANGE.getColor());
|
||||
}
|
||||
break;
|
||||
case MAGIC:
|
||||
if (attackCountIsMax)
|
||||
{
|
||||
OverlayUtil.renderTextLocation(graphics, textLocation, HydraAnimation.RANGE.getText(),
|
||||
HydraAnimation.RANGE.getColor());
|
||||
}
|
||||
else
|
||||
{
|
||||
OverlayUtil.renderTextLocation(graphics, textLocation, HydraAnimation.MAGIC.getText(),
|
||||
HydraAnimation.MAGIC.getColor());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void renderAttackCount(final Graphics2D graphics, final Hydra hydra)
|
||||
{
|
||||
final int attackCount = hydra.getAttackCount();
|
||||
|
||||
final int heightOffset = 30;
|
||||
|
||||
final Point textLocation = hydra.getCanvasTextLocation(graphics, Integer.toString(attackCount),
|
||||
hydra.getLogicalHeight() + heightOffset);
|
||||
|
||||
if (textLocation != null)
|
||||
{
|
||||
OverlayUtil.renderTextLocation(graphics, textLocation, Integer.toString(attackCount), Color.WHITE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018, https://openosrs.com
|
||||
* Copyright (c) 2020, Dutta64 <https://github.com/dutta64>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,38 +30,49 @@ import net.runelite.client.config.ConfigGroup;
|
||||
import net.runelite.client.config.ConfigItem;
|
||||
|
||||
@ConfigGroup("hydra")
|
||||
public interface BabyHydraConfig extends Config
|
||||
public interface HydraConfig extends Config
|
||||
{
|
||||
|
||||
@ConfigItem(
|
||||
position = 1,
|
||||
keyName = "textindicators",
|
||||
name = "Text Indicator",
|
||||
description = "Configures if text indicator is shown above hydra's or not."
|
||||
keyName = "attackCounterOverlay",
|
||||
name = "Attack Counter Overlay",
|
||||
description = "Configures if an attack counter overlay is shown."
|
||||
)
|
||||
default boolean TextIndicator()
|
||||
default boolean isAttackCounterOverlay()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 2,
|
||||
keyName = "countersize",
|
||||
name = "Bold indicator",
|
||||
description = "Configures if text indicator is bold or not."
|
||||
keyName = "boldAttackCounterOverlay",
|
||||
name = "Bold Attack Counter",
|
||||
description = "Configures if the attack counter is <b>bold</b>.<br>Attack Counter Overlay must be enabled."
|
||||
)
|
||||
default boolean BoldText()
|
||||
default boolean isBoldAttackCounterOverlay()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 3,
|
||||
keyName = "prayerhelper",
|
||||
name = "Prayer Helper",
|
||||
description = "Configures if prayer helper is shown or not."
|
||||
keyName = "prayerOverlay",
|
||||
name = "Prayer Overlay",
|
||||
description = "Configures if a prayer overlay is shown.<br>This overlay includes a mini attack counter."
|
||||
)
|
||||
default boolean PrayerHelper()
|
||||
default boolean isPrayerOverlay()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 4,
|
||||
keyName = "poisonProjectileOverlay",
|
||||
name = "Poison Projectile Overlay",
|
||||
description = "Configures if a poison projectile overlay is shown."
|
||||
)
|
||||
default boolean isPoisonOverlay()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,421 @@
|
||||
/*
|
||||
* Copyright (c) 2018, https://openosrs.com
|
||||
* Copyright (c) 2020, Dutta64 <https://github.com/dutta64>
|
||||
* 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.hydra;
|
||||
|
||||
import com.google.inject.Provides;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.Projectile;
|
||||
import net.runelite.api.ProjectileID;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.api.events.AnimationChanged;
|
||||
import net.runelite.api.events.InteractingChanged;
|
||||
import net.runelite.api.events.NpcDespawned;
|
||||
import net.runelite.api.events.NpcSpawned;
|
||||
import net.runelite.api.events.ProjectileMoved;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.events.ConfigChanged;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.plugins.PluginType;
|
||||
import net.runelite.client.ui.overlay.OverlayManager;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Hydra Helper",
|
||||
description = "Overlays for normal Hydras.",
|
||||
tags = {"hydra", "helper", "baby", "small", "normal", "regular"},
|
||||
type = PluginType.PVM,
|
||||
enabledByDefault = false
|
||||
)
|
||||
@Slf4j
|
||||
@Singleton
|
||||
public class HydraPlugin extends Plugin
|
||||
{
|
||||
static final Set<HydraAnimation> VALID_HYDRA_ANIMATIONS = EnumSet.of(
|
||||
HydraAnimation.RANGE,
|
||||
HydraAnimation.MAGIC
|
||||
);
|
||||
|
||||
private static final String CONFIG_GROUP_NAME = "hydra";
|
||||
private static final String CONFIG_ITEM_ATTACK_COUNTER = "attackCounterOverlay";
|
||||
private static final String CONFIG_ITEM_PRAYER_OVERLAY = "prayerOverlay";
|
||||
private static final String CONFIG_ITEM_POISON_PROJECTILE_OVERLAY = "poisonProjectileOverlay";
|
||||
private static final String CONFIG_ITEM_BOLD_ATTACK_COUNTER_OVERLAY = "boldAttackCounterOverlay";
|
||||
|
||||
private static final String NPC_NAME_HYDRA = "Hydra";
|
||||
|
||||
private static final int HYDRA_REGION_1 = 5279;
|
||||
private static final int HYDRA_REGION_2 = 5280;
|
||||
|
||||
@Inject
|
||||
private Client client;
|
||||
|
||||
@Inject
|
||||
private HydraConfig hydraConfig;
|
||||
|
||||
@Inject
|
||||
private OverlayManager overlayManager;
|
||||
|
||||
@Inject
|
||||
private HydraAttackCounterOverlay hydraAttackCounterOverlay;
|
||||
|
||||
@Inject
|
||||
private HydraPrayerOverlay hydraPrayerOverlay;
|
||||
|
||||
@Inject
|
||||
private HydraPrayerAttackCounterOverlay hydraPrayerAttackCounterOverlay;
|
||||
|
||||
@Inject
|
||||
private HydraPoisonOverlay hydraPoisonOverlay;
|
||||
|
||||
private final Map<Integer, Hydra> hydras = new HashMap<>();
|
||||
|
||||
private final Map<LocalPoint, Projectile> poisonProjectiles = new HashMap<>();
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private NPC interactingNpc = null;
|
||||
|
||||
@Provides
|
||||
HydraConfig provideConfig(final ConfigManager configManager)
|
||||
{
|
||||
return configManager.getConfig(HydraConfig.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void startUp()
|
||||
{
|
||||
if (hydraConfig.isAttackCounterOverlay())
|
||||
{
|
||||
overlayManager.add(hydraAttackCounterOverlay);
|
||||
}
|
||||
|
||||
if (hydraConfig.isPrayerOverlay())
|
||||
{
|
||||
overlayManager.add(hydraPrayerOverlay);
|
||||
overlayManager.add(hydraPrayerAttackCounterOverlay);
|
||||
}
|
||||
|
||||
if (hydraConfig.isPoisonOverlay())
|
||||
{
|
||||
overlayManager.add(hydraPoisonOverlay);
|
||||
}
|
||||
|
||||
hydraAttackCounterOverlay.setBoldAttackCounterOverlay(hydraConfig.isBoldAttackCounterOverlay());
|
||||
|
||||
hydraAttackCounterOverlay.setHydras(hydras);
|
||||
hydraPrayerOverlay.setHydras(hydras);
|
||||
hydraPrayerAttackCounterOverlay.setHydras(hydras);
|
||||
|
||||
hydraPoisonOverlay.setPoisonProjectiles(poisonProjectiles);
|
||||
|
||||
resetHydras();
|
||||
poisonProjectiles.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void shutDown()
|
||||
{
|
||||
overlayManager.remove(hydraAttackCounterOverlay);
|
||||
overlayManager.remove(hydraPrayerOverlay);
|
||||
overlayManager.remove(hydraPrayerAttackCounterOverlay);
|
||||
overlayManager.remove(hydraPoisonOverlay);
|
||||
resetHydras();
|
||||
poisonProjectiles.clear();
|
||||
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onConfigChanged(final ConfigChanged event)
|
||||
{
|
||||
if (!event.getGroup().equals(CONFIG_GROUP_NAME))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final boolean newConfigValue = Boolean.parseBoolean(event.getNewValue());
|
||||
|
||||
switch (event.getKey())
|
||||
{
|
||||
case CONFIG_ITEM_ATTACK_COUNTER:
|
||||
if (newConfigValue)
|
||||
{
|
||||
overlayManager.add(hydraAttackCounterOverlay);
|
||||
}
|
||||
else
|
||||
{
|
||||
overlayManager.remove(hydraAttackCounterOverlay);
|
||||
}
|
||||
break;
|
||||
case CONFIG_ITEM_PRAYER_OVERLAY:
|
||||
if (newConfigValue)
|
||||
{
|
||||
overlayManager.add(hydraPrayerOverlay);
|
||||
overlayManager.add(hydraPrayerAttackCounterOverlay);
|
||||
}
|
||||
else
|
||||
{
|
||||
overlayManager.remove(hydraPrayerOverlay);
|
||||
overlayManager.remove(hydraPrayerAttackCounterOverlay);
|
||||
}
|
||||
break;
|
||||
case CONFIG_ITEM_POISON_PROJECTILE_OVERLAY:
|
||||
if (newConfigValue)
|
||||
{
|
||||
overlayManager.add(hydraPoisonOverlay);
|
||||
}
|
||||
else
|
||||
{
|
||||
overlayManager.remove(hydraPoisonOverlay);
|
||||
}
|
||||
break;
|
||||
case CONFIG_ITEM_BOLD_ATTACK_COUNTER_OVERLAY:
|
||||
hydraAttackCounterOverlay.setBoldAttackCounterOverlay(hydraConfig.isBoldAttackCounterOverlay());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onNpcSpawned(final NpcSpawned event)
|
||||
{
|
||||
final NPC npc = event.getNpc();
|
||||
|
||||
if (isActorHydra(npc))
|
||||
{
|
||||
addHydra(npc);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onNpcDespawned(final NpcDespawned event)
|
||||
{
|
||||
final NPC npc = event.getNpc();
|
||||
|
||||
if (isActorHydra(npc))
|
||||
{
|
||||
removeHydra(npc);
|
||||
poisonProjectiles.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onInteractingChanged(final InteractingChanged event)
|
||||
{
|
||||
final Actor source = event.getSource();
|
||||
|
||||
if (!isActorHydra(source))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final NPC npc = (NPC) source;
|
||||
|
||||
addHydra(npc);
|
||||
updateInteractingNpc(npc);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onAnimationChanged(final AnimationChanged event)
|
||||
{
|
||||
final Actor actor = event.getActor();
|
||||
|
||||
if (!isActorHydra(actor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final NPC npc = (NPC) event.getActor();
|
||||
|
||||
addHydra(npc);
|
||||
updateInteractingNpc(npc);
|
||||
|
||||
HydraAnimation hydraAnimation;
|
||||
|
||||
try
|
||||
{
|
||||
hydraAnimation = HydraAnimation.fromId(npc.getAnimation());
|
||||
}
|
||||
catch (final IllegalArgumentException e)
|
||||
{
|
||||
hydraAnimation = null;
|
||||
}
|
||||
|
||||
if (hydraAnimation == null || !VALID_HYDRA_ANIMATIONS.contains(hydraAnimation))
|
||||
{
|
||||
// If the animation is not range/magic then do nothing.
|
||||
return;
|
||||
}
|
||||
|
||||
final Hydra hydra = hydras.get(npc.getIndex());
|
||||
|
||||
if (hydra.getHydraAnimation() == null)
|
||||
{
|
||||
// If this is the first observed animation then set it
|
||||
hydra.setHydraAnimation(hydraAnimation);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Objects.equals(hydra.getHydraAnimation(), hydraAnimation))
|
||||
{
|
||||
// If the animation switched from range/magic then set it and reset attack count
|
||||
hydra.setHydraAnimation(hydraAnimation);
|
||||
hydra.resetAttackCount();
|
||||
}
|
||||
}
|
||||
|
||||
hydra.updateAttackCount();
|
||||
|
||||
if (!poisonProjectiles.isEmpty())
|
||||
{
|
||||
updatePoisonProjectiles();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* See net.runelite.client.plugins.alchemicalhydra.AlchemicalHydraPlugin
|
||||
* Copyright (c) 2019, Lucas <https://github.com/lucwousin>
|
||||
*
|
||||
* @param event event object
|
||||
*/
|
||||
@Subscribe
|
||||
private void onProjectileMoved(final ProjectileMoved event)
|
||||
{
|
||||
if (interactingNpc == null || client.getGameCycle() >= event.getProjectile().getStartMovementCycle())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Projectile projectile = event.getProjectile();
|
||||
|
||||
final int projectileId = projectile.getId();
|
||||
|
||||
if (projectileId == ProjectileID.HYDRA_POISON)
|
||||
{
|
||||
poisonProjectiles.put(event.getPosition(), projectile);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* See net.runelite.client.plugins.alchemicalhydra.AlchemicalHydraPlugin
|
||||
* Copyright (c) 2019, Lucas <https://github.com/lucwousin>
|
||||
*/
|
||||
private void updatePoisonProjectiles()
|
||||
{
|
||||
final Set<LocalPoint> expiredPoisonProjectiles = new HashSet<>();
|
||||
|
||||
for (final Map.Entry<LocalPoint, Projectile> entry : poisonProjectiles.entrySet())
|
||||
{
|
||||
if (entry.getValue().getEndCycle() < client.getGameCycle())
|
||||
{
|
||||
expiredPoisonProjectiles.add(entry.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
for (final LocalPoint projectileLocalPoint : expiredPoisonProjectiles)
|
||||
{
|
||||
poisonProjectiles.remove(projectileLocalPoint);
|
||||
}
|
||||
}
|
||||
|
||||
boolean isPlayerAtHydraRegion()
|
||||
{
|
||||
final Player player = client.getLocalPlayer();
|
||||
|
||||
if (player == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final WorldPoint worldPoint = player.getWorldLocation();
|
||||
|
||||
if (worldPoint == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final int regionId = worldPoint.getRegionID();
|
||||
|
||||
return regionId == HYDRA_REGION_1 || regionId == HYDRA_REGION_2;
|
||||
}
|
||||
|
||||
private static boolean isActorHydra(final Actor actor)
|
||||
{
|
||||
return Objects.equals(actor.getName(), NPC_NAME_HYDRA);
|
||||
}
|
||||
|
||||
private void updateInteractingNpc(final NPC npc)
|
||||
{
|
||||
if (!Objects.equals(interactingNpc, npc) &&
|
||||
Objects.equals(npc.getInteracting(), client.getLocalPlayer()))
|
||||
{
|
||||
interactingNpc = npc;
|
||||
}
|
||||
}
|
||||
|
||||
private void addHydra(final NPC npc)
|
||||
{
|
||||
final int npcIndex = npc.getIndex();
|
||||
|
||||
if (!hydras.containsKey(npcIndex))
|
||||
{
|
||||
hydras.put(npcIndex, new Hydra(npc));
|
||||
}
|
||||
}
|
||||
|
||||
private void removeHydra(final NPC npc)
|
||||
{
|
||||
final int npcIndex = npc.getIndex();
|
||||
|
||||
hydras.remove(npcIndex);
|
||||
|
||||
if (Objects.equals(interactingNpc, npc))
|
||||
{
|
||||
interactingNpc = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void resetHydras()
|
||||
{
|
||||
hydras.clear();
|
||||
interactingNpc = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright (c) 2018, https://openosrs.com
|
||||
* Copyright (c) 2020, Dutta64 <https://github.com/dutta64>
|
||||
* 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.hydra;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Polygon;
|
||||
import java.awt.geom.Area;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.Client;
|
||||
import static net.runelite.api.Perspective.getCanvasTileAreaPoly;
|
||||
import net.runelite.api.Projectile;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
|
||||
@Singleton
|
||||
public class HydraPoisonOverlay extends Overlay
|
||||
{
|
||||
private static final Color poisonBorder = new Color(255, 0, 0, 100);;
|
||||
private static final Color poisonFill = new Color(255, 0, 0, 50);;
|
||||
|
||||
private final Client client;
|
||||
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private Map<LocalPoint, Projectile> poisonProjectiles;
|
||||
|
||||
@Inject
|
||||
public HydraPoisonOverlay(final Client client)
|
||||
{
|
||||
this.client = client;
|
||||
this.poisonProjectiles = new HashMap<>();
|
||||
setPosition(OverlayPosition.DYNAMIC);
|
||||
setLayer(OverlayLayer.UNDER_WIDGETS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(final Graphics2D graphics)
|
||||
{
|
||||
if (!poisonProjectiles.isEmpty())
|
||||
{
|
||||
drawPoisonArea(graphics, poisonProjectiles);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* See net.runelite.client.plugins.alchemicalhydra.AlchemicalHydraSceneOverlay
|
||||
* Copyright (c) 2019, Lucas <https://github.com/lucwousin>
|
||||
*
|
||||
* @param graphics graphics object
|
||||
* @param poisonProjectiles poisonProjectiles object
|
||||
*/
|
||||
private void drawPoisonArea(final Graphics2D graphics, final Map<LocalPoint, Projectile> poisonProjectiles)
|
||||
{
|
||||
final Area poisonTiles = new Area();
|
||||
|
||||
for (final Map.Entry<LocalPoint, Projectile> entry : poisonProjectiles.entrySet())
|
||||
{
|
||||
if (entry.getValue().getEndCycle() < client.getGameCycle())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
final LocalPoint point = entry.getKey();
|
||||
final Polygon poly = getCanvasTileAreaPoly(client, point, 3);
|
||||
|
||||
if (poly != null)
|
||||
{
|
||||
poisonTiles.add(new Area(poly));
|
||||
}
|
||||
}
|
||||
|
||||
graphics.setPaintMode();
|
||||
graphics.setColor(poisonBorder);
|
||||
graphics.draw(poisonTiles);
|
||||
graphics.setColor(poisonFill);
|
||||
graphics.fill(poisonTiles);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018, https://openosrs.com
|
||||
* Copyright (c) 2020, Dutta64 <https://github.com/dutta64>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -26,8 +27,13 @@ package net.runelite.client.plugins.hydra;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||
@@ -35,34 +41,48 @@ import net.runelite.client.ui.overlay.components.LineComponent;
|
||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||
|
||||
@Singleton
|
||||
public class BabyHydraIndicatorOverlay extends Overlay
|
||||
public class HydraPrayerAttackCounterOverlay extends Overlay
|
||||
{
|
||||
private final BabyHydraPlugin plugin;
|
||||
private final HydraPlugin hydraPlugin;
|
||||
|
||||
private final PanelComponent panelComponent = new PanelComponent();
|
||||
private final PanelComponent panelComponent;
|
||||
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private Map<Integer, Hydra> hydras;
|
||||
|
||||
@Inject
|
||||
private BabyHydraIndicatorOverlay(final BabyHydraPlugin plugin)
|
||||
private HydraPrayerAttackCounterOverlay(final HydraPlugin hydraPlugin)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
this.hydraPlugin = hydraPlugin;
|
||||
this.panelComponent = new PanelComponent();
|
||||
this.panelComponent.setPreferredSize(new Dimension(14, 0));
|
||||
this.hydras = new HashMap<>();
|
||||
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
||||
setPriority(OverlayPriority.MED);
|
||||
panelComponent.setPreferredSize(new Dimension(14, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
public Dimension render(final Graphics2D graphics)
|
||||
{
|
||||
if (plugin.getHydra() != null && plugin.getHydras().containsKey(plugin.getHydra().getIndex()))
|
||||
final NPC npc = hydraPlugin.getInteractingNpc();
|
||||
|
||||
if (npc == null)
|
||||
{
|
||||
int val = plugin.getHydras().get(plugin.getHydra().getIndex());
|
||||
if (val != 0)
|
||||
{
|
||||
panelComponent.getChildren().clear();
|
||||
panelComponent.getChildren().add(LineComponent.builder().right(Integer.toString(val)).build());
|
||||
return panelComponent.render(graphics);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
|
||||
final Hydra hydra = hydras.get(npc.getIndex());
|
||||
|
||||
if (hydra == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
final String attackCount = String.valueOf(hydra.getAttackCount());
|
||||
|
||||
panelComponent.getChildren().clear();
|
||||
panelComponent.getChildren().add(LineComponent.builder().right(attackCount).build());
|
||||
|
||||
return panelComponent.render(graphics);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
/*
|
||||
* Copyright (c) 2018, https://openosrs.com
|
||||
* Copyright (c) 2020, Dutta64 <https://github.com/dutta64>
|
||||
* 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.hydra;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.Prayer;
|
||||
import net.runelite.api.SpriteID;
|
||||
import net.runelite.client.game.SpriteManager;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||
import net.runelite.client.ui.overlay.components.ImageComponent;
|
||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||
|
||||
@Singleton
|
||||
public class HydraPrayerOverlay extends Overlay
|
||||
{
|
||||
private static final Color ACTIVATED_BACKGROUND_COLOR = new Color(0, 150, 0, 150);
|
||||
private static final Color NOT_ACTIVATED_BACKGROUND_COLOR = new Color(150, 0, 0, 150);
|
||||
|
||||
private final HydraPlugin hydraPlugin;
|
||||
|
||||
private final Client client;
|
||||
|
||||
private final SpriteManager spriteManager;
|
||||
|
||||
private final PanelComponent panelComponent;
|
||||
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private Map<Integer, Hydra> hydras;
|
||||
|
||||
private BufferedImage bufferedImageRange;
|
||||
private BufferedImage bufferedImageMagic;
|
||||
|
||||
@Inject
|
||||
private HydraPrayerOverlay(final HydraPlugin hydraPlugin, final Client client, final SpriteManager spriteManager)
|
||||
{
|
||||
this.hydraPlugin = hydraPlugin;
|
||||
this.client = client;
|
||||
this.spriteManager = spriteManager;
|
||||
this.panelComponent = new PanelComponent();
|
||||
this.hydras = new HashMap<>();
|
||||
this.bufferedImageRange = null;
|
||||
this.bufferedImageMagic = null;
|
||||
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
||||
setPriority(OverlayPriority.HIGH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(final Graphics2D graphics)
|
||||
{
|
||||
final NPC npc = hydraPlugin.getInteractingNpc();
|
||||
|
||||
if (npc == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
final Hydra hydra = hydras.get(npc.getIndex());
|
||||
|
||||
if (hydra == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
final HydraAnimation hydraAnimation = hydra.getHydraAnimation();
|
||||
|
||||
if (hydraAnimation == null || !HydraPlugin.VALID_HYDRA_ANIMATIONS.contains(hydraAnimation))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (bufferedImageMagic == null)
|
||||
{
|
||||
bufferedImageMagic = spriteManager.getSprite(SpriteID.PRAYER_PROTECT_FROM_MAGIC, 0);
|
||||
}
|
||||
|
||||
if (bufferedImageRange == null)
|
||||
{
|
||||
bufferedImageRange = spriteManager.getSprite(SpriteID.PRAYER_PROTECT_FROM_MISSILES, 0);
|
||||
}
|
||||
|
||||
final boolean attackCountIsMax = hydra.getAttackCount() == Hydra.MAX_ATTACK_COUNT;
|
||||
|
||||
switch (hydraAnimation)
|
||||
{
|
||||
case RANGE:
|
||||
if (attackCountIsMax)
|
||||
{
|
||||
return renderPanelMagic(graphics);
|
||||
}
|
||||
else
|
||||
{
|
||||
return renderPanelRange(graphics);
|
||||
}
|
||||
case MAGIC:
|
||||
if (attackCountIsMax)
|
||||
{
|
||||
return renderPanelRange(graphics);
|
||||
}
|
||||
else
|
||||
{
|
||||
return renderPanelMagic(graphics);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private Dimension renderPanelMagic(final Graphics2D graphics)
|
||||
{
|
||||
panelComponent.getChildren().clear();
|
||||
panelComponent.getChildren().add(new ImageComponent(bufferedImageMagic));
|
||||
panelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MAGIC)
|
||||
? ACTIVATED_BACKGROUND_COLOR
|
||||
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||
|
||||
return panelComponent.render(graphics);
|
||||
}
|
||||
|
||||
private Dimension renderPanelRange(final Graphics2D graphics)
|
||||
{
|
||||
panelComponent.getChildren().clear();
|
||||
panelComponent.getChildren().add(new ImageComponent(bufferedImageRange));
|
||||
panelComponent.setBackgroundColor(client.isPrayerActive(Prayer.PROTECT_FROM_MISSILES)
|
||||
? ACTIVATED_BACKGROUND_COLOR
|
||||
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||
|
||||
return panelComponent.render(graphics);
|
||||
}
|
||||
}
|
||||
@@ -1974,7 +1974,6 @@ public interface MenuEntrySwapperConfig extends Config
|
||||
position = 2,
|
||||
section = "hotkeySwapping"
|
||||
)
|
||||
|
||||
default boolean swapNpcContact()
|
||||
{
|
||||
return false;
|
||||
@@ -1987,7 +1986,6 @@ public interface MenuEntrySwapperConfig extends Config
|
||||
position = 3,
|
||||
section = "hotkeySwapping"
|
||||
)
|
||||
|
||||
default boolean bankWieldItem()
|
||||
{
|
||||
return false;
|
||||
@@ -2000,7 +1998,6 @@ public interface MenuEntrySwapperConfig extends Config
|
||||
position = 4,
|
||||
section = "hotkeySwapping"
|
||||
)
|
||||
|
||||
default boolean bankWearItem()
|
||||
{
|
||||
return false;
|
||||
@@ -2013,7 +2010,6 @@ public interface MenuEntrySwapperConfig extends Config
|
||||
position = 5,
|
||||
section = "hotkeySwapping"
|
||||
)
|
||||
|
||||
default boolean bankEatItem()
|
||||
{
|
||||
return false;
|
||||
@@ -2026,7 +2022,6 @@ public interface MenuEntrySwapperConfig extends Config
|
||||
position = 6,
|
||||
section = "hotkeySwapping"
|
||||
)
|
||||
|
||||
default boolean bankDrinkItem()
|
||||
{
|
||||
return false;
|
||||
@@ -2039,7 +2034,6 @@ public interface MenuEntrySwapperConfig extends Config
|
||||
position = 7,
|
||||
section = "hotkeySwapping"
|
||||
)
|
||||
|
||||
default boolean bankEquipItem()
|
||||
{
|
||||
return false;
|
||||
@@ -2052,9 +2046,32 @@ public interface MenuEntrySwapperConfig extends Config
|
||||
position = 8,
|
||||
section = "hotkeySwapping"
|
||||
)
|
||||
|
||||
default boolean bankInvigorateItem()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "hotKeyWalk",
|
||||
name = "Hotkey to Walk",
|
||||
description = "For when you want Walk here as a priority",
|
||||
position = 9,
|
||||
section = "hotkeySwapping"
|
||||
)
|
||||
default boolean hotKeyWalk()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "hotKeyLoot",
|
||||
name = "Hotkey to Loot",
|
||||
description = "For when people stand on your loot",
|
||||
position = 10,
|
||||
section = "hotkeySwapping"
|
||||
)
|
||||
default boolean hotKeyLoot()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,6 +149,74 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
"mazchna", "vannaka", "chaeldar", "nieve", "steve", "duradel", "krystilia", "konar",
|
||||
"murphy", "cyrisus", "smoggy", "ginea", "watson", "barbarian guard", "random"
|
||||
);
|
||||
|
||||
private static final AbstractComparableEntry WALK = new AbstractComparableEntry()
|
||||
{
|
||||
private final int hash = "WALK".hashCode() * 79 + getPriority();
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object entry)
|
||||
{
|
||||
return entry.getClass() == this.getClass() && entry.hashCode() == this.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority()
|
||||
{
|
||||
return 99;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(MenuEntry entry)
|
||||
{
|
||||
return
|
||||
entry.getOpcode() == MenuOpcode.WALK.getId() ||
|
||||
entry.getOpcode() == MenuOpcode.WALK.getId() + MenuOpcode.MENU_ACTION_DEPRIORITIZE_OFFSET;
|
||||
}
|
||||
};
|
||||
|
||||
private static final AbstractComparableEntry TAKE = new AbstractComparableEntry()
|
||||
{
|
||||
private final int hash = "TAKE".hashCode() * 79 + getPriority();
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object entry)
|
||||
{
|
||||
return entry.getClass() == this.getClass() && entry.hashCode() == this.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(MenuEntry entry)
|
||||
{
|
||||
int opcode = entry.getOpcode();
|
||||
if (opcode > MenuOpcode.MENU_ACTION_DEPRIORITIZE_OFFSET)
|
||||
{
|
||||
opcode -= MenuOpcode.MENU_ACTION_DEPRIORITIZE_OFFSET;
|
||||
}
|
||||
|
||||
return
|
||||
opcode >= MenuOpcode.GROUND_ITEM_FIRST_OPTION.getId() &&
|
||||
opcode <= MenuOpcode.GROUND_ITEM_FIFTH_OPTION.getId();
|
||||
}
|
||||
};
|
||||
|
||||
private static final Splitter NEWLINE_SPLITTER = Splitter
|
||||
.on("\n")
|
||||
@@ -300,6 +368,8 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
private boolean swapWildernessLever;
|
||||
private boolean swapJewelleryBox;
|
||||
private boolean getSwapOffer;
|
||||
private boolean hotKeyLoot;
|
||||
private boolean hotKeyWalk;
|
||||
private final HotkeyListener hotkey = new HotkeyListener(() -> this.hotkeyMod)
|
||||
{
|
||||
@Override
|
||||
@@ -1525,7 +1595,14 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
{
|
||||
menuManager.addPriorityEntry("climb-up").setPriority(100);
|
||||
}
|
||||
|
||||
if (this.hotKeyLoot)
|
||||
{
|
||||
menuManager.addPriorityEntry(TAKE);
|
||||
}
|
||||
if (this.hotKeyWalk)
|
||||
{
|
||||
menuManager.addPriorityEntry(WALK);
|
||||
}
|
||||
if (this.swapNpcContact)
|
||||
{
|
||||
for (String npccontact : npcContact)
|
||||
@@ -1551,6 +1628,8 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
menuManager.removePriorityEntry(new BankComparableEntry("equip", "", false));
|
||||
menuManager.removePriorityEntry(new BankComparableEntry("invigorate", "", false));
|
||||
menuManager.removePriorityEntry("climb-up");
|
||||
menuManager.removePriorityEntry(TAKE);
|
||||
menuManager.removePriorityEntry(WALK);
|
||||
|
||||
for (String npccontact : npcContact)
|
||||
{
|
||||
@@ -1796,6 +1875,8 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
this.bankInvigorateItem = config.bankInvigorateItem();
|
||||
this.swapNpcContact = config.swapNpcContact();
|
||||
this.getSwapOffer = config.getSwapOffer();
|
||||
this.hotKeyWalk = config.hotKeyWalk();
|
||||
this.hotKeyLoot = config.hotKeyLoot();
|
||||
}
|
||||
|
||||
private void addBuySellEntries()
|
||||
|
||||
@@ -129,4 +129,24 @@ public interface NpcIndicatorsConfig extends Config
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 7,
|
||||
keyName = "notifyOnRespawn",
|
||||
name = "Notify on Respawn",
|
||||
description = "Enable notification on respawn")
|
||||
default boolean getNotifyOnRespawn()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 8,
|
||||
keyName = "notifyOnRespawnDelay",
|
||||
name = "Notification Delay",
|
||||
description = "Notify when NPC is x ms from respawning")
|
||||
default int getNotifyOnRespawnDelay()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.Color;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -38,6 +40,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.Locale;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.AccessLevel;
|
||||
@@ -61,6 +64,7 @@ import net.runelite.api.events.MenuOptionClicked;
|
||||
import net.runelite.api.events.NpcDefinitionChanged;
|
||||
import net.runelite.api.events.NpcDespawned;
|
||||
import net.runelite.api.events.NpcSpawned;
|
||||
import net.runelite.client.Notifier;
|
||||
import net.runelite.api.util.Text;
|
||||
import net.runelite.client.callback.ClientThread;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
@@ -86,6 +90,16 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
{
|
||||
private static final int MAX_ACTOR_VIEW_RANGE = 15;
|
||||
|
||||
// Estimated time of a game tick in seconds
|
||||
private static final double ESTIMATED_TICK_LENGTH = 0.6;
|
||||
|
||||
private static final NumberFormat TIME_LEFT_FORMATTER = DecimalFormat.getInstance(Locale.getDefault());
|
||||
|
||||
static
|
||||
{
|
||||
((DecimalFormat)TIME_LEFT_FORMATTER).applyPattern("#0.0");
|
||||
}
|
||||
|
||||
// Option added to NPC menu
|
||||
private static final String TAG = "Tag";
|
||||
private static final String UNTAG = "Un-tag";
|
||||
@@ -125,12 +139,21 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
@Setter(AccessLevel.PACKAGE)
|
||||
private boolean hotKeyPressed = false;
|
||||
|
||||
@Inject
|
||||
private Notifier notifier;
|
||||
|
||||
/**
|
||||
* NPCs to highlight
|
||||
*/
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private final Set<NPC> highlightedNpcs = new HashSet<>();
|
||||
|
||||
/**
|
||||
* NPCs to notify when close to spawning
|
||||
*/
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private final Set<MemorizedNpc> pendingNotificationNpcs = new HashSet<>();
|
||||
|
||||
/**
|
||||
* Dead NPCs that should be displayed with a respawn indicator if the config is on.
|
||||
*/
|
||||
@@ -206,6 +229,10 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
private boolean highlightMenuNames;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean showRespawnTimer;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private boolean getNotifyOnRespawn;
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private int getNotifyOnRespawnDelay;
|
||||
|
||||
@Provides
|
||||
NpcIndicatorsConfig provideConfig(ConfigManager configManager)
|
||||
@@ -235,6 +262,7 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
overlayManager.remove(npcSceneOverlay);
|
||||
overlayManager.remove(npcMinimapOverlay);
|
||||
deadNpcsToDisplay.clear();
|
||||
pendingNotificationNpcs.clear();
|
||||
memorizedNpcs.clear();
|
||||
spawnedNpcsThisTick.clear();
|
||||
despawnedNpcsThisTick.clear();
|
||||
@@ -252,6 +280,7 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
{
|
||||
highlightedNpcs.clear();
|
||||
deadNpcsToDisplay.clear();
|
||||
pendingNotificationNpcs.clear();
|
||||
memorizedNpcs.forEach((id, npc) -> npc.setDiedOnTick(-1));
|
||||
lastPlayerLocation = null;
|
||||
skipNextSpawnCheck = true;
|
||||
@@ -388,6 +417,12 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
if (memorizedNpcs.containsKey(npc.getIndex()))
|
||||
{
|
||||
despawnedNpcsThisTick.add(npc);
|
||||
MemorizedNpc mn = memorizedNpcs.get(npc.getIndex());
|
||||
|
||||
if (!mn.getPossibleRespawnLocations().isEmpty())
|
||||
{
|
||||
pendingNotificationNpcs.add(mn);
|
||||
}
|
||||
}
|
||||
|
||||
highlightedNpcs.remove(npc);
|
||||
@@ -409,6 +444,7 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
{
|
||||
removeOldHighlightedRespawns();
|
||||
validateSpawnedNpcs();
|
||||
checkNotifyNpcs();
|
||||
lastTickUpdate = Instant.now();
|
||||
lastPlayerLocation = client.getLocalPlayer().getWorldLocation();
|
||||
}
|
||||
@@ -486,6 +522,16 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
highlightedNpcs.remove(npc);
|
||||
}
|
||||
|
||||
public double getTimeLeftForNpc(MemorizedNpc npc)
|
||||
{
|
||||
final Instant now = Instant.now();
|
||||
final double baseTick = NpcIndicatorsPlugin.ESTIMATED_TICK_LENGTH * (
|
||||
npc.getDiedOnTick() + npc.getRespawnTime() - client.getTickCount()
|
||||
);
|
||||
final double sinceLast = (now.toEpochMilli() - lastTickUpdate.toEpochMilli()) / 1000.0;
|
||||
return Math.max(0.0, baseTick - sinceLast);
|
||||
}
|
||||
|
||||
private void memorizeNpc(NPC npc)
|
||||
{
|
||||
final int npcIndex = npc.getIndex();
|
||||
@@ -561,6 +607,33 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
public String formatTime(double time)
|
||||
{
|
||||
return TIME_LEFT_FORMATTER.format(time);
|
||||
}
|
||||
|
||||
private void checkNotifyNpcs()
|
||||
{
|
||||
if (!this.getNotifyOnRespawn)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double notifyDelay = ((double)this.getNotifyOnRespawnDelay) / 1000;
|
||||
final String notifyDelayStr = notifyDelay > 0
|
||||
? " is less than " + formatTime(notifyDelay) + " seconds from respawn"
|
||||
: " respawned.";
|
||||
|
||||
for (MemorizedNpc npc : pendingNotificationNpcs)
|
||||
{
|
||||
if (getTimeLeftForNpc(npc) <= notifyDelay)
|
||||
{
|
||||
pendingNotificationNpcs.remove(npc);
|
||||
notifier.notify(npc.getNpcNames() + notifyDelayStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void validateSpawnedNpcs()
|
||||
{
|
||||
if (skipNextSpawnCheck)
|
||||
@@ -569,6 +642,7 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
for (NPC npc : despawnedNpcsThisTick)
|
||||
{
|
||||
if (!teleportGraphicsObjectSpawnedThisTick.isEmpty() && teleportGraphicsObjectSpawnedThisTick.contains(npc.getWorldLocation()))
|
||||
@@ -657,5 +731,7 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
this.drawMinimapNames = config.drawMinimapNames();
|
||||
this.highlightMenuNames = config.highlightMenuNames();
|
||||
this.showRespawnTimer = config.showRespawnTimer();
|
||||
this.getNotifyOnRespawn = config.getNotifyOnRespawn();
|
||||
this.getNotifyOnRespawnDelay = config.getNotifyOnRespawnDelay();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,15 +31,10 @@ import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Polygon;
|
||||
import java.awt.Shape;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Constants;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.NPCDefinition;
|
||||
import net.runelite.api.Perspective;
|
||||
@@ -63,12 +58,7 @@ public class NpcSceneOverlay extends Overlay
|
||||
// a dark background
|
||||
private static final Color TEXT_COLOR = Color.WHITE;
|
||||
|
||||
private static final NumberFormat TIME_LEFT_FORMATTER = DecimalFormat.getInstance(Locale.US);
|
||||
|
||||
static
|
||||
{
|
||||
((DecimalFormat) TIME_LEFT_FORMATTER).applyPattern("#0.0");
|
||||
}
|
||||
|
||||
private final Client client;
|
||||
private final NpcIndicatorsPlugin plugin;
|
||||
@@ -128,11 +118,8 @@ public class NpcSceneOverlay extends Overlay
|
||||
OverlayUtil.renderPolygon(graphics, poly, color);
|
||||
}
|
||||
|
||||
final Instant now = Instant.now();
|
||||
final double baseTick = ((npc.getDiedOnTick() + npc.getRespawnTime()) - client.getTickCount()) * (Constants.GAME_TICK_LENGTH / 1000.0);
|
||||
final double sinceLast = (now.toEpochMilli() - plugin.getLastTickUpdate().toEpochMilli()) / 1000.0;
|
||||
final double timeLeft = Math.max(0.0, baseTick - sinceLast);
|
||||
final String timeLeftStr = TIME_LEFT_FORMATTER.format(timeLeft);
|
||||
|
||||
final String timeLeftStr = plugin.formatTime(plugin.getTimeLeftForNpc(npc));
|
||||
|
||||
final int textWidth = graphics.getFontMetrics().stringWidth(timeLeftStr);
|
||||
final int textHeight = graphics.getFontMetrics().getAscent();
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Plinko60
|
||||
* 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.shiftwalker;
|
||||
|
||||
import net.runelite.client.config.Config;
|
||||
import net.runelite.client.config.ConfigGroup;
|
||||
import net.runelite.client.config.ConfigItem;
|
||||
|
||||
@ConfigGroup("shiftwalkhere")
|
||||
public interface ShiftWalkerConfig extends Config
|
||||
{
|
||||
@ConfigItem(
|
||||
keyName = "shiftWalk",
|
||||
name = "Shift to Walk",
|
||||
description = "For when you want Walk here as a priority"
|
||||
)
|
||||
default boolean shiftWalk()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "shiftLoot",
|
||||
name = "Shift to Loot",
|
||||
description = "For when people stand on your loot"
|
||||
)
|
||||
default boolean shiftLoot()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "shiftWalkEverything",
|
||||
name = "Walk Under Everything",
|
||||
description = "Enable this option when you do not want to interact with anything while Shift is pressed. " +
|
||||
"If Walk Here is an option it will be the action taken."
|
||||
)
|
||||
default boolean shiftWalkEverything()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "shiftWalkBoxTraps",
|
||||
name = "Walk Under Box Traps",
|
||||
description = "Press \"Shift\" to be able to walk under instead of picking up a Box Trap."
|
||||
)
|
||||
default boolean shiftWalkBoxTraps()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "shiftWalkAttackOption",
|
||||
name = "Walk Under Attack Options",
|
||||
description = "Press \"Shift\" to be able to walk instead of attacking. Make sure Left Click Attack is on."
|
||||
)
|
||||
default boolean shiftWalkAttackOption()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -1,281 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Plinko60
|
||||
* 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.shiftwalker;
|
||||
|
||||
import com.google.inject.Provides;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameState;
|
||||
import net.runelite.api.MenuEntry;
|
||||
import net.runelite.api.MenuOpcode;
|
||||
import net.runelite.api.events.ClientTick;
|
||||
import net.runelite.api.events.FocusChanged;
|
||||
import net.runelite.api.events.GameStateChanged;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.config.Keybind;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.events.ConfigChanged;
|
||||
import net.runelite.client.input.KeyManager;
|
||||
import net.runelite.client.menus.AbstractComparableEntry;
|
||||
import net.runelite.client.menus.MenuManager;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.plugins.PluginType;
|
||||
import net.runelite.client.util.HotkeyListener;
|
||||
|
||||
/**
|
||||
* Shift Walker Plugin. Credit to MenuEntrySwapperPlugin for code some code structure used here.
|
||||
*/
|
||||
@PluginDescriptor(
|
||||
name = "Shift Walk Under",
|
||||
description = "Use Shift to toggle the Walk Here menu option. While pressed you will Walk rather than interact with objects.",
|
||||
tags = {"npcs", "items", "objects"},
|
||||
type = PluginType.UTILITY,
|
||||
enabledByDefault = false
|
||||
)
|
||||
@Singleton
|
||||
public class ShiftWalkerPlugin extends Plugin
|
||||
{
|
||||
|
||||
private static final AbstractComparableEntry WALK = new AbstractComparableEntry()
|
||||
{
|
||||
private final int hash = "WALK".hashCode() * 79 + getPriority();
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object entry)
|
||||
{
|
||||
return entry.getClass() == this.getClass() && entry.hashCode() == this.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority()
|
||||
{
|
||||
return 99;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(MenuEntry entry)
|
||||
{
|
||||
return
|
||||
entry.getOpcode() == MenuOpcode.WALK.getId() ||
|
||||
entry.getOpcode() == MenuOpcode.WALK.getId() + MenuOpcode.MENU_ACTION_DEPRIORITIZE_OFFSET;
|
||||
}
|
||||
};
|
||||
|
||||
private static final AbstractComparableEntry TAKE = new AbstractComparableEntry()
|
||||
{
|
||||
private final int hash = "TAKE".hashCode() * 79 + getPriority();
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object entry)
|
||||
{
|
||||
return entry.getClass() == this.getClass() && entry.hashCode() == this.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(MenuEntry entry)
|
||||
{
|
||||
int opcode = entry.getOpcode();
|
||||
if (opcode > MenuOpcode.MENU_ACTION_DEPRIORITIZE_OFFSET)
|
||||
{
|
||||
opcode -= MenuOpcode.MENU_ACTION_DEPRIORITIZE_OFFSET;
|
||||
}
|
||||
|
||||
return
|
||||
opcode >= MenuOpcode.GROUND_ITEM_FIRST_OPTION.getId() &&
|
||||
opcode <= MenuOpcode.GROUND_ITEM_FIFTH_OPTION.getId();
|
||||
}
|
||||
};
|
||||
|
||||
private static final String EVENTBUS_THING = "shiftwalker shift";
|
||||
private static final String SHIFT_CHECK = "shiftwalker hotkey check";
|
||||
@Inject
|
||||
private Client client;
|
||||
@Inject
|
||||
private ShiftWalkerConfig config;
|
||||
@Inject
|
||||
private MenuManager menuManager;
|
||||
@Inject
|
||||
private KeyManager keyManager;
|
||||
@Inject
|
||||
private EventBus eventBus;
|
||||
@Setter(AccessLevel.PRIVATE)
|
||||
private boolean hotkeyActive;
|
||||
private boolean shiftWalk;
|
||||
private boolean shiftLoot;
|
||||
|
||||
@Provides
|
||||
ShiftWalkerConfig provideConfig(ConfigManager configManager)
|
||||
{
|
||||
return configManager.getConfig(ShiftWalkerConfig.class);
|
||||
}
|
||||
|
||||
private final HotkeyListener shift = new HotkeyListener(() -> Keybind.SHIFT)
|
||||
{
|
||||
@Override
|
||||
public void hotkeyPressed()
|
||||
{
|
||||
startPrioritizing();
|
||||
setHotkeyActive(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hotkeyReleased()
|
||||
{
|
||||
stopPrioritizing();
|
||||
setHotkeyActive(false);
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void startUp()
|
||||
{
|
||||
this.shiftWalk = config.shiftWalk();
|
||||
this.shiftLoot = config.shiftLoot();
|
||||
if (client.getGameState() == GameState.LOGGED_IN)
|
||||
{
|
||||
keyManager.registerKeyListener(shift);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutDown()
|
||||
{
|
||||
keyManager.unregisterKeyListener(shift);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onGameStateChanged(GameStateChanged event)
|
||||
{
|
||||
if (event.getGameState() != GameState.LOGGED_IN)
|
||||
{
|
||||
keyManager.unregisterKeyListener(shift);
|
||||
return;
|
||||
}
|
||||
keyManager.registerKeyListener(shift);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onFocusChanged(FocusChanged event)
|
||||
{
|
||||
if (!event.isFocused())
|
||||
{
|
||||
stopPrioritizing();
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onConfigChanged(ConfigChanged event)
|
||||
{
|
||||
if (!event.getGroup().equals("shiftwalkhere"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ("shiftWalk".equals(event.getKey()))
|
||||
{
|
||||
this.shiftWalk = "true".equals(event.getNewValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
this.shiftLoot = "true".equals(event.getNewValue());
|
||||
}
|
||||
}
|
||||
|
||||
private void hotkeyCheck(ClientTick event)
|
||||
{
|
||||
if (hotkeyActive)
|
||||
{
|
||||
int i = 0;
|
||||
for (boolean bol : client.getPressedKeys())
|
||||
{
|
||||
if (bol)
|
||||
{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (i == 0)
|
||||
{
|
||||
stopPrioritizing();
|
||||
setHotkeyActive(false);
|
||||
eventBus.unregister(SHIFT_CHECK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void startPrioritizing()
|
||||
{
|
||||
eventBus.subscribe(ClientTick.class, EVENTBUS_THING, this::addEntries);
|
||||
eventBus.subscribe(ClientTick.class, SHIFT_CHECK, this::hotkeyCheck);
|
||||
}
|
||||
|
||||
private void addEntries(ClientTick event)
|
||||
{
|
||||
if (this.shiftLoot)
|
||||
{
|
||||
menuManager.addPriorityEntry(TAKE);
|
||||
}
|
||||
if (this.shiftWalk)
|
||||
{
|
||||
menuManager.addPriorityEntry(WALK);
|
||||
}
|
||||
|
||||
eventBus.unregister(EVENTBUS_THING);
|
||||
}
|
||||
|
||||
private void stopPrioritizing()
|
||||
{
|
||||
eventBus.subscribe(ClientTick.class, EVENTBUS_THING, this::removeEntries);
|
||||
}
|
||||
|
||||
private void removeEntries(ClientTick event)
|
||||
{
|
||||
menuManager.removePriorityEntry(TAKE);
|
||||
menuManager.removePriorityEntry(WALK);
|
||||
eventBus.unregister(EVENTBUS_THING);
|
||||
}
|
||||
}
|
||||
@@ -20,26 +20,36 @@ import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.MenuOpcode;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.Perspective;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.PlayerAppearance;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.api.events.MenuEntryAdded;
|
||||
import net.runelite.api.events.MenuOptionClicked;
|
||||
import net.runelite.api.events.NpcDespawned;
|
||||
import net.runelite.api.events.NpcSpawned;
|
||||
import net.runelite.api.kit.KitType;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
import net.runelite.client.menus.AbstractComparableEntry;
|
||||
import net.runelite.client.menus.MenuManager;
|
||||
import net.runelite.client.plugins.theatre.RoomHandler;
|
||||
import net.runelite.client.plugins.theatre.TheatreConstant;
|
||||
import net.runelite.client.plugins.theatre.TheatrePlugin;
|
||||
import net.runelite.client.plugins.theatre.TheatreRoom;
|
||||
import net.runelite.client.util.WeaponMap;
|
||||
import net.runelite.client.util.WeaponStyle;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
@Slf4j
|
||||
public class NyloHandler extends RoomHandler
|
||||
{
|
||||
private static final String MESNAME = "tobmes";
|
||||
private static final String MAGE_NYLO = "Nylocas Hagios";
|
||||
private static final String RANGE_NYLO = "Nylocas Toxobolos";
|
||||
private static final String MELEE_NYLO = "Nylocas Ischyros";
|
||||
final List<NPC> waveSpawns = new ArrayList<>();
|
||||
final List<NPC> waveAgros = new ArrayList<>();
|
||||
private final MenuManager menuManager;
|
||||
@@ -55,6 +65,8 @@ public class NyloHandler extends RoomHandler
|
||||
private int wave = 0;
|
||||
private NyloOverlay overlay = null;
|
||||
private NyloPredictor predictor = null;
|
||||
private WeaponStyle currentWeaponStyle;
|
||||
private boolean skipTickCheck = false;
|
||||
|
||||
public NyloHandler(final Client client, final TheatrePlugin plugin, final MenuManager menuManager, final EventBus eventBus)
|
||||
{
|
||||
@@ -85,6 +97,7 @@ public class NyloHandler extends RoomHandler
|
||||
if (plugin.isNylocasMenuSwap())
|
||||
{
|
||||
eventBus.subscribe(MenuOptionClicked.class, MESNAME, this::onMenuOptionClicked);
|
||||
eventBus.subscribe(MenuEntryAdded.class, MESNAME, this::onMenuEntryAdded);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -126,7 +139,6 @@ public class NyloHandler extends RoomHandler
|
||||
this.waveSpawns.clear();
|
||||
this.waveAgros.clear();
|
||||
this.predictor.reset();
|
||||
menuManager.removeSwaps("Nylocas Hagios", "Nylocas Toxobolos", "Nylocas Ischyros");
|
||||
}
|
||||
|
||||
public void onConfigChanged()
|
||||
@@ -134,6 +146,7 @@ public class NyloHandler extends RoomHandler
|
||||
if (plugin.isNylocasMenuSwap())
|
||||
{
|
||||
eventBus.subscribe(MenuOptionClicked.class, MESNAME, this::onMenuOptionClicked);
|
||||
eventBus.subscribe(MenuEntryAdded.class, MESNAME, this::onMenuEntryAdded);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -337,7 +350,7 @@ public class NyloHandler extends RoomHandler
|
||||
if (polygon != null)
|
||||
{
|
||||
graphics.setColor(color);
|
||||
graphics.setStroke(new BasicStroke(2));
|
||||
graphics.setStroke(new BasicStroke(1));
|
||||
graphics.draw(polygon);
|
||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 20));
|
||||
graphics.fill(polygon);
|
||||
@@ -350,25 +363,42 @@ public class NyloHandler extends RoomHandler
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (skipTickCheck)
|
||||
{
|
||||
skipTickCheck = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean findPillar = false;
|
||||
|
||||
for (NPC npc : client.getNpcs())
|
||||
Player p = client.getLocalPlayer();
|
||||
if (p == null)
|
||||
{
|
||||
if (npc.getId() == 8358)
|
||||
{
|
||||
findPillar = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!findPillar)
|
||||
{
|
||||
this.onStop();
|
||||
return;
|
||||
}
|
||||
PlayerAppearance pa = p.getPlayerAppearance();
|
||||
if (pa == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int weaponID = ObjectUtils.defaultIfNull(pa.getEquipmentId(KitType.WEAPON), -1);
|
||||
currentWeaponStyle = WeaponMap.StyleMap.get(weaponID);
|
||||
}
|
||||
boolean findPillar = false;
|
||||
|
||||
for (NPC npc : client.getNpcs())
|
||||
{
|
||||
if (npc.getId() == 8358)
|
||||
{
|
||||
findPillar = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!findPillar)
|
||||
{
|
||||
this.onStop();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (NPC spider : new ArrayList<>(spiders.keySet()))
|
||||
{
|
||||
@@ -396,23 +426,49 @@ public class NyloHandler extends RoomHandler
|
||||
|
||||
private void onMenuOptionClicked(MenuOptionClicked event)
|
||||
{
|
||||
final String option = event.getOption().toLowerCase();
|
||||
|
||||
if (!option.equals("equip") && !option.equals("wield") && !option.equals("hold"))
|
||||
int opcode = event.getOpcode();
|
||||
if (opcode == MenuOpcode.ITEM_SECOND_OPTION.getId())
|
||||
{
|
||||
return;
|
||||
WeaponStyle newStyle = WeaponMap.StyleMap.get(event.getIdentifier());
|
||||
if (newStyle != null)
|
||||
{
|
||||
skipTickCheck = true;
|
||||
currentWeaponStyle = newStyle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final int id = event.getIdentifier();
|
||||
final Set<AbstractComparableEntry> entries = Weapons.getEntries(id);
|
||||
menuManager.removeSwaps("Nylocas Hagios", "Nylocas Toxobolos", "Nylocas Ischyros");
|
||||
|
||||
if (entries.isEmpty())
|
||||
private void onMenuEntryAdded(MenuEntryAdded event)
|
||||
{
|
||||
if (plugin.isNylocasMenuSwap())
|
||||
{
|
||||
return;
|
||||
if (event.getOpcode() == MenuOpcode.NPC_SECOND_OPTION.getId() && event.getOption().equals("Attack"))
|
||||
{
|
||||
String target = event.getTarget();
|
||||
switch (currentWeaponStyle)
|
||||
{
|
||||
case MAGIC:
|
||||
if (target.equals(RANGE_NYLO) || target.equals(MELEE_NYLO))
|
||||
{
|
||||
client.setMenuOptionCount(client.getMenuOptionCount() - 1);
|
||||
}
|
||||
break;
|
||||
case RANGE:
|
||||
if (target.contains(MAGE_NYLO) || target.contains(MELEE_NYLO))
|
||||
{
|
||||
client.setMenuOptionCount(client.getMenuOptionCount() - 1);
|
||||
}
|
||||
break;
|
||||
case MELEE:
|
||||
if (target.contains(MAGE_NYLO) || target.contains(RANGE_NYLO))
|
||||
{
|
||||
client.setMenuOptionCount(client.getMenuOptionCount() - 1);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
entries.forEach(menuManager::addHiddenEntry);
|
||||
}
|
||||
|
||||
private void recalculateLocal()
|
||||
@@ -447,11 +503,4 @@ public class NyloHandler extends RoomHandler
|
||||
}
|
||||
}
|
||||
|
||||
private enum AttackStyle
|
||||
{
|
||||
MELEE,
|
||||
MAGE,
|
||||
RANGE,
|
||||
RANGE2H
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package net.runelite.client.plugins.theatre.rooms.nylocas;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.ItemID;
|
||||
import net.runelite.client.menus.AbstractComparableEntry;
|
||||
import net.runelite.client.menus.ComparableEntries;
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@AllArgsConstructor
|
||||
public enum Weapons
|
||||
{
|
||||
MELEE(ImmutableSet.of(ItemID.ABYSSAL_WHIP, ItemID.ABYSSAL_TENTACLE, ItemID.SCYTHE_OF_VITUR,
|
||||
ItemID.SCYTHE_OF_VITUR_22664, ItemID.SCYTHE_OF_VITUR_UNCHARGED, ItemID.HAM_JOINT, ItemID.SWIFT_BLADE,
|
||||
ItemID.BANDOS_GODSWORD, ItemID.BANDOS_GODSWORD_20782, ItemID.BANDOS_GODSWORD_21060, ItemID.BANDOS_GODSWORD_OR,
|
||||
ItemID.DRAGON_WARHAMMER, ItemID.DRAGON_CLAWS, ItemID.EVENT_RPG, ItemID.GHRAZI_RAPIER, ItemID.GHRAZI_RAPIER_23628,
|
||||
ItemID.BLADE_OF_SAELDOR, ItemID.CRYSTAL_HALBERD, ItemID.DRAGON_SCIMITAR, ItemID.RUNE_SCIMITAR, ItemID.BLADE_OF_SAELDOR_23996,
|
||||
ItemID.BLADE_OF_SAELDOR_INACTIVE, ItemID.BLADE_OF_SAELDOR_INACTIVE_23999),
|
||||
ImmutableSet.of(ComparableEntries.newBaseComparableEntry("Attack", "Nylocas Hagios"),
|
||||
ComparableEntries.newBaseComparableEntry("Attack", "Nylocas Toxobolos"))
|
||||
),
|
||||
MAGE(ImmutableSet.of(ItemID.KODAI_WAND, ItemID.MASTER_WAND, ItemID.TRIDENT_OF_THE_SEAS,
|
||||
ItemID.TRIDENT_OF_THE_SWAMP, ItemID.SANGUINESTI_STAFF, ItemID.IBANS_STAFF, ItemID.IBANS_STAFF_1410,
|
||||
ItemID.IBANS_STAFF_U, ItemID.TRIDENT_OF_THE_SWAMP_E, ItemID.TRIDENT_OF_THE_SEAS_E),
|
||||
ImmutableSet.of(ComparableEntries.newBaseComparableEntry("Attack", "Nylocas Ischyros"),
|
||||
ComparableEntries.newBaseComparableEntry("Attack", "Nylocas Toxobolos"))
|
||||
),
|
||||
RANGE(ImmutableSet.of(ItemID.TOXIC_BLOWPIPE, ItemID.TWISTED_BOW, ItemID.CRAWS_BOW,
|
||||
ItemID.RED_CHINCHOMPA, ItemID.CHINCHOMPA, ItemID.BLACK_CHINCHOMPA, ItemID.ARMADYL_CROSSBOW,
|
||||
ItemID.DRAGON_CROSSBOW, ItemID.RUNE_CROSSBOW, ItemID.DORGESHUUN_CROSSBOW),
|
||||
ImmutableSet.of(ComparableEntries.newBaseComparableEntry("Attack", "Nylocas Hagios"),
|
||||
ComparableEntries.newBaseComparableEntry("Attack", "Nylocas Ischyros"))
|
||||
);
|
||||
|
||||
private final Set<Integer> ids;
|
||||
private final Set<AbstractComparableEntry> entries;
|
||||
private static final Map<Set<Integer>, Set<AbstractComparableEntry>> map;
|
||||
|
||||
static
|
||||
{
|
||||
final ImmutableMap.Builder<Set<Integer>, Set<AbstractComparableEntry>> builder = new ImmutableMap.Builder<>();
|
||||
for (Weapons weps : Weapons.values())
|
||||
{
|
||||
builder.put(weps.getIds(), weps.getEntries());
|
||||
}
|
||||
map = builder.build();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
static Set<AbstractComparableEntry> getEntries(int id)
|
||||
{
|
||||
final Set<AbstractComparableEntry> entries = new HashSet<>();
|
||||
|
||||
for (Map.Entry<Set<Integer>, Set<AbstractComparableEntry>> entry : map.entrySet())
|
||||
{
|
||||
if (entry.getKey().contains(id))
|
||||
{
|
||||
entries.addAll(entry.getValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return entries;
|
||||
}
|
||||
}
|
||||
@@ -27,12 +27,15 @@ import com.google.common.base.Splitter;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.Color;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.Client;
|
||||
@@ -40,10 +43,12 @@ import net.runelite.api.GameState;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.events.AnimationChanged;
|
||||
import net.runelite.api.events.CommandExecuted;
|
||||
import net.runelite.api.events.GameStateChanged;
|
||||
import net.runelite.api.events.GameTick;
|
||||
import net.runelite.api.events.SpotAnimationChanged;
|
||||
import net.runelite.api.kit.KitType;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.callback.ClientThread;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
@@ -51,8 +56,12 @@ import net.runelite.client.events.ConfigChanged;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.plugins.PluginType;
|
||||
import net.runelite.client.plugins.tmorph.ui.TPanel;
|
||||
import net.runelite.client.ui.ClientToolbar;
|
||||
import net.runelite.client.ui.NavigationButton;
|
||||
import net.runelite.client.util.Clipboard;
|
||||
import net.runelite.client.util.ColorUtil;
|
||||
import net.runelite.client.util.ImageUtil;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
@PluginDescriptor(
|
||||
@@ -67,19 +76,20 @@ public class TMorph extends Plugin
|
||||
{
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private static final Map<String, KitType> kit;
|
||||
private static final Color COLOR = new Color(10, 134, 74, 255);
|
||||
|
||||
static
|
||||
{
|
||||
final ImmutableMap.Builder<String, KitType> builder = new ImmutableMap.Builder<>();
|
||||
|
||||
for (KitType kit : KitType.values())
|
||||
{
|
||||
builder.put(kit.getName(), kit);
|
||||
}
|
||||
|
||||
kit = builder.build();
|
||||
}
|
||||
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
private static final Splitter NEWLINE_SPLITTER = Splitter
|
||||
.on("\n")
|
||||
.omitEmptyStrings()
|
||||
@@ -94,15 +104,25 @@ public class TMorph extends Plugin
|
||||
@Inject
|
||||
private EventBus eventBus;
|
||||
|
||||
private Map<String, String> set1;
|
||||
private Map<String, String> set2;
|
||||
private Map<String, String> set3;
|
||||
@Inject
|
||||
private ClientToolbar clientToolbar;
|
||||
|
||||
@Inject
|
||||
private ClientThread clientThread;
|
||||
|
||||
private TPanel panel;
|
||||
private NavigationButton navButton;
|
||||
private int animation;
|
||||
private int globalAnimSwap;
|
||||
private int globalGraphicSwap;
|
||||
private int graphic;
|
||||
private int targetAnimation;
|
||||
private int targetGraphic;
|
||||
@Setter
|
||||
private Map<String, String> panelMorph = new HashMap<>();
|
||||
private Map<String, String> set1;
|
||||
private Map<String, String> set2;
|
||||
private Map<String, String> set3;
|
||||
|
||||
@Provides
|
||||
TMorphConfig provideConfig(ConfigManager configManager)
|
||||
@@ -113,8 +133,20 @@ public class TMorph extends Plugin
|
||||
@Override
|
||||
protected void startUp()
|
||||
{
|
||||
final BufferedImage icon = ImageUtil.getResourceStreamFromClass(getClass(), "nav.png");
|
||||
|
||||
panel = injector.getInstance(TPanel.class);
|
||||
|
||||
navButton = NavigationButton.builder()
|
||||
.tooltip("TMorph")
|
||||
.icon(icon)
|
||||
.priority(100)
|
||||
.panel(panel)
|
||||
.build();
|
||||
|
||||
clientToolbar.addNavigation(navButton);
|
||||
|
||||
updateConfig();
|
||||
addSubscriptions();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,15 +155,8 @@ public class TMorph extends Plugin
|
||||
eventBus.unregister(this);
|
||||
}
|
||||
|
||||
private void addSubscriptions()
|
||||
{
|
||||
eventBus.subscribe(AnimationChanged.class, this, this::onAnimationChanged);
|
||||
eventBus.subscribe(GameTick.class, this, this::onGameTick);
|
||||
eventBus.subscribe(SpotAnimationChanged.class, this, this::onSpotAnimationChanged);
|
||||
eventBus.subscribe(CommandExecuted.class, this, this::onCommandExecuted);
|
||||
}
|
||||
|
||||
private void onCommandExecuted(CommandExecuted event)
|
||||
@Subscribe
|
||||
public void onCommandExecuted(CommandExecuted event)
|
||||
{
|
||||
final String[] args = event.getArguments();
|
||||
|
||||
@@ -172,23 +197,47 @@ public class TMorph extends Plugin
|
||||
sb.append(kitType.getName());
|
||||
sb.append("\n");
|
||||
}
|
||||
client.addChatMessage(ChatMessageType.GAMEMESSAGE, "TMorph", ColorUtil.prependColorTag("Your current gear has been copied to your clipboard", COLOR), null);
|
||||
client.addChatMessage(
|
||||
ChatMessageType.GAMEMESSAGE,
|
||||
"TMorph",
|
||||
ColorUtil.prependColorTag("Your current gear has been copied to your clipboard", Color.RED),
|
||||
null
|
||||
);
|
||||
Clipboard.store(sb.toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
client.addChatMessage(ChatMessageType.GAMEMESSAGE, "TMorph", ColorUtil.prependColorTag("Invalid syntax, do ::tmorph copy", Color.RED), null);
|
||||
client.addChatMessage(
|
||||
ChatMessageType.GAMEMESSAGE,
|
||||
"TMorph",
|
||||
ColorUtil.prependColorTag("Invalid syntax, do ::tmorph copy", Color.RED),
|
||||
null
|
||||
);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
client.addChatMessage(ChatMessageType.GAMEMESSAGE, "TMorph", ColorUtil.prependColorTag("Invalid syntax, do ::tmorph copy", Color.RED), null);
|
||||
client.addChatMessage(
|
||||
ChatMessageType.GAMEMESSAGE,
|
||||
"TMorph",
|
||||
ColorUtil.prependColorTag("Invalid syntax, do ::tmorph copy", Color.RED),
|
||||
null
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onConfigChanged(ConfigChanged event)
|
||||
public void onGameStateChanged(GameStateChanged event)
|
||||
{
|
||||
if (event.getGameState() == GameState.LOGIN_SCREEN)
|
||||
{
|
||||
clientThread.invokeLater(() -> panel.populateSlots());
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onConfigChanged(ConfigChanged event)
|
||||
{
|
||||
if (event.getGroup().equals("TMorph"))
|
||||
{
|
||||
@@ -196,7 +245,8 @@ public class TMorph extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
private void onSpotAnimationChanged(SpotAnimationChanged event)
|
||||
@Subscribe
|
||||
public void onSpotAnimationChanged(SpotAnimationChanged event)
|
||||
{
|
||||
final Actor actor = event.getActor();
|
||||
|
||||
@@ -218,7 +268,8 @@ public class TMorph extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
private void onAnimationChanged(AnimationChanged event)
|
||||
@Subscribe
|
||||
public void onAnimationChanged(AnimationChanged event)
|
||||
{
|
||||
final Actor actor = event.getActor();
|
||||
|
||||
@@ -240,7 +291,8 @@ public class TMorph extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
private void onGameTick(GameTick event)
|
||||
@Subscribe
|
||||
public void onGameTick(GameTick event)
|
||||
{
|
||||
if (client.getGameState() != GameState.LOGGED_IN)
|
||||
{
|
||||
@@ -257,14 +309,15 @@ public class TMorph extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
updateGear(panelMorph, player);
|
||||
updateGear(set1, player);
|
||||
updateGear(set2, player);
|
||||
updateGear(set3, player);
|
||||
}
|
||||
|
||||
private void updateGear(Map<String, String> map, Player player)
|
||||
public void updateGear(Map<String, String> map, Player player)
|
||||
{
|
||||
if (map == null || map.isEmpty())
|
||||
if (map == null || map.isEmpty() || player.getPlayerAppearance() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2019, ganom <https://github.com/Ganom>
|
||||
* 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.tmorph;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TmorphSet
|
||||
{
|
||||
private String name;
|
||||
private int helmet;
|
||||
private int cape;
|
||||
private int amulet;
|
||||
private int weapon;
|
||||
private int torso;
|
||||
private int shield;
|
||||
private int legs;
|
||||
private int hands;
|
||||
private int boots;
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Copyright (c) 2019, ganom <https://github.com/Ganom>
|
||||
* 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.tmorph.ui;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JComboBox;
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.kit.KitType;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
import net.runelite.client.plugins.tmorph.TMorph;
|
||||
import net.runelite.client.ui.ColorScheme;
|
||||
import net.runelite.client.ui.components.ComboBoxIconEntry;
|
||||
import net.runelite.client.ui.components.ComboBoxListRenderer;
|
||||
import net.runelite.client.util.AsyncBufferedImage;
|
||||
import net.runelite.client.util.ImageUtil;
|
||||
import net.runelite.http.api.item.ItemEquipmentStats;
|
||||
import net.runelite.http.api.item.ItemStats;
|
||||
import org.pushingpixels.substance.internal.utils.SubstanceDropDownButton;
|
||||
|
||||
@Getter
|
||||
public class EquipSlot extends JComboBox<ComboBoxIconEntry>
|
||||
{
|
||||
private final ComboBoxIconEntry original;
|
||||
private Map<Integer, ComboBoxIconEntry> boxMap;
|
||||
private KitType kitType;
|
||||
|
||||
EquipSlot(KitType kitType)
|
||||
{
|
||||
super();
|
||||
this.kitType = kitType;
|
||||
this.boxMap = new LinkedHashMap<>();
|
||||
setPreferredSize(new Dimension(200, 42));
|
||||
setBackground(ColorScheme.DARK_GRAY_COLOR);
|
||||
setRenderer(new ComboBoxListRenderer());
|
||||
original = new ComboBoxIconEntry(
|
||||
new ImageIcon(ImageUtil.getResourceStreamFromClass(TMorph.class, kitType.getName().toLowerCase() + ".png")),
|
||||
kitType.getName(),
|
||||
null
|
||||
);
|
||||
addItem(original);
|
||||
setSelectedIndex(0);
|
||||
for (Component component : getComponents())
|
||||
{
|
||||
if (component instanceof SubstanceDropDownButton)
|
||||
{
|
||||
remove(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void populate(Client client, ItemManager itemManager)
|
||||
{
|
||||
assert client.isClientThread() : "Populate must be called on client thread";
|
||||
|
||||
for (int i = 0; i < client.getItemCount(); i++)
|
||||
{
|
||||
ItemStats stats = itemManager.getItemStats(i, false);
|
||||
|
||||
if (stats == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!stats.isEquipable())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ItemEquipmentStats equipment = stats.getEquipment();
|
||||
|
||||
if (equipment == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (equipment.getSlot() != kitType.getIndex())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
AsyncBufferedImage image = itemManager.getImage(i);
|
||||
|
||||
if (image == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
final ComboBoxIconEntry entry = new ComboBoxIconEntry(
|
||||
new ImageIcon(image),
|
||||
client.getItemDefinition(i).getName(),
|
||||
client.getItemDefinition(i)
|
||||
);
|
||||
boxMap.put(i, entry);
|
||||
addItem(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,453 @@
|
||||
/*
|
||||
* Copyright (c) 2019, ganom <https://github.com/Ganom>
|
||||
* 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.tmorph.ui;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import javax.inject.Inject;
|
||||
import javax.swing.Box;
|
||||
import javax.swing.BoxLayout;
|
||||
import static javax.swing.BoxLayout.Y_AXIS;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameState;
|
||||
import net.runelite.api.ItemDefinition;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.kit.KitType;
|
||||
import static net.runelite.api.kit.KitType.AMULET;
|
||||
import static net.runelite.api.kit.KitType.BOOTS;
|
||||
import static net.runelite.api.kit.KitType.CAPE;
|
||||
import static net.runelite.api.kit.KitType.HANDS;
|
||||
import static net.runelite.api.kit.KitType.HELMET;
|
||||
import static net.runelite.api.kit.KitType.LEGS;
|
||||
import static net.runelite.api.kit.KitType.SHIELD;
|
||||
import static net.runelite.api.kit.KitType.TORSO;
|
||||
import static net.runelite.api.kit.KitType.WEAPON;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.Notifier;
|
||||
import net.runelite.client.database.DatabaseManager;
|
||||
import static net.runelite.client.database.data.Tables.TMORPH_SETS;
|
||||
import net.runelite.client.database.data.tables.records.TmorphSetsRecord;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
import net.runelite.client.plugins.tmorph.TMorph;
|
||||
import net.runelite.client.plugins.tmorph.TmorphSet;
|
||||
import net.runelite.client.ui.PluginPanel;
|
||||
import net.runelite.client.ui.components.ComboBoxIconEntry;
|
||||
import net.runelite.client.util.Clipboard;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Result;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
|
||||
@Slf4j
|
||||
public class TPanel extends PluginPanel
|
||||
{
|
||||
private static final Set<KitType> BLACKLIST = ImmutableSet.of(KitType.AMMUNITION, KitType.RING, KitType.HEAD, KitType.JAW);
|
||||
|
||||
private final Client client;
|
||||
private final DatabaseManager databaseManager;
|
||||
private final ItemManager itemManager;
|
||||
private final TMorph plugin;
|
||||
private final Notifier notifier;
|
||||
|
||||
private final JComboBox<String> selector;
|
||||
private final Map<KitType, EquipSlot> equipSlots;
|
||||
private final Map<KitType, Integer> kitToId;
|
||||
private final Map<String, TmorphSet> setMap;
|
||||
private final ExecutorService executor;
|
||||
private JPanel equipPanel;
|
||||
|
||||
@Inject
|
||||
public TPanel(
|
||||
final Client client,
|
||||
final DatabaseManager databaseManager,
|
||||
final ItemManager itemManager,
|
||||
final TMorph plugin,
|
||||
final Notifier notifier
|
||||
)
|
||||
{
|
||||
super(false);
|
||||
this.client = client;
|
||||
this.databaseManager = databaseManager;
|
||||
this.itemManager = itemManager;
|
||||
this.plugin = plugin;
|
||||
this.notifier = notifier;
|
||||
this.equipSlots = new LinkedHashMap<>();
|
||||
this.kitToId = new HashMap<>();
|
||||
this.setMap = new HashMap<>();
|
||||
this.selector = new JComboBox<>();
|
||||
this.executor = Executors.newSingleThreadExecutor();
|
||||
init();
|
||||
}
|
||||
|
||||
private void init()
|
||||
{
|
||||
selector.addItem("Populating fields...");
|
||||
selector.setSelectedIndex(0);
|
||||
selector.addActionListener((e) ->
|
||||
{
|
||||
String name = (String) selector.getSelectedItem();
|
||||
Result<TmorphSetsRecord> recs = databaseManager.getDsl()
|
||||
.selectFrom(TMORPH_SETS)
|
||||
.where(TMORPH_SETS.SET_NAME.eq(name))
|
||||
.fetch();
|
||||
|
||||
for (TmorphSetsRecord rec : recs)
|
||||
{
|
||||
for (Map.Entry<KitType, EquipSlot> entry : equipSlots.entrySet())
|
||||
{
|
||||
int id = rec.getValue(kitToField(entry.getKey()));
|
||||
EquipSlot es = entry.getValue();
|
||||
es.setSelectedItem(es.getBoxMap().getOrDefault(id, es.getOriginal()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
final JLabel title = new JLabel();
|
||||
title.setText("Tmorph Sets");
|
||||
title.setForeground(Color.WHITE);
|
||||
title.setHorizontalAlignment(JLabel.CENTER);
|
||||
title.setVerticalAlignment(JLabel.CENTER);
|
||||
|
||||
final JPanel titleAndMarkersPanel = new JPanel();
|
||||
titleAndMarkersPanel.setLayout(new BorderLayout());
|
||||
titleAndMarkersPanel.add(title, BorderLayout.CENTER);
|
||||
|
||||
final JPanel northAnchoredPanel = new JPanel();
|
||||
northAnchoredPanel.setLayout(new BoxLayout(northAnchoredPanel, Y_AXIS));
|
||||
northAnchoredPanel.setBorder(new EmptyBorder(0, 0, 10, 0));
|
||||
northAnchoredPanel.add(titleAndMarkersPanel);
|
||||
northAnchoredPanel.add(Box.createRigidArea(new Dimension(0, 10)));
|
||||
northAnchoredPanel.add(selector);
|
||||
|
||||
final JPanel containerHolder = new JPanel();
|
||||
final JPanel containerPanel = new JPanel();
|
||||
|
||||
final JLabel caption = new JLabel();
|
||||
caption.setText("Morph Selector");
|
||||
caption.setForeground(Color.WHITE);
|
||||
caption.setHorizontalAlignment(JLabel.CENTER);
|
||||
caption.setVerticalAlignment(JLabel.CENTER);
|
||||
|
||||
final JPanel captionPanel = new JPanel();
|
||||
captionPanel.add(caption);
|
||||
|
||||
equipPanel = new JPanel();
|
||||
equipPanel.setLayout(new GridLayout(11, 1, 1, 1));
|
||||
addSlots();
|
||||
|
||||
containerPanel.setLayout(new BorderLayout());
|
||||
containerPanel.add(captionPanel, BorderLayout.NORTH);
|
||||
containerPanel.add(equipPanel, BorderLayout.CENTER);
|
||||
|
||||
containerHolder.add(containerPanel);
|
||||
|
||||
final JPanel contentPanel = new JPanel();
|
||||
final BoxLayout contentLayout = new BoxLayout(contentPanel, Y_AXIS);
|
||||
contentPanel.setLayout(contentLayout);
|
||||
contentPanel.add(containerHolder);
|
||||
|
||||
final JPanel contentWrapper = new JPanel(new BorderLayout());
|
||||
contentWrapper.add(Box.createGlue(), BorderLayout.CENTER);
|
||||
contentWrapper.add(contentPanel, BorderLayout.NORTH);
|
||||
final JScrollPane contentWrapperPane = new JScrollPane(contentWrapper);
|
||||
contentWrapperPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
|
||||
setLayout(new BorderLayout());
|
||||
setBorder(new EmptyBorder(10, 10, 10, 10));
|
||||
add(northAnchoredPanel, BorderLayout.NORTH);
|
||||
add(contentWrapperPane, BorderLayout.CENTER);
|
||||
executor.submit(this::populateSelector);
|
||||
}
|
||||
|
||||
private void populateSelector()
|
||||
{
|
||||
if (!databaseManager.checkTableExists("TMORPH_SETS"))
|
||||
{
|
||||
databaseManager.getDsl().createTable(TMORPH_SETS)
|
||||
.column(TMORPH_SETS.SET_NAME, SQLDataType.VARCHAR(255).nullable(false))
|
||||
.column(TMORPH_SETS.HELMET, SQLDataType.INTEGER.nullable(false))
|
||||
.column(TMORPH_SETS.CAPE, SQLDataType.INTEGER.nullable(false))
|
||||
.column(TMORPH_SETS.AMULET, SQLDataType.INTEGER.nullable(false))
|
||||
.column(TMORPH_SETS.WEAPON, SQLDataType.INTEGER.nullable(false))
|
||||
.column(TMORPH_SETS.TORSO, SQLDataType.INTEGER.nullable(false))
|
||||
.column(TMORPH_SETS.SHIELD, SQLDataType.INTEGER.nullable(false))
|
||||
.column(TMORPH_SETS.LEGS, SQLDataType.INTEGER.nullable(false))
|
||||
.column(TMORPH_SETS.HANDS, SQLDataType.INTEGER.nullable(false))
|
||||
.column(TMORPH_SETS.BOOTS, SQLDataType.INTEGER.nullable(false))
|
||||
.execute();
|
||||
}
|
||||
|
||||
Result<TmorphSetsRecord> recs = databaseManager.getDsl().selectFrom(TMORPH_SETS).fetch();
|
||||
setMap.clear();
|
||||
selector.removeAllItems();
|
||||
selector.addItem("Select your set...");
|
||||
selector.setSelectedIndex(0);
|
||||
|
||||
for (Record record : recs)
|
||||
{
|
||||
TmorphSet tmo = new TmorphSet();
|
||||
String name = record.getValue(TMORPH_SETS.SET_NAME);
|
||||
tmo.setName(name);
|
||||
tmo.setHelmet(record.getValue(TMORPH_SETS.HELMET));
|
||||
tmo.setCape(record.getValue(TMORPH_SETS.CAPE));
|
||||
tmo.setAmulet(record.getValue(TMORPH_SETS.AMULET));
|
||||
tmo.setWeapon(record.getValue(TMORPH_SETS.WEAPON));
|
||||
tmo.setTorso(record.getValue(TMORPH_SETS.TORSO));
|
||||
tmo.setShield(record.getValue(TMORPH_SETS.SHIELD));
|
||||
tmo.setLegs(record.getValue(TMORPH_SETS.LEGS));
|
||||
tmo.setHands(record.getValue(TMORPH_SETS.HANDS));
|
||||
tmo.setBoots(record.getValue(TMORPH_SETS.BOOTS));
|
||||
setMap.put(name, tmo);
|
||||
selector.addItem(name);
|
||||
}
|
||||
}
|
||||
|
||||
private void addSlots()
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
for (KitType kitType : KitType.values())
|
||||
{
|
||||
if (BLACKLIST.contains(kitType))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
final EquipSlot equip = new EquipSlot(kitType);
|
||||
|
||||
equip.addItemListener((e) ->
|
||||
{
|
||||
if (e.getStateChange() == ItemEvent.SELECTED)
|
||||
{
|
||||
ComboBoxIconEntry combo = (ComboBoxIconEntry) e.getItem();
|
||||
|
||||
if (combo.getData() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ItemDefinition def = (ItemDefinition) combo.getData();
|
||||
KitType type = null;
|
||||
|
||||
for (Map.Entry<KitType, EquipSlot> entry : equipSlots.entrySet())
|
||||
{
|
||||
if (entry.getValue() == e.getSource())
|
||||
{
|
||||
type = entry.getKey();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (kitToId.containsKey(type))
|
||||
{
|
||||
kitToId.replace(type, def.getId());
|
||||
}
|
||||
else
|
||||
{
|
||||
kitToId.put(type, def.getId());
|
||||
}
|
||||
|
||||
if (client.getGameState() == GameState.LOGGED_IN)
|
||||
{
|
||||
generate(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
equipSlots.put(kitType, equip);
|
||||
equipPanel.add(equip);
|
||||
i++;
|
||||
}
|
||||
|
||||
final JButton setButton = new JButton("Set/Copy Active Morph");
|
||||
setButton.addActionListener((e) -> plugin.setPanelMorph(generate(true)));
|
||||
equipPanel.add(setButton);
|
||||
|
||||
final JButton saveButton = new JButton("Save Active Morph");
|
||||
saveButton.addActionListener((e) ->
|
||||
{
|
||||
final String s = JOptionPane.showInputDialog(saveButton, "What would you like to name the set?");
|
||||
|
||||
if (s == null || s.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Result<TmorphSetsRecord> records = databaseManager.getDsl()
|
||||
.selectFrom(TMORPH_SETS)
|
||||
.where(TMORPH_SETS.SET_NAME.eq(s))
|
||||
.fetch();
|
||||
|
||||
boolean exists = records.isNotEmpty();
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
databaseManager.getDsl().insertInto(TMORPH_SETS)
|
||||
.set(TMORPH_SETS.SET_NAME, s)
|
||||
.set(TMORPH_SETS.HELMET, kitToId.getOrDefault(HELMET, -1))
|
||||
.set(TMORPH_SETS.CAPE, kitToId.getOrDefault(CAPE, -1))
|
||||
.set(TMORPH_SETS.AMULET, kitToId.getOrDefault(AMULET, -1))
|
||||
.set(TMORPH_SETS.WEAPON, kitToId.getOrDefault(WEAPON, -1))
|
||||
.set(TMORPH_SETS.TORSO, kitToId.getOrDefault(TORSO, -1))
|
||||
.set(TMORPH_SETS.SHIELD, kitToId.getOrDefault(SHIELD, -1))
|
||||
.set(TMORPH_SETS.LEGS, kitToId.getOrDefault(LEGS, -1))
|
||||
.set(TMORPH_SETS.HANDS, kitToId.getOrDefault(HANDS, -1))
|
||||
.set(TMORPH_SETS.BOOTS, kitToId.getOrDefault(BOOTS, -1))
|
||||
.execute();
|
||||
executor.submit(this::populateSelector);
|
||||
}
|
||||
else
|
||||
{
|
||||
databaseManager.getDsl().update(TMORPH_SETS)
|
||||
.set(TMORPH_SETS.HELMET, kitToId.getOrDefault(HELMET, -1))
|
||||
.set(TMORPH_SETS.CAPE, kitToId.getOrDefault(CAPE, -1))
|
||||
.set(TMORPH_SETS.AMULET, kitToId.getOrDefault(AMULET, -1))
|
||||
.set(TMORPH_SETS.WEAPON, kitToId.getOrDefault(WEAPON, -1))
|
||||
.set(TMORPH_SETS.TORSO, kitToId.getOrDefault(TORSO, -1))
|
||||
.set(TMORPH_SETS.SHIELD, kitToId.getOrDefault(SHIELD, -1))
|
||||
.set(TMORPH_SETS.LEGS, kitToId.getOrDefault(LEGS, -1))
|
||||
.set(TMORPH_SETS.HANDS, kitToId.getOrDefault(HANDS, -1))
|
||||
.set(TMORPH_SETS.BOOTS, kitToId.getOrDefault(BOOTS, -1))
|
||||
.where(TMORPH_SETS.SET_NAME.eq(s))
|
||||
.execute();
|
||||
}
|
||||
});
|
||||
equipPanel.add(saveButton);
|
||||
}
|
||||
|
||||
public void populateSlots()
|
||||
{
|
||||
for (EquipSlot slot : equipSlots.values())
|
||||
{
|
||||
slot.populate(client, itemManager);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, String> generate(boolean copy)
|
||||
{
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final Player player = client.getLocalPlayer();
|
||||
|
||||
if (player == null
|
||||
|| player.getPlayerAppearance() == null
|
||||
|| client.getWidget(WidgetInfo.LOGIN_CLICK_TO_PLAY_SCREEN) != null
|
||||
|| client.getViewportWidget() == null)
|
||||
{
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
for (KitType kitType : KitType.values())
|
||||
{
|
||||
if (BLACKLIST.contains(kitType))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
final Widget widget = client.getWidget(kitType.getWidgetInfo());
|
||||
|
||||
if (widget == null || widget.getDynamicChildren() == null || widget.getDynamicChildren().length < 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
final int id = itemManager.canonicalize(widget.getDynamicChildren()[1].getItemId());
|
||||
final int kitId = kitToId.getOrDefault(kitType, -1);
|
||||
|
||||
if (kitId == -1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
sb.append(id);
|
||||
sb.append(",");
|
||||
sb.append(kitId);
|
||||
sb.append(":");
|
||||
sb.append(kitType.getName());
|
||||
sb.append("\n");
|
||||
}
|
||||
|
||||
final String s = sb.toString();
|
||||
|
||||
if (copy)
|
||||
{
|
||||
Clipboard.store(s);
|
||||
notifier.notify("Saved to clipboard.");
|
||||
}
|
||||
|
||||
return plugin.getNEWLINE_SPLITTER()
|
||||
.withKeyValueSeparator(":")
|
||||
.split(s);
|
||||
}
|
||||
|
||||
private TableField<TmorphSetsRecord, Integer> kitToField(KitType kitType)
|
||||
{
|
||||
switch (kitType)
|
||||
{
|
||||
case HELMET:
|
||||
return TMORPH_SETS.HELMET;
|
||||
case CAPE:
|
||||
return TMORPH_SETS.CAPE;
|
||||
case AMULET:
|
||||
return TMORPH_SETS.AMULET;
|
||||
case WEAPON:
|
||||
return TMORPH_SETS.WEAPON;
|
||||
case TORSO:
|
||||
return TMORPH_SETS.TORSO;
|
||||
case SHIELD:
|
||||
return TMORPH_SETS.SHIELD;
|
||||
case LEGS:
|
||||
return TMORPH_SETS.LEGS;
|
||||
case HANDS:
|
||||
return TMORPH_SETS.HANDS;
|
||||
case BOOTS:
|
||||
return TMORPH_SETS.BOOTS;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class MiscUtils
|
||||
|
||||
if (client.getWorldType().stream().anyMatch(worldType -> worldType == WorldType.PVP || worldType == WorldType.HIGH_RISK))
|
||||
{
|
||||
wildernessLevel += 15;
|
||||
wildernessLevel += 10;
|
||||
}
|
||||
|
||||
return Math.max(0, wildernessLevel);
|
||||
|
||||
@@ -72,9 +72,9 @@ public class PvPUtil
|
||||
{
|
||||
if (client.getVar(Varbits.IN_WILDERNESS) != 1)
|
||||
{
|
||||
return Math.abs(client.getLocalPlayer().getCombatLevel() - player.getCombatLevel()) <= 15;
|
||||
return Math.abs(client.getLocalPlayer().getCombatLevel() - player.getCombatLevel()) <= 10;
|
||||
}
|
||||
wildernessLevel = 15;
|
||||
wildernessLevel = 10;
|
||||
}
|
||||
return Math.abs(client.getLocalPlayer().getCombatLevel() - player.getCombatLevel())
|
||||
< (getWildernessLevelFrom(client.getLocalPlayer().getWorldLocation()) + wildernessLevel);
|
||||
|
||||
@@ -0,0 +1,735 @@
|
||||
package net.runelite.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.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.ARMADYL_GODSWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ARMADYL_GODSWORD_OR, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ARMADYL_GODSWORD_20593, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ARMADYL_GODSWORD_22665, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ARCLIGHT, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BANDOS_GODSWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BANDOS_GODSWORD_OR, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BANDOS_GODSWORD_20782, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BANDOS_GODSWORD_21060, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BARBTAIL_HARPOON, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BARRELCHEST_ANCHOR, 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_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.BLESSED_AXE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BLADE_OF_SAELDOR, 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.BEACH_BOXING_GLOVES, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BEACH_BOXING_GLOVES_11706, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.PET_ROCK, 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.CATTLEPROD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRIER_BELL, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.NEW_CRYSTAL_HALBERD_FULL_I, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_FULL_I, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_910_I, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_810_I, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_710_I, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_610_I, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_510_I, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_410_I, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_310_I, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_210_I, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_110_I, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.NEW_CRYSTAL_HALBERD_FULL, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_FULL, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_910, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_810, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_710, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_610, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_510, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_410, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_310, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_210, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CRYSTAL_HALBERD_110, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CURSED_GOBLIN_HAMMER, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.DARK_DAGGER, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.DARKLIGHT, 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_100, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.DHAROKS_GREATAXE_75, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.DHAROKS_GREATAXE_50, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.DHAROKS_GREATAXE_25, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.DHAROKS_GREATAXE_0, 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_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_HASTAP, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.DRAGON_HASTAP_22737, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.DRAGON_HASTAP_22740, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.DRAGON_HASTAKP, 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_SCIMITAR, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.DRAGON_SCIMITAR_OR, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.DRAGON_SCIMITAR_20406, 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.EXCALIBUR, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.EXCALIBUR_8280, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ELDER_MAUL, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ELDER_MAUL_21205, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.EVENT_RPG, 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.GOLDEN_TENCH, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.GILDED_HASTA, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.GILDED_2H_SWORD, 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.GRANITE_LONGSWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.GRANITE_HAMMER, 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.GUTHANS_WARSPEAR, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.GUTHANS_WARSPEAR_100, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.GUTHANS_WARSPEAR_75, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.GUTHANS_WARSPEAR_50, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.GUTHANS_WARSPEAR_25, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.GUTHANS_WARSPEAR_0, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.HALBERD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.HAND_FAN, 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.BUTTERFLY_NET, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.HILL_GIANT_CLUB, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.RUBBER_CHICKEN, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.RUBBER_CHICKEN_10732, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.RUBBER_CHICKEN_22666, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.OILY_FISHING_ROD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.OILY_PEARL_FISHING_ROD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SARAS_BLESSED_SWORD_FULL, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.GREEN_BANNER, 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.KATANA, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.KERIS, 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.LEAFBLADED_BATTLEAXE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.LYRE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ENCHANTED_LYRE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ENCHANTED_LYRE5, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ENCHANTED_LYRE4, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ENCHANTED_LYRE3, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ENCHANTED_LYRE2, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ENCHANTED_LYRE1, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.MAGIC_SECATEURS, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.MAGIC_SECATEURS_NZ, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.MAGIC_BUTTERFLY_NET, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.MACE, 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.RED_FLOWERS, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ASSORTED_FLOWERS, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BLACK_FLOWERS, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BLUE_FLOWERS, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ORANGE_FLOWERS, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.PURPLE_FLOWERS, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.WHITE_FLOWERS, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.YELLOW_FLOWERS, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BLUE_FLOWERS_8936, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.RED_FLOWERS_8938, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.MOUSE_TOY, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.NUNCHAKU, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ORANGE_SALAMANDER, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CHAOTIC_HANDEGG, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.PEACEFUL_HANDEGG, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.HOLY_HANDEGG, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.PROP_SWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.MEAT_TENDERISER, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.STONE_BOWL, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.MACHETE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.JADE_MACHETE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.OPAL_MACHETE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.RED_TOPAZ_MACHETE, 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_SALAMANDER, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ROCK_HAMMER, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ROYAL_SCEPTRE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.RUNE_2H_SWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.RUNE_AXE, 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_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.SARADOMIN_GODSWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SARADOMIN_GODSWORD_OR, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SARADOMIN_SWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SARADOMIN_MJOLNIR, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SARADOMINS_BLESSED_SWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SHADOW_SWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SCYTHE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SCYTHE_10735, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SCYTHE_OF_VITUR, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SCYTHE_OF_VITUR_UNCHARGED, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SCYTHE_OF_VITUR_22664, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SILVER_SICKLE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SILVER_SICKLE_B, 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.SPEAR, 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.SWAMP_LIZARD, 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_100, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.TORAGS_HAMMERS_75, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.TORAGS_HAMMERS_50, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.TORAGS_HAMMERS_25, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.TORAGS_HAMMERS_0, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.TRAINING_SWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.TZHAARKETEM, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.TZHAARKETOM, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.VERACS_FLAIL, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.VERACS_FLAIL_100, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.VERACS_FLAIL_75, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.VERACS_FLAIL_50, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.VERACS_FLAIL_25, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.VERACS_FLAIL_0, 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.ARCEUUS_BANNER, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.HOSIDIUS_BANNER, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.LOVAKENGJ_BANNER, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.PISCARILIUS_BANNER, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SHAYZIEN_BANNER, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.EASTER_BASKET, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.TROLLWEISS, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.SNOWBALL, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.STALE_BAGUETTE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.RUNE_BATTLEAXE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.RUNE_BATTLEAXE_20552, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.LARGE_SPADE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.CANDY_CANE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.WOODEN_SPOON, 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_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.WOLFBANE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.WOODEN_SWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ZAMORAK_GODSWORD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ZAMORAK_GODSWORD_OR, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ZAMORAKIAN_HASTA, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ZAMORAKIAN_SPEAR, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.ZOMBIE_HEAD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.OAK_BLACKJACK, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.WILLOW_BLACKJACK, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.MAPLE_BLACKJACK, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.OAK_BLACKJACKD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.WILLOW_BLACKJACKD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.MAPLE_BLACKJACKD, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.OAK_BLACKJACKO, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.WILLOW_BLACKJACKO, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.MAPLE_BLACKJACKO, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BIRTHDAY_BALLOONS, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.BIRTHDAY_CAKE, WeaponStyle.MELEE);
|
||||
StyleMap.put(ItemID.NOOSE_WAND, 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.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.CRAWS_BOW, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRAWS_BOW_U, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CROSSBOW, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.NEW_CRYSTAL_BOW_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_FULL_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_910_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_810_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_710_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_610_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_510_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_410_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_310_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_210_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_110_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.NEW_CRYSTAL_BOW, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_FULL, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_910, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_810, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_710, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_610, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_510, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_410, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_310, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_210, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.CRYSTAL_BOW_110, 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.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_100, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.KARILS_CROSSBOW_75, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.KARILS_CROSSBOW_50, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.KARILS_CROSSBOW_25, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.KARILS_CROSSBOW_0, 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_I, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MAGIC_SHORTBOW_20558, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MAPLE_LONGBOW, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MAPLE_SHORTBOW, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MITH_CROSSBOW, 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.MONKEY_TALISMAN, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MORRIGANS_THROWING_AXE, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MORRIGANS_JAVELIN, WeaponStyle.RANGE);
|
||||
StyleMap.put(ItemID.MUD_PIE, 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_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_100, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.AHRIMS_STAFF_75, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.AHRIMS_STAFF_50, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.AHRIMS_STAFF_25, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.AHRIMS_STAFF_0, 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.BROKEN_STAFF, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.BRYOPHYTAS_STAFF, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.BRYOPHYTAS_STAFF_UNCHARGED, 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.FIRE_BATTLESTAFF, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.GUTHIX_CROZIER, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.GUTHIX_STAFF, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.IBANS_STAFF, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.IBANS_STAFF_U, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.IBANS_STAFF_1410, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.IVANDIS_FLAIL, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.KODAI_WAND, 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.PHARAOHS_SCEPTRE, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_8, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_7, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_6, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_5, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_4, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_3, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_2, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.PHARAOHS_SCEPTRE_1, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.ROD_OF_IVANDIS_10, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.ROD_OF_IVANDIS_9, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.ROD_OF_IVANDIS_8, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.ROD_OF_IVANDIS_7, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.ROD_OF_IVANDIS_6, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.ROD_OF_IVANDIS_5, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.ROD_OF_IVANDIS_4, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.ROD_OF_IVANDIS_3, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.ROD_OF_IVANDIS_2, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.ROD_OF_IVANDIS_1, 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_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_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.UNCHARGED_TRIDENT, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.UNCHARGED_TRIDENT_E, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.UNCHARGED_TOXIC_TRIDENT, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.UNCHARGED_TOXIC_TRIDENT_E, 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.VOID_KNIGHT_MACE, WeaponStyle.MAGIC);
|
||||
StyleMap.put(ItemID.VOID_KNIGHT_MACE_BROKEN, 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);
|
||||
//what the fuck...
|
||||
StyleMap.put(ItemID.GNOMEBALL, WeaponStyle.MAGIC);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package net.runelite.client.util;
|
||||
|
||||
public enum WeaponStyle
|
||||
{
|
||||
MAGIC, RANGE, MELEE
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
@@ -34,6 +34,7 @@ import javax.inject.Inject;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.client.config.OpenOSRSConfig;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import net.runelite.client.Notifier;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -59,6 +60,10 @@ public class NpcIndicatorsPluginTest
|
||||
@Bind
|
||||
private OpenOSRSConfig openOSRSConfig;
|
||||
|
||||
@Mock
|
||||
@Bind
|
||||
private Notifier notifier;
|
||||
|
||||
@Inject
|
||||
private NpcIndicatorsPlugin npcIndicatorsPlugin;
|
||||
|
||||
|
||||