Skip to content

Commit

Permalink
Merge pull request #141 from taida957789/skeleton-animation
Browse files Browse the repository at this point in the history
[MapleLib] Fix some mobs skeleton animnation
  • Loading branch information
lastbattle authored Sep 26, 2021
2 parents e1e73c5 + 166af20 commit 30ff917
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 30ff917

Please sign in to comment.