Just because you are likely to return to this, I would advise you get it OUT of ::doTurn, and instead make a new function called :
rocessAlignment() or something. Then call that instead of updateAlignment in this first posted IF statement. Just move all the following code out into the new function.
"paiNumRealBuilding[iI]"
If this is the global variable, bad form, you should use the ::get___() accessor instead of going straight to the variable. Also you are missing the m_ which is common for a global, so I'll assume it is a local variable which was loaded earlier in the function. Also, you don't want to use RealBuilding IIRC, because then you skip free things like the Mage Guild from Catacomb Libralus.
Why are you doing the checking of CivilizationBuildings for the Buildingclass? That will lead to you doing multiple checks for each building. So when I loop through everything and I check the Mage Guild, I will see that the Bannor don't have a unique version, so I check the Mage Guild. Later I get to the Sheaim UB for Mage Guilds, I see that I use a normal Mage Guild, so I check those again. Thus I have looked at my Mage Guilds twice. You are in a loop over all BuildingTypes, just use what the loop currently is.
Buildings must have both <iAlignmentShift> and <iAlignmentShiftModifier> to do anything in this function as you have it written.
You shouldn't be calling for getNumBuilding(eBuilding) if you already checked that they have this building at the start of your function. Though since you changed what building you are looking at, you DO need it as you have things written. But as I said, you really shouldn't change which building you are looking at.
Instead of looping over the number of buildings that they have, you really ought to just multiply the shift by the number of buildings which they have and finish in a single line. You should also use a std::min() -- or std::max() for the negatives -- function to ensure that they cannot exceed their shift limit.