|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
) u; T. E B6 }I posted this because someone kinda posted a youtube thingy about it :O.8 h8 K! E( D8 K7 X; p( F- d0 y! } _
) Q' f, l; b. q* v5 vFind this in DPSrv.cpp @ worldserver- k1 k8 M; T" u! y y
! b$ [ h% w" h+ |( ?% U
Code:" ?/ |* j) B& n
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# g9 \9 ]' }& z I9 [: N1 C- v
{" u, M" _$ A3 C% E# z
DWORD nId;) r3 h$ z" T' \0 d- w# o
int nPart;
- d+ ]- A% N4 w& x
8 X; ~; C) | k- D( a4 G; K ar >> nId;
& ?# f( \; X4 ^" }7 W ar >> nPart;
0 [( O2 e' U2 l S: b, K
]% A$ z; L5 b1 Y2 M( f if( nPart >= MAX_HUMAN_PARTS )
+ o0 p3 s; E- H, B% o return;6 V# e! G( @! k5 l7 o. M5 B* k+ y, E
: y7 q! r* ]2 x6 S CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' D& ^, q1 r+ `4 W: X9 h- `/ G: f' c: f# Q6 E
( v& j9 t' E. R) B X8 @
Code:' }- u" S- w4 p' o$ h) ~
#ifdef __QUGET_SWAP_FIX! \; x& C! R2 |" z) r5 ^
6 l; A; K% i3 A6 |& Z" l/ q! v+ Z! c+ k
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )6 [$ l9 D' N0 b" I# n; v
pUser->SetHitPoint( pUser->GetMaxHitPoint());
! D( ^* S! A _& a# t e8 R) z: d; F+ C
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
- q7 [- g. ]' q3 ] pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 R& R. B3 x& P7 u3 e5 E
2 @* i2 ^6 [3 R. S6 E0 d8 J3 F9 w if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )1 Q0 o+ D, h4 W) r: ? B
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );" L: H( l. x4 e7 F
0 f1 h. _. i& ~: W9 }1 c#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp, z+ [2 }1 S8 u4 V0 ^8 E3 u; q1 V7 u
and add under
) n% X; e( p/ ?2 d* d" r
5 d. e. ]" f, |) QCode:0 c' [: L6 a8 Q' ~5 j% k$ A5 ~' O
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
, y7 u: W7 J1 Y' h" j8 l {- N5 o4 _/ D- c" L. r4 G3 t
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 );
9 g/ O$ }* X' m5 o# b8 \& { }this
# _& @5 Q3 `5 C% [
6 _$ |+ a( Q z2 l3 s& UCode:
9 D8 H: w/ P9 u" o h: T5 Y#ifdef __QUGET_SWAP_FIX7 N9 w" C! T% M. @) u8 B' a
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
) A' k! x6 O: F# P5 w: ^ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
( E& b! ~4 p" R2 J
/ [ f& z8 O: Z8 u& b5 ^, t if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ); s v/ ]! o O+ l
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" B" L6 p- G* U W1 }) O
- A! v& R/ d* q; N& P4 M
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )$ V/ f( w- h( Q
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
& ?' Q- r$ B7 I' S3 \$ i! S5 S% X7 b
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : z' e' @. I; J
$ D/ Z+ O% t# X4 P6 N
- I' R7 k( c( R$ [ |
|