This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
MasterTradeSkills is a World of Warcraft addon for Vanilla WoW and Turtle WoW that enhances item tooltips to show crafting recipe information. It displays which recipes use a particular ingredient, recipe sources, skill requirements, and information about alternate characters who know the recipes.
This is a WoW addon built with:
- Lua programming language
- Ace3v framework for addon structure
- Type annotations using EmmyLua format
- LibStub for library management
- LibCrafts-1.0: Recipe database and localization
- LibCraftingProfessions-1.0: Profession scanning and skill management
- LibItemTooltip-1.0: Tooltip hooking and enhancement
- AceAddon-3.0: Core addon framework
- AceDB-3.0: Saved variables and character data management
- AceConfig-3.0: Options UI system
Addon.lua: Main addon class implementing tooltip enhancement logic
- Hooks into item tooltips via LibItemTooltip
- Creates tooltip data from recipe database queries
- Handles filtering, sorting, and display of recipe information
- Uses setfenv(1, MasterTradeSkills) namespace pattern
Database/Modern.lua: Character data persistence and management
- Stores player profession skills and recipe knowledge per character/realm
- Manages cross-character data sharing with faction filtering
- Handles legacy data migration from older addon versions
Options.lua: Configuration UI using Ace3 framework
- Dynamic options generation based on supported professions
- Nested option groups for tooltips, difficulty, sorting, etc.
- Integration with Blizzard's interface options panel
- LibCraftingProfessions scans player profession windows and fires events
- Database layer saves skill data per character/realm
- When hovering over items, LibItemTooltip fires tooltip events
- Main addon queries LibCrafts for recipes using the item as reagent
- Recipe data is filtered, sorted and displayed in enhanced tooltips
Libraries load first, then core files in dependency order: Environment.lua → GlobalVariables.lua → Utils.lua → Locales → Database → Options → Addon.lua
/mts options- Opens addon configuration window- No build/test commands - this is a runtime WoW addon
- Namespace isolation: All files use
setfenv(1, MasterTradeSkills) - Type annotations: EmmyLua format for IDE support (
---@type,---@param, etc.) - Library access: Via LibStub pattern for dependency injection
- Event-driven: Uses callback registration for profession updates and tooltip events
- Ace3 patterns: Standard addon structure with OnInitialize/OnEnable lifecycle
Locale files in src/locale/ provide translated strings for supported languages. The addon supports deDE, enUS, esES, frFR, koKR, ptBR, ruRU, zhCN, zhTW locales.
IMPORTANT: All locale files must be saved in UTF-8 encoding to properly handle non-ASCII characters in translations.