TrinityCore icon indicating copy to clipboard operation
TrinityCore copied to clipboard

Fix ObjectGuid constructor calls for TrinityCore automerge compatibility

Open Copilot opened this issue 4 months ago • 1 comments

Fixes compilation failures in the automerge process caused by recent changes to TrinityCore's ObjectGuid API.

Problem

The automerge was failing with compilation errors related to ObjectGuid constructor calls. Recent changes to TrinityCore deprecated the 3-parameter ObjectGuid constructor for Global GUID types (Item, Player, etc.) that don't require entry IDs.

The old constructor pattern:

ObjectGuid(HighGuid::Item, 0, guid)

Has been replaced with:

ObjectGuid(HighGuid::Item, guid)

Solution

Updated all ObjectGuid constructor calls to use the correct 2-parameter format for Global GUID types. The ObjectGuid header now explicitly deletes the old 3-parameter constructor with ObjectGuid(HighGuid, uint32, uint64 counter) = delete; to prevent incorrect usage.

Files Changed

  • Reforger.cpp: Fixed 2 instances in the reforging script
  • Reforging.cpp: Fixed 1 instance in the reforge packet handling
  • cs_debug.cpp: Fixed 2 instances in debug commands
  • Player.cpp: Fixed 1 instance in friend list management

Testing

  • All changes are minimal API compatibility fixes with no functional changes
  • Security scan passed with 0 alerts
  • Comprehensive search performed to ensure no instances were missed

This resolves the automerge build failures and restores functionality to the Transmog and Reforging scripts.

Original prompt

This section details on the original issue you should resolve

<issue_title>Transmog and Reforging Script no longer works</issue_title> <issue_description>with the last commit the scripts no lomger work and your automerge fails. This is the Problem with a change the Objectguid.

https://github.com/Rochet2/TrinityCore/actions/runs/18267087442/job/52003082566

@Rochet2 </issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes Rochet2/TrinityCore#162

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot avatar Oct 07 '25 19:10 Copilot