|
|
@ -73,6 +73,9 @@ REGISTER_UI_CLASS(CDBCtrlSheet)
|
|
|
|
|
|
|
|
|
|
|
|
const uint64 NOTIFY_ANIM_MS_DURATION = 1000;
|
|
|
|
const uint64 NOTIFY_ANIM_MS_DURATION = 1000;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// state kept and changed by UI:SAVE:SHOW_ICON_BUFFS
|
|
|
|
|
|
|
|
bool CDBCtrlSheet::_ShowIconBuffs = true;
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
|
|
|
|
void CControlSheetInfoWaiter::sendRequest()
|
|
|
|
void CControlSheetInfoWaiter::sendRequest()
|
|
|
@ -1066,11 +1069,19 @@ void CDBCtrlSheet::updateIconSize()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
void CDBCtrlSheet::clearIconBuffs()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_EnchantIcons.clear();
|
|
|
|
|
|
|
|
_BuffIcons.clear();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
void CDBCtrlSheet::infoReceived()
|
|
|
|
void CDBCtrlSheet::infoReceived()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!_ItemSheet)
|
|
|
|
if (!_ItemSheet)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
clearIconBuffs();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1082,9 +1093,10 @@ void CDBCtrlSheet::infoReceived()
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clearIconBuffs();
|
|
|
|
|
|
|
|
|
|
|
|
// crystallized spell
|
|
|
|
// crystallized spell
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_EnchantIcons.clear();
|
|
|
|
|
|
|
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
|
|
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
|
|
|
CSBrickManager *pBM= CSBrickManager::getInstance();
|
|
|
|
CSBrickManager *pBM= CSBrickManager::getInstance();
|
|
|
|
for(uint i=0; i<itemInfo->Enchantment.Bricks.size(); ++i)
|
|
|
|
for(uint i=0; i<itemInfo->Enchantment.Bricks.size(); ++i)
|
|
|
@ -1109,7 +1121,6 @@ void CDBCtrlSheet::infoReceived()
|
|
|
|
|
|
|
|
|
|
|
|
// buff icons
|
|
|
|
// buff icons
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_BuffIcons.clear();
|
|
|
|
|
|
|
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
|
|
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
|
|
|
|
|
|
|
|
|
|
|
if (itemInfo->HpBuff > 0) _BuffIcons.push_back(SBuffIcon(rVR.getTextureIdFromName(_HpBuffIcon)));
|
|
|
|
if (itemInfo->HpBuff > 0) _BuffIcons.push_back(SBuffIcon(rVR.getTextureIdFromName(_HpBuffIcon)));
|
|
|
@ -2315,7 +2326,7 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti
|
|
|
|
rVR.draw11RotFlipBitmap (_RenderLayer+1, x, y, 0, false, _DispOver2BmpId, fastMulRGB(curSheetColor, _IconOver2Color));
|
|
|
|
rVR.draw11RotFlipBitmap (_RenderLayer+1, x, y, 0, false, _DispOver2BmpId, fastMulRGB(curSheetColor, _IconOver2Color));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!_BuffIcons.empty())
|
|
|
|
if (_ShowIconBuffs && !_BuffIcons.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// there is max 4 icons
|
|
|
|
// there is max 4 icons
|
|
|
|
sint32 hArea = (hSheet / 4);
|
|
|
|
sint32 hArea = (hSheet / 4);
|
|
|
@ -2350,7 +2361,7 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti
|
|
|
|
drawNumber(x+1, y-2+hSheet-rVR.getFigurTextureH(), wSheet, hSheet, numberColor, enchant, false);
|
|
|
|
drawNumber(x+1, y-2+hSheet-rVR.getFigurTextureH(), wSheet, hSheet, numberColor, enchant, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!_EnchantIcons.empty())
|
|
|
|
if (_ShowIconBuffs && !_EnchantIcons.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// should only only 2 icons at most
|
|
|
|
// should only only 2 icons at most
|
|
|
|
// draw them in single line, top-right
|
|
|
|
// draw them in single line, top-right
|
|
|
@ -3268,13 +3279,22 @@ void CDBCtrlSheet::setupItemInfoWaiter()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const CItemSheet *item = asItemSheet();
|
|
|
|
const CItemSheet *item = asItemSheet();
|
|
|
|
if(!item)
|
|
|
|
if(!item)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
clearIconBuffs();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!useItemInfoForFamily(item->Family))
|
|
|
|
if (!useItemInfoForFamily(item->Family))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
clearIconBuffs();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (getItemSerial() == 0 || getItemCreateTime() == 0)
|
|
|
|
if (getItemSerial() == 0 || getItemCreateTime() == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
clearIconBuffs();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string luaMethodName = ((item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL) ? "updateCrystallizedSpellTooltip" : "updateBuffItemTooltip");
|
|
|
|
string luaMethodName = ((item->Family == ITEMFAMILY::CRYSTALLIZED_SPELL) ? "updateCrystallizedSpellTooltip" : "updateBuffItemTooltip");
|
|
|
|
CDBCtrlSheet *ctrlSheet = const_cast<CDBCtrlSheet*>(this);
|
|
|
|
CDBCtrlSheet *ctrlSheet = const_cast<CDBCtrlSheet*>(this);
|
|
|
@ -4674,7 +4694,3 @@ void CDBCtrlSheet::startNotifyAnim()
|
|
|
|
_NotifyAnimEndTime = T1 + NOTIFY_ANIM_MS_DURATION;
|
|
|
|
_NotifyAnimEndTime = T1 + NOTIFY_ANIM_MS_DURATION;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|