|
|
|
@ -309,7 +309,6 @@ CCtrlSheetInfo::CCtrlSheetInfo()
|
|
|
|
|
_InterfaceColor= true;
|
|
|
|
|
_SheetSelectionGroup = -1;
|
|
|
|
|
_UseQuality = true;
|
|
|
|
|
_DisplayItemQuality = true;
|
|
|
|
|
_UseQuantity = true;
|
|
|
|
|
_DuplicateOnDrag = false;
|
|
|
|
|
_ItemSlot= SLOTTYPE::UNDEFINED;
|
|
|
|
@ -1277,6 +1276,9 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
|
|
|
|
|
|
sint32 sheet = _SheetId.getSInt32();
|
|
|
|
|
|
|
|
|
|
_DispQuality = -1;
|
|
|
|
|
_DispQuantity = -1;
|
|
|
|
|
|
|
|
|
|
// If this is the same sheet, need to resetup
|
|
|
|
|
if (_LastSheetId != sheet || _NeedSetup)
|
|
|
|
|
{
|
|
|
|
@ -1290,13 +1292,6 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
|
{
|
|
|
|
|
_ItemSheet = (CItemSheet*)pES;
|
|
|
|
|
|
|
|
|
|
// Display the item quality?
|
|
|
|
|
_DisplayItemQuality= _UseQuality &&
|
|
|
|
|
_ItemSheet->Family != ITEMFAMILY::COSMETIC &&
|
|
|
|
|
_ItemSheet->Family != ITEMFAMILY::TELEPORT &&
|
|
|
|
|
_ItemSheet->Family != ITEMFAMILY::SERVICE
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
_DispSheetBmpId = rVR.getTextureIdFromName (_ItemSheet->getIconMain());
|
|
|
|
|
// if file not found or empty, replace by default icon
|
|
|
|
|
if( _DispSheetBmpId == -1)
|
|
|
|
@ -1350,21 +1345,11 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
|
_DispQuantity = _Quantity.getSInt32();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
// do not display any number
|
|
|
|
|
_DispQuantity = -1;
|
|
|
|
|
}
|
|
|
|
|
else _DispQuantity = -1;
|
|
|
|
|
|
|
|
|
|
// Setup quality
|
|
|
|
|
if(_DisplayItemQuality)
|
|
|
|
|
{
|
|
|
|
|
if(_UseQuality)
|
|
|
|
|
_DispQuality= _Quality.getSInt32();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_DispQuality= -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// special icon text
|
|
|
|
|
if( _NeedSetup || _ItemSheet->getIconText() != _OptString )
|
|
|
|
@ -1403,7 +1388,7 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// update quality. NB: if quality change, the must updateItemCharacRequirement
|
|
|
|
|
if(_DisplayItemQuality)
|
|
|
|
|
if(_UseQuality)
|
|
|
|
|
{
|
|
|
|
|
sint32 newQuality= _Quality.getSInt32();
|
|
|
|
|
if(newQuality!=_DispQuality)
|
|
|
|
@ -1412,10 +1397,6 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
|
updateItemCharacRequirement(_LastSheetId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_DispQuality= -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// update armour color (if USER_COLOR db change comes after SHEET change)
|
|
|
|
|
if(_ArmourColorFromDB && _UserColor)
|
|
|
|
@ -1428,8 +1409,7 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// hide x1 on equipable items to show BuffIcons on bottom-left corner
|
|
|
|
|
if (_DispQuantity == 1)
|
|
|
|
|
if (_ItemSheet != NULL)
|
|
|
|
|
{
|
|
|
|
|
switch(_ItemSheet->Family)
|
|
|
|
|
{
|
|
|
|
@ -1438,9 +1418,14 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
|
case ITEMFAMILY::RANGE_WEAPON:
|
|
|
|
|
case ITEMFAMILY::SHIELD:
|
|
|
|
|
case ITEMFAMILY::JEWELRY:
|
|
|
|
|
_DispQuantity = -1;
|
|
|
|
|
// hide 'x0' and 'x1' stack count for equipable items
|
|
|
|
|
if (_DispQuantity < 2)
|
|
|
|
|
_DispQuantity = -1;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
// hide 'q0'and 'q1' quality for every other item
|
|
|
|
|
if (_DispQuality < 2)
|
|
|
|
|
_DispQuality = -1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1910,8 +1895,6 @@ void CDBCtrlSheet::setupOutpostBuilding()
|
|
|
|
|
{
|
|
|
|
|
COutpostBuildingSheet *pOBSheet = (COutpostBuildingSheet*)pES;
|
|
|
|
|
|
|
|
|
|
_DisplayItemQuality = false;
|
|
|
|
|
|
|
|
|
|
_DispSheetBmpId = rVR.getTextureIdFromName (pOBSheet->getIconMain());
|
|
|
|
|
// if file not found or empty, replace by default icon
|
|
|
|
|
if( _DispSheetBmpId == -1)
|
|
|
|
|