|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked : `8 P" }( L r: \) i( W3 c$ U
I posted this because someone kinda posted a youtube thingy about it :O.; b' O' x( x% h
+ }9 J/ [* ~$ h9 i" g+ s! KFind this in DPSrv.cpp @ worldserver! V, _9 u: s" }9 J4 m# U
! f* m% c. q% ^. BCode:
5 r! J6 T0 y8 k% q" W* u P( }void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )4 M! M0 W- g3 W, R K0 k0 j! {
{9 v z& L9 z& H9 a% S
DWORD nId;9 D5 m7 T' @7 v, |, o; p" J% }8 s
int nPart;
7 X4 ~- ?# Y0 H. j" G |2 n" {$ B* G( c ^/ [$ {' ?. c
ar >> nId;( Y! D9 U$ i: `0 ?" A
ar >> nPart; ( I) Y; i* z) H/ |6 V/ n6 t( r( [% {
" G/ \: E' G; K+ a8 f; O if( nPart >= MAX_HUMAN_PARTS )
) q3 k- D# r" t1 M( ^7 O6 X return;
\% \- k( j- I+ }8 R
; M; \* s) r: \) p3 S' { CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it, [6 X g; p" [' q+ v/ J
+ R4 y1 b' `- Q8 e; B
( V+ }- r9 i7 D+ w! jCode:' J) m Y' q5 u; A
#ifdef __QUGET_SWAP_FIX* }! G, B# S' v/ w5 f
* ]3 N5 n8 w+ Q. D6 I
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )3 s( \; {8 I. T" T! U5 p) \$ |
pUser->SetHitPoint( pUser->GetMaxHitPoint());$ `) e+ o/ t% N2 L' T; X; Y
$ v4 H: C2 u/ q3 Z) J7 j' [ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
2 Z! H, N5 |9 w k pUser->SetManaPoint( pUser->GetMaxManaPoint() );; O$ t0 R! p5 N0 y4 \
" V7 w% n$ b; Q( m if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
3 v; b7 k/ D, m pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ ~& ]" o, y1 H$ R. g3 y y7 z; g+ W
4 {" u5 I3 k" @7 J! X/ T#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
% s/ R. P* j b9 f3 v4 M$ yand add under; h" Z+ x! O9 `/ o
( y5 E- ?/ V. N1 b$ VCode:" _* x O( S' s3 ~4 B0 D6 _
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
7 f, w/ e _0 d* U9 G Y9 u {8 f1 q# |* N' D5 s8 n
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 );
/ X" l% C1 J, x }this: y7 z0 P# l( X" k
4 y' e0 S% H/ D) q: b A$ QCode:
5 F: B$ G1 _6 d8 {( M#ifdef __QUGET_SWAP_FIX
+ u7 w: K: M' U& y- y if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) P" S4 [' g$ v& Y: W& x; [* G0 l
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());% a8 e5 a" l& C. U
9 z4 c4 ^1 R/ ?$ [# z1 `& v6 I) D
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
4 s5 A$ P4 z$ }% @( y9 C& \ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
_+ r$ d3 f: [, |! i1 W' G. I1 v
7 q0 {% z, `4 T1 K' {3 x if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
) A. {' F" y/ e9 ~7 P/ x pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );4 n7 o0 q: s3 v1 X6 z1 K3 K. q
2 n# v7 r, d3 l' F#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
. [- Z7 i1 J: u, E1 B
0 z5 ^# R( I: x6 W3 _
' R; y& {, D* M# D) z# U |
|