1888 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
3.0 KiB
Second native merchant, new item creation and reversible armor/stat test
Actual644849 same native Forever70334 process, gateway stopped, no rebuild/relogin. Normal0.5sW approached Dermot Johns190 after server location review; native stop and server save show−8904.51/−115.149 ->−8901.99/−112.63, no teleport/SQL edit. Original rightclick/gossip/browse showed12 real armor items over2pages, vendor/ repair buttons and repair-anvil cursor. This verifies service presentation, NOT actual repair cost/function. Source vendor flags16388=vendor+repair. No NPC/GUID hardcoded in adapter; same generic code as Brother Danil152.
OriginalUI bought Thin Cloth Gloves2119, sourceBuyCount1/BuyPrice24: wallet9925 ->9901, genuine NEW GUID36246root30count1 created by Tortoise and displayed in backpack/native tooltip. Existing16waters and all previous items unchanged. Source 1A4/native470172 and34byte3F003B captured, observer lost25 surrounding rows but all critical rows present; real acceptance exit0. No GM grant or SQL inventory edit. This covers new-item creation (prior water purchase only merged a stack).
Reversible equip test: source fixture36246root30, originalT3gauntlets22421/GUID 36238slot9. First coordinate attempt sent NO equip packet: original merchant close also closed auto-open bags. No state change, no protocol failure; saved original inventory/health/money verified. Corrected harness uses the already verified real client /use0slot8 action with original merchant visibly closed. Original engine emitted two410004/5byte equip requests over the roundtrip, Tortoise swapped exact GUIDs. With2119slot9 source currentHP5859->5589; original UnitHealth/Max5589/5589, GetInventoryItemID(player,10)=2119 and original model changed gloves. Returning T3 through same original client action restored exact inventory (36238slot9, 36246root30). Source currentHP remains5589 after max restored, as expected for unhealed health. Controlled GM restoration returned only recordedHP/max5859/5859; no custom stat feature. Final nativeAPI22421/5859/5859 and server save agree. Wallet9901 unchanged throughout equipment test. No item/stat spoofing, source modified only through actual equip/GM restoration. Trace lost0/errornone, exit0.
This proves armor equip/restore and health/max update path, not full character sheet/all armor modifiers/set bonuses. Preserve exact T3 gear and currentfixture. New reusable ops/native_armor_roundtrip_test.py requires confirmed closed merchant, explicit source GUID/slots and HP/max baseline; no coordinate reliance for use. Only tool/doc changes after a8a410f full62tests; syntax and real scenario checked.
Next trainer/list/learning/reset and other merchant restrictions. Reference WorldSocket::WritePacketToBuffer already calls ClassicOpcodes::TranslateServerOpcode, whose staged index insertion/removal reproduces actual merchant codes. Native adapter previously skipped that normalization. Reuse the pinned original transport mapping for future packet additions, rather than inferring uniform family offsets.