|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
7 ?* n$ } [) i1 LI posted this because someone kinda posted a youtube thingy about it :O.0 {% t9 |( |/ g; G' P0 u5 }
2 L; V4 i4 B' ^
Find this in DPSrv.cpp @ worldserver
0 w2 n. d) p7 t+ M6 [
$ w! M8 p8 o9 \* P! C4 A( RCode:$ t( Y) [: m" p0 D- m
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
5 E5 w) B/ H }{
8 _# S$ D3 t7 O- l DWORD nId;
1 X4 t O8 w9 z- ~$ o0 x& h int nPart;0 C# Q7 Q% X* w; q# Y8 J, W/ A, i; U
0 q0 k( k z& [4 m- E ar >> nId;
. y" i* C9 a! `! L( v ar >> nPart; L4 C( |/ y& L+ q2 k0 i
" n) a1 M1 x' H6 R U6 I, @8 b if( nPart >= MAX_HUMAN_PARTS ) 3 F) L6 T( v B
return; c/ y$ d# L3 z$ V9 r$ ^! w, w9 Y
7 g) w$ v- T9 D; c' b
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it- o! M" _6 a. m. y) a5 N! |$ n7 ?
+ I8 {" b5 j! f- s$ U% h4 [" e6 y! b) k! G
Code:
3 B5 O: K6 o" U2 X#ifdef __QUGET_SWAP_FIX5 C+ }7 f( O6 y- x3 q" r4 `
+ b0 |! R3 p4 {7 N3 }% X; ` if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
8 k" l$ A }1 u$ P1 C pUser->SetHitPoint( pUser->GetMaxHitPoint());
+ z( v* ]+ v% N: d& b3 h6 k7 `% i8 x- H
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
& }5 _* N2 @4 l1 K pUser->SetManaPoint( pUser->GetMaxManaPoint() );
7 D- f# U- |$ s; m/ p7 x! U3 f, d8 {' S* y8 Y* d: S$ U3 x' N
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ). K7 o6 j& c: @8 w N y. x
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );: l% M- M- c2 |: k
5 P4 o9 `( p) C#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 o1 ?& z- X9 m0 X- E
and add under
2 j" t- [; O3 H% k2 L+ L& q; h# M6 L0 H9 ^# }, O+ F. F9 Q# ]0 ^
Code:7 o& _6 E: d6 ]& e3 j
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
; N! v. t9 K7 E+ Y {: }7 v0 J( q3 W; D/ }
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 );" x! R- t J* W* r: {8 W% l
}this
/ v! }( `; I* W/ z2 a: [9 I3 `
, D8 p4 ~& l' j' {, @9 p* ^Code:/ q% }8 J. ^* k0 A. \7 F' |
#ifdef __QUGET_SWAP_FIX& ` I2 [6 ~3 b
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
' n4 c+ I* W( w$ s1 S$ i pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
' \ |- f$ u$ o
! W- s" q3 ^6 j' s6 }1 E if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' m. D+ b4 _, {4 M! I' c( P- x* \" G
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 ~" Q& L( ~3 l- ?
. _& b. \8 U: V4 m# x if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% w; }$ b' X- k# h
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
o) ?5 V, U0 V" h @4 `5 o1 D5 C l; g6 h" C6 y# E
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver + Q& o+ \6 @6 Q# S8 l- P
4 u; l; \' V( @+ z# u
, ^; S4 w5 J! _: R+ Z2 T$ F1 q |
|