|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 4 \( _& ^- R7 L
I posted this because someone kinda posted a youtube thingy about it :O.+ t+ q1 K f! o$ ~" P
6 _: j! {4 o5 i& i1 F1 y, K
Find this in DPSrv.cpp @ worldserver$ [: F5 f& U$ c0 T7 T2 I
8 X6 w3 `- r3 }$ |3 fCode:
$ Z: _( P' q8 {& V9 }void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )2 A6 g/ L# n; Q6 i9 X. O" {5 |+ w
{
0 C1 P; v% Q: c% O/ R5 L5 {# u! \& { DWORD nId;
4 G E3 E) A# W" ^ I int nPart;, q. B' c7 W. {2 a0 g( K, S* p
9 B7 [4 G2 s- Q
ar >> nId;! i7 c$ v; T/ |/ h; I
ar >> nPart; 7 i+ y# {- r$ A( X A- ]) w
, ]9 b* V8 D% R) f( C j& H3 ] if( nPart >= MAX_HUMAN_PARTS ) & G2 T4 b' A8 d* ?' h2 x& A6 j
return;% V3 c' A/ m" j$ s7 @
+ t5 `" b3 x! q* |6 w' |, d CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
/ G0 w: ]0 @! u9 D0 I$ ~7 k
# H/ I6 W8 e2 `" E' ?0 v; j" U2 @- Q5 l0 b) n
Code:0 ]0 H5 E3 M5 H; m: N) K; O
#ifdef __QUGET_SWAP_FIX" V% O7 n, Z% N) J- b
" w- n8 D. d& e) P" U if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
z" Q) G. _/ ?3 r4 i0 P pUser->SetHitPoint( pUser->GetMaxHitPoint());
* c+ O7 [. x( ]2 ?/ r% I- J/ U8 H) l1 |7 C. m ^
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! T; [& q+ P3 H4 j: a- r, f
pUser->SetManaPoint( pUser->GetMaxManaPoint() );4 P2 h+ u1 `% A$ w
# C, b" `) U( R if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
" P. D# A5 b$ F1 ] pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );+ o. n* o! k; I5 D; D" H3 e/ C' Z
+ M' f9 Y, _$ ?* F# U9 N
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ G9 X* Q" A! r& [. D% R7 z
and add under# Q/ h! d' T; s3 z5 _! j2 l$ l' z6 C
: h L6 d9 n# z' U1 jCode:
- s1 n6 i# S( Vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 h1 H& s2 I! n1 H3 _, y9 P' Z
{
* z7 m) D2 M& [) j7 t M 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 );
2 d7 o6 L1 I2 ]# a+ |. i3 z }this
: y" ~! E% F2 e9 \$ u" G* G
6 P* @3 U7 _& d+ r' s j9 R- gCode:
, e0 [2 p. w1 x. r# M! a1 w: [7 `#ifdef __QUGET_SWAP_FIX
9 u/ O# |9 f" h/ q5 [9 Z if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
( j1 }( ^) F& d; i% ]0 C pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 c1 d. _1 v0 L$ C
+ j: P' `( z: I5 t; n" F
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( {7 a) ]9 t) j7 G pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
0 b+ B$ j1 O9 U" I8 e$ E& M$ ], S
/ n+ V' [. [% Q; E9 S if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
) K4 Y: @# N0 ~, P9 ^0 J pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
" Q1 L1 k, C4 u) h: N6 w: N6 A1 n! [2 T" s2 [/ ~$ F. K
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
" g$ c. N- f$ z0 q4 V& x1 t# T2 M2 u% ?' T W+ o+ X0 G' `- y6 C
1 x8 D2 r: I& C9 H8 t* F
|
|