mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 09:33:47 +00:00
fix(Core) : Enable randomProperties or suffix up to 5 (#2340)
This commit is contained in:
@@ -608,8 +608,8 @@ void Item::SetItemRandomProperties(int32 randomPropId)
|
||||
SetInt32Value(ITEM_FIELD_RANDOM_PROPERTIES_ID, item_rand->ID);
|
||||
SetState(ITEM_CHANGED, GetOwner());
|
||||
}
|
||||
for (uint32 i = PROP_ENCHANTMENT_SLOT_2; i < PROP_ENCHANTMENT_SLOT_2 + 3; ++i)
|
||||
SetEnchantment(EnchantmentSlot(i), item_rand->enchant_id[i - PROP_ENCHANTMENT_SLOT_2], 0, 0);
|
||||
for (uint32 i = PROP_ENCHANTMENT_SLOT_0; i < MAX_ENCHANTMENT_SLOT; ++i)
|
||||
SetEnchantment(EnchantmentSlot(i), item_rand->enchant_id[i - PROP_ENCHANTMENT_SLOT_0], 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -625,7 +625,7 @@ void Item::SetItemRandomProperties(int32 randomPropId)
|
||||
SetState(ITEM_CHANGED, GetOwner());
|
||||
}
|
||||
|
||||
for (uint32 i = PROP_ENCHANTMENT_SLOT_0; i < PROP_ENCHANTMENT_SLOT_0 + 3; ++i)
|
||||
for (uint32 i = PROP_ENCHANTMENT_SLOT_0; i < MAX_ENCHANTMENT_SLOT; ++i)
|
||||
SetEnchantment(EnchantmentSlot(i), item_rand->enchant_id[i - PROP_ENCHANTMENT_SLOT_0], 0, 0);
|
||||
}
|
||||
}
|
||||
@@ -898,7 +898,7 @@ void Item::ClearEnchantment(EnchantmentSlot slot)
|
||||
if (!GetEnchantmentId(slot))
|
||||
return;
|
||||
|
||||
for (uint8 x = 0; x < MAX_ITEM_ENCHANTMENT_EFFECTS; ++x)
|
||||
for (uint8 x = 0; x < MAX_SPELL_ITEM_ENCHANTMENT_EFFECTS; ++x)
|
||||
SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1 + slot*MAX_ENCHANTMENT_OFFSET + x, 0);
|
||||
SetState(ITEM_CHANGED, GetOwner());
|
||||
}
|
||||
|
||||
@@ -152,11 +152,11 @@ enum EnchantmentSlot
|
||||
PRISMATIC_ENCHANTMENT_SLOT = 6, // added at apply special permanent enchantment
|
||||
MAX_INSPECTED_ENCHANTMENT_SLOT = 7,
|
||||
|
||||
PROP_ENCHANTMENT_SLOT_0 = 7, // used with RandomSuffix
|
||||
PROP_ENCHANTMENT_SLOT_1 = 8, // used with RandomSuffix
|
||||
PROP_ENCHANTMENT_SLOT_0 = 7, // used with RandomSuffix and RandomProperty
|
||||
PROP_ENCHANTMENT_SLOT_1 = 8, // used with RandomSuffix and RandomProperty
|
||||
PROP_ENCHANTMENT_SLOT_2 = 9, // used with RandomSuffix and RandomProperty
|
||||
PROP_ENCHANTMENT_SLOT_3 = 10, // used with RandomProperty
|
||||
PROP_ENCHANTMENT_SLOT_4 = 11, // used with RandomProperty
|
||||
PROP_ENCHANTMENT_SLOT_3 = 10, // used with RandomSuffix and RandomProperty
|
||||
PROP_ENCHANTMENT_SLOT_4 = 11, // used with RandomSuffix and RandomProperty
|
||||
MAX_ENCHANTMENT_SLOT = 12
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user