Cherry pick from https://gitlab.com/trinitycore/TrinityCore_434/commit/a85579b83e059292a57138d2b907ded01df77dc3
779d3b2368