|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% |, l0 F! y6 W N) `% }# i8 AI posted this because someone kinda posted a youtube thingy about it :O., F" ?5 P" t( g* U6 }- \5 \
6 N/ G) c" q3 ^: e6 FFind this in DPSrv.cpp @ worldserver8 o! G6 [7 g, i4 N
7 P. U% h, y2 Q5 X6 ]: c: A$ P
Code:" H+ w* `% B& Y0 |& Y* O& v0 W
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )2 A8 t: [" L1 A" M! j
{ a d% p' j+ ]
DWORD nId;
% ^2 q. J: P+ S$ a5 ]2 Q2 _ int nPart;
* O5 ]! w- T X; u: b1 |
! Z8 P0 Q& n' a ar >> nId;
/ o9 s) `4 E& r1 G# W8 Z+ N" l ar >> nPart;
. y% T3 r1 m# X / u4 S* ^. f0 d
if( nPart >= MAX_HUMAN_PARTS )
) o. b7 I7 v5 m return;
7 Z6 K' b& ^+ }1 M- C# \9 x1 t Z, x _' s" e
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ b8 L# m) ^, ^
+ R5 E+ a4 p! G/ m
, s4 } R* _3 q- W. Z0 c% s- I
Code:
?- n, p4 Q, \, ]#ifdef __QUGET_SWAP_FIX6 Y; M$ d4 x; ^/ G
4 n; J3 f) ?: I3 }
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* p. i2 I/ V* w; M( c3 S pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ e5 Q+ M+ F; {2 z0 m" K
% V! h' M( |+ y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )) a. \; `, l! a; @5 a2 ~
pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 a0 z0 L+ |4 ]: w) S: s( R
" }- u! A: o- o
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
5 z N9 O& |4 }' v6 u pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& X1 E0 a5 S, C/ P; b7 m6 A0 ]: }3 L7 { \: ?
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; A6 D; R3 h- s3 Land add under
* I0 M) E6 A% M2 W( ~0 \5 q) g0 @" p( U5 `: z0 h* \, z
Code:
' n- G* ]! C) u3 c! x$ m7 l8 E* Rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
0 _" z- `& M/ p7 s3 V {. e$ A" c- |' X" }" \, 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 );
5 k4 }7 s% z# y; ?; X' e5 c Z6 v" L }this9 v: q. k, [# Z$ Z B
6 z$ \- g/ e' @
Code:
2 l1 X( v2 {9 e1 q0 D+ a#ifdef __QUGET_SWAP_FIX
* E5 [) l9 x6 b2 h+ P" | if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
* ]4 m5 K2 A" o pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. L+ @* a' c$ p2 [% H+ h
& ^( U0 e5 i) n7 [ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
/ g. m. x* h6 Y" W8 o+ i# N3 V I pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
0 U4 v0 Q6 g! F2 R! K8 t
8 H) P- C7 D. X) i- q* e- ]/ E if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
! ^* J6 U) j% y2 z, }' I9 f# { pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. T/ n% J5 Z& c5 P9 r g! S, E4 A7 ]3 q. Y( E9 a; l, V1 x
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ' v+ J8 r' V' P3 M3 _* |
( w- M2 r, Z$ ~9 b7 E4 j+ i1 g3 ?$ n6 x
|
|