Remove some faulty code for picking a random item enchant if RandomProperty is -1. This will have to be implemented correctly later.
Also prevent the core throwing errors when loading items with RandomProperty -1 --HG-- branch : trunk
This commit is contained in:
@@ -2256,7 +2256,7 @@ void ObjectMgr::LoadItemPrototypes()
|
||||
const_cast<ItemPrototype*>(proto)->Sheath = SHEATHETYPE_NONE;
|
||||
}
|
||||
|
||||
if (proto->RandomProperty && !sItemRandomPropertiesStore.LookupEntry(GetItemEnchantMod(proto->RandomProperty)))
|
||||
if (proto->RandomProperty > 0 && !sItemRandomPropertiesStore.LookupEntry(GetItemEnchantMod(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;
|
||||
|
||||
Reference in New Issue
Block a user