|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
1 {7 V8 O! Q" r k9 XI posted this because someone kinda posted a youtube thingy about it :O.
5 k2 J1 h3 g! { a$ O
/ `" D/ J; t' z$ Q* [Find this in DPSrv.cpp @ worldserver
[8 O0 r) A- H. F
: S# |; a s: ?$ l0 k0 i bCode:9 ?3 |* _0 _$ y# H/ v7 G! M
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( v. p4 U \5 y2 v, c+ @% e( d* d
{
1 I7 \( b# v" c8 Z DWORD nId;
4 c2 B; n1 D$ N, R int nPart;
( \5 u! q* d! j
# I/ Y. G |2 M0 G1 _* Z ar >> nId;
) [' s6 |" F4 s ar >> nPart; 1 @0 v$ o* T' F. T: F9 C
1 ~ @; t. L6 e- \
if( nPart >= MAX_HUMAN_PARTS ) 6 \+ z9 m( ^& b8 L* G) ?
return;
% b/ z8 b7 N& w9 g% g; D' X. [0 b
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 u3 W$ ]( C: a* L0 t" u* u# F' Y
5 Q3 \& b5 \3 j% ~* M0 ]$ |
" I( F* d- H& K4 h0 v3 [& \' e
Code:. x1 q( s% I2 J' m
#ifdef __QUGET_SWAP_FIX
/ V- n E0 h1 o/ |9 G2 s- }- L. W. q1 T
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )' o$ Q& i% D9 s
pUser->SetHitPoint( pUser->GetMaxHitPoint());( J' z" F: J9 a2 C0 G2 Q& z1 j
/ J1 t- d; v8 @6 e. O- p if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
/ y! A8 x& a* f4 w3 ?0 V pUser->SetManaPoint( pUser->GetMaxManaPoint() );* T+ D$ P4 M8 l X/ V/ `9 B3 Q: I. d
k9 T2 q" i& N4 L, |% x if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )9 K% D& v: d0 h0 P! L
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
2 r! a6 L; U+ X5 y1 y& ^" ~- k' c6 ~) Y" `
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 |. F* ?, t! `$ E) Q
and add under9 ]. |. |+ n! f+ S2 g
' d/ G2 O- S0 Q; h" Q
Code:7 Z8 X5 n0 a, T5 u2 @) l2 T- Z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )8 k# R: T/ Y. S' g+ Y+ R7 Q
{3 z5 E% Y0 t! g |4 V! X
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 );
+ M8 b7 G8 R, l1 D4 s$ V1 E: g }this& x$ D2 T5 @$ k: I! S; o; [
! M0 j8 _% V7 S. _- m; ^; |% E+ m0 SCode:! g p1 O! I1 x! X& N! F. m1 D: e# W( ~
#ifdef __QUGET_SWAP_FIX, j+ }9 B5 f P6 [! M _' @
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
: J! ?0 r4 Y! M pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 O t! l$ I3 X3 G9 }5 {* |$ w. U/ B* c. l5 h
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )+ j. R9 @/ z0 ?8 s
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
7 I; @$ H0 R& d* f7 ?$ a& }/ Y
: `/ n0 j5 @1 Y* u! o; _/ t2 U, F. P if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
5 i/ U, |% e" | pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ N/ r `, ]- x, I1 _( j- ~) E' x
3 N5 c; k' ~3 X1 k. }& Y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver - i$ |, i7 w- [6 j# f
6 C. L% y5 X5 J9 ~$ w% A6 b Z+ D3 @" L" U( U0 d( m( t
|
|