|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked " B n% P( ]# E- x9 p- p( E
I posted this because someone kinda posted a youtube thingy about it :O.
2 ~/ T2 \6 |* z* y0 V; K, W9 U# }+ m3 `) Y
Find this in DPSrv.cpp @ worldserver( O6 t& a& F I) C1 [/ c8 f [7 e
$ E& w8 u1 V# D; q" _& F' \4 C
Code:
* }* n7 r! Z# I- I/ i6 lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
# H' L* [) j; D0 F{8 J4 w& b r- S S
DWORD nId;: i3 r& F+ G+ ^# D q% ^
int nPart;8 a' u) T k/ E) o2 r( r- \
5 ~3 ?- a$ z: ^5 W$ Y; t
ar >> nId;
% q3 m$ C7 H q ar >> nPart; * I. P( i) u1 o, {7 Z
2 f5 I; q1 A; ]; |- T, P# t
if( nPart >= MAX_HUMAN_PARTS )
4 F' Y$ n( G' O, `+ k return;2 N6 w$ {2 P4 k' J( i
* H1 |( R3 k1 ?: v1 D0 v- w9 m CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( @& @ z9 r: B: t% U5 z! p( S
4 J6 \( F' C% F& @; Z+ k p+ L" _% M7 X ~5 f8 G
Code:9 W3 ^- C% W# W6 {
#ifdef __QUGET_SWAP_FIX
; j* b* {* E( B, i$ ?) E t* |- E+ f( E& R# [
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )( n6 Q- s0 |; e- i1 p. Y) P, V+ j
pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 \# G( ~2 _& X Y. n& h2 l: _ D. _# E
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ). ]- j# T- Y) s/ @/ l
pUser->SetManaPoint( pUser->GetMaxManaPoint() );/ u# V1 T2 t% ?/ d& N6 v
8 ^8 v# R& T' L6 W if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
5 \8 h5 ], g9 @$ z pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
6 D! j+ R2 K7 x- B& V
; I; A5 T6 u0 y" N6 o#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( F- Q. Y1 F+ j4 `and add under
- J6 v+ h8 b+ p% t1 J, u
' u, d4 w- ]3 `, hCode:
! h& v% b) `/ E1 Z* j+ Eif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 o, R" a$ v4 D& h
{2 D3 x q; e, R! @) O# g
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 );7 k0 F* l8 {5 ]7 Y: @9 ]
}this4 w: e0 \& h q8 K6 t
2 @0 r& {7 C! `( ?& U& u
Code:0 J& P2 ~+ |( s
#ifdef __QUGET_SWAP_FIX4 W: X- M' t2 }
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
g5 i" |# g/ Y% q) d pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 F% ^, \9 H. w9 W0 ~' G1 G3 c; A5 _, q+ z+ Q% x
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ); J* J @/ w" q* ?$ z3 f9 W4 d) Q% i
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );- A6 [" C! R: T# e+ f3 e. J T0 Z8 t
4 q O+ o2 B6 |1 ^9 D8 L2 ]" f+ ]
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )6 E4 g8 h* h8 n, }+ _, O
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 Y+ N% S3 |7 F( G, Y4 o" w* `* D. i3 q+ y8 j5 q1 E% K
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & ]& v# n0 v A( F9 E
6 e$ f" ^3 T" W/ W) ?. {" [
1 d/ ?" `* \6 V
|
|