|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
4 B& F% T6 U8 J: p; DI posted this because someone kinda posted a youtube thingy about it :O.! `! c9 ^( k- ?, s% q
4 h, d/ A- N% b9 v! e% G, a. [Find this in DPSrv.cpp @ worldserver
& p' W4 n1 G: v7 U% i; G
Q" u9 W4 H! dCode:4 F3 x3 z# Y4 @$ h: J
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 |/ v+ @$ o* f6 F5 [
{$ z5 B& x1 i2 v) i2 k
DWORD nId;
3 h# j8 l9 f1 k9 R int nPart;
3 ? l9 |0 a' ]3 C
5 y7 F/ m/ O' b7 ~: r ar >> nId;
, V( I& J2 Q- }/ t1 S. n ar >> nPart; * S G3 H+ z0 h6 P+ N! v$ E
! A- e- a9 `* L
if( nPart >= MAX_HUMAN_PARTS )
' K& l0 L- a, G5 V- n( u return;% [- g; C5 O1 {% ?) p
8 V1 W; n0 Y9 h( Q7 H2 G
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& ~* A4 w0 S/ |+ \( a6 B2 ~1 j/ n+ B5 c; V4 |
& U( R/ n2 @2 }Code:$ D$ I, L) b0 q
#ifdef __QUGET_SWAP_FIX
% w9 L( P# p9 s7 b# f# R* m/ A9 V* P
+ ?5 ]: ?/ P7 j3 y+ n6 m if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )$ b& M" e+ b2 c$ i
pUser->SetHitPoint( pUser->GetMaxHitPoint());
( y7 w- T Z: L- x' j7 x
+ w7 R8 K; ~8 \6 o if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ): o% }3 q& T5 F2 V, r" s) ?
pUser->SetManaPoint( pUser->GetMaxManaPoint() );/ ~3 N6 [# D5 z- I" `: o& U
! t2 e& O: }" S( f if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
& x6 X9 O( h" a* h$ `1 u pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ C$ d! `8 n h) _# [( z2 x0 `/ O
7 i$ h! C2 J% c. `# ~3 c' P- R#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 Y4 l$ P7 q1 I$ g
and add under1 V% ~$ N6 L0 W0 |
0 i( ]* G z8 x) n: }
Code:$ I: B @$ t+ F$ I
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ): R* W1 M% P+ o* m; J$ y0 g
{$ |) v; V, n$ A7 F+ r
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 );. d1 B8 E0 w4 H) ]$ ^8 V
}this! L/ t# d9 e1 C+ F8 {7 z9 k
3 {" M& g' r: A/ p* ?
Code:/ s- `- B3 z0 P& i5 ?
#ifdef __QUGET_SWAP_FIX
/ K* s8 C1 n! ^$ ? if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
|0 G- M" s( |, w pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 x4 ~+ V+ F- ?0 d3 F
8 a0 k# H# v0 z3 \4 x if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
7 v, W1 @- I( F O% s pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& r0 Z8 n! B, i% B9 p
1 P* k" g4 M& V& E% N if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
8 A# r2 ^) }. m8 M pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) C* ^! ]. I. m; f9 u, J& g
2 c' K2 u% E" _- u2 i& c/ y/ v) t" Z#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 L! C, L* y; O. G& ?* K4 V8 K- m. A* S* y/ F) \3 N2 {
9 T5 a+ u& x: o! X |
|