Skip to content

Fix objscale_master build after upstream master merge#181

Merged
Rochet2 merged 770 commits into
objscale_masterfrom
fix/objscale_master-upstream-merge
May 26, 2026
Merged

Fix objscale_master build after upstream master merge#181
Rochet2 merged 770 commits into
objscale_masterfrom
fix/objscale_master-upstream-merge

Conversation

@Rochet2

@Rochet2 Rochet2 commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

The scheduled merge workflow merges TrinityCore/TrinityCore master into objscale_master and builds with -DWITH_WARNINGS_AS_ERRORS=1. The branch was failing at the merge step (spawn SQL conflicts) and would not compile after upstream schema/API changes.

This PR merges the latest upstream master into objscale_master, resolves the conflicts, and keeps per-spawn scale persistence working.

What was wrong

Merge conflicts

  1. WorldDatabase.cpp — Upstream expanded WORLD_INS_CREATURE / WORLD_INS_GAMEOBJECT with phaseUseFlags, terrainSwapMap, ScriptName, and StringId. Objscale adds a per-spawn size column to both INSERT statements.

  2. Creature.cpp::SaveToDB — Upstream appended ScriptName / StringId SQL binds after unit flags. Objscale appends data.size at the end of the same statement.

  3. GameObject.cpp::SaveToDB — Same overlap between objscale's data.size bind and upstream's ScriptName / StringId binds.

Post-merge compile errors (WITH_WARNINGS_AS_ERRORS=1)

  1. cs_gobject.cpp::HandleGameObjectSetScaleCommand — Passed GameObjectSpawnId through std::to_string(...).c_str() for LANG_COMMAND_OBJNOTFOUND instead of dereferencing like other call sites; success message passed std::string to a %s placeholder without .c_str().

What was fixed

File Fix
src/server/database/Database/Implementation/WorldDatabase.cpp Keep upstream spawn columns and objscale size in both INSERT templates.
src/server/game/Entities/Creature/Creature.cpp Bind data.size, then upstream ScriptName / StringId.
src/server/game/Entities/GameObject/GameObject.cpp Same bind ordering for gameobjects.
src/server/scripts/Commands/cs_gobject.cpp LANG_COMMAND_OBJNOTFOUND, *guidLow; .ToString().c_str() for the success %s.

Test plan

  • Merge this PR into objscale_master.
  • Confirm the merge workflow _master (objscale_master, …) jobs pass.
  • In-game: .npc scale 2.0 on a creature — verify scale and DB persistence.
  • In-game: .gobject set scale <id> 2.0 — verify scale, persistence, and visibility refresh.
  • Reset path: scale <= 0 restores template scale.

Shauren and others added 30 commits February 26, 2026 10:53
… result of incorrect merge conflict resolution
… while still being teleported to a different map
Shauren and others added 27 commits May 11, 2026 10:34
…tly always printed before battleground starts and replaced its trinity_string entry with proper battleground status packet
by jildor, closes TrinityCore#28854

(cherry picked from commit fe81161)
@Rochet2 Rochet2 force-pushed the fix/objscale_master-upstream-merge branch from 9d41063 to 9b651d0 Compare May 25, 2026 22:34
@Rochet2 Rochet2 merged commit e166a85 into objscale_master May 26, 2026
10 checks passed
@Rochet2 Rochet2 deleted the fix/objscale_master-upstream-merge branch May 26, 2026 00:08
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.