nextEnhanceLevel<="Item.Item Max Enhancement Level"_I?
(nextEnhanceLevel<="Item.Item Max Enhancement Level"_I&&itemRef.lock()->GetEnhancementInfo()[nextEnhanceLevel].chapterAvailable<=game->GetCurrentChapter())?
if(GetEnhancementInfo().size()>2){//If the item has exactly 2 enhancement levels, then it's an item that can only simply be crafted. Therefore, don't do the max enhancement level check.
if(EnhancementLevel()>="Item.Item Max Enhancement Level"_I)returnfalse;
size_tenhancementIndex=std::min(itemRef.lock()->EnhancementLevel()+1,"Item.Item Max Enhancement Level"_I);
if(itemRef.lock()->IsEquippable()&&Inventory::GetItemCount(itemRef.lock()->ActualName())==0)enhancementIndex=0;//If we don't have the item, use the initial crafting list instead. But only for equipment!
if(!itemRef.lock()->IsEquippable()||itemRef.lock()->GetEnhancementInfo()[enhancementIndex].chapterAvailable<=game->GetCurrentChapter()&&itemRef.lock()->EnhancementLevel()!="Item.Item Max Enhancement Level"_I){
if(itemRef.lock()->IsEquippable()&&Inventory::GetItemCount(itemRef.lock()->ActualName())==0)enhancementIndex=0;//If we don't have the item, use the initial crafting list instead. But only for equipment!
uint8_tnextLevel=std::min(itemRef.lock()->EnhancementLevel()+1,"Item.Item Max Enhancement Level"_I);
boollockedDueToChapterReq=itemRef.lock()->GetEnhancementInfo()[nextLevel].chapterAvailable>game->GetCurrentChapter()||itemRef.lock()->EnhancementLevel()=="Item.Item Max Enhancement Level"_I;