aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-06 15:23:25 -0600
committermegamage <none@none>2009-03-06 15:23:25 -0600
commit6f595b30382e5104e4e4c744431284c9f4eda742 (patch)
treedcff781de91fd962df6686cb0321c1fc10e25ea5 /src
parent93113cd3cc4f67bc685d39524a21e0d53d352ffb (diff)
[7387] Check maxcount >= min count for item (not reference) record in loot templates DB tables.. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/LootMgr.cpp7
-rw-r--r--src/shared/revision_nr.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp
index 77d8c780e1e..da5b4343d24 100644
--- a/src/game/LootMgr.cpp
+++ b/src/game/LootMgr.cpp
@@ -278,6 +278,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 fb8ea9d9143..160925670ff 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 "7385"
+ #define REVISION_NR "7387"
#endif // __REVISION_NR_H__