Skip to content

Commit

Permalink
Properly update the file
Browse files Browse the repository at this point in the history
  • Loading branch information
KillzXGaming committed Dec 20, 2023
1 parent 89e1cfb commit 3a5047c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ static dynamic SetDictionary(object section)
bymlProperties.Add("Z", ((ByamlVector3F)section).Z);
return bymlProperties;
}
if (section is UnitObject)
{
//Generate a unit ID unique to the object if set to 0
if (((UnitObject)section).UnitIdNum == 0)
((UnitObject)section).UnitIdNum = UnitIDRng.Next(0, 100000);
}

var properties = section.GetType().GetProperties(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
var fields = section.GetType().GetFields(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
Expand Down

0 comments on commit 3a5047c

Please sign in to comment.