mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 08:06:23 +00:00
fix(Core) : Enable randomProperties or suffix up to 5 (#2340)
This commit is contained in:
@@ -437,7 +437,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
|
||||
SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(item_rand_suffix->enchant_id[k]);
|
||||
if (pEnchant)
|
||||
{
|
||||
for (int t = 0; t < MAX_ITEM_ENCHANTMENT_EFFECTS; t++)
|
||||
for (int t = 0; t < MAX_SPELL_ITEM_ENCHANTMENT_EFFECTS; t++)
|
||||
if (pEnchant->spellid[t] == m_spellInfo->Id)
|
||||
{
|
||||
amount = uint32((item_rand_suffix->prefix[k]*castItem->GetItemSuffixFactor()) / 10000);
|
||||
|
||||
@@ -6969,7 +6969,7 @@ SpellCastResult Spell::CheckItems()
|
||||
// do not allow adding usable enchantments to items that have use effect already
|
||||
if (enchantEntry)
|
||||
{
|
||||
for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s)
|
||||
for (uint8 s = 0; s < MAX_SPELL_ITEM_ENCHANTMENT_EFFECTS; ++s)
|
||||
{
|
||||
switch (enchantEntry->type[s])
|
||||
{
|
||||
|
||||
@@ -2914,7 +2914,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex)
|
||||
// support only enchantings with add socket in this slot
|
||||
{
|
||||
bool add_socket = false;
|
||||
for (uint8 i = 0; i < MAX_ITEM_ENCHANTMENT_EFFECTS; ++i)
|
||||
for (uint8 i = 0; i < MAX_SPELL_ITEM_ENCHANTMENT_EFFECTS; ++i)
|
||||
{
|
||||
if (pEnchant->type[i] == ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET)
|
||||
{
|
||||
|
||||
@@ -2801,7 +2801,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
{
|
||||
uint32 enchantId = spellInfo->Effects[j].MiscValue;
|
||||
SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId);
|
||||
for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s)
|
||||
for (uint8 s = 0; s < MAX_SPELL_ITEM_ENCHANTMENT_EFFECTS; ++s)
|
||||
{
|
||||
if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user