|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' K5 W' Q; q( n' n9 lI posted this because someone kinda posted a youtube thingy about it :O.5 g' ]" N0 G4 H- }
" B a0 m, f; t5 X3 g( d" }# ^
Find this in DPSrv.cpp @ worldserver x/ b8 x: U9 X" e8 Z
1 S6 H- I& U/ K( y, zCode:
b. E( J i/ Yvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
3 }0 b; a2 \. d, a: W3 y{9 @3 r5 B3 U. a5 k& u. X6 v
DWORD nId;% G- e7 R' U5 C
int nPart;# k1 @9 q6 g7 ^: Z: F6 v8 }/ `
" b; H. J5 P4 W4 C ar >> nId;
. u, N( c$ Y1 }6 j$ Q ar >> nPart; 6 ^% A( n& `9 Y
5 ]) g+ w' r/ m: w
if( nPart >= MAX_HUMAN_PARTS ) . _% B$ T0 i+ B2 c
return;9 ]/ p% M7 i6 N; e. R: L
+ t2 ^& j: g5 R5 a, P1 A) e CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 m! P0 D0 [( q, b2 f5 z
! V/ o; m9 x) `$ f5 U7 ?
& S6 O# u$ f1 d, `Code:
5 v9 y( |8 h8 B4 M9 |/ A! L#ifdef __QUGET_SWAP_FIX
, A& w/ n+ k! ]7 t3 @! n: ^1 E+ K0 j+ B* i8 ~% o. M) ]6 I; E4 }, y
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
7 }3 L+ a7 ~7 p! B, l: f: v pUser->SetHitPoint( pUser->GetMaxHitPoint());
! P, c9 {0 G9 }' F8 m+ h
6 s& D# G* Q+ M# R( J0 v+ s if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
( K( H: y5 C1 I pUser->SetManaPoint( pUser->GetMaxManaPoint() );
7 z7 I ?, ~" N7 e& D
3 h* f( x+ F6 x. | if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 n# M7 c) C( f @2 V9 m9 O
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
3 ^5 L6 X' s5 w2 w1 d
4 x( ^9 g7 Y9 {#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp. |/ i; z% g N
and add under& \, d% l0 b% o6 w' ^0 @' t
2 v: d% Q' a* j" k' K& J: i; DCode:$ `4 ?3 m1 B; p
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
' j, i" T9 s8 [ {: r" D7 n3 d1 J
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 );+ ~( y- ], E6 v- Q9 A
}this
7 }8 q6 h$ O6 q6 n6 \! ^ { E8 M# o* G$ C& ^
Code:
5 `3 X$ A, q7 i( O7 V& n#ifdef __QUGET_SWAP_FIX
( e1 Y9 K! P( p, g9 Z if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )9 }. O3 Y9 |. L
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 n, h" Z1 Y0 m; i5 r6 ^: v7 T2 L z, w+ J8 _4 u1 |
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
4 J$ A+ M2 @' f1 e- A/ e pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );2 ?5 Q+ O4 u6 B$ F3 ~, n2 P
# C; H [% Y- s/ S6 O) }
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ). K$ N) q0 H* v1 q
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 M% B; i7 E( @
0 d, N) c* d+ u, [7 r3 K#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 H$ H7 h2 ?; A7 `7 u l2 f. i
7 h. N7 H4 p/ e9 D |
|