|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% S% `# g6 r* f. K9 MI posted this because someone kinda posted a youtube thingy about it :O.
3 ~$ y$ h; `3 H0 z& A+ n9 n) g# k6 M4 u
Find this in DPSrv.cpp @ worldserver
% R8 I" C* p N- _* n( G Q* n7 t8 V& E3 v% @
Code:4 x2 G1 _+ U# g. U6 F# {
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )' Q( [* F0 W& r2 R/ C; u
{
1 w% w b1 r- Z& Q8 F) L DWORD nId;
- N9 A0 `1 h1 x/ @' R int nPart;
! s- E- b. R5 S# x+ P( Q/ b2 ]. i# K$ w. @! |9 a! Q* \, Q+ {
ar >> nId;% s+ E7 w% T0 K/ j, i! B3 {
ar >> nPart; 9 e! X0 r4 i2 q
) f1 k+ y; K0 |4 D9 }: B" e
if( nPart >= MAX_HUMAN_PARTS )
5 ~4 ^6 `: l# ?; Y- R& H* x return;* Z% k( |2 o4 w% E. K' m& d4 Y
# K2 i, S( x- S4 r2 e. E- V
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
: C! {4 u! M5 v. d {* q; R9 Q8 B& P6 k L
7 q- h4 K, r0 r. R( H
Code:
$ z. b. p; T% `8 R9 k) z: D7 B4 ^#ifdef __QUGET_SWAP_FIX* w0 H" I8 G% b1 a' t
8 S5 _& ^6 t: n if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ). k$ T$ U, Z' J& P, G
pUser->SetHitPoint( pUser->GetMaxHitPoint());0 D7 H2 \# F! l$ H# d) W6 E1 j
/ A+ J6 J" h, e. r% M
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
* A) g7 g# N3 Y# Q pUser->SetManaPoint( pUser->GetMaxManaPoint() );
" T. b1 x" R( |2 U5 @
/ u( Z* u- C Y$ a Z4 T& o V if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )1 d! O0 X8 j2 o: z1 |% ]" J/ @
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# S6 D8 k, K* f5 R6 Q
8 }' I& q9 O; N: D* m9 l& ?
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
5 t9 y( [. n3 Aand add under
% u' @4 \9 P8 e* y
1 A* I- P& n: n, pCode:
6 z6 i( d3 `: B, }0 r1 g2 uif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ @2 }4 a1 [' K. J
{1 e' `/ a! B Z
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 );
) `, Q* @% M x- ], k: D& q) A: w }this
! y: Z' U/ _6 L0 p0 _9 i# r/ D8 i) J! o( y1 @1 B
Code:+ Z2 ^) B6 v: m+ M
#ifdef __QUGET_SWAP_FIX1 \% Z1 h# Y0 I9 V w3 p3 t. r6 n
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
/ h! K, }! {) }" I1 A pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint()); v, y9 l$ a, q% b6 k2 q5 ^
% ~- O# X! |; t* |; o6 E: T if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
- J) D1 ~( t6 C+ e4 j: _4 h, Y pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* K. _) }1 I/ E! K5 ~; w* M7 Y6 }4 h0 a: X# X
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
5 @1 v( Y( P+ r6 R# j5 t. } pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );, {8 I e3 c* l% [5 P+ M
5 m& `# y3 }+ k. P9 w% z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# g, [3 z9 E: d ]0 Z+ z
7 ]" n7 W' u" S/ E& F O6 n# [
& M( c. U3 E0 j4 }4 z |
|