|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , J: r! X) j- ]9 _
I posted this because someone kinda posted a youtube thingy about it :O.
+ ]1 {' O* a% f3 _" [( c. G% d( b* Z* z$ G2 L, F$ q: Z) E. K" p
Find this in DPSrv.cpp @ worldserver4 K6 }* V: Z+ S% r6 ]
: o% [, a, l8 X V' MCode:
- k9 R7 o: O. D$ `, P; b% J% Yvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
. o; ?) Z' }$ _* C- n/ B{
! H+ N& c: g' o! } DWORD nId;
' s4 i# d3 _# A! E int nPart;
* k0 p& m( `- O! i
: F% D" k) u L9 k! C; H- t7 b2 _5 q3 g ar >> nId;
/ |8 Q* B% n5 I2 N0 }; r ar >> nPart; ( ^$ W2 y1 n5 U# e3 A, V
2 s9 P5 ~7 y* v" Q- _' `* Y
if( nPart >= MAX_HUMAN_PARTS )
. u& D4 p& f) W% S. m/ F- y return;
# W) |5 a! b9 J e5 r
! J' _, M4 X9 |( }5 j+ c% z CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! x5 N2 f3 Z/ c9 ]% p$ R% P
, C# o; b/ [+ R1 ^3 u3 \, j5 t6 y# f+ Z3 V/ ~! _
Code:5 N" D9 m/ P/ D) r4 q" o
#ifdef __QUGET_SWAP_FIX
0 E9 h* A6 g, J0 {; U& k& m5 _
* k! }' ^2 K, H8 h+ g if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
- t* `2 v b7 P6 t! d9 n) ? pUser->SetHitPoint( pUser->GetMaxHitPoint());3 ^' L$ X0 r4 |1 [
7 g& @# X8 J' M! x' q! C% Y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )) d* ]. n; }6 C' i% m. @" L) s
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
, V( E& K/ K. X
5 f/ W8 B+ [8 @$ s3 w0 ~& A1 z if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ); }9 V: H, _9 v) k3 D# l9 B/ ^& h
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );" O" B' p& Q7 o0 ]$ U
, L2 q+ r/ v$ O% u; L( y
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp. O( T1 z: ^1 ^% m" x: [3 E; m
and add under
. _2 b9 W. Q" }2 |( u
. R! u' u" Z, j/ G) Q, u! |Code:9 N* t i9 e) ~& v
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
+ A8 a# _* I& g' g3 w {8 [" a8 h* z( A
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 );: L8 j: G) Q' X( o: w* c$ D/ w( L
}this& S/ i- ^% T' r3 P4 J
# Y e# n7 g) B) kCode:
$ {6 [8 T: s, D8 U- P* M; f9 J! w#ifdef __QUGET_SWAP_FIX2 H1 W: X* u( w3 m
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
Z2 N; R" W' d& v7 k2 x- r' E/ k pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& P' o4 ]( ~1 L1 P% n$ x
% u$ D" g1 Q& k& `) ?4 p! D/ Q if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )+ O- i2 J, [# q( ], \/ G
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );5 V5 F1 m1 s9 ]& A) ]
3 Z" I9 A# g# y
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
3 Q5 |1 D4 j, {5 u pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% d' ~0 C1 p- I# I
1 x c( J% S: J" ^% L#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 7 X4 y3 X' n; a. l
+ y, j( O$ G+ K X, O; x* N
6 Q) X8 N g9 G r% F" @) i4 _ |
|