diff options
author | Kudlaty <none@none> | 2009-09-22 01:52:16 +0200 |
---|---|---|
committer | Kudlaty <none@none> | 2009-09-22 01:52:16 +0200 |
commit | d3c402fa180554017268a6a24b72443b14d8d11c (patch) | |
tree | e71311a295b85633ba62c6a632be8c85492df31f /src | |
parent | 9e5c8db01f792231ecff7e3f60a31ebfea733ff1 (diff) |
Fix problems with no stack limit.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/ItemPrototype.h | 7 | ||||
-rw-r--r-- | src/game/Player.cpp | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/game/ItemPrototype.h b/src/game/ItemPrototype.h index f38e5cdc455..a6daf47cb48 100644 --- a/src/game/ItemPrototype.h +++ b/src/game/ItemPrototype.h @@ -116,8 +116,6 @@ enum ITEM_FLAGS ITEM_FLAGS_USEABLE_IN_ARENA = 0x00200000, ITEM_FLAGS_THROWABLE = 0x00400000, // not used in game for check trow possibility, only for item in game tooltip ITEM_FLAGS_SPECIALUSE = 0x00800000, // last used flag in 2.3.0 - ITEM_FLAGS_NO_STACK_LIMIT = 0x00FFFFFF, // items which not have stack limit - ITEM_FLAGS_NO_STACK_LIMIT2 = 0x07FFFFFF, // We aren't sure exactly why they need two yet ITEM_FLAGS_BOA = 0x08000000, // bind on account (set in template for items that can binded in like way) ITEM_FLAGS_TRIGGERED_CAST = 0x10000000, // used by enchanting scrolls made with vellum ITEM_FLAGS_MILLABLE = 0x20000000 @@ -606,10 +604,7 @@ struct ItemPrototype uint32 GetMaxStackSize() const { - if (Flags & ITEM_FLAGS_NO_STACK_LIMIT || Flags & ITEM_FLAGS_NO_STACK_LIMIT2) - return uint32(0x7FFFFFFF-1); - else - return Stackable > 0 ? uint32(Stackable) : uint32(0x7FFFFFFF-1); + return (Stackable == 2147483647 || Stackable <= 0) ? uint32(0x7FFFFFFF-1) : uint32(Stackable); } float getDPS() const diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 8db30d47e68..e7c7a8aba23 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -9346,7 +9346,7 @@ uint8 Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, } // no maximum - if(pProto->MaxCount <= 0) + if(pProto->MaxCount <= 0 || pProto->MaxCount == 2147483647) return EQUIP_ERR_OK; uint32 curcount = GetItemCount(pProto->ItemId,true,pItem); |