[9345] Show enchantment applied to item in trade slot to caster after apply.

Also more strictly check cases when in spell targets presetn item in trade slot.
This commit is contained in:
VladimirMangos 2010-02-10 03:43:00 +03:00
parent d931cf62ee
commit 96202d7dfd
3 changed files with 14 additions and 2 deletions

View file

@ -4071,6 +4071,10 @@ void Spell::EffectEnchantItemPerm(uint32 effect_idx)
// add new enchanting if equipped
item_owner->ApplyEnchantment(itemTarget,PERM_ENCHANTMENT_SLOT,true);
// update trade window for show enchantment for caster in trade window
if (m_targets.m_targetMask & TARGET_FLAG_TRADE_ITEM)
p_caster->GetSession()->SendUpdateTrade();
}
void Spell::EffectEnchantItemPrismatic(uint32 effect_idx)
@ -4129,6 +4133,10 @@ void Spell::EffectEnchantItemPrismatic(uint32 effect_idx)
// add new enchanting if equipped
item_owner->ApplyEnchantment(itemTarget,PRISMATIC_ENCHANTMENT_SLOT,true);
// update trade window for show enchantment for caster in trade window
if (m_targets.m_targetMask & TARGET_FLAG_TRADE_ITEM)
p_caster->GetSession()->SendUpdateTrade();
}
void Spell::EffectEnchantItemTmp(uint32 i)
@ -4256,6 +4264,10 @@ void Spell::EffectEnchantItemTmp(uint32 i)
// add new enchanting if equipped
item_owner->ApplyEnchantment(itemTarget, TEMP_ENCHANTMENT_SLOT, true);
// update trade window for show enchantment for caster in trade window
if (m_targets.m_targetMask & TARGET_FLAG_TRADE_ITEM)
p_caster->GetSession()->SendUpdateTrade();
}
void Spell::EffectTameCreature(uint32 /*i*/)