Store to be traded items in array based on item guid instead of item slot to prevent exploiting. Fixes #667.

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-02-15 13:55:16 +01:00
parent 9fe3a501cc
commit a5585ceb3c
4 changed files with 33 additions and 27 deletions
+1 -2
View File
@@ -1232,7 +1232,6 @@ class Player : public Unit, public GridObject<Player>
Player* GetTrader() const { return pTrader; }
void ClearTrade();
void TradeCancel(bool sendback);
uint16 GetItemPosByTradeSlot(uint32 slot) const { return tradeItems[slot]; }
void UpdateEnchantTime(uint32 time);
void UpdateItemDuration(uint32 time, bool realtimeonly=false);
@@ -2463,7 +2462,7 @@ Spell * m_spellModTakingSpell;
Player *pTrader;
bool acceptTrade;
uint16 tradeItems[TRADE_SLOT_COUNT];
uint64 tradeItems[TRADE_SLOT_COUNT];
uint32 tradeGold;
bool m_DailyQuestChanged;