游戏乐悠悠网游开发网

标题: 交易窗口更新、星辰的交易窗口 [打印本页]

作者: mythosdev    时间: 2015-9-22 10:44
标题: 交易窗口更新、星辰的交易窗口
在文件WndField.cpp
搜索CWndStatic* pWndNameI = (CWndStatic*)GetDlgItem( WIDC_STATIC2 );
添加
#if !defined(__WNDTRADE_111001)
CWndStatic* pWndGoldYou = (CWndStatic*)GetDlgItem( WIDC_STATIC3 );
CWndStatic* pWndGoldI = (CWndStatic*)GetDlgItem( WIDC_STATIC4 );
#endif

#ifdef __WNDTRADE_111001
CString Namestring;
Namestring.Format(prj.GetText(TID_GAME_WNDTRADE_ITEM), pMover->GetName( TRUE ) );
pWndNameYou->SetTitle( Namestring );//对方姓名

Namestring.Format(prj.GetText(TID_GAME_WNDTRADE_ITEM), g_pPlayer->GetName() );
pWndNameI->SetTitle( Namestring );//自己姓名
#else
pWndNameYou->SetTitle( pMover->GetName( TRUE ) );
pWndNameI->SetTitle( g_pPlayer->GetName() );
#endif // __WNDTRADE_111001


CString string;
int nLength;

string.Format( "%d", m_nGoldYou );

nLength = string.GetLength();
while(nLength - 3 > 0)
{
nLength -= 3;
string.Insert(nLength, ',');
}

#ifdef __WNDTRADE_111001
if (m_nGoldYou > 0)
p2DRender->TextOut( 44 + 5, 296 + 3, string, 0xff000000);

#else
pWndGoldYou->SetTitle( string );
#endif // __WNDTRADE_111001


string.Format( "%d", m_nGoldI );
nLength = string.GetLength();
while(nLength - 3 > 0)
{
nLength -= 3;
string.Insert(nLength, ',');
}
#ifdef __WNDTRADE_111001
if(m_nGoldI > 0)
p2DRender->TextOut( 206 + 5, 296 + 3, string, 0xff000000);
#else
pWndGoldI->SetTitle( string );
#endif // __WNDTRADE_111001

#ifdef __WNDTRADE_111001 //显示交易对象信息
CString m_Tradestring;
m_Tradestring.Format(prj.GetText(TID_GAME_WNDTRADE_NAME), pMover->GetName(TRUE));
p2DRender->TextOut( 15, 23, m_Tradestring, 0xff000000); //显示姓名

m_Tradestring.Format(prj.GetText(TID_GAME_WNDTRADE_ID), pMover->m_idPlayer);
p2DRender->TextOut( 170, 23, m_Tradestring, 0xff000000); //显示ID

m_Tradestring.Format(prj.GetText(TID_GAME_WNDTRADE_LEVEL), pMover->GetLevel());
p2DRender->TextOut( 15, 43, m_Tradestring, 0xff000000); //显示等级

m_Tradestring.Format(prj.GetText(TID_GAME_WNDTRADE_JOB), pMover->GetJobString());
p2DRender->TextOut( 170, 43, m_Tradestring, 0xff000000); //显示职业

CGuild* pGuild = pMover->GetGuild();
if (pGuild)
{
m_Tradestring.Format(prj.GetText(TID_GAME_WNDTRADE_GUILD), pGuild->m_szGuild);
p2DRender->TextOut( 15, 63, m_Tradestring, 0xff000000); //显示公会
}
else
{
m_Tradestring.Format(prj.GetText(TID_GAME_WNDTRADE_GUILD), prj.GetText(TID_GAME_WNDTRADE_GUILDNO));
p2DRender->TextOut( 15, 63, m_Tradestring, 0xff000000); //显示无公会
}

m_Tradestring.Format(prj.GetText(TID_GAME_WNDTRADE_FRIEND));
p2DRender->TextOut( 15, 83, m_Tradestring, 0xff000000); //显示好友关系

if (g_WndMng.m_RTMessenger.GetFriend( pMover->m_idPlayer ))
{
m_Tradestring.Format(prj.GetText(TID_GAME_WNDTRADE_YESFRIEND));
p2DRender->TextOut( 85, 83, m_Tradestring, prj.GetTextColor(TID_GAME_WNDTRADE_YESFRIEND)); //是好友
}
else
{
m_Tradestring.Format(prj.GetText(TID_GAME_WNDTRADE_NOFRIEND));
p2DRender->TextOut( 85, 83, m_Tradestring, prj.GetTextColor(TID_GAME_WNDTRADE_NOFRIEND)); //不是好友
}




#endif // __WNDTRADE_111001

亲测无错误,可用

作者: dianpula    时间: 2018-12-20 09:57
资源甚好,感谢楼主。。




欢迎光临 游戏乐悠悠网游开发网 (http://bbs.yxlyy.club/) Powered by Discuz! X3.2