|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked - | T& C" V# r' ^
I posted this because someone kinda posted a youtube thingy about it :O.6 A6 p# J5 D3 i
# e, d! U6 W$ y* l
Find this in DPSrv.cpp @ worldserver
9 k2 u3 H) N( E+ W! D8 w- P: U: k: G0 f8 f
Code:
: N$ F( x, k- D- ~( }3 G1 Jvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
* c m3 d! R; ]- b/ k- V{& A6 h c* T* R/ R! y. r. [
DWORD nId;& P P; ?! x0 x7 T) B# A6 e# C
int nPart;
* g- X- f" W4 s6 G1 h- g2 A, A3 n1 {8 @, P4 s
ar >> nId;
_( L/ q' {5 [ N ar >> nPart; # H. T/ J. q2 [+ ]# m( B+ E9 E$ R4 n
$ @0 [( Y4 F2 }* ~ if( nPart >= MAX_HUMAN_PARTS )
) x4 M' C1 N) v return;
' P; H" b# W5 N% H3 v2 [
5 K( l$ O/ [* q CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" D8 d1 x3 e. f9 r9 m0 f8 Z/ i1 u. Y8 H" x
3 g, m; F3 t7 w0 HCode:
/ g; J4 M6 l/ I" \1 K#ifdef __QUGET_SWAP_FIX
3 q4 S2 G' |4 Y a6 b4 b# X" H: h" `6 K1 `) s, Z+ m: E3 _% G* V% L/ U9 i
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
5 e/ t( V, O- ` pUser->SetHitPoint( pUser->GetMaxHitPoint());
! V I: V1 {9 W6 U, w2 w9 D& R, ^' k( C3 R9 w- X
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )) D* J+ N4 r/ O, Z% u6 m
pUser->SetManaPoint( pUser->GetMaxManaPoint() );# Z9 t% {, b: K/ a4 _/ j
9 J' ]" x9 G u8 T if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
5 P$ g! b- K G! z& N3 M. V: J pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ @; R! M% d. r+ a$ t+ T* l$ _5 a% {$ }) G# `
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* d+ c% e/ Q2 ~, u7 G
and add under
$ N: b: E: I, ?" I1 H/ N+ |& s- I* s2 A
Code:% D( R- B7 d% v: \$ L/ A* S
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )$ I7 f+ v; }- ?2 E# P+ N3 H
{
, ]/ q1 A9 l" k+ c8 ]) 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 );: a2 p; H$ b0 d$ }- x8 S
}this3 s. U& i% E: p, M/ i/ F
6 Q& }, c" H! U* f* c
Code:
& z3 U# q @5 n9 B$ q#ifdef __QUGET_SWAP_FIX& N: q4 T8 Y* a% [! k
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ): e3 \( X% |7 Y& c D- {9 t1 N
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());0 d4 f: Y( c: R) t
* n$ C, J2 i7 G) Y* f1 H
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )6 y& N* y, s5 ~3 _
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: Y5 ]0 R4 N/ J o8 F# i5 I
: Z- T* ^* n9 s& H! J+ a# D
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )1 @! O+ z' _ B! p
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 u9 _! ^0 e3 q
' } L9 G$ P3 N& [0 L#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* [- R3 y8 M' }9 R3 F
K9 K8 y6 c! I& e, M2 X- P; L+ W' ]: C* h' K$ K
|
|