1888 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
29 lines
2.0 KiB
Python
29 lines
2.0 KiB
Python
"""Read original source-linked spell tooltip; no casting, learning or item grants."""
|
|
from pathlib import Path
|
|
import sys,json,secrets
|
|
sys.path.insert(0,'ops')
|
|
from client_session import Session
|
|
from native_engine_character_test import Controller,local_listeners
|
|
from native_test_guard import require_authenticated_turtle_realm,require_local_turtle_ports
|
|
from native_item_metadata_test import persist_probe
|
|
from console_report import parse
|
|
W=Path(__file__).resolve().parent;pid=int(Path('runtime/native-client.pid').read_text());c=Controller(pid);run=secrets.token_hex(4)
|
|
require_local_turtle_ports(local_listeners());require_authenticated_turtle_realm(c.rpc('inspect-wire-account'))
|
|
key='originalBadgeControls';commands=[f'/run GatewayDiagnosticsSaved.{key}={{run="{run}",spells={{}}}}']
|
|
for spell in(60668,41975):
|
|
cmd=f'/run local r={{}};local t=C_TooltipInfo.GetItemByID({spell});for _,l in ipairs(t and t.lines or {{}})do local s=l.leftText;if not issecretvalue(s)and type(s)=="string"then r[#r+1]=s end end;GatewayDiagnosticsSaved.{key}.spells[{spell}]=r'
|
|
assert len(cmd)<=255;commands.append(cmd)
|
|
saved=Path('runtime/native-client/_classic_beta_/WTF/Account/SavedVariables/GatewayDiagnostics.lua')
|
|
with Session(pid)as s:
|
|
s.wait_world(15)
|
|
s.macro('/run for _,i in ipairs({60668,41975})do C_Item.RequestLoadItemDataByID(i)end')
|
|
for cmd in commands:s.macro(cmd)
|
|
s.macro('/run GameTooltip:SetOwner(UIParent,"ANCHOR_NONE");GameTooltip:ClearAllPoints();GameTooltip:SetPoint("CENTER",UIParent,"CENTER",0,0);GameTooltip:SetItemByID(60668)')
|
|
s.shot(W/'native-badge-before.png');s.macro('/run GameTooltip:Hide()')
|
|
def observed():
|
|
data=parse(saved.read_text()).get(key,{})
|
|
return data if data.get('run')==run else None
|
|
result,warning=persist_probe(s,c,observed)
|
|
report=dict(kind='actual-native-source-badge-control',pid=pid,run=run,probe=result,reload_warning=warning,local_only=True,cast_or_learning=False,gameplay_verified=False,visual_review_pending=True)
|
|
(W/'native-badge-before.json').write_text(json.dumps(report,indent=2)+'\n');print(json.dumps(result,indent=2))
|