June Server, Client, Tools Source .....
#17

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();



Messages In This Thread
[No subject] - by CDWriter - 02-08-2016, 04:52 AM
[No subject] - by dethunter12 - 02-08-2016, 04:58 AM
[No subject] - by CDWriter - 02-08-2016, 05:03 AM
[No subject] - by Sutz - 02-08-2016, 05:06 AM
[No subject] - by CDWriter - 02-08-2016, 05:08 AM
[No subject] - by pwesty - 02-08-2016, 06:21 AM
[No subject] - by kravens - 02-08-2016, 01:06 PM
[No subject] - by CDWriter - 02-08-2016, 01:29 PM
[No subject] - by Assasin - 02-08-2016, 04:48 PM
[No subject] - by Arnii - 02-08-2016, 07:46 PM
[No subject] - by Sickness - 02-08-2016, 09:22 PM
[No subject] - by CDWriter - 02-09-2016, 05:37 AM
[No subject] - by CDWriter - 02-09-2016, 05:53 AM
[No subject] - by ZaTii - 02-09-2016, 08:33 AM
[No subject] - by ☣ WARFACE ☣ - 02-09-2016, 08:42 AM
[No subject] - by pwesty - 02-09-2016, 09:41 AM
[No subject] - by ☣ WARFACE ☣ - 02-09-2016, 11:19 AM
[No subject] - by Sutz - 02-09-2016, 12:51 PM
[No subject] - by alinux - 01-09-2017, 04:27 PM
[No subject] - by Nymphetamine - 01-09-2017, 05:44 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)