aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Entities/Item/ItemEnchantmentMgr.cpp5
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp2
2 files changed, 2 insertions, 5 deletions
diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
index 5d8d6ef25ce..c363f305451 100644
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
@@ -95,10 +95,7 @@ uint32 GetItemEnchantMod(int32 entry)
if (entry == -1)
{
- tab = RandomItemEnch.begin();
- entry = urand(1, RandomItemEnch.size()) - 1;
- for (uint32 i = 0; i < entry; ++i)
- ++tab;
+ /* To do: Find randomproperty/suffix based on item level. */
}
else
tab = RandomItemEnch.find(entry);
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 00fbc83244c..38df034ccc4 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -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;