*Do not apply auras with 4th diminishing level

*Some fixes related to last commit.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-05-01 17:21:16 +02:00
parent 0f5a9cb46f
commit a098dc72fc
6 changed files with 79 additions and 84 deletions

View File

@@ -3688,15 +3688,10 @@ void Spell::EffectEnchantItemPerm(uint32 effect_idx)
// Handle vellums
if (itemTarget->IsWeaponVellum() || itemTarget->IsArmorVellum())
{
// item can be in trade slot and have owner diff. from caster
Player* item_owner = itemTarget->GetOwner();
if(!item_owner)
return;
// destroy one vellum from stack
uint32 count=1;
item_owner->DestroyItemCount(itemTarget,count,true);
unitTarget=item_owner;
p_caster->DestroyItemCount(itemTarget,count,true);
unitTarget=p_caster;
// and add a scroll
DoCreateItem(effect_idx,m_spellInfo->EffectItemType[effect_idx]);
itemTarget=NULL;
@@ -3704,8 +3699,9 @@ void Spell::EffectEnchantItemPerm(uint32 effect_idx)
}
else
{
// not grow at item use at item case
p_caster->UpdateCraftSkill(m_spellInfo->Id);
// do not increase skill if vellum used
if (!(m_CastItem && m_CastItem->GetProto()->Flags & ITEM_FLAGS_TRIGGERED_CAST))
p_caster->UpdateCraftSkill(m_spellInfo->Id);
uint32 enchant_id = m_spellInfo->EffectMiscValue[effect_idx];
if (!enchant_id)