fix(Core) : Enable randomProperties or suffix up to 5 (#2340)

This commit is contained in:
Shard
2020-01-23 08:06:05 +01:00
committed by Stoabrogga
parent 59234f8f4b
commit 9f690a3741
9 changed files with 38 additions and 52 deletions

View File

@@ -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);

View File

@@ -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])
{

View File

@@ -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)
{

View File

@@ -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;