127 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
16 lines
728 B
C++
16 lines
728 B
C++
// Generated by ops/item_random_property_compat.py: source item+random property -> native ItemBonusList.
|
|
#pragma once
|
|
#include <algorithm>
|
|
#include <cstdint>
|
|
#include <iterator>
|
|
namespace gateway::item_random_property_profile {
|
|
inline constexpr uint32_t ItemBonusListTable=0x96232523;
|
|
struct Row {uint32_t item,property,list;};
|
|
inline constexpr Row Rows[]={{0,0,0}};
|
|
inline uint32_t resolve(uint32_t item,uint32_t property){
|
|
if(!item || !property)return 0;
|
|
auto p=std::lower_bound(std::begin(Rows),std::end(Rows),Row{item,property,0},[](const Row& a,const Row& b){return a.item<b.item || (a.item==b.item && a.property<b.property);});
|
|
return p!=std::end(Rows) && p->item==item && p->property==property?p->list:0;
|
|
}
|
|
}
|