|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked # M# W" @* F* Z+ G
I posted this because someone kinda posted a youtube thingy about it :O.
! f- E( R% a! h- b( r; d0 Q3 J' g4 G' H# u1 \/ J' F4 O" O
Find this in DPSrv.cpp @ worldserver
* \. P5 {1 H1 k3 z: P( R$ f
; N+ d7 _5 n8 C8 pCode:
. _$ v |. n) P& R+ T/ J3 Uvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )2 n G3 l7 N0 [2 g/ y# y' a# u: ?
{1 [% t& m, x/ s
DWORD nId;' B0 _7 z0 P& W
int nPart;
/ V0 g& G5 r1 r% ~/ o6 J# A
& ]% {: d% m Y ar >> nId;
9 c v0 b$ m6 V. Y5 c6 ~ K0 j ar >> nPart;
9 M G A6 N) L & w3 B8 k6 l o7 {+ }, d
if( nPart >= MAX_HUMAN_PARTS )
9 Z5 F3 g) v3 A, O) ^ y return;
# R! N; d7 ~- J, y
% W3 ?( ]0 s7 |, h CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ M- M' O- E: G: i# E0 Q- F, S
/ N* V& w6 j' B4 \* V& ^1 I3 W/ Z- Z; f4 p' V6 I* ~
Code:
6 [! u8 U) o2 d" e+ s4 g9 u1 C3 F8 A#ifdef __QUGET_SWAP_FIX0 H$ k( J. R2 Q* p
) T# i: z7 q( L/ @$ |# N, |; `) \6 { if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* o5 e: `( _+ h! W$ S9 R ~4 P& o. B
pUser->SetHitPoint( pUser->GetMaxHitPoint());6 [) S) U7 b1 F1 s. I
; S+ e1 x3 z2 O: U) a
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
, d/ g' V k1 S pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 a+ s# g1 y! @" J9 v
% }, J# t9 }* W* S3 O1 b* ^
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
0 H9 h* q5 X, ]$ K7 k" { pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );2 X4 W1 |2 H5 Z/ L0 t! P- ]. x2 b
+ E; |- w9 n) H2 A#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 }3 Y- r" `' m/ w( M, u- G' V
and add under k( z7 A7 f% l: ^6 x% _, u3 A
7 `* \8 Z$ U% K( q! w& JCode:* U" _& ~$ |1 b) y. W2 d$ g
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )3 O. i+ j0 s9 a6 c! m' ]
{! s2 u7 G- |5 _/ F0 T/ 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 );4 L" U i# `0 V% f
}this
- [* r) y& K6 s! O1 h/ H; m+ Y( d' S* P, }2 J. S
Code:
J5 | Z, x3 n6 y8 Y* M#ifdef __QUGET_SWAP_FIX. W) ? v, I2 a
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
4 m1 r$ n" r5 V6 B+ P pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());* O# b! m0 Q F2 O- |
+ U. [8 e% S4 _, G+ J6 w if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )3 }( O1 K' ~! `/ M6 P
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
: q5 g8 ~; k1 m5 @! I3 _
" D e# q, Z4 _ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ); E. c8 F! r/ @/ t
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
7 W% Z: |0 t8 l9 X3 g
, P9 j+ @: @# n* {% P5 Z* o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
3 ^+ q3 E2 I- B9 @
0 l; w3 i! Y& D J0 q
' Z. P" g' B0 ^) V |
|