From 9209ae1b70c10ef498d10199bfb533dc0219c05c Mon Sep 17 00:00:00 2001 From: OEVG <950+oevg@noreply.octowow.st> Date: Sat, 31 Oct 2026 21:13:24 -0400 Subject: [PATCH] Release 4.6.1: tidy README, add changelog, stop forcing Nampower event CVars on 4.5.0+ Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_019W3rwwjHwAer9dAQAg4q7V --- .gitattributes | 1 + CHANGELOG.md | 110 ++++++++++++++ README.md | 377 +++++++++++++++++++++------------------------- ShaguDPS.toc | 2 +- parser-native.lua | 16 +- 5 files changed, 297 insertions(+), 209 deletions(-) create mode 100644 .gitattributes create mode 100644 CHANGELOG.md diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f5646db --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,110 @@ +# Changelog + +All notable changes to ShaguDPS for WoW 1.18.1 clients. Release notes with install steps and +validation details for 4.5 and 4.6 are in [docs/](docs/). + +## 4.6.1 + +### Changed + +- Nampower 4.5.0 and later enable the auto attack and heal events when ShaguDPS registers + them, so ShaguDPS no longer changes `NP_EnableAutoAttackEvents` and `NP_EnableSpellHealEvents` + in your saved settings on those versions. Older Nampower versions still get both set to `1`. + +### Documentation + +- Rewrote the README: one table of modes, one of data sources, a contents list, and the + per-version "what's new" text moved here. +- Added this changelog. The Nampower link now points to the brues-code build. + +## 4.6.0 + +### Added + +- **Dispels mode** with per-window *Done* and *Received* selections, aura, player and ability + breakdowns, and Current, Overall and saved-fight data. Requires ClassicAPI combat logging. +- Newer ClassicAPI builds supply named damage shields (for example Thorns) and the dispelling + ability. Older builds keep *Reflect (School)* names and unknown-ability labels. + +### Changed + +- Valid positive ClassicAPI overhealing values are used for effective healing. Zero is trusted + only after positive overhealing was seen in the session and only for visible targets with a + maximum health above 100; otherwise the health-based estimate remains the fallback. +- Windows showing the same segment share sorted display data and skip repainting unchanged rows. +- Pull-threshold labels are correct, confirmed in game with melee and ranged samples. + *Pull Aggro* now displays 100%. The raw-threat thresholds and 0.5 second polling are unchanged. + +### Fixed + +- Missing dispel history is labelled as not recorded instead of showing zero. +- Threat replies to older outstanding requests are discarded using the target GUID and a + switch generation. + +## 4.5.0 + +### Added + +- Class icons in Damage, Heal and Threat (on by default; toggle *Show Class Icons*). +- *Blizzard Retail (Modern)* bar texture with modern colors for all nine classes + (`/sdps texture 8`). +- `/sdps threatdebug` and `/sdps perf` diagnostics. +- A 110-130% pull-threshold range when your melee or ranged status is unknown. + +### Changed + +- Totals, rates and percentages align in columns; DPS, HPS and TPS are whole numbers: + `100K (1000 DPS) [100%]`. Chat reports use the same format. +- Threat: requests on target switch, immediate display of replies, a rolling five-second TPS, + stale-data clearing, and centered target and mode titles. Polling stays at 0.5 seconds. +- Boss deaths are detected through the destination GUID on ClassicAPI builds with combat + logging, with the chat message as the fallback. + +### Fixed + +- Missing players in the threat list caused by decimal threat values and percentages. +- Duplicate wipe entries caused by healing while targeting a boss corpse. Existing duplicate + entries in saved history are not removed. + +## 4.3 + +### Added + +- **Boss fight history**: the segment menu gains *Fights* with the last 10 boss fights, saved + per character. Chat reports name the boss, kill or wipe and the fight length. + +## 4.2 + +### Added + +- **Damage and Heal modes** replace the DPS and HPS views, with total, rate and share on one bar + and overhealing as the lighter bar behind effective healing. + +### Changed + +- Large numbers are shortened (`37K`, `1.23M`) in windows and chat reports. + +### Fixed + +- Lua error when sending the heal report to chat. + +## 4.1 + +### Added + +- **Threat mode**: the threat list of your current target from the server's threat API, with a + *Pull Aggro* line, TPS, and sharing of replies with TWThreat. + +## Earlier + +Changes from before the versions above were not recorded with a version number. + +- **Data sources**: ClassicAPI and Nampower parsers next to the chat combat log, selectable with + `/sdps source`. Nampower is only used when GUID unit tokens are available. +- *Fight Duration* per-second time mode next to *Active Time*. +- *Classic* theme (default) and the original *Flat* theme. +- Lock button, three Puppeteer-style bar textures, and per-GUID unit caching. +- New windows start with the size and view of the first window; long names no longer run into + the numbers; unmerged pets show as "Owner - Pet"; the best effective heal value used for the + heal bar scale was fixed; bars of different windows no longer share global frame names; the + settings window closes with Escape. diff --git a/README.md b/README.md index bd54b5a..2cf24ff 100644 --- a/README.md +++ b/README.md @@ -1,198 +1,159 @@ -# ShaguDPS 4.6 for WoW 1.18.1 Clients +# ShaguDPS -A very small and lightweight damage and healing meter, updated for 1.18.1 clients. -It reads structured combat events from **ClassicAPI** or **Nampower** when they are -loaded, and falls back to parsing the chat combat log on a plain client. +A very small and lightweight damage, healing, threat and dispel meter for WoW 1.18.1 +clients (Interface 11200, Lua 5.0). -Based on [ShaguDPS](https://github.com/shagu/ShaguDPS) by Shagu and the Nampower -parser from [Duciel's fork](https://github.com/Duciel/ShaguDPS). +It reads structured combat events from **ClassicAPI** or **Nampower** when one is loaded +and falls back to parsing the chat combat log on a plain client. -## What's new in 4.6 +Based on [ShaguDPS](https://github.com/shagu/ShaguDPS) by Shagu and the Nampower parser +from [Duciel's fork](https://github.com/Duciel/ShaguDPS). See the [changelog](CHANGELOG.md) +for what changed in each version. -- One Dispels mode with per-window Done/Received selections, aura/player/ability - breakdowns and Current, Overall and saved-fight data. Requires ClassicAPI combat logging. -- Newer ClassicAPI builds supply named shield effects and dispelling abilities; - older builds retain school-based reflect names and unknown-ability labels. -- Use valid positive ClassicAPI overhealing values for effective healing. - After observing support in this session, zero is trusted only for visible - targets with absolute maximum health above 100; otherwise health-based - estimation remains the fallback. No version sentinel is treated as proof. -- Shared display sorting and skipped unchanged redraws across matching windows. -- Missing dispel history is labelled as not recorded instead of zero. -- Target-generation/GUID safeguards for older outstanding threat requests. -- Correct pull-threshold labels, confirmed by in-game melee/ranged samples; - Pull Aggro now displays 100%. Raw-threat thresholds and 0.5s polling remain. +## Contents -See [4.6 release notes](docs/release-4.6.0.md). - -## What's new in 4.5 - -- Aligned columns for totals, whole-number DPS/HPS/TPS, and bracketed - percentages: `100K (1000 DPS) [100%]`. Chat reports use the same format. -- Optional class icons in Damage, Heal, and Threat, enabled by default. -- *Blizzard Retail (Modern)* texture with the supplied modern palette for - all nine classes. Select it with `/sdps texture 8`. -- More reliable threat parsing, immediate target-switch requests and reply - display, rolling five-second TPS, and stale-data handling. Regular polling - stays at 0.5 seconds. Target and mode titles are centered together. -- A 110–130% threshold range when your melee/ranged status is unknown. -- Fixed duplicate boss wipes caused by healing while targeting a boss corpse. - ClassicAPI builds with combat logging use GUID-based boss-death detection, - with chat detection as the fallback. -- On-demand `/sdps threatdebug` and `/sdps perf` diagnostics. - -See [4.5 release notes](docs/release-4.5.0.md) for installation and compatibility. - -## Features and earlier changes - -**Data sources** -- **ClassicAPI** (preferred): reads `COMBAT_LOG_EVENT_UNFILTERED`, which needs a - ClassicAPI build that includes the combat log. Units come with - GUIDs and group/pet flags, so group members, pets, guardians and totems are found - without scanning names on every hit, and nothing depends on the client language. -- **Nampower**: reads `SPELL_DAMAGE_EVENT_*`, `AUTO_ATTACK_*`, `DAMAGE_SHIELD_*` and - `SPELL_HEAL_BY_*`. Turns on Nampower's auto attack and heal events - (`NP_EnableAutoAttackEvents`, `NP_EnableSpellHealEvents`) when it is used. - Needs GUID unit tokens, which SuperWoW or ClassicAPI provide; without them it - isn't used (it used to take over and record nothing). -- **Chat combat log**: the original text parser, used when neither is available. -- Pick one in the settings or with `/sdps source`; "Auto" takes the best one loaded. - The settings show which source is in use. -- Unit lookups are cached per GUID, so busy raids cost less. -- Pets and totems of group members are matched to their owner through the GUID - (`UnitOwnerGUID` with ClassicAPI, the owner token with SuperWoW). - -**Boss fight history** (new in 4.3) -- The segment menu reads *Current*, *Fights*, *Overall*. *Fights* opens the last - 10 boss fights, newest first, with their length; wipes are greyed out. -- A fight counts as a boss fight when someone in the group targeted a raid boss - (boss classification or skull level) during it. Trash fights aren't kept. -- Picking one shows its damage and healing; chat reports name the boss, kill or - wipe and the fight length. -- The history is saved per character and survives reloads and logouts. A raid - boss fight takes roughly 50 KB, so ten of them stay under 1 MB. *Reset Data* - clears it too. - -**Three modes** (new in 4.2) -- *Damage* shows total damage, damage per second and share on one bar, for - example `37K (2388 DPS) [62.1%]`; *Heal* does the same for effective - healing (`1500 (97 HPS) [100%]`), with overhealing as the lighter bar behind - it. Large numbers are shortened (`37K`, `1.23M`); chat reports - use the same short numbers and add the overhealing to heal lines. -- Windows that showed DPS or HPS switch to Damage or Heal. -- Fixed the Lua error when sending the heal report to chat. - -**Threat view** (new in 4.1) -- A third mode next to Damage and Heal: the threat list of your current - target, straight from the server's threat API (the same one TWThreat uses). -- Shows each player's threat and percent of their pull threshold, with a red - *Pull Aggro* line where you would take aggro: 110% of the tank in melee range, - 130% at range. Player bars show threat, TPS and percent; hover a bar to see - who has aggro. The server displays the aggro holder at 100%. The *Pull Aggro* - row also shows 100% (the pull point) and has no TPS value. -- The segment button shows the target's name in this mode. -- Asks the server twice a second, only while a window shows threat, you are in a - party or raid and your target is an elite or boss in combat. If TWThreat is - also running, ShaguDPS reads its answers instead of asking a second time. - Switching targets requests fresh data immediately. - Replies refresh visible threat windows immediately; actual update speed - depends on the server and, when sharing replies, the other addon's query rate. -- TPS is averaged over a rolling five-second window. Old threat bars clear when - the target dies, combat ends, you leave the group, or no reply arrives for - three seconds. A fresh reply restores the display. -- If your player is missing from the reply, the pull threshold shows a - raw-threat range from 110% to 130% of tank threat; the bar marks its upper - end until your range is known, while its pull-threshold percentage is 100%. - -**Per second time** -- *Active Time* (default, as before): each unit's own time spent dealing damage. -- *Fight Duration*: the time the whole segment lasted, the same for everyone, like - most raid parses. Windows keep ticking while a fight runs. -- Bar tooltips show the active time, and in fight duration mode the fight time and - the share of it the unit was active. - -**Classic theme** (default; switch back with *Theme: Flat* or `/sdps theme 0`) -- Tooltip-style window in a neutral dark fill with the silver border. -- Gold title buttons and icons that light up on hover, no boxes. -- Silver rule under the title, quest-log glow on hovered bars and menu entries. -- Dropdown lists as tooltip panels. -- Shadowed text instead of outlines, a dark track behind each bar. -- Settings in the stock dialog box with the gold header plate, stock checkboxes, - page arrows and close button. - -**Window** -- *Blizzard Retail (Modern)* is texture 8 (`/sdps texture 8`). It uses the - supplied retail bar texture and modern colors for all nine classes at full - opacity, including Warlock (0.53, 0.53, 0.93). Pastel lightening is bypassed - for all class colors with this preset. -- Class icons appear beside player names in Damage, Heal and Threat. Toggle - *Show Class Icons* in settings; icons scale with bar height. -- Lock button left of the + button locks or unlocks moving and resizing of all windows. -- Three more bar textures in the style of Puppeteer's health bars: *Puppeteer* - (with the shine), *Puppeteer Shineless* and *Puppeteer Flat*. *Blizzard* is the - stock bar. The settings show the textures by name. - -**Fixes** -- New windows start with the size and view of the first window. -- Long names no longer run into the numbers on the bars. -- Unmerged pets show as "Owner - Pet" instead of "Owner - Pet (Owner)". -- Fixed the best effective heal value used for the heal bar scale. -- Bars of different windows no longer share global frame names. -- The settings window closes with Escape. -- When the selected data source can't be used, the settings say why and which - source is used instead (for example a ClassicAPI build without the combat log). -- Less work per combat event and per refresh: names and labels are cached, damage - events skip the target name lookup, and only the units that get a bar are read - when a window refreshes. Hidden windows don't refresh. - -## Dispels mode - -Select *Dispels* in the mode menu. Open the mode menu again to choose *Done* -or *Received* for that window. The title shows the direction; the segment menu -still selects Current, Fights or Overall. Bars show successful removals and -share; tooltips list the top ten removed auras and players involved. - -Curse, disease, poison and magic removals all count, including offensive magic -dispels. Each aura removed counts once, so a cast removing several auras may -count more than once. Failed attempts and casts alone do not count. -Recording currently requires ClassicAPI with `COMBAT_LOG_EVENT_UNFILTERED`; -it works independently of the selected damage source. Older saved fights -remain available but have no dispel data. Only aggregate counts are retained, -not timestamps or full event logs. Newer ClassicAPI builds can additionally supply the dispelling ability name; -aura-driven dispels and unseen casts may still have an unknown ability. -Curse/disease/poison/magic categories are not inferred from aura names. - -## Display caching and target safeguards - -Windows showing the same segment share sorted display data. Unchanged rows -skip repainting; reports, settings changes, resizing and scrolling still update. -Live fight-duration rates continue updating, and Threat always paints new replies. -Display caches are not saved with fight history. - -Old fights without recorded dispels are labelled as missing data rather than -zero dispels. Saved dispel data remains viewable without ClassicAPI loaded. - -Threat requests retain a local target GUID (or name when GUIDs are unavailable) -and switch generation. Responses to identifiable older requests are discarded. -The server payload has no target/request identifier, so matching uses reply -order with a short expiry; it cannot guarantee attribution if replies are lost, -reordered, or supplied by another addon. Polling remains at 0.5 seconds. Player percentages are the server-provided -pull-threshold percentages, without a second normalization. +- [Installation](#installation) +- [Features](#features) +- [Data sources](#data-sources) +- [Commands](#commands) +- [Combat log range](#combat-log-range) +- [Diagnostics](#diagnostics) +- [Notes](#notes) ## Installation + 1. Download the latest version and unpack it. 2. Make sure the folder is named `ShaguDPS` (not `ShaguDPS-master`). 3. Copy `ShaguDPS` into `Wow-Directory\Interface\AddOns`. -4. Restart the game. +4. Restart the game (a reload is not enough when a new texture file was added). + +When updating, back up the addon and your SavedVariables first. Settings and boss +history carry over. Optional client mods: [ClassicAPI](https://github.com/brues-code/ClassicAPI), -[Nampower](https://github.com/pepopo978/nampower), SuperWoW. +[Nampower](https://github.com/brues-code/nampower) and SuperWoW. None of them is required. + +## Features + +### Modes + +Pick the mode from the title menu of each window; every window can show a different one. + +| Mode | Shows | +|------|-------| +| Damage | Total damage, DPS and share on one bar: `37K (2388 DPS) [62.1%]` | +| Heal | Effective healing, HPS and share, with overhealing as the lighter bar behind: `1500 (97 HPS) [100%]` | +| Threat | The threat list of your current target, from the server's threat API | +| Dispels | Successful removals, done or received (choose per window) | + +Large numbers are shortened (`37K`, `1.23M`). Chat reports use the same format, add the +overhealing to heal lines and name the boss, kill or wipe and the fight length for saved fights. + +### Segments and boss fight history + +The segment menu reads *Current*, *Fights* and *Overall*. + +- *Fights* opens the last 10 boss fights, newest first, with their length. Wipes are greyed out. +- A fight counts as a boss fight when someone in the group targeted a raid boss + (boss classification or skull level) while it ran. Trash fights are not kept. +- The history is saved per character and survives reloads and logouts. A raid boss fight + takes roughly 50 KB, so ten of them stay under 1 MB. *Reset Data* clears it. +- With ClassicAPI, boss deaths are detected by GUID; otherwise the chat death message is used. + +### Threat + +- Shows each player's threat and percent of their pull threshold, with a red *Pull Aggro* + line where you would take aggro: 110% of the tank's threat in melee range, 130% at range. + The server shows the aggro holder at 100%. Hover a bar to see who has aggro. +- TPS is a rolling five-second average. Switching targets requests fresh data immediately. +- Asks the server twice a second, only while a window shows threat, you are in a group and + your target is an elite or boss in combat. If TWThreat is also running, ShaguDPS reads + its answers instead of asking a second time. +- Old bars clear when the target dies, combat ends, you leave the group, or no reply + arrives for three seconds. +- If you are missing from the reply, the threshold shows a raw-threat range of 110% to 130% + of the tank's threat until your range is known. +- Replies to older requests are discarded using the target GUID (or name) and a switch + generation. The server payload has no request ID, so attribution relies on reply order + with a short expiry and can't be guaranteed if replies are lost, reordered, or supplied + by another addon. + +### Dispels + +Select *Dispels* in the mode menu, then open the menu again to choose *Done* or *Received*. +Bars show successful removals and share; tooltips list the top ten removed auras and the +players involved, and the dispelling abilities when ClassicAPI supplies them. + +- Curse, disease, poison and magic removals all count, including offensive magic dispels. + Each aura removed counts once, so one cast that removes several auras can count more than once. +- Failed attempts and casts alone do not count. +- Only aggregate counts are kept, not timestamps. Fights saved before 4.6 have no dispel data + and say so instead of showing zero. +- Recording needs ClassicAPI with `COMBAT_LOG_EVENT_UNFILTERED` and works independently of + the selected damage source. Aura-driven dispels and casts the client didn't see show an + unknown ability. + +### Time per second + +- *Active Time* (default): each unit's own time spent dealing damage. +- *Fight Duration*: the time the whole segment lasted, the same for everyone, like most raid + parses. Windows keep ticking while a fight runs. + +Bar tooltips show the active time and, in fight duration mode, the fight time and the share +of it the unit was active. + +### Window and appearance + +- **Themes:** *Classic* (default, tooltip-style window with the silver border and stock + dialogs) or the original *Flat* look. Switch with the settings or `/sdps theme 0|1`; + it needs a reload. +- **Textures:** eight bar textures, including three in the style of Puppeteer's health bars + and *Blizzard Retail (Modern)* (`/sdps texture 8`) with modern palette colors for all nine classes. +- **Class icons** beside player names in Damage, Heal and Threat, scaled with the bar height. +- **Lock button** next to the + button locks or unlocks moving and resizing of all windows. +- New windows start with the size and view of the first window. +- Long names no longer run into the numbers, and unmerged pets show as "Owner - Pet". +- The settings window closes with Escape. + +### Performance + +- Unit lookups are cached per GUID, so busy raids cost less. +- Windows showing the same segment share sorted display data and skip repainting unchanged rows. +- Hidden windows don't refresh, and names and labels are cached. + +## Data sources + +Pick one in the settings or with `/sdps source`. *Auto* takes the best one loaded, and the +settings show which source is in use and why a forced one isn't available. + +| Source | Reads | Notes | +|--------|-------|-------| +| **ClassicAPI** (preferred) | `COMBAT_LOG_EVENT_UNFILTERED` | Needs a build that includes the combat log. Units come with GUIDs and group/pet flags, so group members, pets, guardians and totems are found without scanning names, and nothing depends on the client language. | +| **Nampower** | `SPELL_DAMAGE_EVENT_*`, `AUTO_ATTACK_*`, `DAMAGE_SHIELD_*`, `SPELL_HEAL_BY_*` | Needs GUID unit tokens from SuperWoW or ClassicAPI, otherwise it isn't used. Nampower 4.5.0 and later enable the events when ShaguDPS registers them; older versions get `NP_EnableAutoAttackEvents` and `NP_EnableSpellHealEvents` set to `1`. | +| **Chat combat log** | The localized combat log text | The original parser, used when neither of the above is available. | + +Pets and totems of group members are matched to their owner through the GUID +(`UnitOwnerGUID` with ClassicAPI, the owner token with SuperWoW). + +### Healing and overhealing + +ClassicAPI reports overhealing with each heal. A positive value is used for effective +healing. Zero is ambiguous on older builds, so it is trusted only after positive overhealing +has been seen in the session and only for visible targets with a maximum health above 100; +otherwise effective healing is estimated from the target's health. ClassicAPI predicts +overhealing on the client, so it isn't server-authoritative. Nampower and the chat parser +always use the health-based estimate. + +### Shields + +Newer ClassicAPI builds name damage shields such as Thorns. Older builds and ambiguous +events show *Reflect (School)*. Damage ownership is the same either way. ## Commands `/shagudps`, `/sdps` or `/sd`: -``` +```text /sdps config Open the settings /sdps threatdebug Measure threat requests/replies for 10 seconds /sdps perf Measure addon CPU/memory for 10 seconds @@ -211,37 +172,45 @@ Optional client mods: [ClassicAPI](https://github.com/brues-code/ClassicAPI), /sdps toggle Toggle visibility of the main window ``` -## Combat Log Range +## Combat log range -ShaguDPS has no raid-syncing between players: it sees what your client is told about, -which is limited by the combat log range (40 yards by default). This applies to every -data source. To raise it to 200: +ShaguDPS has no raid syncing between players: it sees what your client is told about, which +is limited by the combat log range (40 yards by default). This applies to every data source. +To raise it to 200: - /run for _,n in pairs({"Party", "PartyPet", "FriendlyPlayers", "FriendlyPlayersPets", "HostilePlayers", "HostilePlayersPets", "Creature" }) do SetCVar("CombatLogRange"..n, 200) end +``` +/run for _,n in pairs({"Party", "PartyPet", "FriendlyPlayers", "FriendlyPlayersPets", "HostilePlayers", "HostilePlayersPets", "Creature" }) do SetCVar("CombatLogRange"..n, 200) end +``` -Or in your Config.wtf: +Or in your `Config.wtf`: - SET CombatLogRangeParty "200" - SET CombatLogRangePartyPet "200" - SET CombatLogRangeFriendlyPlayers "200" - SET CombatLogRangeFriendlyPlayersPets "200" - SET CombatLogRangeHostilePlayers "200" - SET CombatLogRangeHostilePlayersPets "200" - SET CombatLogRangeCreature "200" +``` +SET CombatLogRangeParty "200" +SET CombatLogRangePartyPet "200" +SET CombatLogRangeFriendlyPlayers "200" +SET CombatLogRangeFriendlyPlayersPets "200" +SET CombatLogRangeHostilePlayers "200" +SET CombatLogRangeHostilePlayersPets "200" +SET CombatLogRangeCreature "200" +``` -Some unitframe addons rely on the range being exactly "40" for their range checks, -and some reset it back to "40". +Some unit frame addons rely on the range being exactly `40` for their range checks, and some +reset it back to `40`. -## Optional ClassicAPI diagnostics +## Diagnostics -With a ClassicAPI build that provides addon profiling, `/sdps perf` measures -ShaguDPS for ten seconds. Memory is reported in KB with its change; garbage -collection can change that value. CPU results require `/console scriptProfile 1` -followed by `/reload`. Profiling adds overhead: turn it off with -`/console scriptProfile 0` and `/reload` after testing. CPU results are elapsed -addon CPU milliseconds and milliseconds per second, not an FPS measurement. -Older builds report unsupported diagnostics without affecting normal operation. +- `/sdps threatdebug` counts threat requests, replies and changed replies for ten seconds. +- `/sdps perf` measures ShaguDPS for ten seconds. Memory is reported in KB with its change; + garbage collection can change that value. CPU results need a ClassicAPI build with addon + profiling: run `/console scriptProfile 1` and `/reload` first, and switch it off again with + `/console scriptProfile 0` and `/reload`, because profiling adds overhead. The values are + elapsed addon CPU milliseconds and milliseconds per second, not an FPS measurement. + Builds without profiling report it as unsupported and are otherwise unaffected. -Boss kill detection uses ClassicAPI's `UNIT_DIED` destination GUID when the -combat-log and GUID APIs are available. Other clients, or bosses whose GUID -cannot be resolved, retain localized chat death detection. +## Notes + +- Saved variables are `ShaguDPS_Config` and `ShaguDPS_Fights`, both per character. +- Display caches are not saved with fight history. +- The combat log events and global strings the chat parser uses are listed in + [docs/combat-log.md](docs/combat-log.md). +- Detailed notes per release are in [docs/](docs/). diff --git a/ShaguDPS.toc b/ShaguDPS.toc index 1c6e9de..d7c752c 100644 --- a/ShaguDPS.toc +++ b/ShaguDPS.toc @@ -2,7 +2,7 @@ ## Title: |cffffcc00Shagu|cffffffffDPS ## Author: Shagu; Duciel (Nampower parser); OEVG2 (4.0) ## Notes: A simple and lightweight DPS and damage meter. Reads ClassicAPI or Nampower combat events when available, the chat combat log otherwise. -## Version: 4.6.0 +## Version: 4.6.1 ## OptionalDeps: pfUI ## SavedVariablesPerCharacter: ShaguDPS_Config, ShaguDPS_Fights diff --git a/parser-native.lua b/parser-native.lua index 6355929..ff363b7 100644 --- a/parser-native.lua +++ b/parser-native.lua @@ -315,10 +315,18 @@ parser:RegisterSource("nampower", { return "needs SuperWoW or ClassicAPI for GUID unit tokens" end, enable = function() - -- auto attack and heal events are off by default in Nampower - for _, cvar in pairs({ "NP_EnableAutoAttackEvents", "NP_EnableSpellHealEvents" }) do - local ok, value = pcall(GetCVar, cvar) - if ok and value == "0" then pcall(SetCVar, cvar, "1") end + -- Auto attack and heal events are off by default in Nampower. From 4.5.0 + -- on, registering the event turns it on, so the saved CVars stay untouched. + -- Older versions only know the CVars. + local major, minor = 0, 0 + local ok, a, b = pcall(GetNampowerVersion) + if ok then major, minor = tonumber(a) or 0, tonumber(b) or 0 end + + if major < 4 or (major == 4 and minor < 5) then + for _, cvar in pairs({ "NP_EnableAutoAttackEvents", "NP_EnableSpellHealEvents" }) do + local ok, value = pcall(GetCVar, cvar) + if ok and value == "0" then pcall(SetCVar, cvar, "1") end + end end for event in pairs(nampower) do