diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-08-19 01:39:59 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-08-19 01:39:59 +0200 |
commit | 22fc8d2c06a73e0d29b03c5f6c98992ba331615b (patch) | |
tree | 3bd58600e7d8b732a501088ba6d46ecd334dae3a /src/game-server/itemmanager.cpp | |
parent | 67af89b5fe14d2d0431cefb9b714f72873a74e16 (diff) | |
download | manaserv-22fc8d2c06a73e0d29b03c5f6c98992ba331615b.tar.gz manaserv-22fc8d2c06a73e0d29b03c5f6c98992ba331615b.tar.bz2 manaserv-22fc8d2c06a73e0d29b03c5f6c98992ba331615b.tar.xz manaserv-22fc8d2c06a73e0d29b03c5f6c98992ba331615b.zip |
Changed the sprite layer protocol to support
an arbitrary number of layers. (up to 255).
Diffstat (limited to 'src/game-server/itemmanager.cpp')
-rw-r--r-- | src/game-server/itemmanager.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/game-server/itemmanager.cpp b/src/game-server/itemmanager.cpp index d41212bb..6840368a 100644 --- a/src/game-server/itemmanager.cpp +++ b/src/game-server/itemmanager.cpp @@ -132,16 +132,18 @@ void ItemManager::readEquipSlotsFile() continue; } - bool visible = XML::getBoolProperty(node, "visible", false); - if (visible) + if (slotId > 255) { - if (++mVisibleEquipSlotCount > 7) - { - LOG_WARN("Item Manager: More than 7 visible equip slot!" - "This will not work with current netcode!"); - } + LOG_WARN("Item Manager: equip slot " << slotId + << ": (" << name << ") is superior to 255 " + "and has been ignored."); + continue; } + bool visible = XML::getBoolProperty(node, "visible", false); + if (visible) + ++mVisibleEquipSlotCount; + EquipSlotsInfo::iterator i = mEquipSlotsInfo.find(slotId); if (i != mEquipSlotsInfo.end()) |