mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-17 20:58:07 +02:00
Fix display of remaining spell duration for creatures
This commit is contained in:
parent
d586d4ea89
commit
f4a218285f
@ -691,7 +691,7 @@ void StackInfoBasicPanel::initializeData(const CStack * stack)
|
||||
if (spellBonuses->empty())
|
||||
throw std::runtime_error("Failed to find effects for spell " + effect.toSpell()->getJsonKey());
|
||||
|
||||
int duration = spellBonuses->front()->duration;
|
||||
int duration = spellBonuses->front()->turnsRemain;
|
||||
|
||||
icons.push_back(std::make_shared<CAnimImage>(AnimationPath::builtin("SpellInt"), effect + 1, 0, firstPos.x + offset.x * printed, firstPos.y + offset.y * printed));
|
||||
if(settings["general"]["enableUiEnhancements"].Bool())
|
||||
|
@ -238,7 +238,7 @@ CStackWindow::ActiveSpellsSection::ActiveSpellsSection(CStackWindow * owner, int
|
||||
if (spellBonuses->empty())
|
||||
throw std::runtime_error("Failed to find effects for spell " + effect.toSpell()->getJsonKey());
|
||||
|
||||
int duration = spellBonuses->front()->duration;
|
||||
int duration = spellBonuses->front()->turnsRemain;
|
||||
boost::replace_first(spellText, "%d", std::to_string(duration));
|
||||
|
||||
spellIcons.push_back(std::make_shared<CAnimImage>(AnimationPath::builtin("SpellInt"), effect + 1, 0, firstPos.x + offset.x * printed, firstPos.y + offset.y * printed));
|
||||
|
Loading…
x
Reference in New Issue
Block a user