summaryrefslogtreecommitdiff
path: root/src/gui/windows/equipmentwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-23 16:45:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-23 16:45:46 +0300
commitd20744c0ff83572dc209389df900826b7d088546 (patch)
treeb6a91790f6c52d016e57cfdba687251c1f01409f /src/gui/windows/equipmentwindow.cpp
parenta22d7bce703101ba3ae15cb5b8545381dfe863c4 (diff)
downloadmv-d20744c0ff83572dc209389df900826b7d088546.tar.gz
mv-d20744c0ff83572dc209389df900826b7d088546.tar.bz2
mv-d20744c0ff83572dc209389df900826b7d088546.tar.xz
mv-d20744c0ff83572dc209389df900826b7d088546.zip
Add support for additional slots in net code.
Now projectile slot depend on server.
Diffstat (limited to 'src/gui/windows/equipmentwindow.cpp')
-rw-r--r--src/gui/windows/equipmentwindow.cpp7
1 files changed, 5 insertions, 2 deletions
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<std::string, int> 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<EquipmentBox*>::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());