diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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; |