大大泡泡糖
4级·生命之泉
4级·生命之泉
  • UID31694
  • 注册日期2013-04-17
  • 最后登录2014-10-09
  • 粉丝2
  • 关注0
  • 发帖数116
  • QQ
  • 铜币42枚
  • 威望0点
  • 银元80个
阅读:1850回复:2

【源码修改】交易窗口更新、星辰的交易窗口

楼主#
更多 发布于:2014-01-15 22:29

在文件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

亲测无错误,可用
总有刁民想害朕
1级·灵魂力量
1级·灵魂力量
  • UID36029
  • 注册日期2014-01-12
  • 最后登录2014-02-14
  • 粉丝0
  • 关注0
  • 发帖数6
  • QQ
  • 铜币30枚
  • 威望0点
  • 银元7个
沙发#
发布于:2014-01-16 01:53
少了俩处
你会被我捅死。
3级·血之光辉
3级·血之光辉
  • UID35310
  • 注册日期2013-10-24
  • 最后登录2014-09-24
  • 粉丝4
  • 关注0
  • 发帖数118
  • QQ
  • 铜币36枚
  • 威望0点
  • 银元122个
板凳#
发布于:2014-01-17 22:08
{:soso_e139:}
游客

返回顶部