From d20744c0ff83572dc209389df900826b7d088546 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 23 Nov 2014 16:45:46 +0300 Subject: Add support for additional slots in net code. Now projectile slot depend on server. --- src/gui/windows/equipmentwindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/windows/equipmentwindow.cpp') diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index e37d623d6..a78052404 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -53,11 +53,13 @@ #include "utils/dtor.h" #include "utils/gettext.h" +#include "net/inventoryhandler.h" + #include "debug.h" EquipmentWindow *equipmentWindow = nullptr; EquipmentWindow *beingEquipmentWindow = nullptr; -static const int BOX_COUNT = 22; +static const int BOX_COUNT = 27; std::map EquipmentWindow::mSlotNames; EquipmentWindow::EquipmentWindow(Equipment *const equipment, @@ -241,6 +243,7 @@ void EquipmentWindow::draw(Graphics *graphics) } i = 0; + const int projSlot = inventoryHandler->getProjectileSlot(); for (std::vector::const_iterator it = boxes.begin(), it_end = boxes.end(); it != it_end; ++ it, ++ i) { @@ -258,7 +261,7 @@ void EquipmentWindow::draw(Graphics *graphics) // with maximum opacity graphics->drawImage(image, box->x + mItemPadding, box->y + mItemPadding); - if (i == ItemSlot::PROJECTILE_SLOT) + if (i == projSlot) { graphics->setColorAll(mLabelsColor, mLabelsColor2); const std::string str = toString(item->getQuantity()); -- cgit v1.2.3-70-g09d2