|
|
@ -309,6 +309,7 @@ CCtrlSheetInfo::CCtrlSheetInfo()
|
|
|
|
_InterfaceColor= true;
|
|
|
|
_InterfaceColor= true;
|
|
|
|
_SheetSelectionGroup = -1;
|
|
|
|
_SheetSelectionGroup = -1;
|
|
|
|
_UseQuality = true;
|
|
|
|
_UseQuality = true;
|
|
|
|
|
|
|
|
_DisplayItemQuality = true;
|
|
|
|
_UseQuantity = true;
|
|
|
|
_UseQuantity = true;
|
|
|
|
_DuplicateOnDrag = false;
|
|
|
|
_DuplicateOnDrag = false;
|
|
|
|
_ItemSlot= SLOTTYPE::UNDEFINED;
|
|
|
|
_ItemSlot= SLOTTYPE::UNDEFINED;
|
|
|
@ -1276,9 +1277,6 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
|
|
|
|
|
|
|
|
sint32 sheet = _SheetId.getSInt32();
|
|
|
|
sint32 sheet = _SheetId.getSInt32();
|
|
|
|
|
|
|
|
|
|
|
|
_DispQuality = -1;
|
|
|
|
|
|
|
|
_DispQuantity = -1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If this is the same sheet, need to resetup
|
|
|
|
// If this is the same sheet, need to resetup
|
|
|
|
if (_LastSheetId != sheet || _NeedSetup)
|
|
|
|
if (_LastSheetId != sheet || _NeedSetup)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1292,6 +1290,13 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_ItemSheet = (CItemSheet*)pES;
|
|
|
|
_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());
|
|
|
|
_DispSheetBmpId = rVR.getTextureIdFromName (_ItemSheet->getIconMain());
|
|
|
|
// if file not found or empty, replace by default icon
|
|
|
|
// if file not found or empty, replace by default icon
|
|
|
|
if( _DispSheetBmpId == -1)
|
|
|
|
if( _DispSheetBmpId == -1)
|
|
|
@ -1345,11 +1350,21 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
_DispQuantity = _Quantity.getSInt32();
|
|
|
|
_DispQuantity = _Quantity.getSInt32();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
// do not display any number
|
|
|
|
|
|
|
|
_DispQuantity = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else _DispQuantity = -1;
|
|
|
|
|
|
|
|
|
|
|
|
// Setup quality
|
|
|
|
// Setup quality
|
|
|
|
if(_UseQuality)
|
|
|
|
if(_DisplayItemQuality)
|
|
|
|
|
|
|
|
{
|
|
|
|
_DispQuality= _Quality.getSInt32();
|
|
|
|
_DispQuality= _Quality.getSInt32();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_DispQuality= -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// special icon text
|
|
|
|
// special icon text
|
|
|
|
if( _NeedSetup || _ItemSheet->getIconText() != _OptString )
|
|
|
|
if( _NeedSetup || _ItemSheet->getIconText() != _OptString )
|
|
|
@ -1388,7 +1403,7 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// update quality. NB: if quality change, the must updateItemCharacRequirement
|
|
|
|
// update quality. NB: if quality change, the must updateItemCharacRequirement
|
|
|
|
if(_UseQuality)
|
|
|
|
if(_DisplayItemQuality)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sint32 newQuality= _Quality.getSInt32();
|
|
|
|
sint32 newQuality= _Quality.getSInt32();
|
|
|
|
if(newQuality!=_DispQuality)
|
|
|
|
if(newQuality!=_DispQuality)
|
|
|
@ -1397,6 +1412,10 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
updateItemCharacRequirement(_LastSheetId);
|
|
|
|
updateItemCharacRequirement(_LastSheetId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_DispQuality= -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// update armour color (if USER_COLOR db change comes after SHEET change)
|
|
|
|
// update armour color (if USER_COLOR db change comes after SHEET change)
|
|
|
|
if(_ArmourColorFromDB && _UserColor)
|
|
|
|
if(_ArmourColorFromDB && _UserColor)
|
|
|
@ -1409,31 +1428,6 @@ void CDBCtrlSheet::setupItem ()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_ItemSheet != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
switch(_ItemSheet->Family)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
case ITEMFAMILY::ARMOR:
|
|
|
|
|
|
|
|
case ITEMFAMILY::MELEE_WEAPON:
|
|
|
|
|
|
|
|
case ITEMFAMILY::RANGE_WEAPON:
|
|
|
|
|
|
|
|
case ITEMFAMILY::SHIELD:
|
|
|
|
|
|
|
|
case ITEMFAMILY::JEWELRY:
|
|
|
|
|
|
|
|
case ITEMFAMILY::CRAFTING_TOOL:
|
|
|
|
|
|
|
|
case ITEMFAMILY::HARVEST_TOOL:
|
|
|
|
|
|
|
|
case ITEMFAMILY::TAMING_TOOL:
|
|
|
|
|
|
|
|
case ITEMFAMILY::TRAINING_TOOL:
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// at each frame, must test for grayed.
|
|
|
|
// at each frame, must test for grayed.
|
|
|
|
if(_AutoGrayed)
|
|
|
|
if(_AutoGrayed)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1899,6 +1893,8 @@ void CDBCtrlSheet::setupOutpostBuilding()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
COutpostBuildingSheet *pOBSheet = (COutpostBuildingSheet*)pES;
|
|
|
|
COutpostBuildingSheet *pOBSheet = (COutpostBuildingSheet*)pES;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_DisplayItemQuality = false;
|
|
|
|
|
|
|
|
|
|
|
|
_DispSheetBmpId = rVR.getTextureIdFromName (pOBSheet->getIconMain());
|
|
|
|
_DispSheetBmpId = rVR.getTextureIdFromName (pOBSheet->getIconMain());
|
|
|
|
// if file not found or empty, replace by default icon
|
|
|
|
// if file not found or empty, replace by default icon
|
|
|
|
if( _DispSheetBmpId == -1)
|
|
|
|
if( _DispSheetBmpId == -1)
|
|
|
@ -2539,7 +2535,7 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti
|
|
|
|
sint32 hArea = (hSheet / 4);
|
|
|
|
sint32 hArea = (hSheet / 4);
|
|
|
|
sint32 xIcon = x;
|
|
|
|
sint32 xIcon = x;
|
|
|
|
// move buff icons up a row, quantity text is displayed on bottom-left corner
|
|
|
|
// move buff icons up a row, quantity text is displayed on bottom-left corner
|
|
|
|
sint32 yIcon = y + (_DispQuantity > 0 ? hArea : 0);
|
|
|
|
sint32 yIcon = y + hArea;
|
|
|
|
for (uint i = 0; i < _BuffIcons.size(); ++i)
|
|
|
|
for (uint i = 0; i < _BuffIcons.size(); ++i)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sint32 wIcon = _BuffIcons[i].IconW;
|
|
|
|
sint32 wIcon = _BuffIcons[i].IconW;
|
|
|
|