Skip to content

Commit

Permalink
Merge pull request #211 from lushen124/bugfix/0175-fix-fe8-cc-random-…
Browse files Browse the repository at this point in the history
…recruit

[Issue #175] Fixed FE8 Creature Campaign recruitment
  • Loading branch information
lushen124 committed Mar 17, 2020
2 parents 449ebc5 + d4a2c9f commit 203883e
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -452,6 +452,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 @@ -879,7 +882,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 203883e

Please sign in to comment.