From 0bfc8499c4f7333db099765eb9730aa4d65d53eb Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Fri, 6 Mar 2009 04:56:51 +0300 Subject: [PATCH] [7387] Check maxcount >= min count for item (not reference) record in loot templates DB tables.. --- src/game/LootMgr.cpp | 7 +++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index 591a123f..3097cff4 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -275,6 +275,13 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const store.GetName(), entry, itemid, chance); return false; } + + if( maxcount < mincountOrRef) // wrong max count + { + sLog.outErrorDb("Table '%s' entry %d item %d: max count (%u) less that min count (%i) - skipped", store.GetName(), entry, itemid, uint32(maxcount), mincountOrRef); + return false; + } + } else // mincountOrRef < 0 { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 02123392..16092567 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 "7386" + #define REVISION_NR "7387" #endif // __REVISION_NR_H__ -- 2.11.4.GIT