diff options
author | megamage <none@none> | 2009-01-03 11:06:51 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-03 11:06:51 -0600 |
commit | 9438625a19c070ec20d392fa57f1de6a61b7b985 (patch) | |
tree | e4d7fc1ea493a8fb86bd4729b5c6940a2c771d27 /src/game/Level3.cpp | |
parent | a1a52b710c6563105d1c24112b1fa2699f3fbdfe (diff) |
[7015] Implement support -1 in item_template.stackable and item_template.maxcount fields. By VladimirMangos.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Level3.cpp')
-rw-r--r-- | src/game/Level3.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 0b414cd64c7..618a2d7cca5 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -6374,17 +6374,17 @@ bool ChatHandler::HandleSendItemsCommand(const char* args) } uint32 item_count = itemCountStr ? atoi(itemCountStr) : 1; - if(item_count < 1 || item_proto->MaxCount && item_count > item_proto->MaxCount) + if(item_count < 1 || item_proto->MaxCount > 0 && item_count > uint32(item_proto->MaxCount)) { PSendSysMessage(LANG_COMMAND_INVALID_ITEM_COUNT, item_count,item_id); SetSentErrorMessage(true); return false; } - while(item_count > item_proto->Stackable) + while(item_count > item_proto->GetMaxStackSize()) { - items.push_back(ItemPair(item_id,item_proto->Stackable)); - item_count -= item_proto->Stackable; + items.push_back(ItemPair(item_id,item_proto->GetMaxStackSize())); + item_count -= item_proto->GetMaxStackSize(); } items.push_back(ItemPair(item_id,item_count)); |