_G.Merfin = _G.Merfin or {}
local Merfin = _G.Merfin

-- Reputation names (numeric -> string)
Merfin.REPUTATION_NAMES = {
  [5] = FACTION_STANDING_LABEL5, -- Friendly
  [6] = FACTION_STANDING_LABEL6, -- Honored
  [7] = FACTION_STANDING_LABEL7, -- Revered
  [8] = FACTION_STANDING_LABEL8, -- Exalted
}

-- Faction item sources
-- itemID -> factionID + rep
Merfin.FactionSourceDB = Merfin.FactionSourceDB or {}

-- =================================================
-- Argent Crusade (1106)
-- =================================================
Merfin.FactionSourceDB[44297] = { factionID = 1106, reputation = 8 } -- Boots of the Neverending Path
Merfin.FactionSourceDB[44295] = { factionID = 1106, reputation = 8 } -- Polished Regimental Hauberk
Merfin.FactionSourceDB[44296] = { factionID = 1106, reputation = 8 } -- Helm of Purified Thoughts
Merfin.FactionSourceDB[44283] = { factionID = 1106, reputation = 8 } -- Signet of Hopeful Light
Merfin.FactionSourceDB[44248] = { factionID = 1106, reputation = 7 } -- Battle Mender's Helm
Merfin.FactionSourceDB[44247] = { factionID = 1106, reputation = 7 } -- Fang-Deflecting Faceguard
Merfin.FactionSourceDB[44244] = { factionID = 1106, reputation = 7 } -- Argent Skeleton Crusher
Merfin.FactionSourceDB[44245] = { factionID = 1106, reputation = 7 } -- Zombie Sweeper Shotgun
Merfin.FactionSourceDB[44214] = { factionID = 1106, reputation = 7 } -- Purifying Torch
Merfin.FactionSourceDB[44216] = { factionID = 1106, reputation = 6 } -- Cloak of Holy Extermination
Merfin.FactionSourceDB[44240] = { factionID = 1106, reputation = 6 } -- Special Issue Legplates
Merfin.FactionSourceDB[44239] = { factionID = 1106, reputation = 6 } -- Standard Issue Legguards


-- =================================================
-- Kirin Tor (1090)
-- =================================================
Merfin.FactionSourceDB[44180] = { factionID = 1090, reputation = 8 } -- Robes of Crackling Flame
Merfin.FactionSourceDB[44181] = { factionID = 1090, reputation = 8 } -- Ghostflicker Waistband
Merfin.FactionSourceDB[44182] = { factionID = 1090, reputation = 8 } -- Boots of Twinkling Stars
Merfin.FactionSourceDB[44183] = { factionID = 1090, reputation = 8 } -- Fireproven Gauntlets
Merfin.FactionSourceDB[44179] = { factionID = 1090, reputation = 7 } -- Mind-Expanding Leggings
Merfin.FactionSourceDB[44176] = { factionID = 1090, reputation = 7 } -- Girdle of the Warrior Magi
Merfin.FactionSourceDB[44173] = { factionID = 1090, reputation = 7 } -- Flameheart Spell Scalpel
Merfin.FactionSourceDB[44174] = { factionID = 1090, reputation = 7 } -- Stave of Shrouded Mysteries
Merfin.FactionSourceDB[44167] = { factionID = 1090, reputation = 6 } -- Shroud of Dedicated Research
Merfin.FactionSourceDB[44170] = { factionID = 1090, reputation = 6 } -- Helm of the Majestic Stag
Merfin.FactionSourceDB[44171] = { factionID = 1090, reputation = 6 } -- Spaulders of Grounded Lightning
Merfin.FactionSourceDB[44166] = { factionID = 1090, reputation = 6 } -- Lightblade Rivener

-- =================================================
-- Knights of the Ebon Blade (1098)
-- =================================================
Merfin.FactionSourceDB[44302] = { factionID = 1098, reputation = 8 } -- Belt of Dark Mending
Merfin.FactionSourceDB[44303] = { factionID = 1098, reputation = 8 } -- Darkheart Chestguard
Merfin.FactionSourceDB[44305] = { factionID = 1098, reputation = 8 } -- Kilt of Dark Mercy
Merfin.FactionSourceDB[44306] = { factionID = 1098, reputation = 8 } -- Death-Inured Sabatons
Merfin.FactionSourceDB[44256] = { factionID = 1098, reputation = 7 } -- Sterile Flesh-Handling Gloves
Merfin.FactionSourceDB[44258] = { factionID = 1098, reputation = 7 } -- Wound-Binder's Wristguards
Merfin.FactionSourceDB[44257] = { factionID = 1098, reputation = 7 } -- Spaulders of the Black Arrow
Merfin.FactionSourceDB[44250] = { factionID = 1098, reputation = 7 } -- Reaper of Dark Souls
Merfin.FactionSourceDB[44249] = { factionID = 1098, reputation = 7 } -- Runeblade of Demonstrable Power
Merfin.FactionSourceDB[44242] = { factionID = 1098, reputation = 6 } -- Dark Soldier Cape
Merfin.FactionSourceDB[44243] = { factionID = 1098, reputation = 6 } -- Toxin-Tempered Sabatons
Merfin.FactionSourceDB[44241] = { factionID = 1098, reputation = 6 } -- Unholy Persuader

-- =================================================
-- The Wyrmrest Accord (1091)
-- =================================================
Merfin.FactionSourceDB[44202] = { factionID = 1091, reputation = 8 } -- Sandals of Crimson Fury
Merfin.FactionSourceDB[44203] = { factionID = 1091, reputation = 8 } -- Dragonfriend Bracers
Merfin.FactionSourceDB[44204] = { factionID = 1091, reputation = 8 } -- Grips of Fierce Pronouncements
Merfin.FactionSourceDB[44205] = { factionID = 1091, reputation = 8 } -- Legplates of Bloody Reprisal
Merfin.FactionSourceDB[44200] = { factionID = 1091, reputation = 7 } -- Ancestral Sinew Wristguards
Merfin.FactionSourceDB[44198] = { factionID = 1091, reputation = 7 } -- Breastplate of the Solemn Council
Merfin.FactionSourceDB[44201] = { factionID = 1091, reputation = 7 } -- Sabatons of Draconic Vigor
Merfin.FactionSourceDB[44199] = { factionID = 1091, reputation = 7 } -- Gavel of the Brewing Storm
Merfin.FactionSourceDB[44152] = { factionID = 1091, reputation = 7 } -- Arcanum of Blissful Mending
Merfin.FactionSourceDB[44188] = { factionID = 1091, reputation = 6 } -- Cloak of Peaceful Resolutions
Merfin.FactionSourceDB[44196] = { factionID = 1091, reputation = 6 } -- Sash of the Wizened Wyrm
Merfin.FactionSourceDB[44197] = { factionID = 1091, reputation = 6 } -- Bracers of Accorded Courtesy
Merfin.FactionSourceDB[44187] = { factionID = 1091, reputation = 6 } -- Fang of Truth
Merfin.FactionSourceDB[44140] = { factionID = 1091, reputation = 6 } -- Arcanum of the Eclipsed Moon
