mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 15:16:24 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -990,6 +990,10 @@ InventoryResult Guild::BankMoveItemData::CanStore(Item* pItem, bool swap)
|
||||
if (pItem->IsSoulBound())
|
||||
return EQUIP_ERR_CANT_DROP_SOULBOUND;
|
||||
|
||||
// Prevent swapping limited duration items into guild bank
|
||||
if (pItem->GetTemplate()->Duration > 0)
|
||||
return EQUIP_ERR_ITEMS_CANT_BE_SWAPPED;
|
||||
|
||||
// Make sure destination bank tab exists
|
||||
if (m_container >= m_pGuild->_GetPurchasedTabsSize())
|
||||
return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;
|
||||
|
||||
@@ -1346,6 +1346,12 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (item->GetTemplate()->Duration > 0)
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED, item, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_GIFT);
|
||||
|
||||
Reference in New Issue
Block a user