|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
6 ^9 d1 ^+ o! l0 oI posted this because someone kinda posted a youtube thingy about it :O.) N7 c; B" N/ B" ~+ B5 t7 K" _, s
3 `3 ^# t O+ N2 J) ?Find this in DPSrv.cpp @ worldserver
1 o7 E5 @1 m0 I6 i, B' }( Z+ s2 m6 x- Y) ^- i3 P! _
Code:
' d* w) r# r3 x. _void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 Z: d/ O3 {; B& {
{& J" t9 w5 ?4 Z: E* f/ T* ?+ I( g
DWORD nId;1 i4 `* R3 `) q4 x6 \
int nPart;% r& n6 ~$ ~4 Y' b3 e
- e! t. V6 u* J1 A/ R! S
ar >> nId;
7 r' v% k: v% L7 ` ar >> nPart; . w4 y& I3 h. I' U1 m2 ~' v
, W8 ^4 b" Z6 c- o
if( nPart >= MAX_HUMAN_PARTS )
{& D( V& k' M# L/ ]( Y return;
2 j5 _; h+ M! o+ |" c G3 ]
4 B7 X% U% I3 y$ Q$ v( u CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ `+ o5 i. \( O# Q% ?: f. j# E8 y
6 l) n! D" O) o; J4 T) w2 s4 h" b6 t+ h$ F) {
Code:( _. H3 L0 H0 T5 Y3 q3 c
#ifdef __QUGET_SWAP_FIX
% O0 i' H2 k* p" i) Y; u# n8 T6 q8 M8 [- ^) C
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ): E: R+ l# G4 m" D# f; U7 U" G
pUser->SetHitPoint( pUser->GetMaxHitPoint());7 J" `* `6 e& L- q- ]9 B7 m
: N1 G4 P- t; K4 { if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
+ T& D0 z$ t4 F I" a( L$ I pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 f S! N* J* @0 \, S
- x7 o' w" `" w9 p; Q if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 }4 M# T3 u8 y/ g4 f pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( l4 U* Z6 a0 k K1 j) B' o
: o. S$ g0 O& Y; _# |: @#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; L$ U4 A% A+ c* Y; M0 rand add under6 r6 t- e% w7 E7 Y0 Q/ Z
2 U! I" T( T- L2 q+ p$ ?Code:
) H6 V! {- g4 Z+ T! z: C+ t: gif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
8 u$ K7 a, s5 w2 m& i; t {
0 C1 T2 }' i4 ^+ N: _ g 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 );
0 N' D& Q: p6 @ x" ? p2 G }this+ W. W; { W! S+ t
( s& U5 s7 F% gCode:! ~1 X* L" t" S) K+ b
#ifdef __QUGET_SWAP_FIX
: E l6 g6 Y& J3 d, G) c3 R if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )) d+ U* L" s8 P8 @/ S
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
) `' F7 {5 F0 H. p5 G) j3 ]6 t* `1 `6 Z8 k; G) }
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )4 N5 y9 z7 i2 x' r, z8 `
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );6 b \* w+ Y$ g# u
3 I9 r3 q) n9 U
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )" f8 _0 M! ?& c" a. c
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 S, W. E" `3 G+ B- a6 U1 ?3 a. |- A! H
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
9 `# t3 O; a J' I
r: x5 E! x$ ?7 V; W6 B% W, b6 }% b1 U
|
|