Skip to content

Retail fixes: class portrait icon + ArcaneBar castbar stability (secure/secret values, safe timing)#11

Open
ronaldfaraj wants to merge 2 commits intoTULOA:mainfrom
ronaldfaraj:main
Open

Retail fixes: class portrait icon + ArcaneBar castbar stability (secure/secret values, safe timing)#11
ronaldfaraj wants to merge 2 commits intoTULOA:mainfrom
ronaldfaraj:main

Conversation

@ronaldfaraj
Copy link
Collaborator

This PR includes two Retail-focused fixes:

  1. Player/Class portrait (TPerl.lua)
  • Fixes class portrait rendering on Retail where SetPortraitToTexture() is not available.
  • Uses a safe fallback to SetTexture() for class icon portraits to prevent Lua errors.
  1. ArcaneBar castbar (TPerl_ArcaneBar.lua)
  • Fixes multiple Retail Lua errors triggered by UNIT_SPELLCAST_* events and castbar updates.
  • Adds defensive handling for Retail “secure/secret” values (castID/GUID and timing fields) to avoid invalid comparisons/arithmetic.
  • Makes cast start/stop/failed/interrupt handling resilient when event payloads are missing/secure or when /reload occurs.
  • Normalizes cast timing (ms vs seconds) safely and prevents invalid texture coordinate updates (TexCoord out of range).

Tested on Retail: no more crashes on /reload, player class portrait works, and target casting no longer triggers ArcaneBar errors.

Fix lua error in player class portrait
Added defensive handling for Retail “secure/secret” values returned by UNIT_SPELLCAST_* events and timing APIs.

Prevented crashes from invalid comparisons/arithmetic (castID, startTime/maxValue/endTime) by validating values before use.

Normalized cast timing units (ms vs seconds) and clamped texture coords to avoid out-of-range TexCoord errors.

Improved resilience across /reload and target casting events without breaking non-Retail behavior.
@ronaldfaraj ronaldfaraj marked this pull request as draft February 10, 2026 21:35
@ronaldfaraj
Copy link
Collaborator Author

Hi! Marking this PR as Draft for now.

It resolves the Retail Lua errors I encountered, but I later noticed the cast bar behavior is not working correctly after these changes. I need additional testing and adjustments before it’s ready for review/merge.

I’ll update the PR once the cast bar is confirmed working end-to-end. Thanks!

@TULOA TULOA marked this pull request as ready for review February 16, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant