阅读:3533回复:4
修复《飞飞》秒杀/隐身/召唤/瞬移/非法物品错误
1. 首先打开DPSrvr.cpp
2. 搜索下面的3处功能:CDPSrvr::OnModifyMode CDPSrvr::OnSummonPlayer CDPSrvr::OnTeleportPlayer 他们后面的代码#ifdef __HACK_0516 DPID dpid; ar >> dpid; if( pUser->m_Snapshot.dpidUser != dpid ) { Error( "[%s] try to hack : PACKETTYPE_MODIFYMODE", pUser->GetName() ); return; } #endif // __HACK_0516 修改为:#ifdef __HACK_0516 DPID dpid; ar >> dpid; if( pUser->m_Snapshot.dpidUser != dpid ) { Error( "[%s] try to hack : PACKETTYPE_MODIFYMODE", pUser->GetName() ); return; } if( !pUser->IsAuthHigher(AUTH_GAMEMASTER) ) { Error( "[%s] try to hack with dpid : PACKETTYPE_MODIFYMODE", pUser->GetName() ); return; } #endif // __HACK_0516 如果你没有 定义__HACK_0516 那么 定义它:-* 3.非法创建物品修复如下:CDPSrvr::OnBuyingInfo 编辑这个代码如下:void CDPSrvr::OnBuyingInfo( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) {/* BUYING_INFO2 bi2; ar.Read( (void*)&bi2, sizeof(BUYING_INFO2) ); CWorld* pWorld; CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser ); SERIALNUMBER iSerialNumber = 0; if( IsValidObj( pUser ) && ( pWorld = pUser->GetWorld() ) ) { bi2.dwRetVal = 0; CItemElem itemElem; itemElem.m_dwItemId = bi2.dwItemId; itemElem.m_nItemNum = (short)bi2.dwItemNum; itemElem.m_bCharged = TRUE; BYTE nId; bi2.dwRetVal = pUser->CreateItem( &itemElem, &nId ); #ifdef __LAYER_1015 g_dpDBClient.SavePlayer( pUser, pWorld->GetID(), pUser->GetPos(), pUser->GetLayer() ); #else // __LAYER_1015 g_dpDBClient.SavePlayer( pUser, pWorld->GetID(), pUser->GetPos() ); #endif // __LAYER_1015 if( bi2.dwRetVal ) { CItemElem* pItemElem = pUser->m_Inventory.GetAtId( nId ); if( pItemElem ) { iSerialNumber = pItemElem->GetSerialNumber(); pItemElem->m_bCharged = TRUE; if( bi2.dwSenderId > 0 ) { // %s? %s????? ?? ?????. } } } } g_dpDBClient.SendBuyingInfo( &bi2, iSerialNumber ); // FILEOUT( "buyinginfo.txt", "dwServerIndex = %d\tdwPlayerId = %d\tdwItemId = %d\tdwItemNum = %d\n", // bi2.dwServerIndex, bi2.dwPlayerId, bi2.dwItemId, bi2.dwItemNum ); static char lpOutputString[260] = { 0, }; sprintf( lpOutputString, "dwServerIndex = %d\tdwPlayerId = %d\tdwItemId = %d\tdwItemNum = %d", bi2.dwServerIndex, bi2.dwPlayerId, bi2.dwItemId, bi2.dwItemNum ); OutputDebugString( lpOutputString ); */} |
|
最新喜欢:liulin... |
沙发#
发布于:2019-12-30 09:47
|
|
板凳#
发布于:2022-10-29 03:19
修复《飞飞》秒杀/隐身/召唤/瞬移/非法物品错误
|
|
4楼#
发布于:2023-12-16 08:45
为了一个铜币努力177914984
|
|