|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
1 C* C+ X: D5 }I posted this because someone kinda posted a youtube thingy about it :O.& J9 b, q5 n8 M' |9 L' ~- \6 u6 w
( _+ z: j- r5 b% w
Find this in DPSrv.cpp @ worldserver" c N8 }, n6 Y; J! U( X/ G
. P' C' E2 t2 a7 H
Code:7 t% I5 R5 }! q* ^( L' i0 L( v
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 h/ X% r6 k9 G1 I# h; `{5 a7 B. t; p8 N* N$ [0 a2 R
DWORD nId;. ?2 C: S* o1 @; Q7 j7 j+ x0 [
int nPart;
' K6 C& s( V3 U; j! m+ ~* P1 O0 l
ar >> nId;
! c$ W4 ]0 e- z) Z: P) r ar >> nPart; * D8 V( u/ |6 m+ @0 }
/ ?! j' ^% t; a, Q! M
if( nPart >= MAX_HUMAN_PARTS )
! j+ u7 L) k: x/ A6 \$ W7 | return;/ f4 E! h$ I: b: H) [ `/ E/ T
6 f4 M' \5 c& g% z8 d
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it( B$ E5 T' g( ~2 z, |
) C. o# Y. x2 N4 p5 q! Q/ H# A2 I! u* y$ a. G
Code:
- q! c g$ }; b( v& v#ifdef __QUGET_SWAP_FIX
& Z0 O& X+ B- F$ }1 w
/ H ^; f Q& {: R8 t& v5 o* P if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ z4 n' R, \4 t6 ^5 C2 ^2 h2 @
pUser->SetHitPoint( pUser->GetMaxHitPoint());
* r* F5 x4 V" C9 ^1 E. D% V
' g. u2 z' E/ d% O if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
& i Q! R, |4 t Z) I3 |5 w pUser->SetManaPoint( pUser->GetMaxManaPoint() );
0 ~% S8 c8 w7 a3 ^3 o) s* f p
0 N7 \- Q Y: C; v! w9 V if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )! P1 V- A2 M2 M, Q
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 ]. v6 Y+ ^! _8 ^
* K( i- T' P# O u0 T& o7 ]& c0 g* n#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 ` l$ z( o" f4 }
and add under- O3 {2 O9 {" ?2 j5 `( P
# R8 B4 X i" S# R. m4 C1 R
Code:
* F9 w, }1 @4 `- q( ~if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )7 x( ^. k5 p5 o9 } B
{8 {7 ~7 }* I' d! S, B" G8 p2 M; 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 );
3 p8 D" E4 W2 a X }this' W6 ?' @7 `. B) j \. w5 Q, c
4 }1 H+ a5 A' L# c% BCode:3 T; k% i9 f k5 @/ D8 q4 C5 ?* L8 M
#ifdef __QUGET_SWAP_FIX
& P# t! E: O. k if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 L$ v6 ], y+ C
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
5 @0 v. ~4 e; [4 g% K$ @' B
& g# Z( ]7 g% p6 b if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
- O- [2 O* H% ^6 C h pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& F3 V' U4 M5 ]2 H {5 R' Y+ d4 S- R9 z
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
; E: J- K8 G# Y% w$ O& }1 r pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );+ h+ Z ^7 n7 l4 H* S
; ] Q1 u2 E: N. v
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
) j/ E$ A" h% D9 O
; n' {7 G% O8 z& z5 L* H2 ?1 S; }; I3 U: R/ U f T G: ~) t
|
|