|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked & J8 p3 O, R r1 i5 ^
I posted this because someone kinda posted a youtube thingy about it :O.0 P9 J& ~% @5 [0 D# x S
. g$ q# l4 V3 t! a
Find this in DPSrv.cpp @ worldserver* }; e p: r& b1 Y
- L, G0 [* c) s+ Y m" }3 FCode:7 p% {3 i7 g9 z- Z- a& m8 _
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 i- Q; T! ~/ L% e0 \7 `' ?- ~2 Z
{
9 Q$ U0 {" D( M" | DWORD nId;
' P& f/ G) x" \/ ?( f/ H9 w: c6 \; q int nPart;* ^( l8 R$ a8 Z7 P4 t+ Z
3 X( `. P2 x$ `5 R5 N+ }
ar >> nId;
" l2 H' r& F2 a7 _ Q ar >> nPart;
$ \% L* q' f# ?$ j& p% n$ W
2 I5 o# Z+ c/ ~: H: Q if( nPart >= MAX_HUMAN_PARTS )
+ S7 X1 S9 I6 ]/ ~4 C8 L+ ? return;
5 x. t$ ?) K6 T5 o6 k1 r: B+ z5 |3 @. v4 f7 K
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
9 {/ A: |0 U7 A- ^1 K0 l, e, h2 ?( C2 b* r8 e5 Q
Y) G. i; X$ n# y* ]% ?Code:
2 n8 c! L5 F: a' ^5 T" u#ifdef __QUGET_SWAP_FIX
3 Z8 U6 ~' Z( T! j8 F! E% v+ b- \) }
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
; L4 @0 C3 i( a S pUser->SetHitPoint( pUser->GetMaxHitPoint());
: y* e. R: s0 h) e* M3 h+ o" U7 K+ b/ w% Y- l! g3 c- k/ \
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )6 P& T2 p" W3 s
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
t& d, J/ H) [5 I" x0 U! U5 W2 ~5 Q' E
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )9 C( X& m( I* g$ F! S( }
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
0 {6 e% _- M1 V) Z
' W0 x. @5 b" V. |' s0 o% ^9 i; ?#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp% g2 E4 h5 g" U/ ]
and add under+ b3 U- _; [, k
* l+ B+ {1 B# z* d: H, `) r
Code:
- T) c' N) Z, p9 J/ [+ L* v; K: Vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
( z: u8 {! E% U4 b8 y' ?8 y% m8 C {# i$ r: E4 `3 z2 l
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 );7 G8 R5 i4 a: q; ]8 w
}this3 g6 u" ^: Y$ D2 C/ h5 P; n% {9 O
8 M/ r' {! a. o) ?7 Z) e
Code:
2 m5 V2 _' |0 _# e4 M#ifdef __QUGET_SWAP_FIX
* L/ `- Z% Z; A& G if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
" k6 Y) j, |/ U/ I8 L+ V pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 c4 `/ t) r( K M1 Z: u' H4 N% k2 J" \) U4 o8 k# i
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )- \* u1 J# l+ R' X( K3 n0 N
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ K% Y, ], y" i M0 b
$ k/ |8 x: U+ m& y) ` if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
i$ l3 O5 w) ^; P; C; Y pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ j. e) `& B6 w2 Y F$ W" _9 `
/ V* I2 W! S& I. w% ^
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# u! p0 \7 [. d) u) Q; N+ G/ c8 V5 Q* S
: _ d4 `- e+ E) r9 } |
|