From d50916a6e05456ba4d5054e28decf86c64830f6b Mon Sep 17 00:00:00 2001 From: tomrus88 Date: Fri, 12 Jun 2009 16:06:14 +0400 Subject: [PATCH] [7998] Raised stackable limit to 1000. Thanks to Seizerkiller. --- src/game/ObjectMgr.cpp | 17 +++++++++++------ src/shared/revision_nr.h | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 611be91c8..e03151533 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1569,7 +1569,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) @@ -1623,7 +1622,7 @@ void ObjectMgr::LoadItemPrototypes() const_cast(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(proto)->Stackable = 1; @@ -1633,10 +1632,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(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(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(proto)->Stackable = 1000; } if(proto->StatsCount > MAX_ITEM_PROTO_STATS) @@ -1834,7 +1833,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) { @@ -1857,6 +1856,12 @@ void ObjectMgr::LoadItemPrototypes() sLog.outErrorDb("Item (Entry: %u) has wrong LimitCategory value (%u)",i,proto->ItemLimitCategory); const_cast(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(proto)->HolidayId = 0; + } } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 10b2fc2fe..ba9c3b2a2 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7997" + #define REVISION_NR "7998" #endif // __REVISION_NR_H__