Merge pull request #1131 from Ganom/refactor_container

runeliteapi: Refactor PLAYER_INTERFACE_CONTAINER_OPENED and add documentation.
This commit is contained in:
Tyler Bochard
2019-07-25 18:18:27 -04:00
committed by GitHub
2 changed files with 19 additions and 6 deletions

View File

@@ -45,11 +45,24 @@ public enum VarClientInt
INPUT_TYPE(5),
MEMBERSHIP_STATUS(103),
/**
* -1 = player inventory closed
* 3 = player inventory opened
*/
PLAYER_INVENTORY_OPENED(171),
/**
* 0 = Combat
* 1 = Stats
* 2 = Quest
* 3 = Inventory
* 4 = Equipment
* 5 = Prayer
* 6 = Spellbook
* 7 = Clan
* 8 = Account Managment
* 9 = Friends
* 10 = Logout
* 11 = Options
* 12 = Emotes
* 13 = Music
*/
PLAYER_INTERFACE_CONTAINER_OPENED(171),
INVENTORY_TAB(171),

View File

@@ -98,7 +98,7 @@ class InventoryViewerOverlay extends Overlay
public Dimension render(Graphics2D graphics)
{
if (plugin.isHideWhenInvOpen()
&& client.getVar(VarClientInt.PLAYER_INVENTORY_OPENED) == 3)
&& client.getVar(VarClientInt.PLAYER_INTERFACE_CONTAINER_OPENED) == 3)
{
return null;
}