mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
[7998] Raised stackable limit to 1000. Thanks to Seizerkiller. Author: tomrus88
--HG-- branch : trunk
This commit is contained in:
@@ -1858,7 +1858,6 @@ void ObjectMgr::LoadItemPrototypes()
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
// can be used in equip slot, as page read use in inventory, or spell casting at use
|
||||
bool req = proto->InventoryType!=INVTYPE_NON_EQUIP || proto->PageText;
|
||||
if(!req)
|
||||
@@ -1912,7 +1911,7 @@ void ObjectMgr::LoadItemPrototypes()
|
||||
const_cast<ItemPrototype*>(proto)->MaxCount = -1;
|
||||
}
|
||||
|
||||
if(proto->Stackable==0)
|
||||
if(proto->Stackable == 0)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong value in stackable (%i), replace by default 1.",i,proto->Stackable);
|
||||
const_cast<ItemPrototype*>(proto)->Stackable = 1;
|
||||
@@ -1922,10 +1921,10 @@ void ObjectMgr::LoadItemPrototypes()
|
||||
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)
|
||||
else if(proto->Stackable > 1000)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has too large value in stackable (%u), replace by hardcoded upper limit (255).",i,proto->Stackable);
|
||||
const_cast<ItemPrototype*>(proto)->Stackable = 255;
|
||||
sLog.outErrorDb("Item (Entry: %u) has too large value in stackable (%u), replace by hardcoded upper limit (1000).",i,proto->Stackable);
|
||||
const_cast<ItemPrototype*>(proto)->Stackable = 1000;
|
||||
}
|
||||
|
||||
if(proto->StatsCount > MAX_ITEM_PROTO_STATS)
|
||||
@@ -2117,7 +2116,7 @@ void ObjectMgr::LoadItemPrototypes()
|
||||
if(proto->TotemCategory && !sTotemCategoryStore.LookupEntry(proto->TotemCategory))
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong TotemCategory (%u)",i,proto->TotemCategory);
|
||||
|
||||
for (int j = 0; j < MAX_ITEM_PROTO_SOCKETS; j++)
|
||||
for (int j = 0; j < MAX_ITEM_PROTO_SOCKETS; ++j)
|
||||
{
|
||||
if(proto->Socket[j].Color && (proto->Socket[j].Color & SOCKET_COLOR_ALL) != proto->Socket[j].Color)
|
||||
{
|
||||
@@ -2140,6 +2139,12 @@ void ObjectMgr::LoadItemPrototypes()
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong LimitCategory value (%u)",i,proto->ItemLimitCategory);
|
||||
const_cast<ItemPrototype*>(proto)->ItemLimitCategory = 0;
|
||||
}
|
||||
|
||||
if(proto->HolidayId && !sHolidaysStore.LookupEntry(proto->HolidayId))
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong HolidayId value (%u)", i, proto->HolidayId);
|
||||
const_cast<ItemPrototype*>(proto)->HolidayId = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user