Replace hard coded grass type slot for the slot type parameter

This commit is contained in:
javierhimura 2017-03-19 15:10:28 +01:00
parent cacb5fdfa0
commit b0fc485eb5

View File

@ -293,7 +293,7 @@ private static EncounterSlot[] getSlots4_DPPt_G(byte[] data, ref int ofs, int nu
LevelMax = level,
LevelMin = level,
Species = species,
Type = SlotType.Grass
Type = t
};
}
@ -314,20 +314,20 @@ private static EncounterSlot[] getSlots4_HGSS_G(byte[] data, ref int ofs, int nu
LevelMin = level,
LevelMax = level,
Species = species,
Type = SlotType.Grass
Type = t
};
}
for (int i = 0; i < numslots; i++)
{
slots[numslots + i] = slots[i].Clone();
slots[numslots + i].Species = (int)BitConverter.ToUInt16(data, ofs + numslots * 3 + i * 2);
slots[numslots + i].Type = SlotType.Grass;
slots[numslots + i].Type = t;
}
for (int i = 0; i < numslots; i++)
{
slots[numslots * 2 + i] = slots[i].Clone();
slots[numslots * 2 + i].Species = (int)BitConverter.ToUInt16(data, ofs + numslots * 5 + i * 2);
slots[numslots * 2 + i].Type = SlotType.Grass;
slots[numslots * 2 + i].Type = t;
}
ofs += numslots * 7;