aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-03 10:39:31 -0500
committermegamage <none@none>2009-05-03 10:39:31 -0500
commiteb3c3a8fb4a4bac2e01222bfd25efd80fc792ba2 (patch)
treeda6ad6a67688e4da8ce0a09c4e9c349b12a04d0a /src
parent558a5707ff50edf93375ae6e50335422c9ec13e4 (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.cpp3
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));