Skip to content

Addon: [1.9.7] - Fix addon init/reset sync and pet targeting dead mobs (#751)#763

Merged
Xian55 merged 1 commit intodevfrom
fix/751
Feb 8, 2026
Merged

Addon: [1.9.7] - Fix addon init/reset sync and pet targeting dead mobs (#751)#763
Xian55 merged 1 commit intodevfrom
fix/751

Conversation

@Xian55
Copy link
Copy Markdown
Owner

@Xian55 Xian55 commented Feb 8, 2026

Summary

  • Addon init/reset race condition: The C# FullReset threshold was a hardcoded magic number (<= 3) that didn't align with the Lua initPhase. Queue data sent during early frames could be missed because globalTime wasn't past the reset threshold when rendering started. Now both sides derive the threshold from FRAME_CHANGE_RATE / GLOBAL_QUEUE_UPDATE, and AddonReader also detects time wraparound (addon reload) via previousGlobalTime.
  • Pet targeting dead mobs: TargetPetTargetGoal.CanRun() didn't check PetTarget_Alive(), causing the Succubus (or any defensive pet) to loop on a corpse target. Added the alive guard.

Addon version bumped from 1.9.6 to 1.9.7.

Test plan

  • Start bot fresh — verify FullReset fires once during init phase and addon frames render correctly after
  • /reload in-game — verify FullReset triggers on time wraparound (globalTime decreases)
  • With Warlock Succubus: kill a mob via pet — verify the bot does not re-target the corpse

🤖 Generated with Claude Code

Addon (DataToColor v1.9.7):
- Derive initPhase from FRAME_CHANGE_RATE (2 * 5 = 10) instead of
  a hardcoded magic number, keeping the Lua and C# thresholds in sync.
- Ensure globalTime is at least initPhase before the first render pass
  so queue data written during early frames is not discarded by the C#
  FullReset check on the very first visible frame.

Core (AddonReader):
- Replace the hardcoded FullReset guard (GlobalTime.Value <= 3) with
  AddonTicks.INIT_PHASE, a named constant derived from the same
  GLOBAL_QUEUE_UPDATE cadence used by the addon.
- Track previousGlobalTime to detect time wraparound / addon reload
  and trigger a FullReset when globalTime decreases.

Core (TargetPetTargetGoal):
- Add bits.PetTarget_Alive() check to CanRun() so the goal does not
  fire when the pet's target is dead, preventing the Succubus (or any
  defensive pet) from looping on a corpse.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Xian55 Xian55 changed the title Fix addon init/reset sync and pet targeting dead mobs (#751) Addon: [1.9.7] - Fix addon init/reset sync and pet targeting dead mobs (#751) Feb 8, 2026
@Xian55 Xian55 linked an issue Feb 8, 2026 that may be closed by this pull request
@Xian55 Xian55 added bugfix This pull request fixes an issue. enhancement This pull request implements a new feature. labels Feb 8, 2026
@Xian55 Xian55 merged commit df0b8ea into dev Feb 8, 2026
1 check passed
@Xian55 Xian55 deleted the fix/751 branch February 10, 2026 20:29
@Xian55 Xian55 added the ai Artificial Intelligence tool has been contributed. label Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Artificial Intelligence tool has been contributed. bugfix This pull request fixes an issue. enhancement This pull request implements a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bot removes Feed pet macro

1 participant