v0.13.19 - Fix on-cooldown spells missing from spellsKnown
- Magic pane query used '.btsd[onclick]' which excludes on-cooldown spells (opacity:0.5, no onclick attribute) - Heartseeker was invisible to hasSpell() during its cooldown period, which is exactly when channeling procs from it - Changed to '.btsd' with onmouseover fallback
This commit is contained in:
parent
49c7ce9cab
commit
e914c08475
5 changed files with 15 additions and 9 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.13.18
|
// @version 0.13.19
|
||||||
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.13.18';
|
const VERSION = '0.13.19';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle automation
|
// — Battle automation
|
||||||
|
|
@ -428,8 +428,10 @@ function parseBattleState() {
|
||||||
STATE.spellsKnown = [];
|
STATE.spellsKnown = [];
|
||||||
const magicPane = document.getElementById('pane_magic');
|
const magicPane = document.getElementById('pane_magic');
|
||||||
if (magicPane) {
|
if (magicPane) {
|
||||||
$$('.btsd[onclick]', magicPane).forEach(el => {
|
// Read all btsd elements with onmouseover (including on-cooldown spells)
|
||||||
|
$$('.btsd', magicPane).forEach(el => {
|
||||||
const omo = el.getAttribute('onmouseover') || '';
|
const omo = el.getAttribute('onmouseover') || '';
|
||||||
|
if (!omo) return;
|
||||||
const m = omo.match(/battle\.set_infopane_spell\('([^']+)',\s*'[^']*',\s*'[^']*',\s*(\d+),\s*(\d+),\s*(\d+)\)/);
|
const m = omo.match(/battle\.set_infopane_spell\('([^']+)',\s*'[^']*',\s*'[^']*',\s*(\d+),\s*(\d+),\s*(\d+)\)/);
|
||||||
if (m) STATE.spellsKnown.push({ n: m[1], mp: parseInt(m[2]), chr: parseInt(m[3]), cd: parseInt(m[4]) });
|
if (m) STATE.spellsKnown.push({ n: m[1], mp: parseInt(m[2]), chr: parseInt(m[3]), cd: parseInt(m[4]) });
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.13.18
|
// @version 0.13.19
|
||||||
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.13.18';
|
const VERSION = '0.13.19';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle automation
|
// — Battle automation
|
||||||
|
|
@ -428,8 +428,10 @@ function parseBattleState() {
|
||||||
STATE.spellsKnown = [];
|
STATE.spellsKnown = [];
|
||||||
const magicPane = document.getElementById('pane_magic');
|
const magicPane = document.getElementById('pane_magic');
|
||||||
if (magicPane) {
|
if (magicPane) {
|
||||||
$$('.btsd[onclick]', magicPane).forEach(el => {
|
// Read all btsd elements with onmouseover (including on-cooldown spells)
|
||||||
|
$$('.btsd', magicPane).forEach(el => {
|
||||||
const omo = el.getAttribute('onmouseover') || '';
|
const omo = el.getAttribute('onmouseover') || '';
|
||||||
|
if (!omo) return;
|
||||||
const m = omo.match(/battle\.set_infopane_spell\('([^']+)',\s*'[^']*',\s*'[^']*',\s*(\d+),\s*(\d+),\s*(\d+)\)/);
|
const m = omo.match(/battle\.set_infopane_spell\('([^']+)',\s*'[^']*',\s*'[^']*',\s*(\d+),\s*(\d+),\s*(\d+)\)/);
|
||||||
if (m) STATE.spellsKnown.push({ n: m[1], mp: parseInt(m[2]), chr: parseInt(m[3]), cd: parseInt(m[4]) });
|
if (m) STATE.spellsKnown.push({ n: m[1], mp: parseInt(m[2]), chr: parseInt(m[3]), cd: parseInt(m[4]) });
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,10 @@ function parseBattleState() {
|
||||||
STATE.spellsKnown = [];
|
STATE.spellsKnown = [];
|
||||||
const magicPane = document.getElementById('pane_magic');
|
const magicPane = document.getElementById('pane_magic');
|
||||||
if (magicPane) {
|
if (magicPane) {
|
||||||
$$('.btsd[onclick]', magicPane).forEach(el => {
|
// Read all btsd elements with onmouseover (including on-cooldown spells)
|
||||||
|
$$('.btsd', magicPane).forEach(el => {
|
||||||
const omo = el.getAttribute('onmouseover') || '';
|
const omo = el.getAttribute('onmouseover') || '';
|
||||||
|
if (!omo) return;
|
||||||
const m = omo.match(/battle\.set_infopane_spell\('([^']+)',\s*'[^']*',\s*'[^']*',\s*(\d+),\s*(\d+),\s*(\d+)\)/);
|
const m = omo.match(/battle\.set_infopane_spell\('([^']+)',\s*'[^']*',\s*'[^']*',\s*(\d+),\s*(\d+),\s*(\d+)\)/);
|
||||||
if (m) STATE.spellsKnown.push({ n: m[1], mp: parseInt(m[2]), chr: parseInt(m[3]), cd: parseInt(m[4]) });
|
if (m) STATE.spellsKnown.push({ n: m[1], mp: parseInt(m[2]), chr: parseInt(m[3]), cd: parseInt(m[4]) });
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// CONFIG — default settings
|
// CONFIG — default settings
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
const VERSION = '0.13.18';
|
const VERSION = '0.13.19';
|
||||||
|
|
||||||
const CFG = {
|
const CFG = {
|
||||||
// — Battle automation
|
// — Battle automation
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name HV Unified
|
// @name HV Unified
|
||||||
// @namespace hvunified
|
// @namespace hvunified
|
||||||
// @version 0.13.18
|
// @version 0.13.19
|
||||||
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
// @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse
|
||||||
// @author GaboGG + Hermes
|
// @author GaboGG + Hermes
|
||||||
// @match *://*.hentaiverse.org/*
|
// @match *://*.hentaiverse.org/*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue