|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
- K: s! o7 {5 T ~: `I posted this because someone kinda posted a youtube thingy about it :O.
& w, z" p9 n; }
3 M% B z) b; A3 g" p9 NFind this in DPSrv.cpp @ worldserver
0 ?- ~& e. e0 V* v: P! L, D0 e( n$ k' I
Code:
# D* M* b' A9 I+ B; k8 Kvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 \: n! h5 p: }9 B7 F; m" n
{
2 x" j9 L- c0 g# r/ U, w DWORD nId;
, e( `& b; I) g3 [& R9 B; k7 ` int nPart;
) l+ f! k0 f! J. [, u/ O9 U7 t
# l% i( _/ x5 \8 u* [& s ar >> nId;
2 n( T0 u" e" }5 n( e ar >> nPart; & S" l* x( L8 J
1 |0 ?# Q, \) ^! I& G: D if( nPart >= MAX_HUMAN_PARTS )
9 p% S6 X$ ^1 U return;0 ]* q4 n) ]0 k+ c G' q
; [) ?5 {# b/ ]& q$ `! X CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it) u; l4 F- `8 @2 |$ W% E! _& c7 Y
% t& }+ P* d2 b& Q3 q3 k
) T8 l. _6 }2 ~) _' a0 b- ACode:: `% c* |+ L; P4 q& k9 M/ G
#ifdef __QUGET_SWAP_FIX( f! w9 `3 @: o, s7 L
! P7 ]% w( @; ^ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
1 r" `, U% D) I ]: J5 ~ pUser->SetHitPoint( pUser->GetMaxHitPoint());1 X7 W3 z$ ^+ w7 ~) Z5 b# [: q
: `, q6 D& ?$ h: S- U; s+ H if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )6 [! Q8 ?, q) Z5 X8 Z+ ]: c3 ]! F/ b3 O
pUser->SetManaPoint( pUser->GetMaxManaPoint() );0 b) E* u; K2 r! y8 C4 v7 S7 }
5 T* ^* M0 h9 n/ g7 f if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
* q# l8 G, F/ Q' h; d pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# ~0 k; f! H2 P) V+ s
. H: W. H! I4 @/ ^+ L4 g& G, m: e4 T#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; P. Z* v: a! L5 Eand add under
6 z! i' z. e7 x1 D' x8 h* b
8 [. P, F/ N6 T+ l+ \Code:
- ^; U( M, x+ p2 e* ?- x: Dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
5 v3 s) b |7 T9 v' P1 I8 ?# e {) D5 y; m9 O# q0 }* V; Q, j( `% v S
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 );4 w4 Z: R+ Y2 ~8 R2 k
}this
/ ^. Y0 \7 m1 Z. ^1 j/ a1 o: X' A4 w/ F- w% i
Code:; z' f! }8 R( n$ R. B
#ifdef __QUGET_SWAP_FIX3 e( z, f: S% P* z
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
! k5 E3 Q% R: Q2 r& } pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());6 f5 ^7 ]. U* ~6 L1 [
& ?$ l; Z( I" T+ u, z; @
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )2 t& v+ s: }& T3 e, r! i
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" Q4 _( l: O9 q' G9 T& Z
$ g; D* O H# `" e
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
% ?1 w3 f$ w) w# Y7 D4 Z& g1 Y pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() ); e @0 b6 w1 k2 S# F" z9 j
$ K: s7 Z$ x: F, c* b8 ^* E
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver + `2 A; [; x- I5 P
2 b0 }# x: J; O" t
1 m! ?2 p" B+ n. i5 l8 g+ f |
|