aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-02-15 13:55:16 +0100
committerMachiavelli <none@none>2010-02-15 13:55:16 +0100
commita5585ceb3cc18d22c6353f0b22db7f2574055635 (patch)
tree27380f0ae86f5282daa476da07f191a9f01360f6 /src/game/Spell.cpp
parent9fe3a501cc0f2d272e40e1319ba19eaf1c527173 (diff)
Store to be traded items in array based on item guid instead of item slot to prevent exploiting. Fixes #667.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 9bcb0751252..4dec156dfbd 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -218,7 +218,7 @@ void SpellCastTargets::Update(Unit* caster)
// 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));
+ m_itemTarget = pTrader->GetItemByGuid(m_itemTargetGUID);
}
if(m_itemTarget)
m_itemTargetEntry = m_itemTarget->GetEntry();