SIR.ThaiBinh
20-10-12, 07:00 PM
Bài này kết hợp với bài hiện tên quái ko cần rà chuột của tớ là chuẩn :P (Tự sướng tý)
Trong KNpc.h chúng ta search đến
BOOL m_bActivateFlag;
Thêm char m_nImageSeries[64];
BOOL m_bActivateFlag;
char m_nImageSeries[64];
Tiếp theo tìm
char m_szBloodNo[32];
Thêm KRUImage m_ImageSeries;
char m_szBloodNo[32];
KRUImage m_ImageSeries;
Trong KNpc.cpp
Tìm void KNpc::Init()
Thêm strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series0.spr");vào sau m_Series = series_metal;
void KNpc::Init()
{
m_dwID = 0;
m_Index = 0;
m_nPlayerIdx = 0;
m_ProcessAI = 1;
m_Kind = kind_normal;
m_Series = series_metal;
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\Series\\0.spr");
Tiếp theo search if (bSelect) nếu chưa làm hiện tên, if (!bSelect) nếu làm hiện tên rùi thêm vào sau nó
int nX, nY;
GetMpsPos(&nX, &nY);
if (m_Series == 0)
{
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series0.spr");
}
else if (m_Series ==1)
{
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series1.spr");
}
else if (m_Series ==2)
{
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series2.spr");
}
else if (m_Series==3)
{
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series3.spr");
}
else
{
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series4.spr");
}
m_ImageSeries.nType = ISI_T_SPR;
m_ImageSeries.Color.Color_b.a = 255;
m_ImageSeries.bRenderStyle = IMAGE_RENDER_STYLE_ALPHA;
m_ImageSeries.uImage = 0;
m_ImageSeries.nISPosition = IMAGE_IS_POSITION_INIT;
m_ImageSeries.bRenderFlag = 0;
strcpy(m_ImageSeries.szImage, m_nImageSeries);
m_ImageSeries.oPosition.nX = nX + nFontSize * g_StrLen(Name) / 4 + 5;
m_ImageSeries.oPosition.nY = nY - 5;
m_ImageSeries.oPosition.nZ = nHeightOff;
m_ImageSeries.nFrame = 0;
g_pRepresent->DrawPrimitives(1, &m_ImageSeries, RU_T_IMAGE, FALSE);
Xong rùi
Trong KNpc.h chúng ta search đến
BOOL m_bActivateFlag;
Thêm char m_nImageSeries[64];
BOOL m_bActivateFlag;
char m_nImageSeries[64];
Tiếp theo tìm
char m_szBloodNo[32];
Thêm KRUImage m_ImageSeries;
char m_szBloodNo[32];
KRUImage m_ImageSeries;
Trong KNpc.cpp
Tìm void KNpc::Init()
Thêm strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series0.spr");vào sau m_Series = series_metal;
void KNpc::Init()
{
m_dwID = 0;
m_Index = 0;
m_nPlayerIdx = 0;
m_ProcessAI = 1;
m_Kind = kind_normal;
m_Series = series_metal;
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\Series\\0.spr");
Tiếp theo search if (bSelect) nếu chưa làm hiện tên, if (!bSelect) nếu làm hiện tên rùi thêm vào sau nó
int nX, nY;
GetMpsPos(&nX, &nY);
if (m_Series == 0)
{
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series0.spr");
}
else if (m_Series ==1)
{
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series1.spr");
}
else if (m_Series ==2)
{
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series2.spr");
}
else if (m_Series==3)
{
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series3.spr");
}
else
{
strcpy(m_nImageSeries, "\\Spr\\Ui3\\Npc\\series4.spr");
}
m_ImageSeries.nType = ISI_T_SPR;
m_ImageSeries.Color.Color_b.a = 255;
m_ImageSeries.bRenderStyle = IMAGE_RENDER_STYLE_ALPHA;
m_ImageSeries.uImage = 0;
m_ImageSeries.nISPosition = IMAGE_IS_POSITION_INIT;
m_ImageSeries.bRenderFlag = 0;
strcpy(m_ImageSeries.szImage, m_nImageSeries);
m_ImageSeries.oPosition.nX = nX + nFontSize * g_StrLen(Name) / 4 + 5;
m_ImageSeries.oPosition.nY = nY - 5;
m_ImageSeries.oPosition.nZ = nHeightOff;
m_ImageSeries.nFrame = 0;
g_pRepresent->DrawPrimitives(1, &m_ImageSeries, RU_T_IMAGE, FALSE);
Xong rùi