mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
Added ItemData::CheckLoreConflict()
This commit is contained in:
parent
5b24cbde5d
commit
8cd6416754
@ -207,3 +207,21 @@ bool EQEmu::ItemData::IsTypeShield() const
|
|||||||
{
|
{
|
||||||
return (ItemType == item::ItemTypeShield);
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@ -538,6 +538,9 @@ namespace EQEmu
|
|||||||
bool IsType1HWeapon() const;
|
bool IsType1HWeapon() const;
|
||||||
bool IsType2HWeapon() const;
|
bool IsType2HWeapon() const;
|
||||||
bool IsTypeShield() 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*/
|
} /*EQEmu*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user