|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 6 l/ D/ r" R7 m! h+ c; x; v* \9 h( F
I posted this because someone kinda posted a youtube thingy about it :O.7 R }( B2 x3 x3 I% {
7 x& l( A3 f8 k0 R
Find this in DPSrv.cpp @ worldserver
- V5 @* a! M4 Z W+ C: \: C, Q3 H, i7 M2 v
Code:1 ?$ j; O1 J. A! Z$ Z5 n+ V* N1 D
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )8 Y9 ~/ B- V: b" v; \3 _
{+ U* c1 o& ], ~
DWORD nId;
9 O/ U; V5 p1 v9 W, O) V, [ int nPart;
4 Y) m, l: x4 P$ o" W3 e4 b; c4 T8 ~; a* d- Y8 b
ar >> nId;3 ?4 g8 {7 H/ k3 g& _' l
ar >> nPart;
1 k/ w2 Z6 g% ?! V0 {5 p/ d
, l' W+ f1 e( v if( nPart >= MAX_HUMAN_PARTS )
' C2 B: _, R6 B4 ?1 j6 _ return;; i! p6 Z- |, R' L4 ]. Y6 A
; v3 O$ }6 V) z" e+ u
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ C$ u Z! K4 I$ W2 d+ L
+ ~* `& I L) b
& K4 K: ^. B+ I$ Q2 W. ^; Q# vCode:2 D7 n. l: _ k# D y
#ifdef __QUGET_SWAP_FIX8 d- ^. l s% m" d* J9 a* j
6 |+ r2 D# \0 b# ~2 D, U if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
! c4 s- d4 T" J/ j8 ^0 C: Q% o pUser->SetHitPoint( pUser->GetMaxHitPoint());
- j6 [( J2 g; Y& j" P# [& N
7 q9 R/ X( D6 C s$ Q% z if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
8 c1 \5 l j- s1 G+ z pUser->SetManaPoint( pUser->GetMaxManaPoint() );* \7 R8 k4 c7 `+ x9 B! `% w2 p
( y9 M6 K- {& m: K7 \
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )" Y6 ]+ j8 \6 g) ~' N" n) m' l
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
- @2 h0 f2 ~ x0 H8 t+ y' T$ a% V: m/ ~5 K4 v
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! G; O K% C" land add under! d: s3 c B( V1 I8 o- \
% K, S: A* x9 m" \9 S& mCode:) K4 L# A) H. a5 W" G
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
. X& S+ f2 @) A/ \: u( |0 |6 n% m { y- k$ _$ z# V
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 );4 P E r( x, e& c- r- A
}this
" N, q6 a7 J: C4 Y
8 d$ V9 q* }- G3 s9 ^( SCode:
$ } r& V0 v E3 _+ n2 W#ifdef __QUGET_SWAP_FIX
) M: ~4 w7 [2 \ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )( {% Y$ R2 q+ }. N3 z6 u4 H
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
, @ f2 P, M) c, N! l4 J3 r1 a) ], P5 `
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
8 g; m$ T2 o! t6 o# D; C2 } pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* A* A1 K) ^" i6 {' _
& q8 w: W9 ~' |" Y6 R if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
# t! k [# ^( y# m& O2 }6 ]8 e4 \, ~ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 I% F% E2 J4 F, X$ |0 r7 a# x/ _" p8 ^
3 A" P2 F4 r. ]
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ' W3 b. s* R( K6 n
* |* l9 w( r! d F- z2 G$ u; o A! i. r/ B' Y- u& q
|
|