Decompile fn_23387 (LookupClientItemByIdentity)
Batch #12413 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_23387 LookupClientItemByIdentity: logic confirmed by peer review Peer-reviewed-by: KWDev, Toshiro, dori, cremane Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
e42eee72fa
commit
7e8d6a3ac8
1 changed files with 9 additions and 4 deletions
|
|
@ -210,13 +210,18 @@ ITEM_INFO LookupClientItem(const std::list<ITEM_INFO>& values, int id, unsigned
|
|||
// OFFSET: 0x00DDD5A0
|
||||
// FUNCTION: fn_23387
|
||||
ITEM_INFO LookupClientItemByIdentity(const std::list<ITEM_INFO>& values, std::uint32_t id) {
|
||||
for (const ITEM_INFO& value : values) {
|
||||
if (value.unknown_0000[1] == id) {
|
||||
return value;
|
||||
if (values.empty()) {
|
||||
return ITEM_INFO(0);
|
||||
}
|
||||
|
||||
auto it = values.begin();
|
||||
for (; it != values.end(); ++it) {
|
||||
if (it->unknown_0000[1] == id) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ITEM_INFO(0);
|
||||
return it != values.end() ? *it : ITEM_INFO(0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x006D5450
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue