From 15dc23ad45f20e147dcfc01abd94b438cc0318ea Mon Sep 17 00:00:00 2001 From: n0n4m3 Date: Sat, 16 Jan 2010 19:21:07 +0300 Subject: Fixed item dupe and apply enchantment while disarm state original patch by zhenya. --HG-- branch : trunk --- src/game/Player.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/game/Player.cpp b/src/game/Player.cpp index e97731fc754..898f0f08f01 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -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; -- cgit v1.2.3