标题: 修复交换错误 [打印本页] 作者: admin 时间: 2016-1-10 03:43 标题: 修复交换错误 Hi I fixed the swap bug a long time ago it got tested on my server and it worked ( w, p7 Q% B# {. \' |; Y9 B
I posted this because someone kinda posted a youtube thingy about it :O. 6 K+ U/ B: M& D {, W( d( u6 v0 u7 p- q0 e- j5 F6 M, Z
Find this in DPSrv.cpp @ worldserver* u6 Z$ A/ ^/ D S7 C2 s& D! i
% j- j1 Q, T( S, r4 v* wCode: G8 E( `9 n" d2 f- }void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) ' K; a- O6 R: o' I: r; a{ + K# k) W2 {' y( o! B: o' z DWORD nId;( C2 x& }. u4 l- S
int nPart; 0 `, h% }6 D8 n$ W$ t4 n2 d7 g# ^$ z) M
ar >> nId; 6 G8 v( G0 `8 n' h2 J. ~/ L ar >> nPart; 4 k) ~% Z4 r: l% K* Y
7 l% k: O5 k' T9 B$ r
if( nPart >= MAX_HUMAN_PARTS ) . ~/ \1 D& e' @9 r$ E2 H
return; 2 L& Z7 q$ M. u( ` [$ ?' Q) u6 R) M4 E$ Q! n6 G) G
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 }, B5 y8 P! X+ Z; c
6 V1 d9 D; T$ u2 H Y) h; i0 Q1 Y/ BCode: + J; q' W) v7 C# J' D2 R#ifdef __QUGET_SWAP_FIX 9 K" k% p, W/ C" ~( v( W3 S; y! U& u% g/ i+ P# P0 L, P
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ) # g" U7 p0 r( g; c pUser->SetHitPoint( pUser->GetMaxHitPoint()); ) s( n8 ^0 b2 l' E5 c 4 o: Q# x( F" N9 R! J. l if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) ( G6 d8 ^$ r* B1 P+ ]; f$ w pUser->SetManaPoint( pUser->GetMaxManaPoint() ); 9 n1 n# E$ Q) u0 v2 q* o ^" \& ?/ O/ A# a" \
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) # N: a( c7 C. t2 p pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );9 c. Q! p; U! y( A* _* k; b
/ S: K# t" O$ e4 g% a
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp9 r: `4 [6 U' L+ ~$ n
and add under * O$ ]* \% q) a, f+ Y* [ + b% m! E8 u8 |7 G8 `Code:+ ~. L1 M3 \! q$ {8 U" t2 b$ h9 a
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 p' U+ d8 s$ X: Y6 f, K& D% C
{8 U. N! Z+ u6 {+ w. s
CMover::UpdateParts( pPlayer->GetSex(), pPlayer->m_dwSkinSet, pPlayer->m_dwFace, pPlayer->m_dwHairMesh, pPlayer->m_dwHeadMesh, pPlayer->m_aEquipInfo, g_WndMng.m_pWndBeautyShop->m_pModel, &pPlayer->m_Inventory );; ~" M+ u. Y" m. x& q
}this6 v& g1 n3 A/ j6 l* ~& ]) D
/ h% F z7 a7 v+ p% {1 ?; ~. s7 h
Code:5 J3 |; B& q/ K$ I
#ifdef __QUGET_SWAP_FIX7 S7 \% z% k8 q- n
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )% m1 Q1 Y- y0 W) t
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint()); 1 M7 m8 p2 L% a, x1 a; D$ R ; e5 j2 L" J @) t: q7 h if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ) % ^6 ?- m" R3 K" ` pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );# z% ~9 r% M" @! i" K# e
9 w; @! [: y& s8 h# Z& p: m5 [ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ) 1 C3 D5 ~" ?$ ]3 v+ @+ a pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) a' u' W7 F: V- \$ e
* h; Z( S. n$ Z% }" x2 d. b! J
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 d) l1 o# ]- g# v
$ m3 V9 s; A3 } p. }3 |