1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-30 15:06:06 +00:00

Parsing sorts vo

This commit is contained in:
Yan Maniez 2018-06-22 17:47:39 +02:00
parent 80df171c5e
commit 0ea81a15d0

View file

@ -26,7 +26,7 @@ namespace AideDeJeuLib.Spells
{ {
re = new Regex("(?<type>.*), (?<level>tour de magie)"); re = new Regex("(?<type>.*), (?<level>tour de magie)");
match = re.Match(value); match = re.Match(value);
if(match.Groups["level"].Value == "tour de magie") if (match.Groups["level"].Value == "tour de magie")
{ {
this.Type = match.Groups["type"].Value; this.Type = match.Groups["type"].Value;
this.Level = "0"; // match.Groups["level"].Value; this.Level = "0"; // match.Groups["level"].Value;
@ -35,7 +35,8 @@ namespace AideDeJeuLib.Spells
else else
{ {
System.Diagnostics.Debug.WriteLine(value); System.Diagnostics.Debug.WriteLine(value);
re = new Regex("level (?<level>\\d) - (?<type>.*?) ?(?<rituel>\\(ritual\\))?"); //re = new Regex("level (?<level>\\d) - (?<type>.*?)\\w?(?<rituel>\\(ritual\\))?");
re = new Regex("(?<level>\\d) - (?<type>.*)\\w?(?<rituel>\\(ritual\\))?");
match = re.Match(value); match = re.Match(value);
this.Type = match.Groups["type"].Value; this.Type = match.Groups["type"].Value;
this.Level = match.Groups["level"].Value; this.Level = match.Groups["level"].Value;