Skip to content

Commit

Permalink
Fixed an issue where Creature Campaign characters in FE8 could not ha…
Browse files Browse the repository at this point in the history
…ve their recruitment randomized.
  • Loading branch information
lushen124 committed Mar 7, 2020
1 parent 5b8077a commit d4a2c9f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ private static void fillSlot(RecruitmentOptions options, ItemAssignmentOptions i

GBAFECharacterData[] linkedSlots = characterData.linkedCharactersForCharacter(slotReference);
for (GBAFECharacterData linkedSlot : linkedSlots) {
// Do not modify if they happen to have a different class.
if (linkedSlot.getClassID() != slotReference.getClassID()) { continue; }

// First, replace the description, and face
// The name is unnecessary because there's a text find/replace that we apply later.
linkedSlot.setDescriptionIndex(fill.getDescriptionIndex());
Expand Down Expand Up @@ -838,7 +841,8 @@ public int compare(Integer o1, Integer o2) {
}

private static void setSlotClass(ItemAssignmentOptions inventoryOptions, GBAFECharacterData slot, GBAFEClassData targetClass, CharacterDataLoader characterData, ClassDataLoader classData, ItemDataLoader itemData, TextLoader textData, ChapterLoader chapterData, Random rng) {
GBAFEClassData originalClass = classData.classForID(slot.getClassID());
int oldClassID = slot.getClassID();
GBAFEClassData originalClass = classData.classForID(oldClassID);
slot.setClassID(targetClass.getID());
transferWeaponRanks(slot, originalClass, targetClass, itemData, rng);

Expand Down

0 comments on commit d4a2c9f

Please sign in to comment.