|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
* @ ~$ u/ Y& VI posted this because someone kinda posted a youtube thingy about it :O.9 b1 c' _9 s3 `& f
9 V% u$ [4 y9 s5 H- FFind this in DPSrv.cpp @ worldserver
5 a0 r' \/ \& U. \# ~2 F r# O: J9 w& e
Code:/ a$ E- K8 Q' k7 O' Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); ?0 h Y/ J2 S0 r
{
5 E: R% c8 R! J* `5 ~ DWORD nId;5 O2 c, Q7 e, e# E/ W
int nPart;
# p/ `" h# c4 r5 V1 _5 l$ s% N* R& Q$ T* P$ k8 O: k# M
ar >> nId;
, R1 n# Q: J! ^4 _+ I" | ar >> nPart; 8 k9 \: X) x0 Y* v! W( X4 u
$ H$ r' n2 V x2 h
if( nPart >= MAX_HUMAN_PARTS )
1 ^( ?) U3 h5 w return;
& Z$ T8 e5 C4 m: z) Y, [# I7 r+ x3 ^9 r: y- k: _- }
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it) w" e! N b7 Y* {5 v- i
5 \6 P2 D% Q$ ~
6 |: @6 C! U3 c" G$ {1 K6 fCode:( w4 x+ m+ ^! e8 f9 A% M) u( w
#ifdef __QUGET_SWAP_FIX
& d1 D3 `) q* b1 A ^$ m% [: N& p' z' u& {" T( C2 u/ V; w5 s
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ); S& t% j4 q: K) Z% f1 p+ {
pUser->SetHitPoint( pUser->GetMaxHitPoint());$ S4 u+ r" e2 b" X8 K" G
3 E' y8 X0 q( }# J8 j if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
; R; G8 t: H H2 I pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* J5 Y! Y& m, y- M: l; L) t. F$ o
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
q3 U8 V+ `, {# @( K pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' N" z" W! G# z% s, s) _$ m v3 r! h* \/ n' I) Z% j
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 h$ q8 I% B J6 Z# R
and add under
, q+ A' x$ \( ]0 J% u+ t2 ^7 f- ]
6 a0 X$ A( k/ M0 S0 B) k* XCode:
4 P8 S) Y% g( ?& j1 Y* m! bif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ). I# A4 N' J4 E! a# Q6 a
{
2 Z: U- Y' ?" _# e 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 );3 g# f* D% l) t, m i/ B0 O
}this4 L& Y; x3 P( r
5 l; ]& Z+ M. m
Code:* s: `/ w0 z1 `* U
#ifdef __QUGET_SWAP_FIX4 X' T% Y# `& M6 ^6 |& c
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
. l, n( |* W2 j) @9 k pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());* U% q8 h) e& x+ I( Q7 F
5 b4 O j4 ~2 P+ ^ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
) T4 I7 l ^7 U pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ c- `) v# T) k9 R
" m1 O3 @* v8 A1 A. z0 a; X if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
- i6 K- C+ v; D* V- Q pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
+ [% r" M. P2 ?( w0 t' W$ o4 c0 o
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver + u. G/ s+ Y: v% b* r
w7 B |) r3 v; s% ^: H% G& g! J
) N$ j+ T# d2 [$ b |
|