02-09-2016, 11:19 AM
Fix Party - 2
PartyAutoUIInviteList.cpp
Before
if (m_pList != NULL)
{
int max = m_vectorPartyListData.size();
CUIListItem* pItem;
CTString strTmp;
CUIText* pTxt;
CUIImage* pImg;
for (i = 0; i < max; ++i)
{
pItem = (CUIListItem*)m_pList->GetListItemTemplate()->Clone();
m_pList->AddListItem(pItem);
int no = ((m_nCurrentPageNum * 10) + i + 1);
pTxt = (CUIText*)pItem->findUI("txt_no");
if (pTxt != NULL)
{
strTmp.PrintF("%d", no);
pTxt->SetText(strTmp);
}
pTxt = (CUIText*)pItem->findUI("txt_name");
if (pTxt != NULL)
{
pTxt->SetText(m_vectorPartyListData[i].strSubject);
if (m_vectorPartyListData[i].nPartyNum >= 8)
{
pTxt->setFontColor(0xA7A9A5FF);
}
else
{
pTxt->setFontColor(DEF_UI_COLOR_WHITE);
}
}
pTxt = (CUIText*)pItem->findUI("txt_pos");
if (pTxt != NULL)
{
strTmp = CZoneInfo::getSingleton()->GetZoneName(m_vectorPartyListData[i].nZone);
pTxt->SetText(strTmp);
}
if (m_vectorPartyListData[i].nLeveldiff == 0)
{
pImg = (CUIImage*)pItem->findUI("img_level");
if (pImg != NULL)
{
if (m_pImgLevel != NULL)
m_pImgLevel->Copy(pImg);
}
}
pImg = (CUIImage*)pItem->findUI("img_class");
if (pImg != NULL)
{
DWORD dwFlag = m_vectorPartyListData[i].dwJobflag;
int job = 0;
while (dwFlag >= 2)
{
dwFlag /= 2;
++job;
}
if (m_pImgClass[job] != NULL)
m_pImgClass[job]->Copy(pImg);
}
pImg = (CUIImage*)pItem->findUI("img_type");
if (pImg != NULL)
{
int type = m_vectorPartyListData[i].nPartyType;
if (m_pImgType[type] != NULL)
m_pImgType[type]->Copy(pImg);
}
}
}
}
After
if (m_pList != NULL)
{
int max = m_vectorPartyListData.size();
CUIBase* pItem = NULL;
CTString strTmp;
CUIText* pTxt = NULL;
CUIImage* pImg = NULL;
for (i = 0; i < max; ++i)
{
CUIBase* pItemTmp = m_pList->GetListItemTemplate();
m_pList->AddListItem(pItemTmp->Clone());
pItem = m_pList->GetListItem(i);
int no = ((m_nCurrentPageNum * 10) + i + 1);
pTxt = (CUIText*)pItem->findUI("txt_no");
if (pTxt != NULL)
{
strTmp.PrintF("%d", no);
pTxt->SetText(strTmp);
}
pTxt = (CUIText*)pItem->findUI("txt_name");
if (pTxt != NULL)
{
pTxt->SetText(m_vectorPartyListData[i].strSubject);
if (m_vectorPartyListData[i].nPartyNum >= 8)
{
pTxt->setFontColor(0xA7A9A5FF);
}
else
{
pTxt->setFontColor(DEF_UI_COLOR_WHITE);
}
}
pTxt = (CUIText*)pItem->findUI("txt_pos");
if (pTxt != NULL)
{
strTmp = CZoneInfo::getSingleton()->GetZoneName(m_vectorPartyListData[i].nZone);
pTxt->SetText(strTmp);
}
if (m_vectorPartyListData[i].nLeveldiff == 0)
{
pImg = (CUIImage*)pItem->findUI("img_level");
if (pImg != NULL)
{
if (m_pImgLevel != NULL)
m_pImgLevel->Copy(pImg);
}
}
pImg = (CUIImage*)pItem->findUI("img_class");
if (pImg != NULL)
{
DWORD dwFlag = m_vectorPartyListData[i].dwJobflag;
int job = 0;
while (dwFlag >= 2)
{
dwFlag /= 2;
++job;
}
if (m_pImgClass[job] != NULL)
m_pImgClass[job]->Copy(pImg);
}
pImg = (CUIImage*)pItem->findUI("img_type");
if (pImg != NULL)
{
int type = m_vectorPartyListData[i].nPartyType;
if (m_pImgType[type] != NULL)
m_pImgType[type]->Copy(pImg);
}
m_pList->UpdateList();
}
}
}
PartyAutoUIPartyList.cpp
Before
pImg = (CUIImage*)pItem->findUI("img_type");
if (pImg != NULL)
{
int type = m_vectorPartyListData[i].nPartyType;
if (m_pImgType[type] != NULL)
m_pImgType[type]->Copy(pImg);
}
After
pImg = (CUIImage*)pItem->findUI("img_type");
if (pImg != NULL)
{
int type = m_vectorPartyListData[i].nPartyType;
if (m_pImgType[type] != NULL)
m_pImgType[type]->Copy(pImg);
}
m_pList->UpdateList();

