|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
0 K: M+ Q+ b3 t( [* l" ~' o9 FI posted this because someone kinda posted a youtube thingy about it :O.9 ?8 s& G( C: X G- B- j5 L
X, r( u1 T8 j, f% U5 \' U, q) tFind this in DPSrv.cpp @ worldserver8 Q5 N6 L2 o! e/ U0 j r6 s1 e3 e* n
7 |9 p- q; B; E) h1 `8 o( a3 HCode:
V3 l. b7 m4 }" B6 ?void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 x! d5 L2 ?. f7 W# i
{' L; ]. f, u& ]2 X
DWORD nId;. K, N6 G% u: J6 q, D
int nPart;$ d8 ^! |8 J$ z
) J1 {: { `- v- y3 t9 o
ar >> nId;+ [8 C9 t6 |4 k" B8 K
ar >> nPart;
- N) e7 ^# E2 ]; n
( s) v% Q* |; T" ] if( nPart >= MAX_HUMAN_PARTS )
' w# o, t I# q, d return;# _3 v5 ?4 f$ W
# z! `2 h$ v/ u+ A CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it$ O. |! A: ^2 `6 A8 h
: O( i: f, N) A1 i' M0 ^
$ E( @2 z8 f/ L; @% t# z9 M
Code:0 V2 p% G8 o. y: O/ g
#ifdef __QUGET_SWAP_FIX3 b% a8 e0 {% R
, q8 g( V9 b6 t! l; A a
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )# n, o& x$ h/ S3 b7 B& ~; U; q
pUser->SetHitPoint( pUser->GetMaxHitPoint());/ v; E0 X9 Y& _0 U0 V3 _
% R3 u/ v3 I. Y" P) u! `# K
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ). S1 R; K+ v! ?* H' b% O5 m
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
6 a1 i( ?6 l8 ~- \" P0 G1 O4 |" h& l; z. t
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
' F1 |( r0 c1 d& R) c7 d2 u' @* E pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ A; ?: Z* O" e; w2 L# ?7 S7 y6 m% @2 @/ u/ D3 i9 ?
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp6 x* Z: N$ w! _1 s. o- v) w9 w
and add under
: H4 D8 W9 ?& \! T! S; u0 h2 ~0 k, u' Q+ K/ T7 F
Code:5 c2 W' N7 z" c6 c+ { q3 X
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 c$ X/ L* b$ ?6 Z
{( B, U) v w0 x; h, i! _* N( w
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 );4 [ N& z: P+ f. k8 k: s$ S
}this& _: T+ s* ^. J0 W& e! T2 q
4 r n- S, r, R1 ?& [# r, j0 J
Code:
7 H! L. s8 k+ U; T1 m/ [( K#ifdef __QUGET_SWAP_FIX
3 s0 _4 I8 f9 d4 S3 L if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 E3 [' e, ~& e& s' G
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 O& M# n; u8 c5 S. _, p% S
- C2 J3 e& u5 S
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )# k7 t- H% w& ]$ p, s' b! z
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* I, c" o. S) H3 |' I
" ^3 [ |+ Q' A+ x$ B! ]$ w if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
( i9 t" s' Y( Z6 [3 g/ \6 Z pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );, ^$ Y: p# y7 ~$ A
+ p5 n; ~% Q: q% u% J% R* ~5 L#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
- _, d7 b4 P! s5 Y4 ?' e. o/ h) a0 d
& Z T! i1 A5 W4 [' g: m I) a( u |
|