Just to add some extra info here.
The source code says:
C++:
std::abs(static_cast<int32_t>(attackerPlayer->getLevel() - level)) <= g_config.getNumber(ConfigManager::EXP_FROM_PLAYERS_LEVEL_RANGE)
Which to me looks like it is the
difference between levels.
So, a level 100 killing a level a level 30 in the example given before would also gain exp apparently???