|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked : i/ d4 `& c7 b% Q" [% ?. O2 I2 m
I posted this because someone kinda posted a youtube thingy about it :O.
* y/ L1 O9 b; R1 ` `/ _4 x( y+ U \( E; \. I5 s0 g6 s- Z
Find this in DPSrv.cpp @ worldserver' n: O$ ~! i! E
1 a" ?- ~- [8 \" ^% }Code:
- `+ V5 C/ H- T) p! N- X4 j/ L4 }5 gvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )- D8 a% u% H3 ]& ]# z* C
{
. }5 ^# j4 A) [9 G$ ~% d3 B5 C5 L DWORD nId;! j: _1 e, v4 m5 R5 Y8 k4 u
int nPart;
1 ~% r7 K$ Q% y& S: b+ ~2 E
( f5 o& A3 G+ l& e) f ar >> nId;! m; x+ d# ?5 u% I' H8 O
ar >> nPart; ; l9 r; k- b. p) Y( s$ t
0 p2 a, C# F8 z# F
if( nPart >= MAX_HUMAN_PARTS )
9 _8 u" [$ e: [: ~ return;
4 |; W6 n6 _, S' W
, [. s* W2 n) L1 j7 g CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it# f' ?7 D/ R- Q
& ?' X6 c% }8 E9 E# |7 n! j
) ]) R3 P' n2 G W) `Code:4 {5 O1 [0 i# J& y( o% T
#ifdef __QUGET_SWAP_FIX2 ~& q3 ^, y I
1 g1 k% l, L' F
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
- f1 E' J: s, \ pUser->SetHitPoint( pUser->GetMaxHitPoint());3 c P0 _& d3 ~( D- z3 t. F
) E" b( u, T# o4 ?9 ~
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
: K. y1 u% V5 X# c3 G: P8 q pUser->SetManaPoint( pUser->GetMaxManaPoint() );
% x* O& P" c2 f, X+ k7 D
6 v5 C( \0 W$ Y" E* J if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ). x, G: z7 \& ~5 B
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
9 W8 J: {9 Y% i c1 Y, M
( ?1 l3 u* E1 d; j- Y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
6 T. l" a/ r* U+ O) X* Rand add under3 V& d# m! a" |) a& m2 Q
& Q8 l' m4 s$ Q- m7 O5 MCode:
5 `. D/ _ H5 T( fif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
& ~# p. t+ _5 p4 z3 M( d% |* P {
6 L& l6 }/ q& q# ^ 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 );9 r2 A/ `) I, n2 v
}this1 Y, N( T/ h# u' P: s4 k7 z
/ s# | I& ~7 O3 B" Q" T. ?Code:
3 X N: S: W9 d- I. N! s: ]#ifdef __QUGET_SWAP_FIX, o2 _6 s1 D- S/ B5 k$ V W
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 r) }% e6 O4 o5 X- R% k1 }
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' j7 E( [$ E9 x8 C' [2 `/ U
/ J6 f" B+ _. m" C/ v
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
" C; i) z+ q: e* Z/ p- q& B pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& p: V8 z, E$ t8 R5 I) J
2 z+ h4 j8 y8 `, S/ J; m if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
+ e9 f0 r: }! T: E( g/ y1 N pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );# S6 i- W | e- v n1 y+ E+ Z- K) C
6 }. L3 z6 P6 N& n3 y2 t
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 5 v4 @8 `% b( K+ U! q1 k1 e9 E
; E% S) ]! G1 r7 l( ~
$ \: L, ]' N6 w' H6 ~
|
|