https://github.com/TrinityCore/TrinityCore/blob/master/src/server/game/Instances/InstanceScript.cpp#L217