diff --git a/common/item_data.cpp b/common/item_data.cpp index e23f962d2..c0e70d72a 100644 --- a/common/item_data.cpp +++ b/common/item_data.cpp @@ -207,3 +207,21 @@ bool EQEmu::ItemData::IsTypeShield() const { return (ItemType == item::ItemTypeShield); } + +bool EQEmu::ItemData::CheckLoreConflict(const ItemData* l_item, const ItemData* r_item) +{ + if (!l_item || !r_item) + return false; + + if (!l_item->LoreGroup || !r_item->LoreGroup) + return false; + + if (l_item->LoreGroup == r_item->LoreGroup) { + if ((l_item->LoreGroup == -1) && (l_item->ID != r_item->ID)) + return false; + + return true; + } + + return false; +} diff --git a/common/item_data.h b/common/item_data.h index 14aa368c2..e5d1a24f2 100644 --- a/common/item_data.h +++ b/common/item_data.h @@ -538,6 +538,9 @@ namespace EQEmu bool IsType1HWeapon() const; bool IsType2HWeapon() const; bool IsTypeShield() const; + + static bool CheckLoreConflict(const ItemData* l_item, const ItemData* r_item); + bool CheckLoreConflict(const ItemData* item) const { return CheckLoreConflict(this, item); } }; } /*EQEmu*/