I am reworking the code chunk in RepByZone that handles getting either Wrathion's or Sabellion's factionID whenever the player's reputation changes. Instead of returning either dragon's factionID, the code is returning the backup of Valdrakken Accord.
What should be happening:
Check the current friendship ranks and return the factionID of the highest rank.
If the ranks are equal, check the progress to the next rank.
If both factions are dead equal or the player hasn't discovered the factionIDs, then return Valdrakken Accord.
I have tested on my main, who is 2 of 6 with Wrathion and 1 of 6 with Sabellion. Each time I visit the Obsidian Throne, RBZ is not switching. The addon is still displaying Valdrakken Accord, and I can't spot the error. I've double-checked the areaID, and the factionIDs, done a few /dump tests, and have run out of ideas.
I figured it out by updating the pre-assigned zone and subzone lists, which were using whatever was assigned during initial login, which is probably either nil. I'll clean up the code, but here are the fixed lines.
-- Sholazar Basin has three possible zone factions; some DF subzones have two; retun factionID based on player's quest progress
-- Sholazar Basin
local frenzyHeartStanding = select(3, GetFactionInfoByID(1104))
local oraclesStanding = select(3, GetFactionInfoByID(1105))