Optimize dictionary in mtgmanaconverter
This commit is contained in:
parent
e158e2196f
commit
8189d78cea
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ namespace Geekbot.net.Lib
|
||||||
var rgx = Regex.Matches(mana, "(\\{(.*?)\\})");
|
var rgx = Regex.Matches(mana, "(\\{(.*?)\\})");
|
||||||
foreach (Match manaTypes in rgx)
|
foreach (Match manaTypes in rgx)
|
||||||
{
|
{
|
||||||
var m = _manaDict.FirstOrDefault(x => x.Key == manaTypes.Value).Value;
|
var m = _manaDict.GetValueOrDefault(manaTypes.Value);
|
||||||
if (!string.IsNullOrEmpty(m))
|
if (!string.IsNullOrEmpty(m))
|
||||||
{
|
{
|
||||||
mana = mana.Replace(manaTypes.Value, m);
|
mana = mana.Replace(manaTypes.Value, m);
|
||||||
|
|
Loading…
Reference in a new issue