First commit, step 4 completed
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# SessionGoldTracker — Project Notes
|
||||
|
||||
## Spec
|
||||
|
||||
A small, movable HUD frame for WoW Forever beta (interface 16001, Midnight-era retail API).
|
||||
|
||||
### What it does
|
||||
- Tracks gold earned in the current play session (positive deltas only — spending does not count against the total).
|
||||
- Displays: session gold earned, gold per hour rate, and time elapsed since session start or last reset.
|
||||
- Provides a reset button on the frame that zeroes the session counters.
|
||||
- Provides a `/gt` slash command: `/gt` toggles the frame, `/gt reset` resets the session counters.
|
||||
- Saves frame position (point, x, y) and lifetime total gold earned across sessions via SavedVariables.
|
||||
- Does NOT act on items, mail, trades, the auction house, or any unit data.
|
||||
|
||||
### What it does NOT do
|
||||
- No combat log parsing.
|
||||
- No item selling, deleting, or using.
|
||||
- No auction house or mail interaction.
|
||||
- No unit-targeted API calls.
|
||||
|
||||
---
|
||||
|
||||
## Target
|
||||
|
||||
| Key | Value |
|
||||
|---|---|
|
||||
| Game | WoW Forever (beta) |
|
||||
| Interface | 16001 |
|
||||
| TOC suffix | `_Camelot` |
|
||||
| API style | Midnight-era retail (`C_*` namespaces where they exist) |
|
||||
| SavedVariables | `SessionGoldTrackerDB` |
|
||||
|
||||
---
|
||||
|
||||
## File Layout
|
||||
|
||||
## Build Order
|
||||
Each step should be independently testable in game before moving on.
|
||||
1. **Skeleton:** TOC files, empty Lua, SavedVariables declared, no errors on load. ✅ DONE
|
||||
2. **DB init:** `PLAYER_LOGIN` handler, default DB, log starting gold to chat with `print()`. Verify money is a number. ✅ DONE
|
||||
3. **Money tracking:** Register `PLAYER_MONEY`, compute delta, accumulate `sessionGross`. Log each delta. ✅ DONE
|
||||
4. **Frame:** Movable frame with labels for earned gold and per-hour rate. No drag yet. ✅ DONE
|
||||
5. **Drag and save position:** Drag support + save point on `OnDragStop` + restore on login.
|
||||
6. **Reset button:** On-frame button that zeroes session counters and resets `sessionStart`.
|
||||
7. **Slash command:** `/gt` toggle, `/gt reset` wired to the same reset logic.
|
||||
8. **Lifetime total:** Add `sessionEarned` to `lifetimeTotal` on `PLAYER_LOGOUT`.
|
||||
9. **Polish:** Format display cleanly, add a tooltip, test across a /reload.
|
||||
|
||||
Reference in New Issue
Block a user