TA的每日心情 | 开心 2011-11-24 11:37 |
---|
签到天数: 1 天 [LV.1]初来乍到 鲜花( 3) 鸡蛋( 0)
|
需要准备的东西
1.干净的源码
2.文本编辑工具,WINDOWS自带的记事本即可还要在这里介绍下自己,shevechco,巨峰社区的管理员,以后可能会有人知道这个社区,现在估计没人知道这个社区,可惜你们看不到的。
希望有人提供我老飞的飞行器源码支持
如果你还不知道怎么编译源码的话请先学习下源码编译方面的知识!
有问题或者源码编译错误请回帖,我会直到帮一个人解决然后不再跟踪这个问题
还请管理员字数限制调整到1W,我这些文件编辑了两次,第一次字数限制了发布了,累死了,分了三段,注意1楼和2楼还有
请尊重劳动成果,用了希望你回个贴,如果有需要,希望有会员用老飞飞行器源码编辑跟我交换更多的功能!
1. ../AccountServer/VersionCommon.h
找到
#if (_MSC_VER > 1200)
#define __VS2003 // 哪颇老矾函版.net
#endif
在后面添加
#define __LIANREN //支持恋人系统 2 ../CACHESERVER/VersionCommon.h
找到
#if (_MSC_VER > 1200)
#define __VS2003 // 哪颇老矾函版.net
#endif在后面添加
#define __LIANREN //支持恋人系统
3 ../CERTIFIER/VersionCommon.h
找到
#if (_MSC_VER > 1200)
#define __VS2003 // 哪颇老矾函版.net
#endif
在后面添加
#define __LIANREN //支持恋人系统
4 ../CORESERVER/DPCacheSrvr.cpp
找到
void CDPCacheSrvr::SendSetPlayerName( u_long idPlayer, const char* lpszPlayer )
{
BEFORESENDSOLE( ar, PACKETTYPE_QUERYSETPLAYERNAME, DPID_ALLPLAYERS );
ar << idPlayer;
ar.WriteString( lpszPlayer );
SEND( ar, this, DPID_ALLPLAYERS );
}在后面添加
#ifdef __LIANREN
//玩家成为恋人了.
void CDPCacheSrvr::SendPlayerCoupled( u_long idPlayer, const char* lpszPlayer ,u_long idPlayer2,const char* lpszPlayer2)
{
BEFORESENDSOLE( ar, PACKETTYPE_PLAYERCOUPLED, DPID_ALLPLAYERS );
ar << idPlayer;
ar.WriteString( lpszPlayer );
ar << idPlayer2;
ar.WriteString(lpszPlayer2);
SEND( ar, this, DPID_ALLPLAYERS );
}
void CDPCacheSrvr::SendPlayerDeCoupled( u_long idPlayer, const char* lpszPlayer ,u_long idPlayer2,const char* lpszPlayer2)
{
BEFORESENDSOLE( ar, PACKETTYPE_PLAYERDECOUPLED, DPID_ALLPLAYERS );
ar << idPlayer;
ar.WriteString( lpszPlayer );
ar << idPlayer2;
ar.WriteString(lpszPlayer2);
SEND( ar, this, DPID_ALLPLAYERS );
}
#endif //__LIANREN5 ../CORESERVER/DPCacheSrvr.h
找到
void SendSetPlayerName( u_long idPlayer, const char* lpszPlayer );
void SendSnoop( const char* lpszString, CPlayer* pSnoop );
后面添加
#ifdef __LIANREN
void SendPlayerCoupled( u_long idPlayer, const char* lpszPlayer ,u_long idPlayer2,const char* lpszPlayer2);
void SendPlayerDeCoupled( u_long idPlayer, const char* lpszPlayer ,u_long idPlayer2,const char* lpszPlayer2);
#endif //__LIANREN6 ../CORESERVER/DPDatabaseClient.cpp
找到
CDPDatabaseClient::CDPDatabaseClient()
{
BEGIN_MSG;
ON_MSG( PACKETTYPE_PARTYNAME, OnPartyName );
ON_MSG( PACKETTYPE_GLOBAL_DATA, OnGlobalData );
ON_MSG( PACKETTYPE_INSERTTAG_RESULT, OnInsertTagResult );
ON_MSG( PACKETTYPE_DC_ADDVOTERESULT, OnAddVoteResult );
ON_MSG( PACKETTYPE_UPDATE_GUILD_RANKING_END, OnUpdateGuildRankFinish );
ON_MSG( PACKETTYPE_DEL_PLAYER, OnDelPlayer );
ON_MSG( PACKETTYPE_GUILD_MEMBERTIME, OnGuildMemberTime );
ON_MSG( PACKETTYPE_BUYING_INFO, OnBuyingInfo );
ON_MSG( PACKETTYPE_TC_LIST, OnTCList );
ON_MSG( PACKETTYPE_QUERYSETPLAYERNAME, OnSetPlayerName );后面添加
#ifdef __LIANREN
ON_MSG( PACKETTYPE_PLAYERCOUPLED, OnPlayerCoupled);
ON_MSG( PACKETTYPE_PLAYERDECOUPLED, OnPlayerDeCoupled);
#endif //__LIANREN找到
void CDPDatabaseClient::SendSnoopGuild( u_long idGuild, u_long idPlayer, const char* lpszChat )
{
BEFORESEND( ar, PACKETTYPE_SETSNOOPGUILD );
ar << idGuild << idPlayer;
ar.WriteString( lpszChat );
SEND( ar, this, DPID_SERVERPLAYER );
}在前面添加
#ifdef __LIANREN
void CDPDatabaseClient::OnPlayerCoupled( CAr & ar )
{
OutputDebugString( \"CORESERVER.EXE\tPACKETTYPE_PLAYERCOUPLED\" );
u_long idPlayer,idPlayer2;
char lpszPlayer[MAX_PLAYER] = { 0, };
char lpszPlayer2[MAX_PLAYER] = {0,};
ar >> idPlayer;
ar.ReadString( lpszPlayer, MAX_PLAYER );
ar >> idPlayer2;
ar.ReadString( lpszPlayer2, MAX_PLAYER );
g_DPCacheSrvr.SendPlayerCoupled(idPlayer,lpszPlayer,idPlayer2,lpszPlayer2);
}
void CDPDatabaseClient::OnPlayerDeCoupled( CAr & ar )
{
u_long idPlayer,idPlayer2;
char lpszPlayer[MAX_PLAYER] = { 0, };
char lpszPlayer2[MAX_PLAYER] = {0,};
ar >> idPlayer;
ar.ReadString( lpszPlayer, MAX_PLAYER );
ar >> idPlayer2;
ar.ReadString( lpszPlayer2, MAX_PLAYER );
g_DPCacheSrvr.SendPlayerDeCoupled(idPlayer,lpszPlayer,idPlayer2,lpszPlayer2);
}
#endif //__LIANREN7 还是上面的目录里面的DPDatabaseClient.h
找到
#if __VER >= 11 // __SYS_PLAYER_DATA
void OnUpdatePlayerData( CAr & ar );
#endif // __SYS_PLAYER_DATA上面添加
#ifdef __LIANREN
void OnPlayerCoupled( CAr & ar );
void OnPlayerDeCoupled( CAr & ar );
#endif // __LIANREN8 还是上面目录里面的VersionCommon.h
找到
#if (_MSC_VER > 1200)
#define __VS2003 // 哪颇老矾函版.net
#endif后面添加
#define __LIANREN //支持恋人系统9 ../DataBaseserver/couplehelper.cpp
找到
#include \"couplehelper.h\"
#include \"dptrans.h\"
#include \"definetext.h\"
#include \"post.h\"在后面添加
#ifdef __LIANREN
#include \"DPCoreSrvr.h\"
extern CDPCoreSrvr g_dpCoreSrvr;
#endif // __LIANREN找到
void CCoupleHelper::OnCouple( CAr & ar )
{
int nResult = 0;
u_long idProposer, idTarget;
ar >> idProposer >> idTarget;
election::OutputDebugString( \"\nT: CCoupleHelper.OnCouple: %d, %d\n\", idProposer, idTarget );
if( m_pMgr->GetCouple( idProposer ) )
nResult = TID_GAME_COUPLE_E06; // 目敲捞 酒囱 某腐磐父 啊瓷钦聪促.
if( nResult == 0 && m_pMgr->GetCouple( idTarget ) )
nResult = TID_GAME_COUPLE_E01; // 措惑捞 何利钦 钦聪促. 目敲捞 酒囱 捞己 某腐磐俊霸父 啊瓷钦聪促.
if( nResult == 0 && !m_pController->Couple( idProposer, idTarget ) )
nResult = TID_GAME_COUPLE_E10; // 单捞磐海捞胶 坷幅涝聪促.
if( nResult == 0 )
m_pMgr->Couple( idProposer, idTarget );在后面添加
#ifdef __LIANREN
if(nResult == 0)
{
LPCSTR szProposer = CPlayerDataCenter::GetInstance()->GetPlayerString(idProposer);
LPCSTR szTarget = CPlayerDataCenter::GetInstance()->GetPlayerString(idTarget);
g_dpCoreSrvr.SendPlayerCoupled(idProposer,szProposer,idTarget,szTarget);
}
#endif // __LIANREN找到
void CCoupleHelper::OnDecouple( CAr & ar )
{
int nResult = 0;
u_long idPlayer;
ar >> idPlayer;
election::OutputDebugString( \"\nT: CCoupleHelper.OnDecouple: %d\n\", idPlayer );
CCouple* pCouple = m_pMgr->GetCouple( idPlayer );
if( !pCouple )
nResult = TID_GAME_COUPLE_E05;
if( nResult == 0 && !m_pController->Decouple( idPlayer ) )
nResult = TID_GAME_COUPLE_E10; // 单捞磐海捞胶 坷幅涝聪促.
if( nResult == 0 && !m_pMgr->Decouple( idPlayer ) )
nResult = TID_GAME_COUPLE_E11;
在后面添加
#ifdef __LIANREN
if(nResult == 0)
{
u_long idPartner = pCouple->GetPartner(idPlayer);
LPCSTR szProposer = CPlayerDataCenter::GetInstance()->GetPlayerString(idPlayer);
LPCSTR szTarget = CPlayerDataCenter::GetInstance()->GetPlayerString(idPartner);
g_dpCoreSrvr.SendPlayerDeCoupled(idPlayer,szProposer,idPartner,szTarget);
}
#endif // __LIANREN
10 还是上面的目录里面DPCoreSrvr.cpp
找到
void CDPCoreSrvr::SendAddVoteResult( VOTE_INSERTED_INFO & info )
{
BEFORESEND( ar, PACKETTYPE_DC_ADDVOTERESULT );
ar << info;
SEND( ar, this, DPID_ALLPLAYERS );
}后面添加
#ifdef __LIANREN
void CDPCoreSrvr::SendPlayerCoupled( u_long idPlayer, const char* lpszPlayer,u_long idPlayer2, const char* lpszPlayer2)
{
BEFORESEND( ar, PACKETTYPE_PLAYERCOUPLED );
ar << idPlayer;
ar.WriteString( lpszPlayer );
ar << idPlayer2;
ar.WriteString(lpszPlayer2);
SEND( ar, this, DPID_ALLPLAYERS );
}
void CDPCoreSrvr::SendPlayerDeCoupled(u_long idPlayer, const char* lpszPlayer,u_long idPlayer2, const char* lpszPlayer2)
{
BEFORESEND( ar, PACKETTYPE_PLAYERDECOUPLED );
ar << idPlayer;
ar.WriteString( lpszPlayer );
ar << idPlayer2;
ar.WriteString(lpszPlayer2);
SEND( ar, this, DPID_ALLPLAYERS );
}
#endif // __LIANREN11 还是上面的目录DPCoreSrvr.h
找到
#if __VER >= 11 // __SYS_PLAYER_DATA
void SendUpdatePlayerData( u_long idPlayer, PlayerData* pPlayerData );
#endif // __SYS_PLAYER_DATA
上面添加
#ifdef __LIANREN
void SendPlayerCoupled( u_long idPlayer, const char* lpszPlayer,u_long idPlayer2, const char* lpszPlayer2);
void SendPlayerDeCoupled( u_long idPlayer, const char* lpszPlayer,u_long idPlayer2, const char* lpszPlayer2);
#endif // __LIANREN
12 还是上面的目录VersionCommon.h
找到
#define __EVENT_1101 // 免媒 捞亥飘
下面添加
#define __LIANREN //支持恋人系统
13 ../LOGINSERVER/VersionCommon.h
找到
#define __CRC
#define __SO1014 // 家南 抗寇 贸府( 某浆, 牢刘, 肺弊牢 )
#define __PROTOCOL0910
#define __PROTOCOL1021
#define __VERIFYNETLIB
#define __DOS1101
#define __STL_0402 // stl
上面添加
#define __LIANREN //支持恋人系统
14 ../neuz/DPClient.cpp
找到
ON_MSG( PACKETTYPE_QUERYSETPLAYERNAME, OnSetPlayerName );
下面添加
#ifdef __LIANREN
ON_MSG( PACKETTYPE_PLAYERCOUPLED, OnPlayerCoupled );
ON_MSG( PACKETTYPE_PLAYERDECOUPLED, OnPlayerDeCoupled );
#endif // __LIANREN
找到
#if __VER >= 11 // __SYS_PLAYER_DATA
PlayerData pd;
pd.data.nJob = pPlayer->GetJob();
pd.data.nLevel = pPlayer->GetLevel();
pd.data.nSex = pPlayer->GetSex();
lstrcpy( pd.szPlayer, pPlayer->GetName() );
下面添加
#ifdef __LIANREN
pd.idCouple = pPlayer->GetCoupleId();//恋人id
lstrcpy( pd.szCouplePlayer, pPlayer->GetCoupleName() ); //恋人名字
#endif //__LIANREN
接着找,可能跟上面一样
#if __VER >= 11 // __SYS_PLAYER_DATA
PlayerData pd;
pd.data.nJob = pPlayer->GetJob();
pd.data.nLevel = pPlayer->GetLevel();
pd.data.nSex = pPlayer->GetSex();
lstrcpy( pd.szPlayer, pPlayer->GetName() );
下面添加
#ifdef __LIANREN
pd.idCouple = pPlayer->GetCoupleId();//恋人id
lstrcpy( pd.szCouplePlayer, pPlayer->GetCoupleName() ); //恋人名字
#endif //__LIANREN
找到
void CDPClient::SendDoEscape( void )
{
if( g_pPlayer )
{
CWorld* pWorld = g_pPlayer->GetWorld();
if( pWorld && pWorld->GetID() == WI_WORLD_GUILDWAR )
{
g_WndMng.OpenMessageBoxUpper( prj.GetText(TID_GAME_GUILDCOMBAT_NO_OUTWAR) );
return;
}
SendHdr( PACKETTYPE_DO_ESCAPE );
}
}
在上面添加
#ifdef __LIANREN
void CDPClient::OnPlayerCoupled( CAr & ar )
{
u_long idPlayer,idPlayer2;
char lpszPlayer[MAX_PLAYER] = { 0, };
char lpszPlayer2[MAX_PLAYER] = { 0, };
ar >> idPlayer;
ar.ReadString( lpszPlayer, MAX_PLAYER );
ar >> idPlayer2;//恋人id
ar.ReadString(lpszPlayer2,MAX_PLAYER);//恋人名字
//Error(\"OnPlayerCoupled:ID:%d Name:%s,idCouple:%d NameCouple:%s\",idPlayer,lpszPlayer,idPlayer2,lpszPlayer2);
char lpOutputString[128] = { 0, };
sprintf( lpOutputString, \"NEUZ.EXE\\t// PAKCETTYPE_QUERYSETPLAYERNAME\\t// %d\\t// %s\", idPlayer, lpszPlayer );
OutputDebugString( lpOutputString );
CMover* pPlayer = prj.GetUserByID( idPlayer );
if( IsValidObj( (CObj*)pPlayer ) )
{
pPlayer->SetCoupleId(idPlayer2);//设置恋人id
pPlayer->SetCoupleName( lpszPlayer2 ); //设置恋人名称
}
CMover* pPlayer2 = prj.GetUserByID( idPlayer2 );
if( IsValidObj( (CObj*)pPlayer2 ) )
{
pPlayer2->SetCoupleId(idPlayer);//设置恋人id
pPlayer2->SetCoupleName( lpszPlayer ); //设置恋人名称
}
CString str;
str.Format(\"恭喜 %s 和 %s 成为恋人\",lpszPlayer,lpszPlayer2);
g_WndMng.PutString( str, NULL, prj.GetTextColor(TID_ADMIN_ANNOUNCE), CHATSTY_SYSTEM );
CWndWorld* pWndWorld = (CWndWorld*)g_WndMng.GetWndBase( APP_WORLD );
if( pWndWorld ){
g_Caption1.AddCaption( str,pWndWorld->m_pFontAPITitle , FALSE, D3DCOLOR_ARGB( 255, 255, 255, 153 ) );
}
}
void CDPClient::OnPlayerDeCoupled( CAr & ar )
{
u_long idPlayer,idPlayer2;
char lpszPlayer[MAX_PLAYER] = { 0, };
char lpszPlayer2[MAX_PLAYER] = { 0, };
ar >> idPlayer;
ar.ReadString( lpszPlayer, MAX_PLAYER );
ar >> idPlayer2;//恋人id
ar.ReadString(lpszPlayer2,MAX_PLAYER);//恋人名字
//Error(\"OnPlayerCoupled:ID:%d Name:%s,idCouple:%d NameCouple:%s\",idPlayer,lpszPlayer,idPlayer2,lpszPlayer2);
char lpOutputString[128] = { 0, };
CMover* pPlayer = prj.GetUserByID( idPlayer );
if( IsValidObj( (CObj*)pPlayer ) )
{
pPlayer->SetCoupleId((u_long)0xffffffff);//设置恋人id
pPlayer->SetCoupleName( \"\\0\" ); //设置恋人名称
}
CMover* pPlayer2 = prj.GetUserByID( idPlayer2 );
if( IsValidObj( (CObj*)pPlayer2 ) )
{
pPlayer2->SetCoupleId((u_long)0xffffffff);//设置恋人id
pPlayer2->SetCoupleName( \"\\0\" ); //设置恋人名称
}
}
#endif // __LIANREN
15 ../neuz/DPClient.h
找到
#if __VER >= 11 // __SYS_PLAYER_DATA
void OnUpdatePlayerData( CAr & ar );
#endif // __SYS_PLAYER_DATA
上面添加
#ifdef __LIANREN
void OnPlayerCoupled( CAr & ar );
void OnPlayerDeCoupled( CAr & ar );
#endif // __LIANREN
16 还是NEUZ目录 VersionCommon.h
找到
#if (_MSC_VER > 1200)
#define __VS2003 // 哪颇老矾函版.net
#endif
下面添加
#define __LIANREN //使用恋人系统
17 ..WORLDSERVER/couplehelper.cpp
找到
void CCoupleHelper::OnCoupleResult( CAr & ar )
{
u_long idProposer, idTarget;
int nResult;
ar >> idProposer >> idTarget >> nResult;
election::OutputDebugString( \"S: CCoupleHelper.OnCoupleResult: %d, %d, %d\", idProposer, idTarget, nResult );
CUser* pProposer = static_cast<CUser*>( prj.GetUserByID( idProposer ) );
CUser* pTarget = static_cast<CUser*>( prj.GetUserByID( idTarget ) );
if( nResult == 0 )
{
m_pMgr->Couple( idProposer, idTarget );
const char* pszProposer = CPlayerDataCenter::GetInstance()->GetPlayerString( idProposer );
const char* pszTarget = CPlayerDataCenter::GetInstance()->GetPlayerString( idTarget );
后面添加
#ifdef __LIANREN
//结婚成功更新下数据以便玩家都可以看到
if (pszProposer)
{
CUser* pUser = (CUser*)prj.GetUserByID( idProposer );
if (IsValidObj(pUser))
{
pUser->SetCoupleId(idTarget);
pUser->SetCoupleName(pszTarget);
}
//CPlayerDataCenter::GetInstance()
}
if (pszTarget)
{
CUser* pUser = (CUser*)prj.GetUserByID( idTarget );
if (IsValidObj(pUser))
{
pUser->SetCoupleId(idProposer);
pUser->SetCoupleName(pszProposer);
}
//CPlayerDataCenter::GetInstance()
}
#endif // __LIANREN
if( !pszProposer ) pszProposer = \"\";
if( !pszTarget ) pszTarget = \"\";
//结成情侣成功,需要通知每位玩家这2个人的信息.
if( IsValidObj( pProposer ) )
{
pProposer->AddCoupleResult( idTarget, pszTarget );
找到
void CCoupleHelper::OnDecoupleResult( CAr & ar )
{
u_long idPlayer;
int nResult;
ar >> idPlayer >> nResult;
election::OutputDebugString( \"S: CCoupleHelper.OnDecoupleResult: %d, %d\", idPlayer, nResult );
CUser* pUser = static_cast<CUser*>( prj.GetUserByID( idPlayer ) );
if( nResult == 0 )
{
CCouple* pCouple = m_pMgr->GetCouple( idPlayer );
ASSERT( pCouple );
if( !pCouple )
return;
CUser* pPartner = static_cast<CUser*>( prj.GetUserByID( pCouple->GetPartner( idPlayer ) ) );
m_pMgr->Decouple( idPlayer );
后面添加
#ifdef __LIANREN
//离婚成功更新下数据以便玩家都可以看到
//CUser* pUser1 = (CUser*)prj.GetUserByID( idPlayer );
if (IsValidObj(pUser))
{
pUser->SetCoupleId((u_long)0xffffffff);
pUser->SetCoupleName(\"\\0\");
}
//CPlayerDataCenter::GetInstance()
//CUser* pUser2 = (CUser*)prj.GetUserByID( pCouple->GetPartner( idPlayer ) );
if( IsValidObj( pPartner ) )
{
pPartner->SetCoupleId((u_long)0xffffffff);
pPartner->SetCoupleName(\"\\0\");
}
#endif // __LIANREN
|
|