cherry pick from https://gitlab.com/trinitycore/TrinityCore_434/commit/f3215c03a9af8792c0c1952452343ff3f5378da4
779d3b2368