Skip to content

Commit

Permalink
Specialized class doesn't contain core attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
WyrnCael committed May 13, 2018
1 parent 2f5a92e commit d3120de
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Assets/TRPGMaker/Scripts/Database/SpecializedClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,11 @@ public void Init()
public void refreshAttributes()
{
if (attributes == null)
attributes = Extensions.Clone<AttributeValue>(Database.Instance.attributes.Where(x => x.isCore).ToList()).ToList();
attributes = new List<AttributeValue>();
else
{
// Remove Deleted
attributes.RemoveAll(x => !Database.Instance.attributes.Contains(x.attribute));

attributes.AddRange(Extensions.Clone<AttributeValue>(Database.Instance.attributes.Where(x => !attributes.Any(y => y.attribute.id == x.id) && x.isCore).ToList()));
List<AttributeValue> aux = new List<AttributeValue>();
aux.AddRange(attributes.Where(x => Database.Instance.attributes.Any(y => y.id == x.attribute.id)));
attributes = aux;
}
}

Expand Down

0 comments on commit d3120de

Please sign in to comment.