From 55cbf74cbe2c40b4592e72621e40f8858fc376d9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 Jan 2016 18:36:21 +0300 Subject: Move cards constants into separate file. --- src/gui/widgets/itemlinkhandler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/itemlinkhandler.cpp') diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index 1f30c5da6..e363fe671 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -24,6 +24,8 @@ #include "itemcolormanager.h" +#include "const/resources/item/cards.h" + #include "gui/viewport.h" #include "gui/popups/itempopup.h" @@ -119,7 +121,7 @@ void ItemLinkHandler::handleLink(const std::string &link, MouseEvent *event) if (id > 0) { str.erase(str.begin()); - while (str.size() < 4) + while (str.size() < maxCards) str.push_back(0); const ItemColor color = ItemColorManager::getColorFromCards(&str[0]); -- cgit v1.2.3-60-g2f50