Fixed item dupe and apply enchantment while disarm state original patch by zhenya.

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2010-01-16 19:21:07 +03:00
parent 9be16cf605
commit 15dc23ad45

View File

@@ -9588,6 +9588,9 @@ uint8 Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem,
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
}
if (pItem && pItem->m_lootGenerated)
return EQUIP_ERR_ALREADY_LOOTED;
// no maximum
if (pProto->MaxCount <= 0 && pProto->ItemLimitCategory == 0 || pProto->MaxCount == 2147483647)
return EQUIP_ERR_OK;
@@ -12554,6 +12557,9 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
if (!item->IsEquipped())
return;
if (!CanUseAttackType(Player::GetAttackBySlot(item->GetSlot())))
return;
if (slot >= MAX_ENCHANTMENT_SLOT)
return;