|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked # i% R, a/ ?8 k: ?# `
I posted this because someone kinda posted a youtube thingy about it :O.3 f2 Z; L f. m0 z" d5 `: U: L
& q& _9 {! Q. S
Find this in DPSrv.cpp @ worldserver
4 D3 y: x4 ~/ x8 ?* K M; V% Z1 M. F H. _
Code:: P- e3 f5 X4 X7 D0 X, h6 B
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; d/ ]& M7 P1 f6 c1 T{
3 e* m6 t$ @# q2 g' m DWORD nId;
+ Z$ r$ o+ i) n( D int nPart;
! A+ g# W" r3 G4 w" P* ~
' J" F' A. G- S9 \( s, j9 ] ar >> nId;
- i# g1 l7 m* r, o ar >> nPart;
: F- U9 d+ E. Q+ e! I ! N0 b: v. [( E. E7 j1 s; t
if( nPart >= MAX_HUMAN_PARTS )
* ~0 R6 W+ d3 ?5 ^: w/ [ return;
7 q; [: `( l8 {& D6 M& s! w% f3 l7 g2 X. ^4 [+ e" W
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it1 C# K3 x, p; E; v; |
9 Q1 C' Q. Q' C
$ V" `1 [ P* t! [' j: O+ rCode:
& J" q6 o! \$ E+ X#ifdef __QUGET_SWAP_FIX
$ A2 Z7 |) Q' D/ m1 @" w' z7 x& _9 E$ b Z0 _. }9 @5 S
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
$ P9 r: ?; a; }6 F8 X4 ` pUser->SetHitPoint( pUser->GetMaxHitPoint());& q: v9 r+ I+ v. s3 c" b
$ M- X2 X; `3 q; D3 ^7 q" A( X$ \
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )1 b8 s3 b& g$ i* l |* y: o
pUser->SetManaPoint( pUser->GetMaxManaPoint() );- X& X+ W: v# ?& d9 d7 a3 M
& @5 W% ~ B/ i6 ?4 p3 q
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
7 i9 {2 b/ l4 P. q3 C4 X) R: M pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
2 j: t1 r, q; ^# a7 ~% i$ `8 d3 X% Y- ~( M- P5 A
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp6 E- {1 o! d3 ]$ ?
and add under3 c k7 K3 o# `" y" G
$ M' j7 { e% [7 E5 j/ g8 D
Code:
2 m& P( {3 F& N6 R/ |if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
" w3 F# a, H7 v5 z) N( o {
! D2 d1 C7 @' ^' m$ x% ? 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 );
- f" Z$ W/ T9 Z' n }this w5 y2 m }- C
. { H1 B7 G6 ^. x4 t
Code:7 W- n/ q: g5 z7 c I' q+ u
#ifdef __QUGET_SWAP_FIX
, E0 ~2 M) I* S; L1 U9 G if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
6 M; c( I4 H" s! a0 X H" { pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
( |3 K: f1 [( ?
% N7 _; R2 @& |" m8 W8 t if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )3 o* I- k _( G Q
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );4 V: K, ^+ ]$ O% [) B- |
: j+ a4 m3 B# `! r/ B
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
% j3 ^( I# M# X0 m pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 P- r! N- m# D* ^7 Z( I! Y$ }3 `0 e5 b
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 n9 ]& Z2 j# L1 X( ^
/ I7 n$ g1 Z; { w: E
5 c6 J% W5 D3 p- _ |
|