mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Profession links are now built and opened the way 3.3.5's CGTradeSkillInfo does it. A received link opens in the engine's own TradeSkillFrame. The ClassicAPI viewer is gone. The link is 3.3.5's format: trade:<spellID>:<rank>:<maxRank>:<GUID>:<bits>|h[<spell name>]. The first field is the profession spell, not the skill line. The GUID replaces the name. A reader whose name cache does not hold the linker sends the name query and opens the link when the answer arrives. The bits cover every SkillLineAbility row of the profession, as 3.3.5's link run does. 1.12's DBC is sorted by ID and does not group a profession's rows into one run, so the rows here are taken in ID order. A link opens only when the reader's row count matches it. The 1.12 list build (0x004FCA20) is 3.3.5's RefreshList without the link branch. Three call-site patches add that branch: - the spell list comes from the link, - the ability rows use the linker's race and class, - the rank is the linker's. Two patches on TryCastSpell's toggle calls record the cast spell (3.3.5's m_spellID). They also make a cast while a link shows open the player's own list instead of closing the window. The game shutdown drops the link, as 3.3.5's does. Enchanting gets the same in the Craft window. Its rows are filtered by castUI, because its recipes have no TRADESPELL bit. GetCraftListLink and IsCraftLinked are the Craft window's twins of the 3.3.5 functions. GetTradeSkillLine, GetCraftDisplaySkillLine and GetCraftName give the linker's values while a link shows. Util/TradeSkillLink.lua now ports 3.3.5's linked mode, which hides Create, Create All and the count controls, and keeps the link buttons. Any spell whose Effect[0] is TRADE_SKILL can be linked. 1.12's SkillLine.dbc has no canLink column. Removed: C_TradeSkillUI.GetTradeSkillListLink, GetCraftListLink and GetTradeSkillListRecipes. Old links no longer open. Not yet verified in game.