|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
2 J& V z1 K7 Y! Y hI posted this because someone kinda posted a youtube thingy about it :O.5 f( W* D/ H5 z) K1 D0 I
: w8 f9 D' d0 s" A, b3 [, U( vFind this in DPSrv.cpp @ worldserver& P+ ~6 ~; N: u
) u$ R* k% @& R4 T* U1 E( v7 t9 m
Code:% c( \( @, B! `3 N/ v$ c
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ): ^, \( a# N% M! A* o6 b; Z
{
' \. C' p7 ?" [8 g# P } DWORD nId;
9 Y( V# ^8 p% F1 V int nPart;
) C, r$ r1 X L& S% c, y% g! `8 D$ i1 F7 Q
ar >> nId;
/ x' B2 ]* M; c5 E% R ar >> nPart;
, @0 f- l4 V& a; M3 j
0 l2 b. N2 j3 t5 l if( nPart >= MAX_HUMAN_PARTS ) 6 `4 R+ P) c% G: I$ q3 ~
return;7 Q$ b3 o0 O1 ?+ Z9 o- v
; R6 ^. `6 d& C3 f
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
) T% D. T3 T- m5 k* Z! L
! D& H3 |+ W- p7 S( x) Z A
; V% ]) ?. C# cCode:2 C7 \+ X6 F, P2 v# u9 A, K
#ifdef __QUGET_SWAP_FIX0 H. V5 y3 {$ A, J) N) v
! _5 P0 n ^4 o* K( N
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
7 y- J: C: i* W) g" G pUser->SetHitPoint( pUser->GetMaxHitPoint());5 x) Z- _% ]5 s Z) J0 R' J4 `
8 p4 M; q6 j) G
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )/ _! m6 i3 T; Z+ o
pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ y1 V6 i+ [/ w9 ^9 U3 _ Q# \
# r& J# x4 e$ \; @ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )5 N% D3 y: }# {. U
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# R. j# m1 |+ |5 J/ h5 i
9 v; h% g; t- [+ I' Y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
9 b& @: y% }9 j7 s& ]and add under
7 d. |. |8 z2 y0 b/ ?8 | @6 {" r! m/ g( {4 I2 z
Code:
Q+ O4 l* A; Lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 q* Z3 B4 J! t {/ |7 \& t5 R8 ?' 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 F, R/ f! ]! C2 d5 h }this: V% x7 z4 }, y6 n+ z
" a" ]* }5 Z- i( ?# x
Code:; H% o+ f. j& Y8 m* k- d
#ifdef __QUGET_SWAP_FIX
1 B- q1 a- R+ a7 V if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
1 n: \7 R0 i6 w# ` pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 l. D6 H$ }5 I' c4 l4 l3 p2 X2 r& l! K
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )( } v2 T. T+ o9 q4 V- U
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
; o# |: T+ E3 O2 I/ z6 q2 i0 ^& |: |* @
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )' N) F* ^% G& H
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ \, ^- x x ]
# I& `9 R6 v8 `. `/ |7 g# @#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 b! V1 m5 k7 m- Y* w
$ @8 [( J5 W4 ^) I( y' k) E y* z3 |; A2 p% b! s5 E% }+ p+ g2 C$ s2 T8 B9 U$ i
|
|