Skip to content

Commit

Permalink
Dont send item loot window if lockpicking for someone in trade Unsure…
Browse files Browse the repository at this point in the history
… about the order change

(based on cmangos/mangos-wotlk@e86d51078)

Signed-off-by: Xfurry <xfurry.cmangos@outlook.com>
  • Loading branch information
killerwife authored and xfurry committed Jan 4, 2018
1 parent 32aae2d commit b576f74
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/game/Spells/SpellEffects.cpp
Expand Up @@ -5425,8 +5425,16 @@ void Spell::EffectOpenLock(SpellEffectEntry const* effect)

// mark item as unlocked
if (itemTarget)
{
itemTarget->SetFlag(ITEM_FIELD_FLAGS, ITEM_DYNFLAG_UNLOCKED);

// only send loot if owner is player, else client sends release anyway
if (itemTarget->GetOwnerGuid() == m_caster->GetObjectGuid())
SendLoot(guid, LOOT_SKINNING, LockType(effect->EffectMiscValue));
}
else
SendLoot(guid, LOOT_SKINNING, LockType(effect->EffectMiscValue));

// not allow use skill grow at item base open
if (!m_CastItem && skillId != SKILL_NONE)
{
Expand All @@ -5447,8 +5455,6 @@ void Spell::EffectOpenLock(SpellEffectEntry const* effect)
}
}
}

SendLoot(guid, LOOT_SKINNING, LockType(effect->EffectMiscValue));
}

void Spell::EffectSummonChangeItem(SpellEffectEntry const* effect)
Expand Down

0 comments on commit b576f74

Please sign in to comment.