Influence of a magnetic field on plasma energy transfer to material surfaces in edge-localized mode simulation experiments with QSPA-M