diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-01 00:11:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-01 00:11:22 +0300 |
commit | 2b2196b1aa2919e71dc2cd8b78a068c7e28a0a0c (patch) | |
tree | 9f6f720d09d26694af658e53f00043d24b1a507d /src/gui/popups/beingpopup.cpp | |
parent | f52dab5137717821aafa7be92a01464d67498d64 (diff) | |
download | manaverse-2b2196b1aa2919e71dc2cd8b78a068c7e28a0a0c.tar.gz manaverse-2b2196b1aa2919e71dc2cd8b78a068c7e28a0a0c.tar.bz2 manaverse-2b2196b1aa2919e71dc2cd8b78a068c7e28a0a0c.tar.xz manaverse-2b2196b1aa2919e71dc2cd8b78a068c7e28a0a0c.zip |
Fix pet popup. For not own pets now show pet info and size always correct.
Diffstat (limited to 'src/gui/popups/beingpopup.cpp')
-rw-r--r-- | src/gui/popups/beingpopup.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp index d8d92f388..5ca2a76be 100644 --- a/src/gui/popups/beingpopup.cpp +++ b/src/gui/popups/beingpopup.cpp @@ -170,7 +170,7 @@ void BeingPopup::show(const int x, const int y, Being *const b) if (type == ActorType::Pet) { const PetInfo *const info = PlayerInfo::getPet(); - if (info) + if (info && info->id == b->getId()) { // TRANSLATORS: being popup label label1->setCaption(strprintf(_("Hungry: %d"), @@ -187,6 +187,17 @@ void BeingPopup::show(const int x, const int y, Being *const b) label7 = nullptr; label8 = nullptr; } + else + { + label1 = nullptr; + label2 = nullptr; + label3 = nullptr; + label4 = nullptr; + label5 = nullptr; + label6 = nullptr; + label7 = nullptr; + label8 = nullptr; + } } else if (type == ActorType::Homunculus) { |