protected override bool IsObject(AmfObject obj) { var storageName = obj.GetString("storageName"); PerkVM.fixup(obj); return(storageName == _xml.Name); }
public static void fixup(AmfObject obj) { PerkVM.initialize(obj, false); // Fixes saves which have NaNs for some perk values if (double.IsNaN(obj.GetDouble("value1"))) { obj["value1"] = 0; } if (double.IsNaN(obj.GetDouble("value2"))) { obj["value2"] = 0; } if (double.IsNaN(obj.GetDouble("value3"))) { obj["value3"] = 0; } if (double.IsNaN(obj.GetDouble("value4"))) { obj["value4"] = 0; } }
protected override void InitializeObject(AmfObject obj) { PerkVM.initialize(obj); obj["storageName"] = _xml.Name; }