|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
( k! g5 C# g' AI posted this because someone kinda posted a youtube thingy about it :O.
) k$ ?1 W P1 _$ c* U8 R) \9 c% ^ |+ k0 v( s3 D
Find this in DPSrv.cpp @ worldserver7 V0 z5 R3 D4 o: o
) F# r" a! X( l J" WCode:
9 o I) D9 K2 Q5 N$ uvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
9 S0 q/ R' n0 q1 X& h- b/ A7 D: t R{9 v4 e+ j0 v% ?9 o# |. U* ]
DWORD nId;
9 y' |4 F7 x5 V1 k int nPart;6 W2 z) n5 T f
/ h1 F% W, Z! T5 ^' w u# @3 c$ V
ar >> nId;
6 Q5 B5 }1 R+ x8 ]# \ ar >> nPart; 8 c* \' n1 U( j) Q( K
2 d* z& J8 Z8 W if( nPart >= MAX_HUMAN_PARTS ) 6 H* |$ X( u6 h& \) N6 t" E @# g7 e
return;( e* X; Q0 E% t, r/ Q$ V
. f: N h; o |9 z CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, l3 I1 Z3 o- z2 x4 r$ f a2 Y4 R5 {
C, G h: W: y( `! U: a3 F* s* b+ r
Code:
1 e" x$ ^3 P" C* ?8 Y5 K#ifdef __QUGET_SWAP_FIX0 N- I* x$ X# m) A' G9 e
: n0 C# e3 p& H$ i; J/ e( l if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
6 b# s d' H7 h" H8 L: X0 I6 a* u pUser->SetHitPoint( pUser->GetMaxHitPoint());
% Y+ G$ w8 y8 s/ C9 }* r& Z2 I- p6 K8 m Z4 j& ^+ ?/ V# l
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
! V1 M- v" g4 S5 D) R pUser->SetManaPoint( pUser->GetMaxManaPoint() );% G% ~1 @6 j) l8 s5 C
3 I0 O' h% m& s" [
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
# G$ v. k# c _0 r G' o$ Q pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); A$ t6 x# T0 x( z* F7 j
J& u6 {$ I0 a( n Q% p#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp+ Q) t! }7 K6 R, q$ E
and add under/ o6 w4 S- \& h
( p2 }1 K4 }3 Y+ P* L \+ _Code:$ w* {* m3 ?7 N5 _
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 R* ?5 z$ p2 ?4 b$ L- ]! p9 [
{
5 g% m1 C( i& {" F- y7 b W 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 );8 x8 R6 E( f; C9 ^
}this
- i, \8 N" B& q. ^
9 @+ ~0 d! W6 i( @3 k) mCode:
+ @. {/ ?+ Y) k#ifdef __QUGET_SWAP_FIX
, `) N. G) \) ]& F if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
3 j# Q1 X1 ^* d' F pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. \3 b1 D( Q0 g2 p0 q, H
1 r1 Y1 d6 E1 B4 N9 }. g, p2 M if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )0 g5 Z& J' u5 F9 t. J: s
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );0 ?8 q I! M4 Z/ ]+ X+ }% L4 q3 u
7 T8 V0 b4 n2 K) D$ N
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
% ?1 I( s5 g2 x6 }9 n3 d pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() ); R! w+ w3 s' T% O- o
2 K: a4 f$ b! l- n" g& l
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
, D2 S3 z j1 c' g% V- L' {- S
/ f& f/ e0 W7 ^+ V% _5 J7 \
5 j, f* \* S8 I: r0 F |
|