|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% ^0 G( p( @9 o. z$ K( y6 FI posted this because someone kinda posted a youtube thingy about it :O.
% J/ P: T- ~9 u4 k) m; ]+ I" ]: J; \$ C1 b; z) K+ ?
Find this in DPSrv.cpp @ worldserver
& ?* t$ D6 Z! G3 y: V4 h& {/ ^& G \" X
Code:
' A8 d8 @* D5 Z1 A- G& p0 y8 r- u: Lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 u2 S! M0 U M" w1 v7 f{
R5 d6 x2 Y7 y: H2 h; P) B+ s DWORD nId;
% ?* I) @: p! l/ F8 C9 W% e int nPart;
# k$ Q# j- I& A1 a
* b% k9 g T' Z% H$ I( y ar >> nId;) S) _1 D* ?, n( f, q: U
ar >> nPart;
) ^: J7 k1 O4 u$ m& i/ I8 Q
! r* u8 S4 j' } if( nPart >= MAX_HUMAN_PARTS )
) }) l1 P$ {) \1 I! y- U return;
# ?; M1 U% H! p4 c
u6 l& w: P. u+ h. g, _ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
8 [& p4 M2 G4 K; k+ |9 s: l2 E# P" U7 r9 t5 G
* }4 c% [5 g( [, h1 p& o% H, q& O
Code:
3 C2 b: v5 d K7 h5 u7 V3 C#ifdef __QUGET_SWAP_FIX+ ^$ R3 X# P% T! P* w# r
% }- X7 e- |9 o9 J if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )8 ~' X# D3 f2 K
pUser->SetHitPoint( pUser->GetMaxHitPoint());) ?. n- L& A% R1 @
/ j% U9 V1 H& M
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! D3 o y- [, ]3 H9 J. v4 T
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
6 n+ S& o, ?7 k+ `% U+ e& P
2 L9 C D$ X* D4 H& W# c3 Y if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )$ [8 n; J3 t# U6 L
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
; b( B* N% f6 @+ r3 x4 G3 `
6 J3 L0 A% u" ~# y' r4 M- K+ V#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
9 i9 b+ `" o2 K1 K, E- ~$ land add under
* w- G- ~+ Z/ P: P) X
" q) \- v6 x! z; h/ ^8 `Code:
; {$ i3 _( n( M; Rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: {; c1 \" g! ~; V {
1 j* c6 t6 \: }( I5 B3 m. L* i 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 );0 u3 M/ k8 T, J9 s, q- g
}this
+ P1 n# r$ e3 p* q4 K9 L. J' I3 c
Code:; K0 g5 Y) O8 M/ j0 Y
#ifdef __QUGET_SWAP_FIX
4 w0 O2 I$ z/ D. f if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
: J/ c% W/ t- C4 g pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
" V7 R7 O+ Z7 l; V3 f: j) B) p8 c8 E" J d, ?2 S0 Z6 a# X
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
q3 U) j. j' Z# @5 k$ F pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );( @1 N7 R- |1 f' B3 |2 U
% O- A: O. B" U2 W; Z/ Y# D4 M* K
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
b' s0 M I% }& I' s4 X; F6 p. V pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 q' t9 ^3 C+ T
: N1 n" F' l# C4 N+ {3 y3 C#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver , c, d. m1 m9 J
! R( Q7 Z5 L, Q1 ^& u2 o0 W. f# v$ M9 u6 }
|
|