|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 8 L! S6 e9 u2 q' |# ?; t
I posted this because someone kinda posted a youtube thingy about it :O.
$ T2 A6 j W5 P& p
: s e' U1 ?5 Y; P+ i& vFind this in DPSrv.cpp @ worldserver
3 i7 @8 }' |' c4 S0 o! x- q2 B1 Z5 t6 x) k7 k! F8 z- ^
Code:/ S3 K% i+ s/ }5 I
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# s; U8 q7 D( V. f! B
{) Y8 m# k9 o) k5 s# r1 D5 L& p
DWORD nId;
. g! [9 p, f4 O6 g$ e0 y1 X8 J int nPart;
! j& n5 m& l0 A, k" h N9 m
5 x$ o1 B ?. g8 T1 y3 A' H! { ar >> nId;
3 d1 {/ H: v5 Y/ P- f2 e+ f! J ar >> nPart; & q, f' |) j. W# m; v; [
3 _7 |" f! r+ A. X5 |% N( Z- y if( nPart >= MAX_HUMAN_PARTS )
1 _# x6 o; R. q; y A return;3 O- I3 v% ?( {1 E; c
' j3 R8 a- x8 ^! a7 i CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
T; C i! ^3 {8 G6 l0 X
! E! q8 q2 \% H3 a/ p8 X |
* N. W. W; c- C3 [1 vCode:
5 V0 G- D4 _2 H5 M! n1 |#ifdef __QUGET_SWAP_FIX
+ z) z4 F4 Q0 A: R3 q: U1 W9 U* b: E- _( U8 ~0 r
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )+ o- @. y/ ^5 O1 R: m% Z# m
pUser->SetHitPoint( pUser->GetMaxHitPoint());
. g/ w l8 @: J. l3 F4 s4 e7 X* V9 _( F; k1 c/ N- L
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )- u$ o8 `) n" c( p
pUser->SetManaPoint( pUser->GetMaxManaPoint() );# Z" G7 N1 w4 Q& |$ H
0 Y7 R% `0 j$ L& g' ]. B if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
% o( _, V+ {0 U. ~2 N' V pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
, }7 l' ?" M. E7 t- @1 ]2 p8 r
$ C. j, h7 E1 d/ d- D3 c& {9 e#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp% S* `# Z7 G/ p
and add under R' m& X: Z% Z f
. e; J8 l1 ]) m1 I4 G
Code:
- z' w2 v0 }2 Pif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
2 d+ T8 _9 ?$ A6 k# _; \ {
2 q1 e, p. S9 T 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 );
: H% W+ P7 K1 I- s8 U4 k5 j }this
# l# ]! G% k# F" o
9 n7 V4 u/ l9 S1 t) A4 VCode:+ q' X& W7 s: v; g# ?* e) A: Z" E
#ifdef __QUGET_SWAP_FIX, M5 L* \8 H6 ~+ r( w1 E2 S
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
5 \! {9 s+ t1 U' f/ h- R, x2 _ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());7 q8 l' `" p) p v; w
6 o7 F9 O& U$ u; j! P5 i! n
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ), r4 p- E( V5 P- t
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% \9 E! `3 K- p5 S6 }
1 s( n+ t- {) `% h# u2 [( u' C
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )9 E" Q* W4 V( O7 v; B2 ~" D2 _& Y
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 m$ Y* [! C. ?, M, `1 E: Z( F) h
" v1 v0 M8 f6 L0 ?, D#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver " F2 g& \0 C* i6 K& w5 r: b: v; K
; z u' h' z. j4 j2 }7 V+ H" D
0 p/ `9 v3 q1 R9 @7 j0 c* x |
|