diff options
author | megamage <none@none> | 2009-05-03 10:39:31 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-03 10:39:31 -0500 |
commit | eb3c3a8fb4a4bac2e01222bfd25efd80fc792ba2 (patch) | |
tree | da6ad6a67688e4da8ce0a09c4e9c349b12a04d0a /src | |
parent | 558a5707ff50edf93375ae6e50335422c9ec13e4 (diff) |
*Only set item target for spell when there is item mask.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index ab075be8201..ca822db570c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -165,8 +165,9 @@ void SpellCastTargets::Update(Unit* caster) { if(m_targetMask & TARGET_FLAG_ITEM) m_itemTarget = ((Player*)caster)->GetItemByGuid(m_itemTargetGUID); - else + else if(m_targetMask & TARGET_FLAG_TRADE_ITEM) { + // here it is not guid but slot Player* pTrader = ((Player*)caster)->GetTrader(); if(pTrader && m_itemTargetGUID < TRADE_SLOT_COUNT) m_itemTarget = pTrader->GetItemByPos(pTrader->GetItemPosByTradeSlot(m_itemTargetGUID)); |