[7015] Implement support -1 in item_template.stackable and item_template.maxcount fields. By VladimirMangos.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-01-03 11:06:51 -06:00
1 parent a1a52b710c
commit 9438625a19
15 files changed
+113 -58

No files matched your search

+12 -1
View File
@@ -1800,11 +1800,22 @@ void ObjectMgr::LoadItemPrototypes()
else if(proto->RequiredReputationRank > MIN_REPUTATION_RANK)
sLog.outErrorDb("Item (Entry: %u) has RequiredReputationFaction ==0 but RequiredReputationRank > 0, rank setting is useless.",i);
if(proto->MaxCount < -1)
{
sLog.outErrorDb("Item (Entry: %u) has too large negative in maxcount (%i), replace by value (-1) no storing limits.",i,proto->MaxCount);
const_cast<ItemPrototype*>(proto)->MaxCount = -1;
}
if(proto->Stackable==0)
{
sLog.outErrorDb("Item (Entry: %u) has wrong value in stackable (%u), replace by default 1.",i,proto->Stackable);
sLog.outErrorDb("Item (Entry: %u) has wrong value in stackable (%i), replace by default 1.",i,proto->Stackable);
const_cast<ItemPrototype*>(proto)->Stackable = 1;
}
else if(proto->Stackable < -1)
{
sLog.outErrorDb("Item (Entry: %u) has too large negative in stackable (%i), replace by value (-1) no stacking limits.",i,proto->Stackable);
const_cast<ItemPrototype*>(proto)->Stackable = -1;
}
else if(proto->Stackable > 255)
{
sLog.outErrorDb("Item (Entry: %u) has too large value in stackable (%u), replace by hardcoded upper limit (255).",i,proto->Stackable);