Skip to content

Commit

Permalink
[MapleLib] Fix some mobs skeleton animnation
Browse files Browse the repository at this point in the history
  • Loading branch information
taida957789 committed Sep 22, 2021
1 parent e1e73c5 commit 166af20
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions MapleLib/WzLib/Spine/WzSpineAtlasLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,23 @@ private static bool TryLoadSkeletonJsonOrBinary(WzImageProperty atlasNode, Atlas
// try read binary based
foreach (WzImageProperty property in childProperties)
{
WzImageProperty linkedProperty = property;

// Derefenerce UOL prop
while ((linkedProperty is WzUOLProperty))
linkedProperty = (linkedProperty as WzUOLProperty).LinkValue as WzImageProperty;

// should be called binaryproperty actually
if (property is WzBinaryProperty soundProp)
if (linkedProperty is WzBinaryProperty soundProp)
{
using (MemoryStream ms = new MemoryStream(soundProp.GetBytes(false)))
{
SkeletonBinary skeletonBinary = new SkeletonBinary(atlas);
data = skeletonBinary.ReadSkeletonData(ms);
return true;
}
}
}

}
}
}
Expand Down

0 comments on commit 166af20

Please sign in to comment.