From abd94e324b1ba872da331e19a3e80a6667edb363 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Wed, 18 Jan 2012 13:10:36 +0100 Subject: Core/Items: Fix crash and updated documentation in SplitItem --- src/server/game/Entities/Player/Player.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 855fb9332b2..eb270521500 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -12891,7 +12891,9 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count) //! Update item count in trade window, prevent spoofing //! Since pSrcItem has its count updated (see above), Item::GetCount() will return the new count //! in the underlying packet builder function - TradeSlots const slot = GetTradeData()->GetTradeSlotForItem(pSrcItem->GetGUID()); + //! Note that this is not blizzlike, the item should be greyed out when in trade. + //! TODO: Figure out which packet(s) are responsible for that. + TradeSlots const slot = GetTradeData() ? GetTradeData()->GetTradeSlotForItem(pSrcItem->GetGUID()) : TRADE_SLOT_INVALID; if (slot != TRADE_SLOT_INVALID) GetTradeData()->SetItem(slot, pSrcItem, true); } -- cgit v1.2.3