|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
8 E+ d) h- ^- ^; VI posted this because someone kinda posted a youtube thingy about it :O., m7 l ~$ e, v/ c6 c1 C2 @1 n
0 z. w A6 J! i" CFind this in DPSrv.cpp @ worldserver4 L8 o: v# i: _, g! P6 r
O1 K4 @2 b: F1 H) b8 M; N2 A7 MCode:
+ H$ Q# t; G2 N# R0 mvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* X! T) w( I8 u" E7 F% c
{' ]3 `3 l- z z% l2 v, n4 d7 G
DWORD nId;
4 ?7 z/ X6 X. h1 u. [3 } int nPart;
$ d) K: g" B, s: F7 I. l/ w) D* E0 B
ar >> nId;
- x! F3 v) ^( U6 X9 E' b# V8 \, i ar >> nPart; 3 T+ v1 f$ D% I. v2 G" G
- s: {, w) p+ J g! D
if( nPart >= MAX_HUMAN_PARTS ) 2 H# o: S, @9 U- j a z
return;
, r! I( g! C# Z0 z1 v5 ~/ c) A% k; x$ O
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it5 `7 K/ V y" V r; B) U+ z
" ]3 e* s/ E& D$ n# u% e2 y& ?( x
3 ]7 h1 Q8 m: n3 L4 U9 x- OCode:, u* J3 I7 f8 x
#ifdef __QUGET_SWAP_FIX$ h! j7 d" F4 H! c4 s
2 E) P- r3 y0 \# R
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )4 Q* v) \9 w2 n+ M7 v
pUser->SetHitPoint( pUser->GetMaxHitPoint());; }! `1 G. E2 s: d
: `+ o- E# W. D! z$ s9 Q# T
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
1 O( W' q0 x9 K9 Y& C0 V* D2 P pUser->SetManaPoint( pUser->GetMaxManaPoint() );
& M( {/ i, X& b; O& T( J8 r1 T1 M0 T& V2 o( n
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ). V# S, E3 H' f3 m+ o. f, ^
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% G- h6 S+ H4 M! u
# Y6 }5 d* f+ f' M3 Y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp9 h9 w: m6 I! g9 R$ T- [9 e
and add under
' H. C. d( }8 V$ n
& g& _/ e1 m. `! z: `6 pCode:
' I3 D) W1 h+ q$ B4 {0 |if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 Y! W/ s$ C5 p& n {2 T I9 b0 `3 _" Q; N8 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 );( Q/ Z- o- N8 A
}this
- z; I1 Z# J7 v6 |* _9 v" S5 C- G: b7 e9 g, q" A. F
Code:
0 h) Q: A0 w! h1 r6 P/ P: R4 b" G#ifdef __QUGET_SWAP_FIX9 `& Y! K: Z& ]
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
5 s+ s7 }- s8 T, C3 I' K pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());) f+ K, s' r3 Z& ]6 B
* ?; \) w7 _# g8 y$ k
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
* F0 i; M& c" @ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
9 a2 m& D# F0 [( x. g+ ] o% ^# Z3 R( R0 ~
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
! |: k$ Q0 X) C* }* C o6 m pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
& ^ C2 a, D% Q1 w, U; h4 `' T0 ~0 t8 [
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# V! o( g; T' X4 G: y6 w: t1 V& T- J ^4 ~+ g
( }( h8 d' l) ]: H
|
|