Core/Quests: Fixed gameobject sparkle state for lootable quest items by moving ItemAddedQuestCheck/ItemRemovedQuestCheck after item is added/removed

This is neccessary so that GameObject::BuildValuesUpdate from BuildValuesUpdateBlockForPlayer picks up correct inventory state and sets GO_DYNFLAG_LO_ACTIVATE

(cherry picked from commit 449bd9058b)
This commit is contained in:
Shauren
2020-05-19 20:50:53 +02:00
parent 192cd48b21
commit b1a1e552d2
2 changed files with 26 additions and 21 deletions

View File

@@ -489,8 +489,8 @@ void WorldSession::HandleSellItemOpcode(WorldPackets::Item::SellItem& packet)
}
else
{
_player->ItemRemovedQuestCheck(pItem->GetEntry(), pItem->GetCount());
_player->RemoveItem(pItem->GetBagSlot(), pItem->GetSlot(), true);
_player->ItemRemovedQuestCheck(pItem->GetEntry(), pItem->GetCount());
RemoveItemFromUpdateQueueOf(pItem, _player);
_player->AddItemToBuyBackSlot(pItem);
}