|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% B$ D+ D+ G; t1 AI posted this because someone kinda posted a youtube thingy about it :O.' N3 @ @" a/ C% Q* E
/ I3 c7 o' y, Y" o. \
Find this in DPSrv.cpp @ worldserver
J2 {+ O" `! I# Z d$ i9 ^
) M0 x$ ^( B e! @& w, KCode:
( _- \4 c+ w3 ]% D5 Q& gvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' I+ D8 m4 D- a9 H6 ~{3 O8 Q3 O0 N$ | q8 g0 @
DWORD nId;
8 v! B/ e: T- H( o k5 D3 h int nPart;
& ?/ r: S( d. _" k6 {% U+ _
% [3 ]! t- k: K$ L/ K2 o ar >> nId;
" i& }; E& y, o3 C" B$ \0 x ar >> nPart; ; p2 M; D5 j; o
+ P; Z1 e: w4 n: W1 c- J3 R if( nPart >= MAX_HUMAN_PARTS )
! N0 ^" z1 R$ B( k return;
* o! p6 _5 R# t& q" I" @! d9 I7 v- D2 N$ W
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! O: r1 \4 o, F. V& ]/ G8 T
5 {; o' {' j q. @5 J& o5 v) B6 I' ?; o( S8 P
Code:3 z3 r" S7 B& u7 { e' s
#ifdef __QUGET_SWAP_FIX8 p& W) }% |0 u' U
' M2 g5 G; k$ H/ t% g' {+ ?1 X if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ Q1 Z2 {2 D3 e; q: ^$ J
pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ V8 g3 R) Y% }9 n* j
) F' }5 ^1 W$ x6 N% P if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) _# A- u0 N6 ~- X0 f _ P8 u
pUser->SetManaPoint( pUser->GetMaxManaPoint() );, n% b! C( T/ x9 _- n' ~
4 p& p, Z2 U1 ?! Q1 i* S if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 B! a$ W, ~# ]! M. }+ f pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( f0 C" h, _* G0 b% _ L1 H
& u! d( j" e& h#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp/ z$ w/ U, S q! L6 Q
and add under+ Q1 m4 a3 U2 Z; y7 S. \; b
4 z. p& Q. `0 e/ D) ~Code:
' t( Q- r, d0 F9 m! D5 nif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ o0 L9 J8 X5 O0 S {
% e) h/ p& w; G' I3 \0 R! d 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 );+ y* r. z7 q& l0 v' k
}this
- N) g0 D/ g$ S, C4 T; A* P) Z/ Y! Z* o$ T0 F3 V1 w
Code:
& r/ T) ]( j- M#ifdef __QUGET_SWAP_FIX3 i, V$ Q7 Y R. B
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
1 I# M/ A5 s" d/ Q pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ [- O( C3 @( D8 v" L* w) i& v% Y
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
! a5 }/ r0 O3 b$ J: V- n. N3 \* y4 k* i pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );/ p6 G" |2 O. F
) d; j) |3 K+ b& i( Z( ?
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% T1 f/ [& j4 o- m* v/ y1 w
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ f" O+ f6 h, [( N
5 ?9 f3 C& D* \#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
" n( I; y4 L! S' q* ^$ o- \/ l4 r/ _- A- E) g& |5 y9 F
) `3 n2 w6 \$ V) N& {
|
|