|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked * Y% T' w! L8 G) w# v
I posted this because someone kinda posted a youtube thingy about it :O.% S. E2 t/ x( d' ~
. I' i( _8 o* V' \( H! l% A5 z# D4 U
Find this in DPSrv.cpp @ worldserver
* \( a5 ]( Z) ~3 R+ e( F+ p; K$ |: `
Code:
) X/ n3 X: U% H/ b! Mvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )$ ?6 T& r* E* y$ v- F3 }
{+ e: R! y! J9 r8 p
DWORD nId;2 ]& m1 z. O7 h( D
int nPart;
4 p8 Q* L4 \0 S+ K [- ]: }" i7 c: P/ H+ e+ e. J0 `. b
ar >> nId;
# d+ y. e! U/ Y7 T+ l/ V" V, O ar >> nPart;
, t; \# U8 ^; Q ! f3 l3 z! x" f+ g. h( ]5 M
if( nPart >= MAX_HUMAN_PARTS )
' L8 L5 q7 `4 q8 w; P* r return;
) O9 D1 n2 }1 O8 b" }8 ?5 ]6 i
( ]0 ~' ~: m$ D& B' `7 {; } CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it3 f# i# U3 e3 y- [3 P: a
i, e K: r" e5 h& y
7 O# ~! m4 f+ `( s1 c- g6 ^& |: Z& f
Code:) p6 j' k+ g- N, m* X1 l @ w5 y# Q
#ifdef __QUGET_SWAP_FIX
2 w* I) m" b1 b$ O2 D3 V7 O' J" W# o; E0 O( k( _
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )0 [3 L: G0 u2 w: D" s' P
pUser->SetHitPoint( pUser->GetMaxHitPoint());4 }8 G/ B y1 O% I$ _
8 P& o- O+ c4 p
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! t7 b# Y5 c% c k, `+ p# M3 e
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( A. F8 a, a/ [2 Y* l1 c/ ]! S
9 j1 }5 T% I! ~. C1 y. T A if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
9 r% k) J9 @! R, S6 I" ]# L pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 K, L. b% Q0 B9 M7 N/ W" i/ B: {( n
; ~; D0 I' f, S$ z+ G7 s
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp: D: k, k) ]9 E. A' h$ c1 a' _0 m: w5 _
and add under; Z+ Z5 W2 A+ l, s
7 U) b9 L/ ]# L% f$ p2 y5 h( v
Code:1 [' M' J, a9 p& r
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 ^* e f2 \8 |; {, W- @8 W3 Y {
% E; I7 C5 C* [/ j8 H* 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 );. S) u n( u, D: e5 O' u
}this" M7 Y5 ^( P! b
; x2 `/ c& E/ r" J3 K( S
Code:! r& b4 `+ [) Z. {8 c3 T/ g
#ifdef __QUGET_SWAP_FIX
! C$ b1 e$ g# @- M. f. n8 D$ ^ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% T; v- _: V6 G" E9 G3 }) n pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());( d$ d/ f- I0 l5 n. k8 H
5 S0 x& Q! E7 B$ }1 K% u
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( o: m9 O9 M6 f& x1 J pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" E9 S# o# ?5 S* P/ `7 O4 }: W) x7 @( J
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
" [. i3 E4 y& J2 }- q8 V pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );# Z+ H% I, B& b; q' ]
3 C& b7 Y( n) }
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ( h5 W9 }! E1 E5 H
5 h# B/ p. M! u) s
* M! S! ]- H( N0 \6 `' V |
|