Skip to content

Commit

Permalink
Removed unlockedOptions field from AgentState
Browse files Browse the repository at this point in the history
  • Loading branch information
greymistcube committed Mar 4, 2024
1 parent bd80350 commit 1437055
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
2 changes: 0 additions & 2 deletions Lib9c/Action/AuraSummon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ SkillSheet skillSheet
var stat = CombinationEquipment5.GetStat(optionRow, random);
equipment.StatsMap.AddStatAdditionalValue(stat.StatType, stat.BaseValue);
equipment.optionCountFromCombination++;
agentState.unlockedOptions.Add(optionRow.Id);
}
else
{
Expand All @@ -309,7 +308,6 @@ SkillSheet skillSheet

equipment.Skills.Add(skill);
equipment.optionCountFromCombination++;
agentState.unlockedOptions.Add(optionRow.Id);
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions Lib9c/Action/CombinationEquipment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ SkillSheet skillSheet
equipment.StatsMap.AddStatAdditionalValue(stat.StatType, stat.BaseValue);
equipment.Update(equipment.RequiredBlockIndex + optionInfo.RequiredBlockIndex);
equipment.optionCountFromCombination++;
agentState.unlockedOptions.Add(optionRow.Id);
}
else
{
Expand All @@ -695,7 +694,6 @@ SkillSheet skillSheet
equipment.Skills.Add(skill);
equipment.Update(equipment.RequiredBlockIndex + optionInfo.RequiredBlockIndex);
equipment.optionCountFromCombination++;
agentState.unlockedOptions.Add(optionRow.Id);
}
}
}
Expand Down Expand Up @@ -746,7 +744,6 @@ SkillSheet skillSheet
equipment.Skills.Add(skill);
equipment.Update(equipment.RequiredBlockIndex + optionInfo.RequiredBlockIndex);
equipment.optionCountFromCombination++;
agentState.unlockedOptions.Add(optionRow.Id);
}
}
}
Expand Down
8 changes: 1 addition & 7 deletions Lib9c/Model/State/AgentState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public class AgentState : State, ICloneable

public readonly Dictionary<int, Address> avatarAddresses;

public HashSet<int> unlockedOptions;
public int MonsterCollectionRound { get; private set; }

public int Version { get; private set; }
Expand All @@ -26,7 +25,6 @@ public AgentState(Address address) : base(address)
{
Version = CurrentVersion;
avatarAddresses = new Dictionary<int, Address>();
unlockedOptions = new HashSet<int>();
}

public AgentState(Dictionary serialized)
Expand All @@ -41,9 +39,6 @@ public AgentState(Dictionary serialized)
kv => kv.Value.ToAddress()
);
#pragma warning restore LAA1002
unlockedOptions = serialized.ContainsKey((IKey)(Text) "unlockedOptions")
? serialized["unlockedOptions"].ToHashSet(StateExtensions.ToInteger)
: new HashSet<int>();
MonsterCollectionRound = serialized.ContainsKey((IKey) (Text) MonsterCollectionRoundKey)
? serialized[MonsterCollectionRoundKey].ToInteger()
: 0;
Expand All @@ -61,7 +56,6 @@ public AgentState(List serialized)
kv => kv.Value.ToAddress()
);
#pragma warning restore LAA1002
unlockedOptions = serialized[3].ToHashSet(StateExtensions.ToInteger);
MonsterCollectionRound = serialized[4].ToInteger();
}

Expand Down Expand Up @@ -97,7 +91,7 @@ public override IValue SerializeList()
new KeyValuePair<IKey, IValue>(
new Binary(BitConverter.GetBytes(kv.Key)),
kv.Value.Serialize()))),
unlockedOptions.Select(i => i.Serialize()).Serialize(),
new List(), // A placeholder list for now removed unlockedOptions property.
#pragma warning restore LAA1002
MonsterCollectionRound.Serialize());
}
Expand Down

0 comments on commit 1437055

Please sign in to comment.