diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-08-26 16:55:05 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-08-26 16:55:05 +0200 |
commit | 6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d (patch) | |
tree | 4e6e178095ac8cf89dc0dba4f532913891305436 /src/gui/widgets | |
parent | ee8f131b49bb9b1d66cac3840b3c566eb49bcf3f (diff) | |
download | mana-client-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.gz mana-client-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.bz2 mana-client-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.tar.xz mana-client-6d9dbf93e6c0247cb9b19d3f52a1837a5833b22d.zip |
Merged testing branch into master.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/chattab.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 9 | ||||
-rw-r--r-- | src/gui/widgets/itemlinkhandler.cpp | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index fbde2c9c..05f34760 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -236,7 +236,7 @@ void ChatTab::chatInput(const std::string &message) std::string temp = msg.substr(start + 1, end - start - 1); - const ItemInfo itemInfo = ItemDB::get(temp); + const ItemInfo itemInfo = itemDb->get(temp); if (itemInfo.getId() != 0) { msg.insert(end, "@@"); diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index a9df95a6..c8c98d0a 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -257,7 +257,7 @@ void ItemContainer::mousePressed(gcn::MouseEvent &event) { if(event.getClickCount() == 2) { - if (item->isEquipment()) + if (item->getInfo().getEquippable()) { if (item->isEquipped()) item->doEvent("doUnequip"); @@ -277,7 +277,7 @@ void ItemContainer::mousePressed(gcn::MouseEvent &event) { if(event.getClickCount() == 2) { - if (item->isEquipment()) + if (item->getInfo().getEquippable()) { if (item->isEquipped()) item->doEvent("doUnequip"); @@ -285,7 +285,9 @@ void ItemContainer::mousePressed(gcn::MouseEvent &event) item->doEvent("doEquip"); } else + { item->doEvent("doUse"); + } } else { @@ -294,7 +296,8 @@ void ItemContainer::mousePressed(gcn::MouseEvent &event) itemShortcut->setItemSelected(item->getId()); } - if (item->isEquipment()) + + if (item->getInfo().getEquippable()) outfitWindow->setItemSelected(item->getId()); } else diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index b7341084..8477225f 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -49,7 +49,7 @@ void ItemLinkHandler::handleLink(const std::string &link) if (id > 0) { - const ItemInfo &itemInfo = ItemDB::get(id); + const ItemInfo &itemInfo = itemDb->get(id); mItemPopup->setItem(itemInfo, true); if (mItemPopup->isVisible()) |