|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
! d- P9 Y/ ]* l/ s* cI posted this because someone kinda posted a youtube thingy about it :O., H! n! R) F# c0 f" V
! ~$ G. x0 \) d! V& }! e5 \3 yFind this in DPSrv.cpp @ worldserver
( Y. y* ]5 w/ L) D! O3 o; J' b3 ?6 |$ I" H, {
Code:# S5 W7 `. |; I( L) [
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 b+ q1 s% R8 F0 p{3 W' F7 o, h5 j# _ w# o& h
DWORD nId;- }0 m6 M8 x0 \6 U- w. f% f
int nPart;: h2 Y# j$ }# E8 J, t
' n* n% m7 z. C/ f d; s0 K4 H% e
ar >> nId;
/ A3 u# C, t, F$ S" G+ m ar >> nPart;
* v8 L0 p, O3 @" G' ^ - F0 w$ z6 {" ~" ^
if( nPart >= MAX_HUMAN_PARTS )
: O: r& D4 M; W" m& L return;" q4 z6 d( L# K# P! F
$ S1 G3 [- `( a2 w" G& @) k2 J4 ]" V CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ h% r* R6 B' N
! H" `( l& e8 {( L) Q' A7 _* X1 q& {" {' a
Code:
5 z; k3 Z% E1 N. Z D, b% |#ifdef __QUGET_SWAP_FIX, R# l6 m8 A' f, ^4 q
' R k& u: E# s- C. v' o if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )# t$ |. G' G" s* ?
pUser->SetHitPoint( pUser->GetMaxHitPoint());' b- Y) e" p8 j1 e. V3 W- ^9 M
7 z1 s; {1 s6 T
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )# |! S! o' x4 p/ T8 g. k3 Z- C- n
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 x$ T! T. b# P* g# c" z/ M. ]- p; `! g) q1 a( @
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
, m9 b+ X$ U+ y/ B4 t$ F9 q pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
* d' J% a- I+ j( e. K7 P1 Z; s& V* |# {" s
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp' Y: g4 s" l8 v5 l/ [) g
and add under
: m9 H, Z: q/ r5 F2 i' _5 A" s
) {' J) Z1 d7 t1 L. ECode:
, m m. {3 L( ]/ O. }( C! f! sif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )- P) s( j: v5 E6 i+ U
{1 ^1 T7 q9 ~* Q% x! o6 k
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 );
, G1 d+ W9 M5 F; T( c; D; y0 Z! E }this
% Y& M- l1 l) a& v/ w6 j. i( M; Q) c( T1 t. }$ `+ {# ?
Code:3 b! Z" E- ~/ e, {0 G7 z
#ifdef __QUGET_SWAP_FIX9 x) |7 n7 m5 m8 J! F+ h
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
3 }% ]$ |8 M' H, F/ } pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
5 d. \; m4 ` @4 t# W: [ a0 f3 D( R9 y1 d" ?5 n
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
$ t u( I, @& I2 @0 Y- s$ F8 ]& ] pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* s/ R* f0 [0 h7 j
0 u5 r+ z N' l( {% R
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )7 {& k# K9 j) o5 E9 S- `9 F
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
( B' T, C, T% A, y; Z- y. x4 y8 a9 A" s. ]% q0 @ Y& ^& @
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ j6 H, A' v$ C0 m' J" l5 q9 M% `9 @, f3 e, D |# Q
* s% \& d! _! F# S% d z- } |
|