mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge pull request #15746 from Rushor/Venom
Core/Spells: Reduce Duration for EffectEnchantHeldItem-Spells
This commit is contained in:
@@ -4373,11 +4373,14 @@ void Spell::EffectEnchantHeldItem(SpellEffIndex effIndex)
|
||||
if (m_spellInfo->Effects[effIndex].MiscValue)
|
||||
{
|
||||
uint32 enchant_id = m_spellInfo->Effects[effIndex].MiscValue;
|
||||
int32 duration = m_spellInfo->GetDuration(); //Try duration index first ..
|
||||
int32 duration = m_spellInfo->GetDuration(); // Try duration index first ..
|
||||
if (!duration)
|
||||
duration = damage;//+1; //Base points after ..
|
||||
duration = damage;//+1; // Base points after ..
|
||||
if (!duration)
|
||||
duration = 10; //10 seconds for enchants which don't have listed duration
|
||||
duration = 10 * IN_MILLISECONDS; // 10 seconds for enchants which don't have listed duration
|
||||
|
||||
if (m_spellInfo->Id == 14792) // Venomhide Poison
|
||||
duration = 5 * MINUTE * IN_MILLISECONDS;
|
||||
|
||||
SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
|
||||
if (!pEnchant)
|
||||
@@ -4391,7 +4394,7 @@ void Spell::EffectEnchantHeldItem(SpellEffIndex effIndex)
|
||||
return;
|
||||
|
||||
// Apply the temporary enchantment
|
||||
item->SetEnchantment(slot, enchant_id, duration*IN_MILLISECONDS, 0, m_caster->GetGUID());
|
||||
item->SetEnchantment(slot, enchant_id, duration, 0, m_caster->GetGUID());
|
||||
item_owner->ApplyEnchantment(item, slot, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user