|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked S# c0 r( r+ l2 E! S* ]* G
I posted this because someone kinda posted a youtube thingy about it :O.+ v9 `( c5 S1 Q: H1 ~# {& @
: i: w! e/ p8 g1 P. X
Find this in DPSrv.cpp @ worldserver; |7 t. L* l" u* T# N @# g
% q9 t8 ?. n: j+ P8 dCode:! t) D; U& M9 V
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: i2 I) `; N9 F+ N8 |# ~{6 ]5 D! W9 R, u2 J8 v
DWORD nId;
: m. O) X; r; |% O. T ^ int nPart;
4 m% y7 L* L0 a P8 x# F
& c' D+ n3 y* ^, m! K ar >> nId;
7 w1 L8 a8 @# e4 ^ ar >> nPart;
5 @& ^+ ?+ p: D% S ; w3 Z4 I9 O/ k8 C
if( nPart >= MAX_HUMAN_PARTS )
! {' K4 K' l5 @' I h: q return;
# G/ L' n1 k- u+ x; h# W
2 @1 e6 V. x* }* t% d CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" y, `. k, h( C' |6 V0 B
x8 P, l" c' k
5 M" i+ p: F. n5 d- o/ g( FCode:
7 {- I* q, n) Q y6 r; N- T6 U% q6 i#ifdef __QUGET_SWAP_FIX
1 l3 Q7 O5 b5 ^2 U: Z4 G3 ?" f1 D" [. h+ J. M2 A, h; Q, J
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )1 t! ]4 A: r9 s, F
pUser->SetHitPoint( pUser->GetMaxHitPoint());1 _0 b2 L( ]0 E# [
1 z/ ]3 i1 J) f# u$ v
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )/ w1 G( A4 c$ E% }7 ]
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
. i3 x# S u1 j$ G8 q* W. i) a$ z$ t# i
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
& d' h2 I3 g5 _) f u6 P) q pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( W% S9 H2 p: G9 r* i0 @
" E& S/ n3 Y' C2 {7 \#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& X4 l* J' J( B$ z/ }2 E" |- ^
and add under& Y4 _! C3 F: Y% m8 c
; Q7 s; q/ b& `% k- F5 |" C! [Code:1 g7 x8 M9 r+ d$ w! c/ `2 G2 j
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
% {# R: z Z/ q8 D {$ y6 S9 k w1 x) L, @* d
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 ); b) |% t Z7 ~- m1 a" j+ N* c3 i- g
}this
8 Z2 a$ @0 A" ^1 T2 y8 f$ c6 b! m' ~7 e9 B) S' S
Code:
) W" v. \ N7 b0 s#ifdef __QUGET_SWAP_FIX @ n; x+ w0 q- K1 V
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
& Y- f. N/ |4 ^ a- w2 L pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 t2 n) \% K$ _" {, w2 o
' [* q# H- l+ s2 R8 j4 c if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )0 W# e7 `* m4 N* m" K
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- b m; b# k" w: D- e6 ]8 S) [
0 C) ?+ D: o2 P4 C7 r2 f" Y# t if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
1 z& \ v# \- K+ |4 F5 U9 p0 v pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- G8 w* G2 F( P0 k0 P8 R
9 K+ Y7 h$ a p* v, {6 ^' Q0 E4 u#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
, b& @# q" }- L* r7 F# K0 B" W9 K( A! f& U
5 P& J; L7 j" ~- ^ |
|