|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
, f) I1 {8 e; c/ f6 `( @- II posted this because someone kinda posted a youtube thingy about it :O.8 O" x! d* M! O( m; o- U
: |1 ?4 a% B* ^. |" U& v
Find this in DPSrv.cpp @ worldserver
/ o. A$ n8 T- L9 j6 {7 ^9 }- }# G2 H1 {$ @4 d
Code:
p" [, d# W" l4 c! fvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
% z! h$ ?8 Z+ {+ r; B{. P: u J7 ?: e6 [5 Y, q
DWORD nId;) c* B. v7 @6 t' y6 D# t1 U
int nPart;9 z0 S, D1 e& e) n
5 {$ Q9 c, M" o3 i' S ar >> nId;% c4 Y; ^+ \8 ]# @
ar >> nPart;
7 C( B5 l" w* M8 I
5 E0 N9 ~- D+ A' m6 Y$ F if( nPart >= MAX_HUMAN_PARTS ) % I1 y5 e) g2 O" x% R' u9 s J5 t
return;) h9 ^9 L; X+ y, Q" X0 A! m
0 s$ T8 V3 n# R7 k# i& m9 ~
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. _! ?7 B0 }, Q" H9 E2 s, N- h/ r, G. U
5 _1 ]* f1 l( |
Code:- Y8 ]) {, A2 M+ R. V7 S6 ?
#ifdef __QUGET_SWAP_FIX) N1 z5 q+ S+ L. u1 y o
% \$ I3 T* J9 r% ]* }
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
# y! N% q) w: B; r* e pUser->SetHitPoint( pUser->GetMaxHitPoint());
" \& x$ R J: `8 P; ]4 o3 Y1 u
" T8 E! h' Y/ F6 H, P0 K3 \ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )# W, P8 q. g4 ?) C; J" X
pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 g; q4 h$ c! w; x0 F/ S3 `4 X
7 C% F! c% _- G% Q if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( l) a7 G8 B. c6 l0 \! w$ U pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );; U# W( z/ y2 S9 d$ o3 U& f
1 y- T: }! t- T$ U. R) _- q' A
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ m9 K. w j8 a- R1 [$ Z" @+ N! sand add under
/ z0 W& A Y, J6 h
, B2 w) ?1 O' x+ h3 cCode:" f5 z; h; `& a L
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) p# h1 t: k- y# j: R+ v
{+ \: Z/ b3 A- O- n4 L9 v6 H1 | b
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 );
- p. h4 ~! ?5 C- L }this5 `2 b( E. m$ w7 I
, r0 p" x+ i2 h6 c9 t, ]) f
Code:
9 X6 j+ b# f) @#ifdef __QUGET_SWAP_FIX3 B1 Y! {5 ~& t8 o7 _& y
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )/ ?; x! K. F3 E# t: S' d3 s% ^
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 E- f; C5 I+ x+ V$ i1 F# O! h3 Q1 J) r0 [
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
/ W0 G3 R4 D+ S6 R( J! ^ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );# ~5 L' |% y3 ?: K( ^( y
6 i9 p h G& @- \
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )( F6 Q$ ~7 x+ F, H" e, _, s
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );7 O4 s; n% D$ p9 Q0 Y
9 D4 B4 o) q' W7 T3 A3 J6 q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 R; m% G% Y7 u
% m; @& y! O( s; V0 j3 ]* o
& _7 B$ y) j3 p5 H |
|