|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
) @& r6 O& \8 i9 }2 j; u( J$ d5 j0 E- H1 NI posted this because someone kinda posted a youtube thingy about it :O.
( L* p& I) m4 u- e" P3 p0 C& g
7 V: F& Y( d1 W5 F% f2 RFind this in DPSrv.cpp @ worldserver# H& H! Y7 A' f
: |" u Q }0 f& p0 e% m; C; kCode:1 _: q( F# h9 L( H# A) y( V
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 F) u1 @1 S3 F. ` r i+ E{% \" {1 \) G) ~& q! y, ^
DWORD nId;
" x, o) w4 }, B4 m int nPart;( E8 ~) g: l3 I9 ?4 d( f6 w2 ~! D
7 d( {* A4 d3 y! K1 ` ar >> nId;( Q& z0 x2 l$ C6 ?4 f0 R
ar >> nPart;
5 Y5 m+ E" D2 `$ [ 5 `: @! Y+ M3 F9 l: t) k
if( nPart >= MAX_HUMAN_PARTS ) ( Y2 c" j0 l$ ], L$ k: w& n2 E- L
return;+ {$ n) ]1 `) u
% c+ k6 q. P) L; k
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 u/ K8 u1 x, v' g3 W' U6 H0 I
- W9 f7 N; ~% V
/ t6 L0 N2 q- e3 F6 J/ oCode:8 Z/ c$ v8 D# x N& u
#ifdef __QUGET_SWAP_FIX
9 u) g+ D+ b, e' H. r
! o! R' Y% w) u/ k8 U if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )& }0 t+ g+ q8 X0 K* d
pUser->SetHitPoint( pUser->GetMaxHitPoint());7 d" a/ ?/ z% Z
7 `# m Q/ x. l; B
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ), X& Q& l6 ~. T
pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ s$ S/ o: ?/ d. R
O* ]. [$ P$ N F if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )8 h4 o L/ G9 G' U$ g( Q$ P
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );- z j/ } D* C
4 P/ k }# e7 h#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* A* j* p2 M- P: k& r2 W S* P
and add under
# ^ a) Y9 b. n u7 v& N. F+ `: ?' O+ U$ W% `/ p* K& H
Code:$ j+ c1 M- C+ _4 Z+ l& N/ H
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ); M: }2 }+ z8 V# R. V+ I4 Q
{
2 X8 a* j$ b0 A 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 );; w H$ C0 L/ } {8 D
}this0 d8 C: [2 W) S
# y. D+ y* p4 m. {8 n ~Code:
L0 T0 Q4 I' W) G# x# r#ifdef __QUGET_SWAP_FIX0 a: U4 e7 M B. n
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )! |1 \, g0 u' d
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& {$ O8 f* e2 c; H s4 ?
" _" g" m+ g" C; T4 f
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
, c+ R# \1 H; }+ n pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
2 j! c2 e) Z. u" R4 ?' Y5 [& X' w7 A4 F* c9 a/ A
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ): K& c' k" J7 S1 H
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ H/ H# C3 J, J" w
: A% x" v( x: K5 @$ {# r; h#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# x' m; `! m" ?' X
! z( {. k# E, x( K! A: I- W/ r; I7 f) a3 I1 s2 u
|
|