Skip to content

Commit

Permalink
Merge pull request #135 from taida957789/master
Browse files Browse the repository at this point in the history
[MapleLib] Fix nulled LinkValue when path is not endwith ".img"
  • Loading branch information
lastbattle authored Sep 19, 2021
2 parents cd5f8c3 + 4aef568 commit e1e73c5
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions MapleLib/WzLib/WzProperties/WzUOLProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,20 @@ public WzObject LinkValue
{
if (linkVal is WzImageProperty)
linkVal = ((WzImageProperty)linkVal)[path];
else if (linkVal is WzImage image)
else if (linkVal is WzImage image)
linkVal = image[path];
else if (linkVal is WzDirectory directory)
linkVal = directory[path];
else
{
MapleLib.Helpers.ErrorLogger.Log(MapleLib.Helpers.ErrorLevel.Critical, "UOL got nexon'd at property: " + this.FullPath);
return null;
}
else if (linkVal is WzDirectory directory)
{
if (path.EndsWith(".img"))
linkVal = directory[path];
else
linkVal = directory[path + ".img"];
}
else
{
MapleLib.Helpers.ErrorLogger.Log(MapleLib.Helpers.ErrorLevel.Critical, "UOL got nexon'd at property: " + this.FullPath);
return null;
}
}
}
}
Expand Down

0 comments on commit e1e73c5

Please sign in to comment.