Fianlly
This commit is contained in:
@@ -23,7 +23,7 @@ bool Thinker::IsInvNotFull() const {
|
||||
|
||||
bool Thinker::IsItemInInv(const eItemType& itemType) {
|
||||
return std::any_of(std::begin(m_ItemMemory), std::end(m_ItemMemory),
|
||||
[itemType](const ItemMemory& memory)->bool { return memory.ItemInfo.Type == itemType; });
|
||||
[itemType](const ItemMemory& memory)->bool { return memory.ItemInfo.Type == itemType && memory.ItemInfo.Value > 0; });
|
||||
}
|
||||
|
||||
bool Thinker::EmptyValue() {
|
||||
@@ -31,6 +31,7 @@ bool Thinker::EmptyValue() {
|
||||
[](const ItemMemory& memory)->bool { return memory.ItemInfo.Value <= 0; });
|
||||
}
|
||||
|
||||
|
||||
int Thinker::FindEmptyValue(const ItemInfo& item) {
|
||||
const auto foundItem = std::find_if(std::begin(m_ItemMemory), std::end(m_ItemMemory),
|
||||
[item](const ItemMemory& memory)->bool { return memory.ItemInfo.Type == item.Type; });
|
||||
|
||||
Reference in New Issue
Block a user