Skip to content

Commit

Permalink
Fix the spell cost displayed in the quick info window when hero has a…
Browse files Browse the repository at this point in the history
…rtifact that reduces this cost (#9367)
  • Loading branch information
oleg-derevenetz authored Dec 23, 2024
1 parent c649579 commit 0f5b0c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fheroes2/gui/ui_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ namespace fheroes2
assert( spell.isValid() );

std::string spellText( _spell.GetName() );
const uint32_t spellPoints = _spell.spellPoints( nullptr );
const uint32_t spellPoints = _spell.spellPoints( _hero );
if ( spellPoints > 0 ) {
spellText += " [" + std::to_string( spellPoints ) + ']';
}
Expand All @@ -445,7 +445,7 @@ namespace fheroes2
void SpellDialogElement::draw( Image & output, const Point & offset ) const
{
std::string spellText( _spell.GetName() );
const uint32_t spellPoints = _spell.spellPoints( nullptr );
const uint32_t spellPoints = _spell.spellPoints( _hero );
if ( spellPoints > 0 ) {
spellText += " [" + std::to_string( spellPoints ) + ']';
}
Expand Down

0 comments on commit 0f5b0c3

Please sign in to comment.