diff --git a/src/game/Item.cpp b/src/game/Item.cpp index d0a9be332..b5563a979 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -998,6 +998,12 @@ bool Item::IsBoundByEnchant() const if (!enchant_id) continue; + if (enchant_slot == TRANSMOGRIFY_ENCHANTMENT_SLOT) + return true; + + if (enchant_slot > PRISMATIC_ENCHANTMENT_SLOT && enchant_slot < PROP_ENCHANTMENT_SLOT_0) + continue; + SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!enchantEntry) continue; diff --git a/src/game/Item.h b/src/game/Item.h index 568260d07..7f7c984ac 100644 --- a/src/game/Item.h +++ b/src/game/Item.h @@ -164,14 +164,17 @@ enum EnchantmentSlot SOCK_ENCHANTMENT_SLOT_3 = 4, BONUS_ENCHANTMENT_SLOT = 5, PRISMATIC_ENCHANTMENT_SLOT = 6, // added at apply special permanent enchantment - MAX_INSPECTED_ENCHANTMENT_SLOT = 7, + // = 7, + REFORGE_ENCHANTMENT_SLOT = 8, + TRANSMOGRIFY_ENCHANTMENT_SLOT = 9, + MAX_INSPECTED_ENCHANTMENT_SLOT = 10, - PROP_ENCHANTMENT_SLOT_0 = 7, // used with RandomSuffix - PROP_ENCHANTMENT_SLOT_1 = 8, // used with RandomSuffix - 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 - MAX_ENCHANTMENT_SLOT = 12 + PROP_ENCHANTMENT_SLOT_0 = 10, // used with RandomSuffix + PROP_ENCHANTMENT_SLOT_1 = 11, // used with RandomSuffix + PROP_ENCHANTMENT_SLOT_2 = 12, // used with RandomSuffix and RandomProperty + PROP_ENCHANTMENT_SLOT_3 = 13, // used with RandomProperty + PROP_ENCHANTMENT_SLOT_4 = 14, // used with RandomProperty + MAX_ENCHANTMENT_SLOT = 15, }; #define MAX_VISIBLE_ITEM_OFFSET 2 // 2 fields per visible item (entry+enchantment) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index ff074edf8..689bfe358 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -7686,6 +7686,9 @@ void Player::CastItemCombatSpell(Unit* Target, WeaponAttackType attType) // item combat enchantments for (int e_slot = 0; e_slot < MAX_ENCHANTMENT_SLOT; ++e_slot) { + if (e_slot > PRISMATIC_ENCHANTMENT_SLOT && e_slot < PROP_ENCHANTMENT_SLOT_0) + continue; + uint32 enchant_id = item->GetEnchantmentId(EnchantmentSlot(e_slot)); SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) continue; @@ -7790,6 +7793,9 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8 // Item enchantments spells casted at use for (int e_slot = 0; e_slot < MAX_ENCHANTMENT_SLOT; ++e_slot) { + if (e_slot > PRISMATIC_ENCHANTMENT_SLOT && e_slot < PROP_ENCHANTMENT_SLOT_0) + continue; + uint32 enchant_id = item->GetEnchantmentId(EnchantmentSlot(e_slot)); SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) @@ -12309,6 +12315,9 @@ void Player::AddEnchantmentDurations(Item* item) { for (int x = 0; x < MAX_ENCHANTMENT_SLOT; ++x) { + if (x > PRISMATIC_ENCHANTMENT_SLOT && x < PROP_ENCHANTMENT_SLOT_0) + continue; + if (!item->GetEnchantmentId(EnchantmentSlot(x))) continue; @@ -12405,6 +12414,9 @@ void Player::ApplyEnchantment(Item* item, bool apply) void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool apply_dur, bool ignore_condition) { + if (slot > PRISMATIC_ENCHANTMENT_SLOT && slot < PROP_ENCHANTMENT_SLOT_0) + return; + if (!item) return; diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index c77cff0eb..6bbccdd15 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -796,7 +796,7 @@ void Player::UpdateMasteryAuras() if (!masterySpells) return; - for (int i = 0; i < masterySpells->size(); ++i) + for (uint32 i = 0; i < masterySpells->size(); ++i) { SpellAuraHolder* holder = GetSpellAuraHolder(masterySpells->at(i)); if (!holder) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 1edf06f0c..2e1e3887d 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12186" + #define REVISION_NR "12187" #endif // __REVISION_NR_H__