|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
) n. b- a3 X7 l/ E$ V. JI posted this because someone kinda posted a youtube thingy about it :O.- l) l0 @' q$ G$ Y0 f& z4 Z
7 v+ Z8 V2 g3 s* N# a/ Y- B
Find this in DPSrv.cpp @ worldserver
1 o) F; s+ w4 q4 |7 p- }9 R3 h" x
Code:. ^: O. Z y7 K! u" A- T3 _
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 s% _8 W2 L8 x; w% B. [
{- d8 v0 Q) k8 `1 e6 a ^
DWORD nId;5 s; T2 n. @ t+ w) s3 P
int nPart;
8 K8 D$ }4 o: i, Q \3 I' I0 M" U. E" V" @5 r0 K2 G+ C0 m- W
ar >> nId;4 O' c' x, U4 N+ [/ v
ar >> nPart;
" W4 @ j! d2 A/ j+ G- w0 E
3 M& p/ @, o% f/ t if( nPart >= MAX_HUMAN_PARTS )
; o3 R$ f" E8 a return;6 X8 j2 A6 O- {& Q7 L0 f
, D0 l- O6 _* K# |, j9 ` CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it, e; l, ~; B5 Q% Y% ^9 l1 K
( S) Z" A" R& J2 v2 Z
2 j/ t+ e$ c0 ]0 u, t2 T4 ~Code:
7 ^5 y$ m6 d" x! B1 z6 d* V1 P#ifdef __QUGET_SWAP_FIX
! S4 S* ~ R" q. K, w* d
' D; ]1 E+ M+ V% Y0 ~% j if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )( X; [' S- M2 g' v- [8 y1 i, r
pUser->SetHitPoint( pUser->GetMaxHitPoint());
( q7 D8 U7 T: v0 P# L6 }; C% T" ]( S" n2 x, d4 s' F- l
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )1 t8 u% B, H, P
pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 }+ T; Z/ n4 L( g
' f8 L5 ~8 x( A% w+ M" l8 ? if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ). T; J6 P/ Z4 r) i3 y3 c+ z
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& {+ h+ x0 b; b! J2 Q7 }* G! z' V. F- ~# }5 t1 t
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
9 H/ u) G0 _& g: A4 Hand add under0 w7 C; J2 E7 q
\! G. u/ o: C+ VCode:
! D* Z) t- f4 ?if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 Z O1 O, J. k) a0 b, c {* v8 C8 N5 ^0 N3 G0 J7 Y
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 );
m! G a. w6 W3 Y0 k P' F }this
& l% X7 T3 U7 k& r3 _) i: s$ K# X. a
Code:
8 t) b. J* B* [3 P#ifdef __QUGET_SWAP_FIX
8 n, D ^; F( A1 w1 D' r if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )' r# g l) ~2 X" ]# d7 z. q$ ^
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
; ]' `3 d3 W; a# Z
" v' e( u: Q) t. s if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
. ~. y6 {( V. h6 T pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );4 ]3 _. [. H& f6 U% F9 [
; Q( Y" y* I8 s9 f& j+ Q! } if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )( D3 `1 K7 o8 I a' \6 e
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) i o1 w" H1 H+ {. b
* i' j) E2 |2 @; M
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
! u n) A, S; P
8 n+ C9 }7 u4 `: ]1 F2 w% M$ O3 A
7 L* G# D: r, z+ H: L |
|