|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked . g6 y8 [9 H x9 z& e
I posted this because someone kinda posted a youtube thingy about it :O.* R4 p9 I/ ~( P3 Y* f2 D
; W1 ^( K) a8 c, zFind this in DPSrv.cpp @ worldserver
$ X9 i) ^8 w: Q, O- b2 s* A( m$ b- D& M5 X
Code:
% ?1 D) r& @% e+ Q1 qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )8 x, c: w6 @7 {* {6 a
{
+ m& M$ l: S! I. j& d. J DWORD nId;0 [' X; K! H& |
int nPart;
! C+ G0 [) W) x4 n3 _( K$ Z+ Y( w
: @& s* x0 W7 F/ Q2 C% J% x2 ^ ar >> nId;# }# n9 X+ w. V5 [' t7 I: A
ar >> nPart;
/ `- |8 U* N9 g/ a 5 K4 T3 d0 Y9 K/ l* o& G9 J& u( b% Y
if( nPart >= MAX_HUMAN_PARTS ) : q$ y' \& P( d& A. J
return;/ Y3 D3 n# i# [
5 ^ ]! g- @; O
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it ?( \) _0 N/ v7 j3 G7 z8 r
8 D: m* p. u- T( Y; j9 l" ~; T
3 J4 X( C6 h8 N0 O% pCode:. P- O! K* \' l( B
#ifdef __QUGET_SWAP_FIX
- g( d z0 Q. f1 D6 z" v; r6 Q& o/ Y3 ^1 g/ ?- q% F& I& b; k$ s9 ]
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
2 p9 Y3 e$ l S% |( r pUser->SetHitPoint( pUser->GetMaxHitPoint());
0 `7 Z/ O' n( m$ G, v9 W# P
: n- i4 k& Z- ~3 S if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
% ?- }5 c; T# o: T pUser->SetManaPoint( pUser->GetMaxManaPoint() );) [8 O" \$ v" k
6 G8 o8 C' r7 [# y" y! r if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( i& i9 X' H: ^8 _2 y pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 m0 d% `1 ?: Q: @8 z ^- k a3 P& q; Q
8 g( c5 o4 R8 a! {7 ]: v" e% U
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
2 s# p8 y0 e# g* t1 xand add under0 H( a1 m. M3 `* S3 f, G$ u
+ h8 _4 K! N: X+ B* b1 @; |
Code:
; Z9 x0 H. w+ ?, W* t, uif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 m4 s7 v) Y1 p& T {3 R, f( [& }( @5 |) S/ U J
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 );: `2 V) r6 M; J9 p! }$ D
}this
! Q: E8 w/ o& \0 m
( d, ]6 Z; c1 [3 I1 iCode:. J7 T8 b" ^9 b) w) ]
#ifdef __QUGET_SWAP_FIX/ i6 n5 d5 @' \9 |% A
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )7 z) u9 K3 [5 O5 [7 u, O
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- ? _( {! y6 a, w
: g* E3 `) C! [- V. g
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )0 v& z! j; V: S
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
3 A Q) M( V6 _/ J2 I8 T% _/ o5 [0 e4 V
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ): D m+ C7 B9 t
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 E0 B* d5 d a, o; T2 `# K
9 M' v) O& {5 X, N% C2 _# k9 p#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
8 j5 b; i2 `: Q( v$ A. j1 X8 c
+ c8 W- y% c, m2 o2 w$ T( r, J- d% t% {7 M% O- @# [
|
|