--[[
ETB ContainerLoot — collectible contents of openable "bag" items.

Source: AllTheThings (Mists) 5.1.9-14-g4ce839c Categories/ExpansionFeatures.lua
for the headline subset, completed against the community/Warcraft-Wiki
confirmed drop list and cross-verified entry-by-entry against ETB's own
EMT (mounts) and EPT (pets) databases. ATT's own bag nodes ship only a
partial pool (the headline items); the Celestial bags actually award the
full set below, which is why several mounts/pets show "Cache/Satchel of
Celestial Chance" on their in-game tooltips without appearing in ATT's
bag node. Every s=/i= pair here resolves in EMT/EPT — nothing is guessed.

The Satchel, Cache, and Coffer of Celestial Chance share one reward table, so
all three list the same pool. Coffer (item 276086) is the patch 5.5.4 / Phase 3
name for the bag; Satchel (248666, Phase 1) and Cache (266273) are the earlier
phase names. Same Celestial-Dungeon reward family (August Stone Fragment bag).

Schema:
  [containerItemID] = {
      name    = display fallback (the client resolves the real name at runtime),
      mounts  = { {s=<mountSpellID>, i=<teachItemID>[, rep=1]}, ... },
      pets    = { {s=<speciesID>,    i=<cageItemID>},          ... },
  }
  s = collectible id (mount journal spellID, or pet speciesID)
  i = the item that teaches/cages it (for name + icon resolution)
  rep = 1 marks a collectible gated behind a reputation requirement (shown faint)

Only bags actually obtainable on MoP Classic 5.4.8 are listed. ATT also carries
Cata-era "Satchel" mount pools (Throne of the Four Winds / Firelands heroic) and
many post-MoP Trading-Post / promotion bags; those are excluded because they are
not live in this client. New bags can be appended here without code changes.
]]--
local ADDON_NAME, NS = ...
NS.ETB = NS.ETB or {}
local ETB = NS.ETB

-- Shared Celestial Chance reward table (24 mounts + 21 pets), each verified
-- against EMT/EPT. The Satchel, Cache, and Coffer all reference the same pool.
local CELESTIAL_MOUNTS = {
    -- Riding Yaks (beta-only recolours; bag-exclusive on MoP Classic)
    { s = 127209, i = 87786 },              -- Reins of the Black Riding Yak
    { s = 127213, i = 87787 },              -- Reins of the Brown Riding Yak
    { s = 123182, i = 84753 },              -- Reins of the White Riding Yak
    -- Water Striders (Anglers-exalted to ride)
    { s = 127271, i = 87791, rep = 1 },     -- Reins of the Crimson Water Strider
    { s = 127272, i = 87792, rep = 1 },     -- Reins of the Orange Water Strider
    { s = 127274, i = 87793, rep = 1 },     -- Reins of the Jade Water Strider
    { s = 127278, i = 87794, rep = 1 },     -- Reins of the Golden Water Strider
    -- Riding Cranes
    { s = 127178, i = 87784 },              -- Reins of the Jungle Riding Crane
    { s = 1247591, i = 248741 },            -- Reins of the Celestial Riding Crane
    -- Primal Raptors (delivered as Primal Egg, hatches to a random colour)
    { s = 138641, i = 94291 },              -- Reins of the Green Primal Raptor
    { s = 138642, i = 94292 },              -- Reins of the Red Primal Raptor
    { s = 138643, i = 94293 },              -- Reins of the Black Primal Raptor
    -- Primordial Direhorns (Oondasta / Zandalari Warbringer)
    { s = 138423, i = 94228 },              -- Reins of the Cobalt Primordial Direhorn
    { s = 138425, i = 94229 },              -- Reins of the Slate Primordial Direhorn
    { s = 138424, i = 94230 },              -- Reins of the Amber Primordial Direhorn
    { s = 138426, i = 94231 },              -- Reins of the Jade Primordial Direhorn
    -- Primal Direhorn (Sunreaver Onslaught / Kirin Tor Offensive, exalted)
    { s = 140250, i = 95565, rep = 1 },     -- Reins of the Crimson Primal Direhorn
    -- Cloud Serpents
    { s = 127170, i = 87777 },              -- Reins of the Astral Cloud Serpent
    { s = 127158, i = 87771 },              -- Reins of the Heavenly Onyx Cloud Serpent
    { s = 139442, i = 95057 },              -- Reins of the Thundering Cobalt Cloud Serpent
    { s = 132036, i = 90655 },              -- Reins of the Thundering Ruby Cloud Serpent
    -- World boss / raid mounts
    { s = 130965, i = 89783 },              -- Son of Galleon's Saddle
    { s = 136471, i = 93666 },              -- Spawn of Horridon
    { s = 139448, i = 95059 },              -- Clutch of Ji-Kun
}

local CELESTIAL_PETS = {
    { s = 836,  i = 86563 },                -- Jade Crane Chick
    { s = 792,  i = 88148 },                -- Hollow Reed
    { s = 834,  i = 86564 },                -- Imbued Jade Fragment
    { s = 381,  i = 89587 },                -- Porcupette
    { s = 1201, i = 94595 },                -- Spawn of G'nathus
    { s = 1180, i = 94126 },                -- Tiny Red Carp
    { s = 1211, i = 95422 },                -- Tiny Blue Carp
    { s = 1212, i = 95423 },                -- Tiny Green Carp
    { s = 1213, i = 95424 },                -- Tiny White Carp
    { s = 1183, i = 94152 },                -- Son of Animus
    { s = 1202, i = 94835 },                -- Quivering Blob
    { s = 1243, i = 97959 },                -- Dark Quivering Blob
    { s = 1206, i = 94932 },                -- Zandalari Anklerender
    { s = 1207, i = 94933 },                -- Zandalari Kneebiter
    { s = 1208, i = 94934 },                -- Zandalari Footslasher
    { s = 1209, i = 94935 },                -- Zandalari Toenibbler
    { s = 1205, i = 94573 },                -- Direhorn Runt
    { s = 1177, i = 94125 },                -- Living Sandling
    { s = 1200, i = 94574 },                -- Pygmy Direhorn
    { s = 1178, i = 94124 },                -- Sunreaver Micro-Sentry
    { s = 1244, i = 97960 },                -- Ji-Kun Hatchling
}

ETB.ContainerLoot = {
    -- Satchel of Celestial Chance (August Stone Fragment vendor reward).
    [248666] = {
        name = "Satchel of Celestial Chance",
        mounts = CELESTIAL_MOUNTS,
        pets = CELESTIAL_PETS,
    },

    -- Cache of Celestial Chance (the newer/larger Celestial bag).
    [266273] = {
        name = "Cache of Celestial Chance",
        mounts = CELESTIAL_MOUNTS,
        pets = CELESTIAL_PETS,
    },

    -- Coffer of Celestial Chance (patch 5.5.4 / Phase 3 current bag; same pool).
    [276086] = {
        name = "Coffer of Celestial Chance",
        mounts = CELESTIAL_MOUNTS,
        pets = CELESTIAL_PETS,
    },
}
