its been long time since Ive written this feature. And its really bad, fix is more easier ? for uiinventory too.
pythonslotwindow.cpp
void CSlotWindow::__CreateSlotEnableEffect()
{
//__DestroySlotEnableEffect();
for (int i = 0; i < 3; ++i)
{
CAniImageBox* pEff = new CAniImageBox(NULL);
//fix
if (m_apSlotActiveEffect[i])
continue;
//fix
for (int j = 0; j <= 12; ++j)
{
char buf[64+1];
sprintf_s(buf, "d:/ymir work/ui/public/slotactiveeffect/slot%d/%02d.sub", (i+1), j);
pEff->AppendImage(buf);
}
pEff->SetRenderingMode(CGraphicExpandedImageInstance::RENDERING_MODE_SCREEN);
pEff->Show();
m_apSlotActiveEffect[i] = pEff;
}
}
void CSlotWindow::ActivateEffect(DWORD dwSlotIndex, float r, float g, float b, float a)
{
TSlot * pSlot;
if (!GetSlotPointer(dwSlotIndex, &pSlot))
return;
for (int i = 0; i < 3; ++i)
{
//fix
if (pSlot->pActiveSlotEffect[i])
continue;
//fix
CAniImageBox * pEff = new CAniImageBox(NULL);
for (int j = 0; j <= 12; ++j)
{
char cBuf[72];
sprintf_s(cBuf, "d:/ymir work/ui/public/slotactiveeffect/slot%d/%02d.sub", (i + 1), j);
pEff->AppendImage(cBuf, r, g, b, a);
}
pEff->SetRenderingMode(CGraphicExpandedImageInstance::RENDERING_MODE_SCREEN);
pSlot->pActiveSlotEffect[i] = pEff;
}
}