mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Modern method that renders the tooltip for a specific item *instance* identified by GUID — same string `C_Item.GetItemGUID` returns. Distinct from `SetItemByID` (which uses base `ItemSparse` data with no per-instance state): this path goes through the live CGItem, so the tooltip includes enchant lines, random-suffix-decorated name + bonuses, and locked/broken state. Implementation: parse GUID via `Item::Location::ParseGUIDString`, resolve through the engine's `FUN_OBJECT_RESOLVE_BY_GUID`, then build the per-instance hyperlink via `Item::Link::FromCGItem`. Strip the `|cff…|H…|h[…]|h|r` decoration to the bare `item:N:enchant:gem:gem: gem:gem:suffix:unique` payload (SetHyperlink rejects the decorated form with "Unknown link type") and dispatch to the engine's existing SetHyperlink. Closes the loop with `GameTooltip:GetItem()`, which returns the same dressed link back.