|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' Y# y+ W, Z Q0 _& yI posted this because someone kinda posted a youtube thingy about it :O.
6 a1 w7 U3 z6 r% a* B8 v' C8 I! }5 A5 R5 P& @
Find this in DPSrv.cpp @ worldserver
, M* i3 H3 X+ T
F9 j# D6 x: F" W) OCode:6 i, B1 l8 w7 D' _8 |
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
/ W: N% H. T0 l+ m! U, n Y{
; }) K- X) L) W* d( s/ ?& s# e DWORD nId;& i" t+ I$ |& @3 x- T$ u
int nPart;
/ k y/ g! U7 {1 c* Z9 O7 I$ w. k6 Y: k |: z6 E- G6 o
ar >> nId;1 @- k* r, ]& t9 Z# b' J* J
ar >> nPart;
- y$ K( P P: L8 p# j ) ~' B2 ~ _* F6 Q+ a. h( O
if( nPart >= MAX_HUMAN_PARTS )
1 @: H2 o! r3 ^ S. A return;( s9 S( f( P/ O3 t& f/ G* s+ @
5 p( k7 l- K. f+ @: I1 W% a CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
! O* y% U( s8 M) L2 N
0 Q( ]1 X; f2 Q7 C! X) ]. o
% j3 z' m& T; a1 d3 R) ]Code:
6 B0 o& e" |& `, o0 p: X& E#ifdef __QUGET_SWAP_FIX5 G* p9 ]1 S! F* U Q
7 s* p" L) E5 B" S9 J3 q9 S4 a if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
+ {0 H, V2 ^- n S' _ pUser->SetHitPoint( pUser->GetMaxHitPoint());, X: R# p5 ]9 }2 c$ F7 S$ O' x" R; Q
! C- L3 N ~5 x" D( d2 s if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
! P! R4 R( S7 W) P6 ?1 w% N pUser->SetManaPoint( pUser->GetMaxManaPoint() );% y8 l" K, n! d) N: k J
9 F: K5 u) R" ]" p if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )3 P$ l% H" V5 h+ C. a% t# Z/ m
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
! O. C5 N3 ~8 y% p( g/ z: ^" o* b% R+ i' L: C
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
2 |4 u) V) s( Y& B3 e1 Iand add under$ N# Y& M% {" S
' v' |, g. ?; x( eCode:) O+ Q, v# c, A
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )7 O5 g4 z4 Z C( ^, i
{
0 ]" q: C, u4 v& r" K 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 w! ?+ [. L* u0 S4 M6 p: [ }this
1 M4 E( o7 k. x: ?+ |* S d- N* R
# a8 B0 A$ @8 W4 E5 tCode:
/ ]1 ]# c8 O* d#ifdef __QUGET_SWAP_FIX
1 ~# j: }% q4 v# v; x* @7 W if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) h9 n6 t& y( P
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());( Y, Q5 u0 f% q' @" M
6 j, c: X* r& d9 |7 E' G3 B, `2 T if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )# T# ^4 V# b' x; o, m
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
' ~6 g) `( ^6 f$ |9 e7 L. P% h# o/ ]' V0 b/ Y+ v
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
Z! A/ u8 S% a2 u7 I! _0 T pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; @/ V5 o# m0 Z3 H
$ T; E% `( j' |$ o* r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver $ |+ [! |! S# G
/ H6 L) h& ?. ` E+ B( W
) Y, p2 O6 a" e% E- ~4 q
|
|