Skip to content

Commit

Permalink
Fixed images
Browse files Browse the repository at this point in the history
  • Loading branch information
scottAtTai committed Feb 16, 2023
1 parent aaee9a1 commit 8cb2ad3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Settings.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ private void mobconclicked(object sender, RoutedEventArgs e)
{
var format = "ddd MMM dd HH:mm:ss yyyy";
var d = DateTime.Now;
var line = "[" + d.ToString(format) + "] A Shadow regards you indifferently -- You could probably win this fight.";
var line = "[" + d.ToString(format) + "] Ayillish regards you indifferently -- You could probably win this fight.";
logParser.Push(new LogParser.LogParserEventArgs { Line = line });
}

Expand Down
12 changes: 12 additions & 0 deletions src/ViewModels/MobInfoViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,18 @@ private void Parse()
var imageurl = GetValue("imagefilename", splits);
if (!string.IsNullOrWhiteSpace(imageurl) && imageurl.Length > 2)
{
var indexof = imageurl.IndexOf(".png");
if (indexof != -1)
{
imageurl = imageurl.Substring(0, indexof + 4);
}

indexof = imageurl.IndexOf(".jpg");
if (indexof != -1)
{
imageurl = imageurl.Substring(0, indexof + 4);
}

imageurl = char.ToUpper(imageurl[0]) + imageurl.Substring(1, imageurl.Length - 1);
ImageUrl = $"https://wiki.project1999.com/images/{imageurl}";
}
Expand Down

0 comments on commit 8cb2ad3

Please sign in to comment.