runelite-api: add equipment inventory slot id, inventory id, logout widget and chat message type 7
This commit is contained in:
@@ -32,6 +32,7 @@ public enum ChatMessageType
|
|||||||
TRADE_RECEIVED(4),
|
TRADE_RECEIVED(4),
|
||||||
PRIVATE_MESSAGE_INFO(5),
|
PRIVATE_MESSAGE_INFO(5),
|
||||||
PRIVATE_MESSAGE_SENT(6),
|
PRIVATE_MESSAGE_SENT(6),
|
||||||
|
PRIVATE_MESSAGE_RECEIVED_MOD(7),
|
||||||
CLANCHAT(9),
|
CLANCHAT(9),
|
||||||
CLANCHAT_INFO(11),
|
CLANCHAT_INFO(11),
|
||||||
TRADE_SENT(12),
|
TRADE_SENT(12),
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2017, Adam <Adam@sigterm.info>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.api;
|
||||||
|
|
||||||
|
public enum EquipmentInventorySlot
|
||||||
|
{
|
||||||
|
HEAD(0),
|
||||||
|
CAPE(1),
|
||||||
|
AMULET(2),
|
||||||
|
WEAPON(3),
|
||||||
|
BODY(4),
|
||||||
|
SHIELD(5),
|
||||||
|
LEGS(7),
|
||||||
|
GLOVES(9),
|
||||||
|
BOOTS(10),
|
||||||
|
RING(12);
|
||||||
|
|
||||||
|
private final int slotIdx;
|
||||||
|
|
||||||
|
EquipmentInventorySlot(int slotIdx)
|
||||||
|
{
|
||||||
|
this.slotIdx = slotIdx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSlotIdx()
|
||||||
|
{
|
||||||
|
return slotIdx;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
43
runelite-api/src/main/java/net/runelite/api/InventoryID.java
Normal file
43
runelite-api/src/main/java/net/runelite/api/InventoryID.java
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2017, Adam <Adam@sigterm.info>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.api;
|
||||||
|
|
||||||
|
public enum InventoryID
|
||||||
|
{
|
||||||
|
INVENTORY(93),
|
||||||
|
EQUIPMENT(94);
|
||||||
|
|
||||||
|
private final int id;
|
||||||
|
|
||||||
|
InventoryID(int id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,6 +26,7 @@ package net.runelite.api.widgets;
|
|||||||
|
|
||||||
class WidgetID
|
class WidgetID
|
||||||
{
|
{
|
||||||
|
static final int LOGOUT_PANEL_ID = 182;
|
||||||
static final int BANK_GROUP_ID = 12;
|
static final int BANK_GROUP_ID = 12;
|
||||||
static final int BANK_INVENTORY_GROUP_ID = 15;
|
static final int BANK_INVENTORY_GROUP_ID = 15;
|
||||||
static final int DEPOSIT_BOX_GROUP_ID = 192;
|
static final int DEPOSIT_BOX_GROUP_ID = 192;
|
||||||
@@ -68,6 +69,11 @@ class WidgetID
|
|||||||
static final int TEXT = 3;
|
static final int TEXT = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static class LogoutPanel
|
||||||
|
{
|
||||||
|
static final int LOGOUT_BUTTON = 6;
|
||||||
|
}
|
||||||
|
|
||||||
static class PestControl
|
static class PestControl
|
||||||
{
|
{
|
||||||
static final int PURPLE_SHIELD = 21;
|
static final int PURPLE_SHIELD = 21;
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ package net.runelite.api.widgets;
|
|||||||
|
|
||||||
public enum WidgetInfo
|
public enum WidgetInfo
|
||||||
{
|
{
|
||||||
|
LOGOUT_BUTTON(WidgetID.LOGOUT_PANEL_ID, WidgetID.LogoutPanel.LOGOUT_BUTTON),
|
||||||
|
|
||||||
INVENTORY(WidgetID.INVENTORY_GROUP_ID, 0),
|
INVENTORY(WidgetID.INVENTORY_GROUP_ID, 0),
|
||||||
|
|
||||||
WORLD_MAP(WidgetID.WORLD_MAP_MENU_GROUP_ID, WidgetID.WorldMap.OPTION),
|
WORLD_MAP(WidgetID.WORLD_MAP_MENU_GROUP_ID, WidgetID.WorldMap.OPTION),
|
||||||
@@ -152,6 +154,11 @@ public enum WidgetInfo
|
|||||||
return childId;
|
return childId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getPackedId()
|
||||||
|
{
|
||||||
|
return groupId << 16 | childId;
|
||||||
|
}
|
||||||
|
|
||||||
public static int TO_GROUP(int id)
|
public static int TO_GROUP(int id)
|
||||||
{
|
{
|
||||||
return id >>> 16;
|
return id >>> 16;
|
||||||
@@ -162,4 +169,9 @@ public enum WidgetInfo
|
|||||||
return id & 0xFFFF;
|
return id & 0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int PACK(int groupId, int childId)
|
||||||
|
{
|
||||||
|
return groupId << 16 | childId;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user