mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10512] Fixed cast item remove at trade enchanting in some cases
Also nit allow item use spels casts if item in trade.
This commit is contained in:
parent
14a240361d
commit
5e9b5a5297
3 changed files with 13 additions and 2 deletions
|
|
@ -3892,7 +3892,7 @@ void Spell::TakeCastItem()
|
|||
return;
|
||||
|
||||
// not remove cast item at triggered spell (equipping, weapon damage, etc)
|
||||
if(m_IsTriggeredSpell)
|
||||
if(m_IsTriggeredSpell && !(m_targets.m_targetMask & TARGET_FLAG_TRADE_ITEM))
|
||||
return;
|
||||
|
||||
ItemPrototype const *proto = m_CastItem->GetProto();
|
||||
|
|
@ -5726,6 +5726,9 @@ SpellCastResult Spell::CheckItems()
|
|||
// cast item checks
|
||||
if(m_CastItem)
|
||||
{
|
||||
if (m_CastItem->IsInTrade())
|
||||
return SPELL_FAILED_ITEM_NOT_FOUND;
|
||||
|
||||
uint32 itemid = m_CastItem->GetEntry();
|
||||
if( !p_caster->HasItemCount(itemid, 1) )
|
||||
return SPELL_FAILED_ITEM_NOT_FOUND;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue