public IdMappings(IdMap heroes, IdMap spells, IdMap artifacts, IdMap monsters, IdMap creatureGenerators1, IdMap creatureGenerators4, TemplateMap templates) { this.heroes = heroes; this.spells = spells; this.artifacts = artifacts; this.monsters = monsters; this.creatureGenerators1 = creatureGenerators1; this.creatureGenerators4 = creatureGenerators4; this.templates = templates; }
private string TryGetValueForId(int id, IdMap mapping, string name) { if (mapping.IsEmpty) // to avoid spamming the logs { return(null); } if (mapping.TryGetValue(id, out var value) == false) { Log.Information("No name for {itemType} {value}", name, id); } return(value != emptyValue ? value : null); }