The sun is the last light in the array. Here's the info to identify the lights:

vecLightPos.w > 10000 -> sun
vecLightDir.w > 0 -> spotlight
Otherwise -> pointlight