diff --git a/Source/items.cpp b/Source/items.cpp index 707fecdb6..c2d166a13 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -4127,15 +4127,18 @@ void __fastcall UseItem(int p, int Mid, int spl) } } -BOOLEAN __fastcall StoreStatOk(ItemStruct *h) +BOOL __fastcall StoreStatOk(ItemStruct *h) { - BOOLEAN sf; // al + BOOL sf; + + sf = TRUE; + if (plr[myplr]._pStrength < h->_iMinStr) + sf = FALSE; + if (plr[myplr]._pMagic < h->_iMinMag) + sf = FALSE; + if (plr[myplr]._pDexterity < h->_iMinDex) + sf = FALSE; - sf = 1; - if (plr[myplr]._pStrength < h->_iMinStr - || plr[myplr]._pMagic < h->_iMinMag - || plr[myplr]._pDexterity < h->_iMinDex) - sf = 0; return sf; } diff --git a/Source/items.h b/Source/items.h index cd058139e..e8c86fbab 100644 --- a/Source/items.h +++ b/Source/items.h @@ -88,7 +88,7 @@ void __fastcall PrintItemMisc(ItemStruct *x); void __fastcall PrintItemDetails(ItemStruct *x); void __fastcall PrintItemDur(ItemStruct *x); void __fastcall UseItem(int p, int Mid, int spl); -BOOLEAN __fastcall StoreStatOk(ItemStruct *h); +BOOL __fastcall StoreStatOk(ItemStruct *h); BOOL __fastcall SmithItemOk(int i); int __fastcall RndSmithItem(int lvl); void __fastcall BubbleSwapItem(ItemStruct *a, ItemStruct *b);