|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 7 q" ^" o' h, u/ O. K" u
I posted this because someone kinda posted a youtube thingy about it :O.
# J7 B# R% ]; V9 H4 G
7 b9 l0 {& F2 C' z. ]( LFind this in DPSrv.cpp @ worldserver5 b/ f' W/ A6 r6 N& N8 M" p7 A
3 k" T4 I( M, Z6 vCode:
* l9 K6 C" h w0 Zvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
( A% N% [* b, I- g+ G{5 w3 I+ Q6 C: x5 g% `* l0 C
DWORD nId;
. {4 ]5 {" i! s( g5 g int nPart;4 n+ }6 p8 F7 ?/ \2 k2 P* {
0 z! `$ E6 y- J* z, s( B
ar >> nId;
4 [4 v( }' R! d7 X3 U ar >> nPart; % U) e6 z! c( T+ Q( r5 L2 m; z
2 ]7 Z& {: n( F$ q
if( nPart >= MAX_HUMAN_PARTS )
, \5 ~" ^( H$ ~) G; }- s# V3 K return;/ P/ T$ ^! q# X5 \/ }& [
2 M, X3 a7 [' V5 Z( `, D
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
4 I1 c% b: I/ |+ f& Y: h
) b% S7 D; B8 n5 a' _1 {) }
$ m1 s$ b4 M \Code:
. i# j) k* J, F#ifdef __QUGET_SWAP_FIX% G3 ~; }% u4 U& s; E' W5 T
; d) V, W$ | E% ?. y if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* G' {7 Y# _ P2 k
pUser->SetHitPoint( pUser->GetMaxHitPoint());2 ?/ M9 G) d+ Y% }7 q. O; \* ]
2 K N. c9 B6 R if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
6 a2 W" [* Q* g+ n/ r, T pUser->SetManaPoint( pUser->GetMaxManaPoint() );* k8 l! l% X! V) \3 Q. m0 W/ b' M2 j
" h9 n9 H6 T$ X# n
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
2 Z% _* W) C0 W! v pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* L; Z1 a( _6 c6 _1 @8 r
4 [9 A3 {; i b$ A3 g0 j
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp, v: B4 T' ?% d4 P0 L& |& Z
and add under4 p- k2 l4 Z4 J) @. d- d
8 O5 j: q4 W# T/ k, n/ p! i! R6 E1 F% I
Code:9 A+ M8 e2 S X c1 G% u' B
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
4 S( z2 {" g' b {
$ v% }* R% U: e' @! H% @. [ 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 );! |/ E; L9 ]& A3 l9 \
}this4 @$ k0 N' ?$ s
3 V; {. m- d, ]8 N3 ICode:8 {7 {" v/ A- X1 J) l
#ifdef __QUGET_SWAP_FIX
N! n1 `( [& u3 v4 e6 G) t/ u if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )9 `3 W# r" l8 s" O
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& F, D a* e: f1 w& ^7 f
# ~# w1 o* V6 s( ~7 s+ _; A
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )( o5 U1 x$ q8 m- U% { [$ q8 F9 e2 s h
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: N/ w( Z* l3 w( r( `: ~
" ~9 u2 T& s' m. }* u if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
% { Z+ V: S2 z" T$ q5 k* f/ o pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# h( a7 }) R5 e: z% Y8 G5 R
4 b) ~# c' L; D7 U2 n7 ^& h* M#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 `1 @7 n$ c( s+ w! i$ i/ ~
2 u7 J- ]& P; Y
0 w. Z7 z, t+ ~4 K; ^ |
|