Core/Spells: Fixed Spell::CheckCast for targeting items trade with lockpicking

This commit is contained in:
Shauren
2020-04-11 11:51:12 +02:00
parent 427b5ba468
commit 3b6e5a87d8

View File

@@ -5370,7 +5370,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint
if (m_targets.GetTargetMask() & TARGET_FLAG_TRADE_ITEM)
{
if (TradeData* pTrade = m_caster->ToPlayer()->GetTradeData())
pTempItem = pTrade->GetTraderData()->GetItem(TradeSlots(m_targets.GetItemTargetGUID().GetRawValue().at(0))); // at this point item target guid contains the trade slot
pTempItem = pTrade->GetTraderData()->GetItem(TRADE_SLOT_NONTRADED);
}
else if (m_targets.GetTargetMask() & TARGET_FLAG_ITEM)
pTempItem = m_caster->ToPlayer()->GetItemByGuid(m_targets.GetItemTargetGUID());