|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' V2 u' @- q xI posted this because someone kinda posted a youtube thingy about it :O.% u, B( R" D5 C# I, e. X
+ G C6 C9 o9 E% lFind this in DPSrv.cpp @ worldserver
: b5 w8 _; i- e# N$ B, Q K: q: _, x
$ \: H1 q9 g) r) [0 u5 hCode:5 b0 P8 p5 \' R7 }: M# q7 z6 h+ ?
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )4 \. r. P) @/ S# V: G9 {/ g
{
3 B- q9 q2 i I DWORD nId;
4 m2 {6 g; M4 [. ^9 G4 w9 f9 ^; B int nPart;% Q! w) p1 N6 z/ L+ U U
/ Y2 J8 e1 L1 K' |! D" R. Q# H ar >> nId;
# `8 m2 D" N; H2 q) c) Q ar >> nPart;
2 P3 O( V3 Y8 Q0 W8 M- X s4 t
5 S6 y& ?) g! a+ i( U3 W5 a- u if( nPart >= MAX_HUMAN_PARTS ) / q$ f* k( |6 Q9 U2 |& j3 [8 j
return;
6 N( C1 X8 Z6 e7 a. N" I6 Q9 _+ @# t
( y- S# N5 J- w' m CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it% o8 m9 ]5 @3 x; y. q6 I
0 H( T9 E7 e2 s) G
& T* J& l; O0 `* x7 _; yCode:. e# ]( Z0 ^% E7 y
#ifdef __QUGET_SWAP_FIX4 F& t0 J8 o9 Y5 D. \
! R9 \4 k6 L( [2 e
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )2 r: N: o8 B6 ?$ A' F" U- G
pUser->SetHitPoint( pUser->GetMaxHitPoint());
' _* m6 \3 n4 s% z8 E
/ |5 h% g# A* m E* C3 E, n if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )- @1 q7 `( o/ a/ V
pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 s: Q0 L. z& ?6 W8 G) f6 h* {
* ?; C4 c) f3 H3 ~& [+ K& }& C if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )& B9 d0 j9 X9 b Q
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 f( c5 Q5 N K, L
8 k' P& r! S4 A2 D$ p
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( e' y9 O( r1 s1 s( F* ?9 @0 q' Uand add under2 ~9 [' c3 K3 x, P. y- B3 Z+ D
9 r: Y8 C6 b% m- F3 m
Code:* W7 p0 p- W3 x; P
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
( P5 V& H- y0 }# W/ ?, ?7 T3 B {3 u% A) M# N& W N. t
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 );
, {3 Z7 J3 z e$ Y% { }this" u' R( W% d8 I! Z6 K. l7 l
$ S7 Z3 p2 b1 ~# j7 ~) q* `Code:
; ~ w* [# x/ X8 I* L#ifdef __QUGET_SWAP_FIX$ ^1 l/ H/ ~# |4 \6 B. T- g
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
" H" A4 r7 p. R' Q pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());8 C" s7 ]! s6 w! a
) _! i, V$ Z: s9 I7 e9 ~' X
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )- A' b; k8 `- b7 m: _! v
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* }" R' c1 E. {* M& ?
$ r7 x8 a& g. m5 S/ k if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
3 Q O" z- |# q% b F7 ` pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# _" S( ~9 ^" \2 Z% }6 T+ ]# W1 f. }2 T+ M# |" m
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 6 U' X8 @3 G5 x6 e7 l, Y
$ Y8 N/ T! M% f# t9 O2 |* ]2 h! G/ F0 i+ t. R6 w: b
|
|