Simplify drop/set into party

would reset the battle box sprites legality to not shown; also, the
prior fix for #2069 did not work for reloaded save files since
GetSlotFiller was called instead.
This commit is contained in:
Kurt
2018-08-12 19:28:35 -07:00
parent 6edc828cc3
commit 61013b8f18

View File

@@ -267,26 +267,7 @@ private void ResetDaycare()
L_DaycareSeed.Visible = TB_RNGSeed.Visible = seed != null;
}
public void SetParty()
{
// Refresh slots
if (SAV.HasParty)
{
var party = SAV.PartyData;
for (int i = 0; i < party.Count; i++)
SlotPictureBoxes[i + (int)SlotIndex.Party].Image = GetSprite(party[i], -1); // i + (int)SlotIndex.Party); -- dont get sprite with "slot", implies in Box
for (int i = party.Count; i < 6; i++)
SlotPictureBoxes[i + (int)SlotIndex.Party].Image = null;
}
if (SAV.HasBattleBox)
{
var battle = SAV.BattleBoxData;
for (int i = 0; i < battle.Count; i++)
SlotPictureBoxes[i + (int)SlotIndex.BattleBox].Image = GetSprite(battle[i], -1); // , i + (int)SlotIndex.BattleBox); -- dont get sprite with "slot", implies in Box
for (int i = battle.Count; i < 6; i++)
SlotPictureBoxes[i + (int)SlotIndex.BattleBox].Image = null;
}
}
public void SetParty() => ResetParty();
public void ClickUndo()
{
@@ -404,7 +385,7 @@ private void GetSlotFiller(int offset, PictureBox pb)
}
int slot = GetSlot(pb);
pb.Image = GetSprite(p, slot);
pb.Image = GetSprite(p, slot < 6 ? -1 : slot);
pb.BackColor = Color.Transparent;
}