|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked % d' G+ M9 d# z5 X& I T8 m4 a
I posted this because someone kinda posted a youtube thingy about it :O.$ Y8 m8 l; L' }! z. H! H% R F
( Z* e) I! S- ~5 t" c5 W/ TFind this in DPSrv.cpp @ worldserver
8 B0 v, N6 B ?9 Z
- S I) V& g9 u& m3 WCode:
2 a$ h/ I! Z9 d7 svoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 a' X; u3 Z5 q q& c
{
K( R" z& d; Y7 I% N DWORD nId;3 n! z* f/ I: ~) t6 [5 V0 b
int nPart;9 v+ o3 x+ B( p
% f* }1 U. R$ F, _2 s9 g$ P. d+ z
ar >> nId;
. }2 Q: R) p$ w' B ar >> nPart; / r& e) q7 f6 i. f( y" B( _& G
1 }1 |/ h% n* N9 B+ ?
if( nPart >= MAX_HUMAN_PARTS )
) @& ^& E6 i+ E, J return;3 S- F0 w. F4 J0 A0 g0 @
# P; P6 X" {" h5 S: J, s
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
: X/ K1 f2 i4 X5 F# W. ~# J" X4 m+ h5 _" `$ Y5 [
8 k5 Z/ G* ` `
Code:3 o" Q# H$ W( F% u& k$ Z+ C5 I5 {
#ifdef __QUGET_SWAP_FIX
( Q5 O4 k7 Y" l* x
% \+ y+ ^3 G" n if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
' l1 o2 Z. ^0 ]" w pUser->SetHitPoint( pUser->GetMaxHitPoint());1 Z0 @; y" S$ U4 `/ l
# H4 Y2 y5 ?2 c- y. u& @' V* [ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! F6 K; ] {$ L% f0 D3 F
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
1 `' A7 d0 F/ ^. J! G4 o) k$ l1 x3 r8 D
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
+ n1 n: o a( p% |/ | pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );- u" |: W9 e9 k9 u+ K, \) N
7 O% a g9 {: M) B: h6 ?: O1 T5 a6 _
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, ]& N) L3 s4 ~and add under& g% n0 t5 h, A; K+ A8 Z
' b. W! F. e( `( Y% ^4 i4 r
Code:
( ?# L9 x! N( w) o. i* Y5 O- R' ^if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
8 \+ T. B. j4 q6 f: A/ F& V {
+ m, d$ ?. f4 ^' Z1 K# J9 x 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 P4 \6 N; [, I% e7 q }this
$ m; P* r' ]9 q: |
+ N: q* U8 P) d# O" z7 c5 y. _1 i- l8 QCode:
7 d4 m+ J) O. i5 t8 B#ifdef __QUGET_SWAP_FIX
5 L0 O* ]2 y( ]4 B; m1 x" b6 ] if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ). ?. b# j1 ~- i, W
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 t8 Q2 x8 p" m# x4 B9 g! t: r, i5 X& ]6 _" K8 i% I' j3 J: W5 F
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): z j, I: X* Y! b
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 }) w" ]' D% ^* I5 _6 P8 Z- C% @
3 k! \$ M G' p2 q# `0 j if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )) B( ?* P% c1 ^) ~3 D; n+ g
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
0 I h4 V% N4 q' z
9 Z: e3 A# [& }+ }. u' l+ }- z) F#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* v5 o4 [2 K6 ^( u+ b
" q6 b4 y- y: D* |8 I8 ^; N/ M6 q
|
|