From b0b17e56de08e563a7b5f15d4f19a4070c8d0dbb Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Tue, 16 Mar 2010 01:05:56 +0100 Subject: - Overload Item::SetState with player argument where possible to ensure updated data is saved to DB properly. - Alter Item::SetEnchantmentDuration function, add parameter Player* because GetOwner() cannot be called in the function due to hashtable locking in the SaveAllPlayers process. - Remove a sanity check prior to Item::AddToUpdateQueueOf, so assertions can detect whenever a higher level function was not called properly. Please report any crashes related to these assertions to get them resolved asap. --HG-- branch : trunk --- src/game/Guild.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/Guild.cpp') diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index 86b50a651fd..7d3bbdee9c9 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -2208,7 +2208,7 @@ void Guild::MoveFromCharToBank( Player * pl, uint8 PlayerBag, uint8 PlayerSlot, pl->ItemRemovedQuestCheck( pItemChar->GetEntry(), SplitedAmount ); pItemChar->SetCount(pItemChar->GetCount()-SplitedAmount); - pItemChar->SetState(ITEM_CHANGED); + pItemChar->SetState(ITEM_CHANGED, pl); pl->SaveInventoryAndGoldToDB(); StoreItem(BankTab, dest, pNewItem); CharacterDatabase.CommitTransaction(); -- cgit v1.2.3