Herald Observer - Changelog
============================
Version 1.6.1 - Midnight Item Level Squish
--------------------------------------------------------

Gear Validation Update
- Lowered the item level cap from 107 to 41 to reflect the item level squish
  introduced in World of Warcraft: Midnight.

Compatibility
- No changes to UI, SavedVariables, or whitelist.

Version 1.6.0 - Midnight Compatibility
--------------------------------------------------------

Interface Update
- Updated interface version to 120001 for World of Warcraft: Midnight compatibility.

API Modernization
- Replaced deprecated GetItemInfo() calls with C_Item.GetItemInfo(), which returns a
  structured table. Fields accessed: itemQuality (heirloom detection) and expacID
  (expansion check).
- Replaced math.atan2() with math.atan() in minimapButton.lua for Lua 5.3+ compatibility.

UI Overhaul: Custom Dropdown
- Removed UIDropDownMenu / UIDropDownMenu_Initialize / UIDropDownMenu_AddButton, which
  were removed from the game API in Midnight.
- Replaced with a fully custom dropdown built from plain frames and buttons.
- Visual behaviour is identical: click the button to open the list, click an option to
  select it. Selected value and SavedVariables integration are unchanged.

Bug Fix
- Fixed the "Clamp To Screen" checkbox anchor, which was incorrectly referencing the
  now-removed UIDropDownMenu frame.

Compatibility
- Fully backwards compatible with all SavedVariables from previous versions.
- No changes to gear validation logic or whitelist.

Version 1.5.0 - Whitelist Upgrade
--------------------------------------------------------
Added 383 items to the Whitelist

Version 1.4.0 – Whitelist Refinement & Minimap Button Visual Upgrade
--------------------------------------------------------
Whitelist File Slimming
- Curated validItemWhitelist.lua to include only active item IDs.
- Removed deprecated and unused IDs to streamline maintenance.

Minimap Button Visual Update
- Standardized button size to 22×22 to match Blizzard’s micro-buttons.
- Cropped icon

Performance Enhancements

- Reduced addon memory footprint by trimming the whitelist.
- Faster load times during initialization.

Codebase Changes
- Added version header comment to validItemWhitelist.lua for clarity.
- Enhanced debug output to report actual count of loaded entries.

Compatibility
- Fully backwards compatible with version 1.3.0.
- No changes to SavedVariables schema.

Version 1.3.0 - Whitelist Loader Fix & UI Expansion
--------------------------------------------------------

Whitelist Integration Fix
Resolved a major issue preventing the gear whitelist from loading in-game.
- Replaced unsupported require() usage with native WoW-compatible global table loading.
- validItemWhitelist.lua now defines the item whitelist via the global variable validItemIDs.
- The addon now reliably detects and accepts whitelisted item IDs (e.g., 28257, 28260, 28301).

New UI Option: Minimap Button Toggle
- A new checkbox was added to the UI frame to enable or disable the minimap button dynamically.
- Checkbox state is saved via SavedVariables and respected on next login.
- Disabling the minimap button hides it without unloading functionality.

Bug Fixes & Code Improvements
- Fixed duplicate gear scanning logic from earlier versions.
- Cleaned up scanCharacterSheet() to streamline item rejection flow.
- Added debug output to verify whitelist loading and item ID matches.

Compatibility

- Fully backwards compatible with all previous versions.
- No SavedVariables were renamed or removed.

Version 1.2.0 - Heirloom Detection & Gear Enforcement
--------------------------------------------------------

Gear Validation Enhancement

The addon now detects and rejects heirloom gear when validating a player's equipment.
- Heirloom items (quality = 7) are now flagged as ineligible.
- The scan result will include "heirloom" as a rejection reason if detected.
- Fully integrated into the existing getGearValidity() logic.

Feedback and Messaging Updates

Invalid gear reports now mention specific reasons:
- Item level too high (ilvl)
- Expansion too recent (expac)
- Gear is heirloom (heirloom)

Codebase Changes

- Refactored getGearValidity() to return a third validation check for heirloom status.
- Improved output clarity by including detailed rejection causes.

Compatibility

- Fully backwards compatible with previous versions.
- Does not alter existing SavedVariables or UI structure.

Version 1.1.0 - Persistence, Polish, and Slash Commands
--------------------------------------------------------

SavedVariables Support (New!):
- The addon now remembers your settings across game sessions:
  • Dropdown selection ("self", "target", "party", "raid")
  • Clamp to screen checkbox state
  • Main frame position
  • Minimap button position (angle)

Slash Command:
- Added `/herald` to toggle the UI at any time without needing to click the minimap button.

UI Improvements:
- Checkbox now uses the correct template (`UICheckButtonTemplate`) for full compatibility and consistent visuals.
- Dragging the main frame now saves its position dynamically.
- Dropdown choice is restored properly on load.

Minimap Button Upgrade:
- Dragging around the minimap updates and saves icon position.
- Clicking it toggles the main Herald Observer UI.
- Uses shared SavedVariables (`HeraldObserverDB`) for unified settings storage.

Codebase Enhancements:
- Extracted helper functions for better logic modularity (e.g., `getChatType`, `getGearValidity`)
- Removed redundant logic blocks
- Encapsulated position-saving logic
- Added readable structure, forward compatibility, and cleaner startup behavior

Fully backwards compatible with version 1.0.0 users


Version 1.0.0 - Initial Release
-------------------------------

Main Features:
- Added the core functionality to validate player gear eligibility for the "Herald of the Titans" achievement.

Gear Validation:
- Scans the equipped gear of your current target.
- Validates each item based on:
  • Item Level ≤ 107
  • Expansion restriction: must be from Wrath of the Lich King or earlier

Output Options:
- Allows users to choose how the gear check results are shared:
  • Self (local chat only)
  • Target (whisper to the player)
  • Party
  • Raid

Interface:
- Created a dedicated, movable UI frame with:
  • Title and instructions
  • Dropdown menu for selecting output destination
  • Clamp to screen checkbox
  • “Observe” button to initiate scan

Minimap Button:
- Added a custom, movable minimap button for fast access to the main frame.
- Button uses custom logo texture.
- Clicking the icon toggles the UI window.

Known Limitations:
- No slash command yet (/herald)
- Settings (frame position, dropdown selection) are not yet persistent
- Checkbox uses incorrect template (`BackdropTemplate`) — may not render properly in all clients

