Skip to content

fix(mop): default Group::SetTargetIcon context arg so 3-arg callers compile - #18

Merged
MadMaxMangos merged 1 commit into
masterfrom
fix/mop-group-marker-context-default
Jul 22, 2026
Merged

fix(mop): default Group::SetTargetIcon context arg so 3-arg callers compile#18
MadMaxMangos merged 1 commit into
masterfrom
fix/mop-group-marker-context-default

Conversation

@MadMaxMangos

@MadMaxMangos MadMaxMangos commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

The 5.4.8 raid-markers restore (6b7978ec9) gave Group::SetTargetIcon a new
required fourth parameter — uint8 context — so its signature became
(uint8 id, ObjectGuid whoGuid, ObjectGuid targetGuid, uint8 context). That
broke every existing 3-argument caller, most importantly the shared Eluna
Group:SetTargetIcon binding, which fails to compile against the mangos-four
core with:

error C2660: 'Group::SetTargetIcon': function does not take 3 arguments

Because MangosServer/Eluna is shared across all cores (Classic/TBC/WotLK/Cata/
MoP), it can't call the 4-arg overload unconditionally without breaking the
other cores. The clean fix is core-side: give the new parameter a default.

Change

src/game/WorldHandlers/Group.h — default the new context argument to 0:

-  void SetTargetIcon(uint8 id, ObjectGuid whoGuid, ObjectGuid targetGuid, uint8 context);
+  void SetTargetIcon(uint8 id, ObjectGuid whoGuid, ObjectGuid targetGuid, uint8 context = 0);

context = 0 is a normal target-icon set (matching GroupHandler's default
path). All existing 4-arg callers keep working and the pre-MoP 3-arg call is
source-compatible again — so stock Eluna needs no change.

Testing

  • Builds clean against stock Eluna (fd0b208a), no submodule change.
  • 253/253 ctest pass.
  • Live-verified: server boots and runs; raid markers function.

Supersedes MangosServer/Eluna#8 (close it) — the fix belongs in the core that
changed the signature.

🤖 Generated with Claude Code


This change is Reviewable

… compile

The 5.4.8 group-markers restore (6b7978e) added a required `uint8 context`
parameter to Group::SetTargetIcon, breaking every 3-argument caller -- notably
the shared Eluna Group:SetTargetIcon binding (build error C2660). Give the new
parameter a default of 0 (a normal target-icon set) so existing 3-arg callers
stay source-compatible and no Eluna change is needed.

Builds clean against stock Eluna (fd0b208a); 218/218 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MadMaxMangos
MadMaxMangos merged commit 5e1f22c into master Jul 22, 2026
@MadMaxMangos
MadMaxMangos deleted the fix/mop-group-marker-context-default branch July 22, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant