diff options
author | megamage <none@none> | 2009-07-01 17:38:38 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-07-01 17:38:38 -0500 |
commit | bea88590c7c4707ca8217c765177a876b956c6a0 (patch) | |
tree | 6dd86e8f9ab84e92ddec71fd9bf5ae74d0bc0e2c /src/game/ObjectMgr.cpp | |
parent | 9c9c9f507895e551c8c7dc941e06e44b2b35b9a9 (diff) |
[8092] Check bag size at item protos loading and item slots at invetory loading. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index cbf445ebc6b..c9c2ef42820 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -2035,6 +2035,12 @@ void ObjectMgr::LoadItemPrototypes() const_cast<ItemPrototype*>(proto)->Stackable = 1000; } + if(proto->ContainerSlots > MAX_BAG_SIZE) + { + sLog.outErrorDb("Item (Entry: %u) has too large value in ContainerSlots (%u), replace by hardcoded limit (%u).",i,proto->ContainerSlots,MAX_BAG_SIZE); + const_cast<ItemPrototype*>(proto)->ContainerSlots = MAX_BAG_SIZE; + } + if(proto->StatsCount > MAX_ITEM_PROTO_STATS) { sLog.outErrorDb("Item (Entry: %u) has too large value in statscount (%u), replace by hardcoded limit (%u).",i,proto->StatsCount,MAX_ITEM_PROTO_STATS); |