1888 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
37 lines
3.1 KiB
Python
37 lines
3.1 KiB
Python
"""Read every staged wand through original APIs; no grants, equips or casts."""
|
|
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;stage=json.loads((W/'thrown-family-stage.json').read_text());ids=[r['entry']for r in stage['selected']];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'))
|
|
commands=[f'/run GatewayDiagnosticsSaved.wandFamilyProbe={{run="{run}",items={{}},native={{}}}}']
|
|
commands.append('/run GWItemBatch={}')
|
|
for n in range(0,len(ids),10):
|
|
values=','.join(map(str,ids[n:n+10]));commands.append('/run for _,i in ipairs({'+values+'})do GWItemBatch[#GWItemBatch+1]=i;C_Item.RequestLoadItemDataByID(i)end')
|
|
commands.append('/run for _,i in ipairs(GWItemBatch)do local n,l,q,v=C_Item.GetItemInfo(i);GatewayDiagnosticsSaved.wandFamilyProbe.items[i]={name=n,quality=q,level=v,stats=C_Item.GetItemStats("item:"..i)}end')
|
|
for ident in(58239,33156,13173,55474):
|
|
commands.append(f'/run local r={{}};for _,l in ipairs(C_TooltipInfo.GetItemByID({ident}).lines or {{}})do local s=l.leftText;if not issecretvalue(s)and type(s)=="string"then r[#r+1]=s end end;GatewayDiagnosticsSaved.wandFamilyProbe.native[{ident}]=r')
|
|
commands.append('/run GatewayDiagnosticsSaved.wandFamilyProbe.profile=GatewaySourceWeaponDamageData.profileSHA256')
|
|
assert all(len(v)<=255 for v in commands)
|
|
saved=Path('runtime/native-client/_classic_beta_/WTF/Account/SavedVariables/GatewayDiagnostics.lua')
|
|
with Session(pid)as s:
|
|
s.wait_world(15)
|
|
for cmd in commands:s.macro(cmd)
|
|
for ident in(58239,33156):
|
|
s.macro(f'/run GameTooltip:SetOwner(UIParent,"ANCHOR_NONE");GameTooltip:ClearAllPoints();GameTooltip:SetPoint("CENTER",UIParent,"CENTER",0,0);GameTooltip:SetItemByID({ident})')
|
|
s.shot(W/f'native-thrown-{ident}.png')
|
|
s.macro('/run GameTooltip:Hide();GWItemBatch=nil')
|
|
def observed():
|
|
value=parse(saved.read_text()).get('wandFamilyProbe',{})
|
|
return value if value.get('run')==run else None
|
|
result,warning=persist_probe(s,c,observed)
|
|
expected={r['entry']:r['name']for r in stage['selected']};actual=result.get('items',{});missing=[i for i,n in expected.items()if actual.get(i,{}).get('name')!=n]
|
|
report=dict(kind='actual-native-thrown-family-original-api',pid=pid,probe=result,reload_warning=warning,expected_names=expected,name_mismatches=missing,all_staged_item_names_loaded=not missing,local_only=True,visual_review_pending=True,cast_or_equip=False,gameplay_verified=False)
|
|
(W/'native-thrown-api.json').write_text(json.dumps(report,indent=2)+'\n');print(json.dumps(dict(sampled=len(expected),name_mismatches=missing,profile=result.get('profile'),pipe=c.rpc('inspect-engine-pipe').get('error'))))
|
|
if missing:raise RuntimeError('Staged item names not all loaded')
|