Core/Items: Fixed sending unlocked items by mail

Closes #20976
This commit is contained in:
Shauren authored and Aokromes committed 2017-11-27 00:57:25 +01:00
1 parent eebe6fbdff
commit 088d678a9f
2 files changed
+5 -1

No files matched your search

+2 -1
View File
@@ -354,6 +354,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
item->DeleteFromInventoryDB(trans); // deletes item from character's inventory
item->SetOwnerGUID(receiverGuid);
item->SetState(ITEM_CHANGED);
item->SaveToDB(trans); // recursive and not have transaction guard into self, item not in inventory and can be save standalone
draft.AddItem(item);
@@ -752,7 +753,7 @@ void WorldSession::HandleGetMailList(WorldPacket& recvData)
// durability
data << uint32((item ? item->GetUInt32Value(ITEM_FIELD_DURABILITY) : 0));
// unknown wotlk
data << uint8(0);
data << uint8((item && !item->IsLocked() ? 1 : 0));
}
++realCount;
+3
View File
@@ -1807,7 +1807,10 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
SendLoot(guid, LOOT_SKINNING);
}
else if (itemTarget)
{
itemTarget->SetFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_UNLOCKED);
itemTarget->SetState(ITEM_CHANGED, itemTarget->GetOwner());
}
// not allow use skill grow at item base open
if (!m_CastItem && skillId != SKILL_NONE)