|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
8 e3 b+ u1 d$ i* p3 d. b3 a7 i- LI posted this because someone kinda posted a youtube thingy about it :O.
- _: M' D. N7 W6 S; @- D# I# O H T- Z5 ^& e- G6 V9 I% `$ h8 \
Find this in DPSrv.cpp @ worldserver
* a# K1 v$ o& o0 J9 M o0 ^3 T2 n/ u8 h" H) x6 e
Code:
1 h: {. I5 f/ o; l) g* C C2 evoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
3 I8 K' b$ b; f) W$ ~{& t+ u9 i+ A0 r6 L0 ?7 a7 o2 m* q
DWORD nId; J. [! j9 t$ ~6 p) Q0 P6 ]3 I- R2 }
int nPart;
5 ?" F' a& G1 m% B+ R8 ^, E6 }- s3 U2 D1 U& n$ ^
ar >> nId;
# H; r6 Y8 h: s ar >> nPart; , c: S4 y# k* C
! E1 Z3 b) r5 Q5 A+ o5 C" L; g6 u if( nPart >= MAX_HUMAN_PARTS )
6 ^7 t! [3 z4 |2 w# Y return;
* e1 a' X# R. h- S9 J
! j3 s4 T3 k5 p7 q, {7 ^: f$ d$ ] CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, \ F; r" \( ^, Y4 g8 X9 K* v
( b& x; r3 I" A; K
$ c5 p1 M/ Q. Z* o' q2 vCode:) Q( R5 O7 h3 Q4 {7 S- o
#ifdef __QUGET_SWAP_FIX
$ I; g8 U* R1 @, j7 D: E& g7 h1 ]9 N7 Z/ ]
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )- u C; L5 s. R1 d, K9 A
pUser->SetHitPoint( pUser->GetMaxHitPoint());
" h y6 ]) S/ O. B4 K' U/ P3 y, `9 g
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) G2 d: q4 ?9 Q* A0 T5 _, b# k9 p
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
' ^ b$ c( @3 I5 a3 A! L" A' O% x3 M- Z: ]" j8 C) _ j
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
$ w* @ k( T; w @/ T; I pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
7 ` w' ?" D( Z5 {8 D, t
. w! f2 G4 L5 ~, |; {( W& @; N#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp3 j5 M: l/ w1 @3 q. H( T Q2 J
and add under8 D' m6 ^- e ` s4 ?# t
* G8 d! Y. w! n& O& `2 NCode:
8 S1 p- O& U( uif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
- f! }* w2 ~7 c: _9 z& z9 x7 V' D {
' A m* ~( \, a* c4 c7 @ 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 );
6 m1 R0 d: Q. { }this5 H5 Z, w, j. ]! p3 `
3 G4 Y5 O+ [# \( ?
Code:2 l( j5 ~4 I2 b8 [+ l2 M
#ifdef __QUGET_SWAP_FIX' t4 k1 I! e2 r1 E x2 E3 |0 x
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
4 b; S. ]) S( E( D pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ X* k/ t" I$ {( M/ M" _% Y( w, z, z
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
; t x$ c' Q v2 P1 |) z pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" ~* J# v; V& C: L6 m
1 z5 h, t* v' V4 y* U if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
7 `% W! ? ~$ A# u6 l pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );+ H- a6 f5 u" t& f
8 g. ?. v1 E- P3 M* `
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: B1 f9 E" {0 \7 z* q% x( v1 J0 {8 E% k Y7 i# B
" ]3 I; v" G4 W/ |8 [. z
|
|