Repair reversed D&D evidence ranges
This commit is contained in:
@@ -45,7 +45,7 @@ func canonicalizeSpellCast(spell *spellCastResponse, order shared.SourceRefOrder
|
||||
if spell == nil {
|
||||
return 0, false
|
||||
}
|
||||
refs := order.Canonicalize(spellSourceRefs(spell.SourceRefs, sourceID))
|
||||
refs := order.Canonicalize(order.OrderEndpoints(spellSourceRefs(spell.SourceRefs, sourceID)))
|
||||
spell.SourceRefs = spellResponseRefs(refs)
|
||||
return order.EarliestValid(refs)
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
const Key = "dnd/spells"
|
||||
const SchemaVersion = "v1"
|
||||
|
||||
const mappingPolicy = "dnd.spells.extract_mapping.v2"
|
||||
const mappingPolicy = "dnd.spells.extract_mapping.v3"
|
||||
|
||||
const (
|
||||
NPCRegistryReferenceSlot = npcregistry.ReferenceSlot
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestExtractReturnsCanonicalSpellListFromPrivateResponse(t *testing.T) {
|
||||
{
|
||||
Caster: " Aria ",
|
||||
Spell: " Cure Wounds ",
|
||||
SourceRefs: responseSourceRefs(1, 2),
|
||||
SourceRefs: responseSourceRefs(2, 1),
|
||||
},
|
||||
}}}
|
||||
req := extractionRequest()
|
||||
|
||||
Reference in New Issue
Block a user