diff options
Diffstat (limited to 'src/gui/widgets/skilllistbox.h')
-rw-r--r-- | src/gui/widgets/skilllistbox.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/widgets/skilllistbox.h b/src/gui/widgets/skilllistbox.h index a3b6be059..97be121a8 100644 --- a/src/gui/widgets/skilllistbox.h +++ b/src/gui/widgets/skilllistbox.h @@ -165,11 +165,20 @@ class SkillListBox final : public ListBox return; const SkillInfo *const skill = getSkillByEvent(event); - if (!skill) + if (!skill || !skill->data) return; + std::string description = skill->data->description; + std::string mana = skill->skillMana; + if (description.empty()) + { + description = mana; + mana.clear(); + } mPopup->show(viewport->mMouseX, viewport->mMouseY, - skill->data->dispName, skill->data->description); + skill->data->dispName, + description, + mana); } void mouseDragged(MouseEvent &event) |