Sync with https://github.com/TrinityCore/TrinityCore/commit/b65172910c4f65c3ddd3a7c7ca3d3c7330f4a1f0