aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-13 09:42:46 -0500
committermegamage <none@none>2009-06-13 09:42:46 -0500
commit599595ad1060c8b7d1ae8186ffb86e567e7eee46 (patch)
tree3e0e5853187a10801faf7dd90e48a9aebce1a1cc /src/game/ObjectMgr.cpp
parent8a2098d1089635a8dbf588fbf4e7232279660aca (diff)
[7998] Raised stackable limit to 1000. Thanks to Seizerkiller. Author: tomrus88
--HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index ecb30648607..076f5900716 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -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;
+ }
}
}