mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Don't call Item::AddToUpdateQueueOf if no player is specified as parameter for Item::SetState, since in this case, only data stored in the item_instance table is altered, not that of character_inventory.
--HG-- branch : trunk
This commit is contained in:
@@ -625,12 +625,14 @@ void Item::SetState(ItemUpdateState state, Player *forplayer)
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
|
||||
if (state != ITEM_UNCHANGED)
|
||||
{
|
||||
// new items must stay in new state until saved
|
||||
if (uState != ITEM_NEW) uState = state;
|
||||
AddToUpdateQueueOf(forplayer);
|
||||
if (uState != ITEM_NEW)
|
||||
uState = state;
|
||||
|
||||
if (forplayer)
|
||||
AddToUpdateQueueOf(forplayer);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -250,8 +250,8 @@ class Item : public Object
|
||||
void SetInTrade(bool b = true) { mb_in_trade = b; }
|
||||
bool IsInTrade() const { return mb_in_trade; }
|
||||
|
||||
bool HasEnchantRequiredSkill(const Player *pPlayer) const;
|
||||
uint32 GetEnchantRequiredLevel() const;
|
||||
bool HasEnchantRequiredSkill(const Player *pPlayer) const;
|
||||
uint32 GetEnchantRequiredLevel() const;
|
||||
|
||||
bool IsFitToSpellRequirements(SpellEntry const* spellInfo) const;
|
||||
bool IsTargetValidForItemUse(Unit* pUnitTarget);
|
||||
|
||||
Reference in New Issue
Block a user