|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
* q( {3 \ w4 Y, v0 ~( r8 WI posted this because someone kinda posted a youtube thingy about it :O., J4 K# U8 B* i' {2 t
' f9 h6 t( y; {7 [5 M# B, v4 wFind this in DPSrv.cpp @ worldserver
5 {8 r: }- b+ b( b, n- X4 Q3 J3 |
3 H, n) B) g8 Y' \1 a8 gCode:
. Z8 a- q) x1 U. @' c8 ^& h2 q! p- bvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )- c" T+ F# X9 S2 R
{
, {7 S6 a2 P4 e2 b3 b$ } DWORD nId;/ r" g/ M- }. w& Y6 C9 k
int nPart;5 N, u1 D! \% ]+ D5 F% ]
" q; z* D+ c8 Y' n A
ar >> nId;4 h2 {# V4 K( x c, i8 L8 L& Q
ar >> nPart; + {; i3 r/ h* L' H) }/ w% L5 N: ?9 |6 T4 N
6 G# g- ]' f2 M' z; J1 M' N. g if( nPart >= MAX_HUMAN_PARTS )
; g8 D9 M% S. f) V- ~- ^# {$ @ return;
3 {/ b0 |2 I5 y# e5 b/ S l5 O0 e5 o7 m. F5 Q9 e D6 S
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it3 I$ ~+ J0 ^: K# W; f0 d/ G7 f
, D, @' D" Q# q [, b+ d: e2 O& T
; n8 H5 j% B. t( G% c$ JCode:
v7 O: z. o2 _3 b5 t6 N' S, S#ifdef __QUGET_SWAP_FIX1 C e7 `' x; a5 [2 W
) `2 N( c' {6 r2 n8 w0 j; Y
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
' Y% @6 ]$ h' B. z/ `/ W pUser->SetHitPoint( pUser->GetMaxHitPoint());5 h2 Q8 Z! z) u! p6 o# w3 H
0 J2 |: l3 E. l' v- D0 \7 s1 A
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )/ j2 `/ F( I/ U) U0 h# x4 m/ c9 J
pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ E& X0 W: j% D/ e/ G
9 i/ y* x# M( P/ E& v3 @1 F& {! c
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 r( g# t! f( D pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& q" T% s, n! G( c9 V9 ^' {6 W
. Z9 s+ K- O1 F: e$ g0 L% g m#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp% t) S- A) ?, t3 j
and add under! x5 _" w( K/ V+ H. [$ J$ n, T
0 M* y- Q6 h! ] HCode:. T7 Z: t5 D( G3 L4 `4 C/ F
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ): C! N9 X" \2 x& \' L% @
{! }% \8 z3 [0 d5 q
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 );
7 J( i0 y0 W) g }this
) x' \6 R! c* X& x& V
8 x" M7 X* r, u: @+ C* xCode:
. | l, S: A G' l0 ]2 U1 F#ifdef __QUGET_SWAP_FIX
- a- P8 y+ J7 D. M& t if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
3 P |! T) t; z0 b* Z" n8 ] pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 m9 @; S% {0 `9 U. S! ?8 B# x) o& d' S2 b0 G5 D; X& p! `0 ^! f
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 }7 O' P: `; F5 b# x* S, X' i pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
O2 G& }3 p' A* S# y" X
. t' O( l5 b) w9 {) w& H) e if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
1 b4 R/ c; f/ _4 E2 { pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
: F: z* Z, i: Z$ i- o5 c. }( ?( v" Q, u d9 E% }
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
; l1 y( e' x, n5 V0 } G d" {5 I/ R, S: w2 a
4 B8 ?9 v* q8 {; w: ^ |
|