|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , y7 S2 V X) D5 T$ ]7 F
I posted this because someone kinda posted a youtube thingy about it :O.
7 H. ?' t; |( \$ G1 J( Z3 v6 b* F3 A y& f
Find this in DPSrv.cpp @ worldserver5 |5 b5 p. Z6 C3 o7 g7 k
: z0 L) O# t& H
Code:
( W, P3 P6 \9 q3 X5 `void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 o0 m# Z( F& ~ e
{0 k; Y) M# T! N* H
DWORD nId;
- G, u' S' k+ }( r$ V8 Y int nPart;5 ~- ?& f. p w+ f$ e2 H4 |9 s
, j# z. f( `4 H# ?/ X ar >> nId;1 C! Y" F. y( n4 m( [4 V2 S* X* y
ar >> nPart;
; A# J) k, i9 x$ O4 y4 _! h
7 I! ?4 l5 O- f2 A( r$ h# T: Q) i if( nPart >= MAX_HUMAN_PARTS ) 9 a4 Y# i8 ~2 \; x5 g9 o
return;
* J) K1 G, V/ y, N8 @# Y5 ?6 m: |: y& T0 V9 g2 B7 T
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
- d4 a/ ~ P9 k" P$ b9 v" { ^
; H- y1 d; Z5 q: d! T7 s3 x* _' p* d- O g: G! b2 F9 p
Code:. j4 A5 z0 G/ g L
#ifdef __QUGET_SWAP_FIX
: E m% P: n+ {7 Z6 f+ [' i, D( ^8 R* K* l2 d G! i4 A
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )& r/ W' ]1 d' ]4 d
pUser->SetHitPoint( pUser->GetMaxHitPoint());
/ @0 n7 R ^: E" ?1 {" |, n) @. x5 y& L7 J8 K7 _, X
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )( D. x- G8 |. Y* Q$ x
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ y6 E+ x- C% q5 V3 S) T' k8 [+ t% X4 o z" }5 _3 D2 K0 V
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
- R7 a4 V7 b3 Q+ D pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( V5 X9 y% O" @& u% q3 j% x0 h7 Z6 [* P; y
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp( B R( R F, k1 r. `# w+ o. A
and add under# }/ l* Z2 B$ R8 L# E8 F
, n5 e# M9 H7 U% H, _Code:
4 n {# k' [; l, E+ a, {if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )( r6 a z9 \+ G; a
{" _+ A6 s" f( J# n
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 );: w* e* ]( t) M/ D9 h
}this
" i$ L2 n' G l* U
# a9 t. V4 _ @5 V; M# E7 G7 W0 [Code:
4 y+ v/ ^; C! V, G) U$ H; R! E#ifdef __QUGET_SWAP_FIX5 M( ~4 Y+ L; t! Z. n- o9 i% Q
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
' g* {" D8 X# K) c$ o" y5 i pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. U6 J- Q+ T5 P' {2 L/ l5 {. O: T: S, e! I* O
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
- u4 S) @; A; X) i" v+ H pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
|, l1 l8 G. |# }2 i6 U W( L' p! K
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
; F/ y3 y; ^- Z0 H' B pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 V& [; q( Z! B$ n6 x3 V
" C" g6 e& O* O' }#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
/ T6 {( R: p6 c
5 m3 x( a: R" X& p; `# d
% V2 C% B7 T- @* ^3 v" Y' ? |
|