Skip to content

Commit

Permalink
Unlock party - select empty slot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
warblgarbl committed Dec 10, 2024
1 parent f1b383e commit c39cbb6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ protected InputPropagation mouseClick(final int x, final int y, final int button
if(this.loadingStage == 2) {
for(int i = 0; i < 3; i++) {
if(MathHelper.inBox(x, y, 8, this.getSlotY(i), 174, 65)) {
if(gameState_800babc8.charIds_88[i] != -1) {
if(gameState_800babc8.charIds_88[i] != -1 || CONFIG.getConfig(CoreMod.UNLOCK_PARTY_CONFIG.get())) {
playMenuSound(2);
this.primaryCharIndex = i;
this.primaryCharHighlight.y_44 = this.getSlotY(i);

final int charIndex = gameState_800babc8.charIds_88[this.primaryCharIndex];
if(CONFIG.getConfig(CoreMod.UNLOCK_PARTY_CONFIG.get()) || charIndex == -1 || (gameState_800babc8.charData_32c[charIndex].partyFlags_04 & 0x20) == 0) {
if(charIndex == -1 || (gameState_800babc8.charData_32c[charIndex].partyFlags_04 & 0x20) == 0) {
playMenuSound(2);
this.secondaryCharHighlight = allocateUiElement(0x80, 0x80, this.getSecondaryCharX(this.secondaryCharIndex), this.getSecondaryCharY(this.secondaryCharIndex));
FUN_80104b60(this.secondaryCharHighlight);
Expand Down Expand Up @@ -260,7 +260,7 @@ private void menuStage2NavigateDown() {

private void menuStage2Select() {
final int charIndex = gameState_800babc8.charIds_88[this.primaryCharIndex];
if(charIndex != -1 && (CONFIG.getConfig(CoreMod.UNLOCK_PARTY_CONFIG.get()) || (gameState_800babc8.charData_32c[charIndex].partyFlags_04 & 0x20) == 0)) {
if(charIndex != -1 || CONFIG.getConfig(CoreMod.UNLOCK_PARTY_CONFIG.get()) || (gameState_800babc8.charData_32c[charIndex].partyFlags_04 & 0x20) == 0) {
playMenuSound(2);
this.secondaryCharHighlight = allocateUiElement(0x80, 0x80, this.getSecondaryCharX(this.secondaryCharIndex), this.getSecondaryCharY(this.secondaryCharIndex));
FUN_80104b60(this.secondaryCharHighlight);
Expand Down Expand Up @@ -394,4 +394,4 @@ public InputPropagation pressedThisFrame(final InputAction inputAction) {
private int getSlotY(final int slot) {
return 16 + slot * 72;
}
}
}

0 comments on commit c39cbb6

Please sign in to comment.