Is the drop rate pure RNG or is it weighted based on classes in the dungeon at the time? For instance, if there were 0 melee, would it still drop melee dps gear?

Personally, having only just started looking into endgame I'm a bit surprised it isn't token based loot as a lot of other MMOs are - there's still an rng element (beating everyone else's roll) but it's much less harsh.