[c12552] Differ random property and random suffix entries in item_enchantment_template table. Use negative values for random suffixes. This will fix overlapping entries.

Fixes cmangos/issues#138

Signed-off-by: Dramacydal <PulLumBerMal@gmail.com>
This commit is contained in:
Dramacydal 2013-04-08 13:38:41 +03:00 committed by Antz
parent ab636ea537
commit 456de16b5e
8 changed files with 2634 additions and 6294 deletions

View file

@ -2183,13 +2183,13 @@ void ObjectMgr::LoadItemPrototypes()
const_cast<ItemPrototype*>(proto)->Sheath = SHEATHETYPE_NONE;
}
if (proto->RandomProperty && !sItemRandomPropertiesStore.LookupEntry(GetItemEnchantMod(proto->RandomProperty)))
if (proto->RandomProperty && !sItemRandomPropertiesStore.LookupEntry(GetItemRandomPropertyMod(proto->RandomProperty)))
{
sLog.outErrorDb("Item (Entry: %u) has unknown (wrong or not listed in `item_enchantment_template`) RandomProperty (%u)", i, proto->RandomProperty);
const_cast<ItemPrototype*>(proto)->RandomProperty = 0;
}
if (proto->RandomSuffix && !sItemRandomSuffixStore.LookupEntry(GetItemEnchantMod(proto->RandomSuffix)))
if (proto->RandomSuffix && !sItemRandomSuffixStore.LookupEntry(GetItemRandomSuffixMod(proto->RandomSuffix)))
{
sLog.outErrorDb("Item (Entry: %u) has wrong RandomSuffix (%u)", i, proto->RandomSuffix);
const_cast<ItemPrototype*>(proto)->RandomSuffix = 0;