pub fn sanitize_bundle_for_config(
bundle: &BundleRaw,
game_config: &GameConfig,
) -> Option<BundleRaw>Expand description
Drops everything a stored bundle references that no longer exists in the
live config, and returns None when nothing claimable is left.
Config bundles are looked up by id and re-read from GameConfig on every
load, so they cannot go stale. Operator-composed gifts have no config entry
— they are snapshots persisted with the mail and with the character_bundles
row — so an item template, ability or currency removed from the config
after the gift was sent would otherwise be granted as a dangling id. Item
and ability steps already skip unknown ids when they are turned into
elements; currencies do not, and an emptied step would still produce an
empty reward popup. Both are handled here.