- when we porting flagtracker there mus be no simplification or trunkation of the code - you can use utility belt for references about how to check views and create them perhaps also for quests. Same with the folder Mag-Tools # Icon Implementation Discoveries ## DECAL Icon System - CRITICAL DIFFERENCES ### Spell Icons vs Item Icons **SPELL ICONS**: Use RAW icon values from DECAL FileService SpellTable - Access via: `fileService.SpellTable.GetById(spellId)` then reflection to find icon property - **NO OFFSET REQUIRED** - Use raw icon value directly - Matches original Lua: `game.Character.SpellBook.Get(spellID).Icon` (no offset) **ITEM ICONS**: Require MagTools-style offset - Format: `itemIcon + 0x6000000` - Used for inventory items, weapons, armor, etc. ### Working Implementation ```csharp // For SPELL icons - NO offset private int GetRealSpellIcon(int spellId) { var fileService = CoreManager.Current.Filter(); var spell = fileService.SpellTable.GetById(spellId); // Use reflection to find icon property return iconValue; // RAW value, no offset } // For ITEM icons - WITH offset int itemIconId = worldObject.Icon + 0x6000000; ``` ### VVS Icon Display - Use `DecalControls.IconColumn` in XML (NOT PictureColumn) - IconColumn creates HudPictureBox controls automatically - Set icon via: `((HudPictureBox)control).Image = iconId;` ### Successful Applications ✅ **Flag Tracker Recalls Tab**: Real spell icons working perfectly ✅ **MagTools Reference**: Item icons with 0x6000000 offset ✅ **Original Lua Compatibility**: Exact replication of flagtracker behavior ### Implemented Icon Applications ✅ **Flag Tracker Recalls Tab**: Real spell icons working perfectly ✅ **Flag Tracker Cantrips Tab**: Multi-layered icon system implemented - **Attributes**: Spell icons (Strength, Endurance, etc.) with background support - **Protection Auras**: Spell icons (Armor, Flame Ward, etc.) - **Skills**: Dynamic skill icons from character training data ### Cantrips Tab Icon System (Advanced Implementation) Based on original Lua flagtracker's sophisticated 3-icon approach: ```csharp // Attributes: Background + Spell Icon overlay ["Strength"] = new CantripInfo { SpellIconId = 1354, // StrengthSelf8 spell icon BackgroundIconId = 0x060013F9 // UI background icon }; // Protection Auras: Spell icons only ["Armor"] = new CantripInfo { SpellIconId = 1397 // ArmorSelf8 spell icon }; // Skills: Dynamic skill icons from character data IconId = GetSkillIconId(skillId) // Real skill icon + 0x6000000 offset ``` ### Icon Priority System 1. **Background + Spell Overlay**: For attributes (complex layering) 2. **Spell Icons Only**: For protection auras 3. **Skill Icons**: From character skill data (item-style offset) 4. **Fallback**: Default portal icon (0x6002D14) ### Future Icon Usage - **Weapons Tab**: 3-layer system (underlay + icon + overlay) from original Lua - **Luminance Auras**: Could use custom UI icons - **Society Items**: Could use item icons with proper offset