Accumulate lifetimeTotal on every positive PLAYER_MONEY delta and persist to SavedVariables so it survives /reload and Reset. Display a 'Lifetime: Xg Ys Zc' label on the HUD frame. Also fix missing closing 'end' in SlashCmdList closure.
117 lines
4.6 KiB
Markdown
Executable File
117 lines
4.6 KiB
Markdown
Executable File
<parameter=changes>
|
|
# SessionGoldTracker — STATUS.md
|
|
|
|
## Completed Steps
|
|
|
|
- [x] 1. Skeleton
|
|
- [x] 2. DB init
|
|
- [x] 3. Money tracking
|
|
- [x] 4. Frame
|
|
- [x] 5. Drag and save position
|
|
- [x] 6. Reset button
|
|
- [x] 7. Slash command
|
|
- [x] 8. Lifetime total
|
|
## In Progress
|
|
|
|
## Pending
|
|
|
|
- [ ] 8. Lifetime total
|
|
- [ ] 9. Polish
|
|
|
|
## API Verification Status
|
|
|
|
| API | Source | Verified? |
|
|
|---|---|---|
|
|
| `GetMoney()` | PlayerScriptDocumentation.lua | ✅ VERIFIED |
|
|
| `GetTime()` | SystemTimeDocumentation.lua | ✅ VERIFIED |
|
|
| `PLAYER_MONEY` | CurrencyInfoDocumentation.lua | ✅ VERIFIED |
|
|
| `PLAYER_LOGIN` | SystemDocumentation.lua | ✅ VERIFIED |
|
|
| `PLAYER_LOGOUT` | SystemDocumentation.lua | ✅ VERIFIED |
|
|
| `CreateFrame` | FrameAPI docs | ✅ VERIFIED |
|
|
| `frame:SetMovable(true)` | SimpleFrameAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:EnableMouse(true)` | SimpleScriptRegionAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:RegisterForDrag("LeftButton")` | SimpleFrameAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:SetScript("OnDragStart", ...)` | Frame scripts | ✅ VERIFIED |
|
|
| `frame:SetScript("OnDragStop", ...)` | Frame scripts | ✅ VERIFIED |
|
|
| `frame:GetPoint()` | SimpleScriptRegionResizingAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:SetPoint()` | SimpleScriptRegionResizingAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:SetClampedToScreen(true)` | SimpleFrameAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:IsShown()` | SimpleScriptRegionAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:Show()` | SimpleFrameAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:Hide()` | SimpleFrameAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `SlashCmdList` / `SLASH_GT1` | SlashCommandsRegistry.lua.annotated.lua | ✅ VERIFIED |
|
|
| `GetMoneyString()` | QuestInfo.lua, MerchantFrame.lua, etc. | ✅ VERIFIED |
|
|
| `SecondsToTime()` | SharedBasicControls.lua, Blizzard_TimeManager.lua | ✅ VERIFIED |
|
|
| `UIPanelButtonTemplate` | Blizzard_UIPanelTemplates.lua | ✅ VERIFIED (standard template) |
|
|
|
|
## Design Decisions
|
|
|
|
- **Gold per hour**: Shows "---" until 60 seconds have elapsed
|
|
- **Frame visible on login**: No — hidden by default, toggled with `/gt`
|
|
- **Session survives /reload**: Yes — restored from `lastSession` in SavedVariables
|
|
- **Lifetime total**: Accumulated on every positive money change (not only at logout), so Reset doesn't lose gold earned before reset
|
|
|
|
## Known Issues
|
|
|
|
(None yet)
|
|
|
|
|
|
|
|
# SessionGoldTracker — STATUS.md
|
|
|
|
## Completed Steps
|
|
|
|
- [x] 1. Skeleton
|
|
- [x] 2. DB init
|
|
- [x] 3. Money tracking
|
|
- [x] 4. Frame
|
|
- [x] 5. Drag and save position
|
|
- [x] 6. Reset button
|
|
- [x] 7. Slash command
|
|
|
|
## In Progress
|
|
|
|
## Pending
|
|
|
|
- [ ] 8. Lifetime total
|
|
- [ ] 9. Polish
|
|
|
|
## API Verification Status
|
|
|
|
| API | Source | Verified? |
|
|
|---|---|---|
|
|
| `GetMoney()` | PlayerScriptDocumentation.lua | ✅ VERIFIED |
|
|
| `GetTime()` | SystemTimeDocumentation.lua | ✅ VERIFIED |
|
|
| `PLAYER_MONEY` | CurrencyInfoDocumentation.lua | ✅ VERIFIED |
|
|
| `PLAYER_LOGIN` | SystemDocumentation.lua | ✅ VERIFIED |
|
|
| `PLAYER_LOGOUT` | SystemDocumentation.lua | ✅ VERIFIED |
|
|
| `CreateFrame` | FrameAPI docs | ✅ VERIFIED |
|
|
| `frame:SetMovable(true)` | SimpleFrameAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:EnableMouse(true)` | SimpleScriptRegionAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:RegisterForDrag("LeftButton")` | SimpleFrameAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:SetScript("OnDragStart", ...)` | Frame scripts | ✅ VERIFIED |
|
|
| `frame:SetScript("OnDragStop", ...)` | Frame scripts | ✅ VERIFIED |
|
|
| `frame:GetPoint()` | SimpleScriptRegionResizingAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:SetPoint()` | SimpleScriptRegionResizingAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:SetClampedToScreen(true)` | SimpleFrameAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:IsShown()` | SimpleScriptRegionAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:Show()` | SimpleFrameAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `frame:Hide()` | SimpleFrameAPIDocumentation.lua | ✅ VERIFIED |
|
|
| `SlashCmdList` / `SLASH_GT1` | SlashCommandsRegistry.lua.annotated.lua | ✅ VERIFIED |
|
|
| `GetMoneyString()` | QuestInfo.lua, MerchantFrame.lua, etc. | ✅ VERIFIED |
|
|
| `SecondsToTime()` | SharedBasicControls.lua, Blizzard_TimeManager.lua | ✅ VERIFIED |
|
|
| `UIPanelButtonTemplate` | Blizzard_UIPanelTemplates.lua | ✅ VERIFIED (standard template) |
|
|
|
|
## Design Decisions
|
|
|
|
- **Gold per hour**: Shows "---" until 60 seconds have elapsed
|
|
- **Frame visible on login**: No — hidden by default, toggled with `/gt`
|
|
- **Session survives /reload**: Yes — restored from `lastSession` in SavedVariables
|
|
- **Lifetime total**: Accumulated on every positive money change (not only at logout), so Reset doesn't lose gold earned before reset
|
|
|
|
## Known Issues
|
|
|
|
(None yet)
|
|
|
|
|