aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-05-01 17:21:16 +0200
committerQAston <none@none>2009-05-01 17:21:16 +0200
commita098dc72fcb86880955a1e5ba775c5aaefe78e1e (patch)
treeeb01e91364ae062c39e03d4da3fdeeb2fab9ea7f /src/game/SpellEffects.cpp
parent0f5a9cb46f495d8a0cbf9923a4ef31734979cbc7 (diff)
*Do not apply auras with 4th diminishing level
*Some fixes related to last commit. --HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index b1510f9039f..abac18f7a79 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -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)