|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
d8 \$ L, s1 |- _I posted this because someone kinda posted a youtube thingy about it :O.9 X$ q3 T: {1 ]7 s1 \& K
2 L: h+ M4 N7 k
Find this in DPSrv.cpp @ worldserver6 j4 k, G5 k# q$ P% v E
+ R3 K- ]; _ n ]Code:6 v. L9 Q( p/ J! b+ D
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* a! N y3 r7 t+ J- x
{: J0 C( t* h8 d3 p
DWORD nId;
% Z) \+ s8 C# m int nPart;: Z; V0 n \- K
q8 H A1 l- r3 t! g$ i1 W. g
ar >> nId;
/ D/ L5 }- R* A' {" Z3 |- G3 d ar >> nPart;
) `+ u8 x4 j1 a) o3 h" Y2 i9 O& Y" |
- M$ }; I) m- H. ?; F0 q# l7 c if( nPart >= MAX_HUMAN_PARTS ) 7 p6 M: g5 g; K
return;
# I+ C1 \$ G9 d! ~: q5 G+ x% P' U9 `6 P+ w( t! C' |( A& F
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 n o+ V" z5 M. M
- O" I) z) A- k( Q8 u* u
2 F' f6 E' g2 s% D! `3 fCode:
& i) B: `& a; |3 ~#ifdef __QUGET_SWAP_FIX
8 n0 t7 x+ s/ g6 q* t
w, @' T4 e: I- [+ u if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
) k& c6 D% `& a/ N/ i4 f pUser->SetHitPoint( pUser->GetMaxHitPoint());
' D1 D" r; W, \& C1 Y+ @1 c: Q `. h
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )( U% o( n" l/ z* x* m7 Z
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- a0 P) G$ ]/ |' R T4 {% ^2 e) ?: |
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )) @; t! N' `7 s
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
3 e2 q6 A, a8 K" d$ f7 Q/ A, n7 n3 g. n/ [# o) D3 q
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp l" P) n$ V- |4 g. \
and add under
5 V( A: a. p# n' s# _& ]+ F: X/ e9 f0 S9 K# e' f5 I4 J
Code:# a: X' K# C' G7 i! f
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
" P: A! q7 M. D. i {
$ n. h3 S, M V9 V# F; D6 |) Q# h 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 );; G* p" G) p8 m6 N! n: `1 `. U6 i
}this
* @- {- g' J( b2 o, e$ j; c
7 I7 x S) f' I! G. a, X' r/ B+ P8 HCode:4 l; v( P, u: h+ T# ~' X" Q
#ifdef __QUGET_SWAP_FIX
: P" e. _8 O4 L% X+ _ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )4 O. m& T) u R6 s
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
7 }' N7 n. ]" J0 @: S0 ?% q
" a! j* ^9 V8 J# C" L/ ] if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( H5 |# r0 W& f% J r0 y7 e pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
6 y$ \0 s6 h+ t3 `+ V
# E( D( f: s: y! y if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
@5 f+ |; o* [/ [8 `. P! R pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; _) a! w4 h6 j7 g4 a' B/ R. D) T0 O3 ]4 j3 [
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
t& f# ^5 |, I' [6 b- m$ k1 e/ k& f, E4 u0 y' j
+ P- B, F4 y. I2 B! r3 t |
|