Merge remote-tracking branch 'rl-upstream/master' into rl-upstream-220422
This commit is contained in:
@@ -162,9 +162,6 @@ public class ExaminePlugin extends Plugin
|
|||||||
ExamineType type;
|
ExamineType type;
|
||||||
switch (event.getType())
|
switch (event.getType())
|
||||||
{
|
{
|
||||||
case ITEM_EXAMINE:
|
|
||||||
type = ExamineType.ITEM;
|
|
||||||
break;
|
|
||||||
case OBJECT_EXAMINE:
|
case OBJECT_EXAMINE:
|
||||||
type = ExamineType.OBJECT;
|
type = ExamineType.OBJECT;
|
||||||
break;
|
break;
|
||||||
@@ -172,6 +169,7 @@ public class ExaminePlugin extends Plugin
|
|||||||
type = ExamineType.NPC;
|
type = ExamineType.NPC;
|
||||||
break;
|
break;
|
||||||
case GAMEMESSAGE:
|
case GAMEMESSAGE:
|
||||||
|
case ITEM_EXAMINE: // these are spoofed by us from a [proc,examine_item] script edit
|
||||||
type = ExamineType.IF3_ITEM;
|
type = ExamineType.IF3_ITEM;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ import net.runelite.api.MenuEntry;
|
|||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.Point;
|
import net.runelite.api.Point;
|
||||||
import net.runelite.api.TileObject;
|
import net.runelite.api.TileObject;
|
||||||
|
import net.runelite.api.widgets.WidgetID;
|
||||||
|
import net.runelite.api.widgets.WidgetInfo;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
import net.runelite.client.ui.overlay.OverlayLayer;
|
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
@@ -116,7 +118,8 @@ class InteractHighlightOverlay extends Overlay
|
|||||||
NPC npc = plugin.findNpc(id);
|
NPC npc = plugin.findNpc(id);
|
||||||
if (npc != null && config.npcShowHover() && (npc != plugin.getInteractedTarget() || !config.npcShowInteract()))
|
if (npc != null && config.npcShowHover() && (npc != plugin.getInteractedTarget() || !config.npcShowInteract()))
|
||||||
{
|
{
|
||||||
Color highlightColor = menuAction == MenuAction.NPC_SECOND_OPTION || menuAction == MenuAction.WIDGET_TARGET_ON_NPC
|
Color highlightColor = menuAction == MenuAction.NPC_SECOND_OPTION
|
||||||
|
|| menuAction == MenuAction.WIDGET_TARGET_ON_NPC && WidgetInfo.TO_GROUP(client.getSelectedWidget().getId()) == WidgetID.SPELLBOOK_GROUP_ID
|
||||||
? config.npcAttackHoverHighlightColor() : config.npcHoverHighlightColor();
|
? config.npcAttackHoverHighlightColor() : config.npcHoverHighlightColor();
|
||||||
modelOutlineRenderer.drawOutline(npc, config.borderWidth(), highlightColor, config.outlineFeather());
|
modelOutlineRenderer.drawOutline(npc, config.borderWidth(), highlightColor, config.outlineFeather());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ import net.runelite.api.ItemContainer;
|
|||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import static net.runelite.api.ItemID.FIRE_CAPE;
|
import static net.runelite.api.ItemID.FIRE_CAPE;
|
||||||
import static net.runelite.api.ItemID.INFERNAL_CAPE;
|
import static net.runelite.api.ItemID.INFERNAL_CAPE;
|
||||||
|
import net.runelite.api.MenuAction;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.NpcID;
|
import net.runelite.api.NpcID;
|
||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
@@ -439,64 +440,65 @@ public class TimersPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onMenuOptionClicked(MenuOptionClicked event)
|
public void onMenuOptionClicked(MenuOptionClicked event)
|
||||||
{
|
{
|
||||||
if (config.showStamina()
|
if (event.isItemOp() && event.getMenuOption().equals("Drink"))
|
||||||
&& event.getMenuOption().contains("Drink")
|
|
||||||
&& (event.getId() == ItemID.STAMINA_MIX1
|
|
||||||
|| event.getId() == ItemID.STAMINA_MIX2
|
|
||||||
|| event.getId() == ItemID.EGNIOL_POTION_1
|
|
||||||
|| event.getId() == ItemID.EGNIOL_POTION_2
|
|
||||||
|| event.getId() == ItemID.EGNIOL_POTION_3
|
|
||||||
|| event.getId() == ItemID.EGNIOL_POTION_4))
|
|
||||||
{
|
{
|
||||||
// Needs menu option hook because mixes use a common drink message, distinct from their standard potion messages
|
if ((event.getItemId() == ItemID.STAMINA_MIX1
|
||||||
createStaminaTimer();
|
|| event.getItemId() == ItemID.STAMINA_MIX2
|
||||||
return;
|
|| event.getItemId() == ItemID.EGNIOL_POTION_1
|
||||||
|
|| event.getItemId() == ItemID.EGNIOL_POTION_2
|
||||||
|
|| event.getItemId() == ItemID.EGNIOL_POTION_3
|
||||||
|
|| event.getItemId() == ItemID.EGNIOL_POTION_4)
|
||||||
|
&& config.showStamina())
|
||||||
|
{
|
||||||
|
// Needs menu option hook because mixes use a common drink message, distinct from their standard potion messages
|
||||||
|
createStaminaTimer();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((event.getItemId() == ItemID.ANTIFIRE_MIX1
|
||||||
|
|| event.getItemId() == ItemID.ANTIFIRE_MIX2)
|
||||||
|
&& config.showAntiFire())
|
||||||
|
{
|
||||||
|
// Needs menu option hook because mixes use a common drink message, distinct from their standard potion messages
|
||||||
|
createGameTimer(ANTIFIRE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((event.getItemId() == ItemID.EXTENDED_ANTIFIRE_MIX1
|
||||||
|
|| event.getItemId() == ItemID.EXTENDED_ANTIFIRE_MIX2)
|
||||||
|
&& config.showAntiFire())
|
||||||
|
{
|
||||||
|
// Needs menu option hook because mixes use a common drink message, distinct from their standard potion messages
|
||||||
|
createGameTimer(EXANTIFIRE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((event.getItemId() == ItemID.SUPER_ANTIFIRE_MIX1
|
||||||
|
|| event.getItemId() == ItemID.SUPER_ANTIFIRE_MIX2)
|
||||||
|
&& config.showAntiFire())
|
||||||
|
{
|
||||||
|
// Needs menu option hook because mixes use a common drink message, distinct from their standard potion messages
|
||||||
|
createGameTimer(SUPERANTIFIRE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((event.getItemId() == ItemID.EXTENDED_SUPER_ANTIFIRE_MIX1
|
||||||
|
|| event.getItemId() == ItemID.EXTENDED_SUPER_ANTIFIRE_MIX2)
|
||||||
|
&& config.showAntiFire())
|
||||||
|
{
|
||||||
|
// Needs menu option hook because mixes use a common drink message, distinct from their standard potion messages
|
||||||
|
createGameTimer(EXSUPERANTIFIRE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.showAntiFire()
|
if (event.getMenuAction() == MenuAction.CC_OP)
|
||||||
&& event.getMenuOption().contains("Drink")
|
|
||||||
&& (event.getId() == ItemID.ANTIFIRE_MIX1
|
|
||||||
|| event.getId() == ItemID.ANTIFIRE_MIX2))
|
|
||||||
{
|
{
|
||||||
// Needs menu option hook because mixes use a common drink message, distinct from their standard potion messages
|
TeleportWidget teleportWidget = TeleportWidget.of(event.getParam1());
|
||||||
createGameTimer(ANTIFIRE);
|
if (teleportWidget != null)
|
||||||
return;
|
{
|
||||||
}
|
lastTeleportClicked = teleportWidget;
|
||||||
|
}
|
||||||
if (config.showAntiFire()
|
|
||||||
&& event.getMenuOption().contains("Drink")
|
|
||||||
&& (event.getId() == ItemID.EXTENDED_ANTIFIRE_MIX1
|
|
||||||
|| event.getId() == ItemID.EXTENDED_ANTIFIRE_MIX2))
|
|
||||||
{
|
|
||||||
// Needs menu option hook because mixes use a common drink message, distinct from their standard potion messages
|
|
||||||
createGameTimer(EXANTIFIRE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.showAntiFire()
|
|
||||||
&& event.getMenuOption().contains("Drink")
|
|
||||||
&& (event.getId() == ItemID.SUPER_ANTIFIRE_MIX1
|
|
||||||
|| event.getId() == ItemID.SUPER_ANTIFIRE_MIX2))
|
|
||||||
{
|
|
||||||
// Needs menu option hook because mixes use a common drink message, distinct from their standard potion messages
|
|
||||||
createGameTimer(SUPERANTIFIRE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.showAntiFire()
|
|
||||||
&& event.getMenuOption().contains("Drink")
|
|
||||||
&& (event.getId() == ItemID.EXTENDED_SUPER_ANTIFIRE_MIX1
|
|
||||||
|| event.getId() == ItemID.EXTENDED_SUPER_ANTIFIRE_MIX2))
|
|
||||||
{
|
|
||||||
// Needs menu option hook because mixes use a common drink message, distinct from their standard potion messages
|
|
||||||
createGameTimer(EXSUPERANTIFIRE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TeleportWidget teleportWidget = TeleportWidget.of(event.getParam1());
|
|
||||||
if (teleportWidget != null)
|
|
||||||
{
|
|
||||||
lastTeleportClicked = teleportWidget;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1
runelite-client/src/main/scripts/ExamineItem.hash
Normal file
1
runelite-client/src/main/scripts/ExamineItem.hash
Normal file
@@ -0,0 +1 @@
|
|||||||
|
DEC91CFC6FBA0B927EE291A372CFE618232170A27CF96EEADAD29D1D4B761A82
|
||||||
49
runelite-client/src/main/scripts/ExamineItem.rs2asm
Normal file
49
runelite-client/src/main/scripts/ExamineItem.rs2asm
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
.id 6004
|
||||||
|
.int_stack_count 7
|
||||||
|
.string_stack_count 1
|
||||||
|
.int_var_count 7
|
||||||
|
.string_var_count 1
|
||||||
|
iload 1
|
||||||
|
iconst 100000
|
||||||
|
if_icmpge LABEL4
|
||||||
|
jump LABEL23
|
||||||
|
LABEL4:
|
||||||
|
iload 1
|
||||||
|
sconst ","
|
||||||
|
invoke 46
|
||||||
|
sconst " x "
|
||||||
|
iload 0
|
||||||
|
oc_name
|
||||||
|
sconst "."
|
||||||
|
join_string 4
|
||||||
|
iconst 27 ; ITEM_EXAMINE
|
||||||
|
sconst "mes"
|
||||||
|
runelite_callback
|
||||||
|
; ehc examine info
|
||||||
|
;iload 0
|
||||||
|
;iload 1
|
||||||
|
;iconst 0
|
||||||
|
;iload 2
|
||||||
|
;iload 3
|
||||||
|
;iload 4
|
||||||
|
;iload 5
|
||||||
|
;iload 6
|
||||||
|
;invoke 6005
|
||||||
|
jump LABEL34
|
||||||
|
LABEL23:
|
||||||
|
sload 0
|
||||||
|
iconst 27 ; ITEM_EXAMINE
|
||||||
|
sconst "mes"
|
||||||
|
runelite_callback
|
||||||
|
; ehc examine info
|
||||||
|
;iload 0
|
||||||
|
;iload 1
|
||||||
|
;iconst 1
|
||||||
|
;iload 2
|
||||||
|
;iload 3
|
||||||
|
;iload 4
|
||||||
|
;iload 5
|
||||||
|
;iload 6
|
||||||
|
;invoke 6005
|
||||||
|
LABEL34:
|
||||||
|
return
|
||||||
Reference in New Issue
Block a user