Skip to content

Commit

Permalink
Improve Party widget Boost Character Method
Browse files Browse the repository at this point in the history
  • Loading branch information
sithlord48 committed Jan 25, 2023
1 parent c14f5f1 commit 1c6a43d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/widgets/partytab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ void PartyTab::setCharEditorAutoStatCalc(bool enabled)
void PartyTab::setCharacter(const FF7CHAR &charData, const QString &processedName)
{
m_charEditor->setChar(charData, processedName);
if(charData.id == FF7Char::Sephiroth || charData.id == FF7Char::YoungCloud)
m_btnBoostCharacter->setVisible(false);
else
m_btnBoostCharacter->setVisible(true);
}

void PartyTab::setButtonImageToId(int buttonNumber, int id)
Expand Down Expand Up @@ -220,9 +224,14 @@ void PartyTab::updateText()

void PartyTab::boostCharacter()
{
if (m_charEditor->id() == FF7Char::YoungCloud || m_charEditor->id() || m_charEditor->name().isNull())
if (m_charEditor->id() == FF7Char::YoungCloud || m_charEditor->id() == FF7Char::Sephiroth || m_charEditor->name().isNull())
return; //no char selected, sephiroth and young cloud.

if (m_charEditor->id() == FF7Char::Chocobo) {
m_charEditor->MaxStats();
return;
}

int result = QMessageBox::question(this, tr("Black Chocobo"), tr("Do You Want To Also Replace %1's Equipment and Materia?").arg(m_charEditor->name()), QMessageBox::StandardButton::Yes | QMessageBox::StandardButton::No);
switch (result) {
case QMessageBox::StandardButton::Yes : m_charEditor->MaxEquip(); m_charEditor->MaxStats(); break;
Expand Down

0 comments on commit 1c6a43d

Please sign in to comment.