FanLoveJX
01-09-12, 04:11 PM
Đầu Tiên để hiển thị tên và máu quái ta vào file ..\Sources\Core\Src\CoreDrawGameObj.cpp
tìm đến đoạn này:
case CGOG_NPC:
if (uId > 0)
{
if ((nParam & IPOT_RL_INFRONTOF_ALL) == IPOT_RL_INFRONTOF_ALL)
{
int nHeight = Npc[uId].GetNpcPate();
Npc[uId].PaintBlood(nHeight / 2); //ðѪ
int nnHeight = nHeight;
nHeight = Npc[uId].PaintChat(nnHeight); //ÁÄÌìÐÅÏ¢ÖÐÓÐÃû×Ö
if (nHeight == nnHeight) //ûÓÐÁÄÌìÐÅϢʱ»æÖÆÈËÎïÐÅÏ ¢
{
if (NpcSet.CheckShowLife())
{
nHeight = Npc[uId].PaintLife(nnHeight, false);
}
if (NpcSet.CheckShowName())
{
if (nnHeight != nHeight) //ÓÐÄÚÁ¦ÏÔʾʱ
{
nHeight += SHOW_SPACE_HEIGHT;//ºÃ¿´
}
if (Player[CLIENT_PLAYER_INDEX].GetTargetNpc() && Player[CLIENT_PLAYER_INDEX].GetTargetNpc() == uId)
nHeight = Npc[uId].PaintInfo(nHeight, false, 14, 0XFF000000); //±»Ñ¡ÖеÄÈËÃû·Å´óÏÔʾ
else
nHeight = Npc[uId].PaintInfo(nHeight, false);
nHeight += 0;
}
}
sửa thành như sau
case CGOG_NPC:
if (uId > 0)
{
if ((nParam & IPOT_RL_INFRONTOF_ALL) == IPOT_RL_INFRONTOF_ALL)
{
int nHeight = Npc[uId].GetNpcPate();
Npc[uId].PaintBlood(nHeight / 2); //ðѪ
int nnHeight = nHeight;
nHeight = Npc[uId].PaintChat(nnHeight); //ÁÄÌìÐÅÏ¢ÖÐÓÐÃû×Ö
if (nHeight == nnHeight) //ûÓÐÁÄÌìÐÅϢʱ»æÖÆÈËÎïÐÅÏ ¢
{
if (NpcSet.CheckShowLife())
{
nHeight = Npc[uId].PaintLife(nnHeight, true);
}
if (NpcSet.CheckShowName())
{
if (nnHeight != nHeight) //ÓÐÄÚÁ¦ÏÔʾʱ
{
nHeight += SHOW_SPACE_HEIGHT;//ºÃ¿´
}
if (Player[CLIENT_PLAYER_INDEX].GetTargetNpc() && Player[CLIENT_PLAYER_INDEX].GetTargetNpc() == uId)
nHeight = Npc[uId].PaintInfo(nHeight, true, 14, 0XFF000000); //±»Ñ¡ÖеÄÈËÃû·Å´óÏÔʾ
else
nHeight = Npc[uId].PaintInfo(nHeight, true);
nHeight += 0;
}
}
Típ theo để không bị loop khi rê chuột vào quái thì làm như sau:
vào file ..\swrod3\SwordOnline\Sources\Core\Src\KNpc.cpp
tìm đoạn code sau:
void KPlayer::DrawSelectInfo()
{
if (m_nIndex <= 0)
return;
if (m_nPeapleIdx)
{
Npc[m_nPeapleIdx].DrawBorder();
if (Npc[m_nPeapleIdx].m_Kind == kind_player)
{
if (!NpcSet.CheckShowName())
{
Npc[m_nPeapleIdx].PaintInfo(Npc[m_nPeapleIdx].GetNpcPate(), true);
}
}
else if (Npc[m_nPeapleIdx].m_Kind == kind_dialoger)
{
if (!NpcSet.CheckShowName())
{
Npc[m_nPeapleIdx].PaintInfo(Npc[m_nPeapleIdx].GetNpcPate(), true);
}
}
else
{
Npc[m_nPeapleIdx].DrawBlood();
}
return;
}
if (m_nObjectIdx)
{
if (!ObjSet.CheckShowName())
Object[m_nObjectIdx].DrawInfo();
Object[m_nObjectIdx].DrawBorder();
return;
}
}
Xóa hết nội dung trong hàm
void KPlayer::DrawSelectInfo()
{
}
Típ theo nhấn Thank bài viết ^^
Build => cop coreclient.dll sang Client test. :>
# dùng f7-f8 bình thường nhé :D
tìm đến đoạn này:
case CGOG_NPC:
if (uId > 0)
{
if ((nParam & IPOT_RL_INFRONTOF_ALL) == IPOT_RL_INFRONTOF_ALL)
{
int nHeight = Npc[uId].GetNpcPate();
Npc[uId].PaintBlood(nHeight / 2); //ðѪ
int nnHeight = nHeight;
nHeight = Npc[uId].PaintChat(nnHeight); //ÁÄÌìÐÅÏ¢ÖÐÓÐÃû×Ö
if (nHeight == nnHeight) //ûÓÐÁÄÌìÐÅϢʱ»æÖÆÈËÎïÐÅÏ ¢
{
if (NpcSet.CheckShowLife())
{
nHeight = Npc[uId].PaintLife(nnHeight, false);
}
if (NpcSet.CheckShowName())
{
if (nnHeight != nHeight) //ÓÐÄÚÁ¦ÏÔʾʱ
{
nHeight += SHOW_SPACE_HEIGHT;//ºÃ¿´
}
if (Player[CLIENT_PLAYER_INDEX].GetTargetNpc() && Player[CLIENT_PLAYER_INDEX].GetTargetNpc() == uId)
nHeight = Npc[uId].PaintInfo(nHeight, false, 14, 0XFF000000); //±»Ñ¡ÖеÄÈËÃû·Å´óÏÔʾ
else
nHeight = Npc[uId].PaintInfo(nHeight, false);
nHeight += 0;
}
}
sửa thành như sau
case CGOG_NPC:
if (uId > 0)
{
if ((nParam & IPOT_RL_INFRONTOF_ALL) == IPOT_RL_INFRONTOF_ALL)
{
int nHeight = Npc[uId].GetNpcPate();
Npc[uId].PaintBlood(nHeight / 2); //ðѪ
int nnHeight = nHeight;
nHeight = Npc[uId].PaintChat(nnHeight); //ÁÄÌìÐÅÏ¢ÖÐÓÐÃû×Ö
if (nHeight == nnHeight) //ûÓÐÁÄÌìÐÅϢʱ»æÖÆÈËÎïÐÅÏ ¢
{
if (NpcSet.CheckShowLife())
{
nHeight = Npc[uId].PaintLife(nnHeight, true);
}
if (NpcSet.CheckShowName())
{
if (nnHeight != nHeight) //ÓÐÄÚÁ¦ÏÔʾʱ
{
nHeight += SHOW_SPACE_HEIGHT;//ºÃ¿´
}
if (Player[CLIENT_PLAYER_INDEX].GetTargetNpc() && Player[CLIENT_PLAYER_INDEX].GetTargetNpc() == uId)
nHeight = Npc[uId].PaintInfo(nHeight, true, 14, 0XFF000000); //±»Ñ¡ÖеÄÈËÃû·Å´óÏÔʾ
else
nHeight = Npc[uId].PaintInfo(nHeight, true);
nHeight += 0;
}
}
Típ theo để không bị loop khi rê chuột vào quái thì làm như sau:
vào file ..\swrod3\SwordOnline\Sources\Core\Src\KNpc.cpp
tìm đoạn code sau:
void KPlayer::DrawSelectInfo()
{
if (m_nIndex <= 0)
return;
if (m_nPeapleIdx)
{
Npc[m_nPeapleIdx].DrawBorder();
if (Npc[m_nPeapleIdx].m_Kind == kind_player)
{
if (!NpcSet.CheckShowName())
{
Npc[m_nPeapleIdx].PaintInfo(Npc[m_nPeapleIdx].GetNpcPate(), true);
}
}
else if (Npc[m_nPeapleIdx].m_Kind == kind_dialoger)
{
if (!NpcSet.CheckShowName())
{
Npc[m_nPeapleIdx].PaintInfo(Npc[m_nPeapleIdx].GetNpcPate(), true);
}
}
else
{
Npc[m_nPeapleIdx].DrawBlood();
}
return;
}
if (m_nObjectIdx)
{
if (!ObjSet.CheckShowName())
Object[m_nObjectIdx].DrawInfo();
Object[m_nObjectIdx].DrawBorder();
return;
}
}
Xóa hết nội dung trong hàm
void KPlayer::DrawSelectInfo()
{
}
Típ theo nhấn Thank bài viết ^^
Build => cop coreclient.dll sang Client test. :>
# dùng f7-f8 bình thường nhé :D