|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; n2 P0 I- X4 u+ b8 k& P; I ?I posted this because someone kinda posted a youtube thingy about it :O.9 T7 e3 l% ?9 G* n4 P5 [
. y! I( ?- }' \" v) z/ i+ q3 AFind this in DPSrv.cpp @ worldserver
. }0 V, U! Q, `5 W7 M6 L/ r1 N- m& ]
Code:
' p _( o2 B* yvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( l0 }- X! H u0 z( c5 c- ? B
{% h' A4 P* _4 Y2 {; e' U2 V
DWORD nId;
y# w' b5 p4 h8 ?# F int nPart;
# W) Z& |3 ?1 B: }6 V
' ?3 E M$ |* |; ~ ar >> nId;4 c' a w; `; e Y! M$ l
ar >> nPart;
4 o* L+ J" T2 o
2 H0 T! p n3 f# Y( @8 D( v if( nPart >= MAX_HUMAN_PARTS )
" H0 f- x8 J) v return;1 K' f% d$ ~1 E: [
3 Y5 R* N4 E0 f8 ^; a4 j
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
; [) `3 f3 U/ Q& x
1 ^: M4 k6 d" X: q1 h5 U. e. l" O, G2 K
Code:! r1 q$ A; n! M
#ifdef __QUGET_SWAP_FIX" `7 l9 [+ o4 ^/ I+ S* w3 j
2 ]8 T4 E/ t3 I% R$ T& p& j if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
' `( M9 W9 \. D1 |; O pUser->SetHitPoint( pUser->GetMaxHitPoint());" D& G, G# G- m3 B4 O0 w
, ~( `4 v6 \$ Y* \" E' P
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )5 m1 |0 U) {- E( a
pUser->SetManaPoint( pUser->GetMaxManaPoint() ); A+ V; M: c- W+ L7 Q
' L9 p& @5 Z7 P# K3 o if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
" F! {/ a$ U& y5 |) H8 q pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
) l t4 Y g8 g. q
, c# y7 F* |( j#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp# M: Y# ~4 S) d
and add under
! m/ w1 J4 y/ n# z1 ^( I" @; c3 N. Q2 g) q# W. d* F
Code:; l6 V) {; G) h/ H- z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ r/ J" K1 g2 G; h0 C k! G7 Z {
# a n" t" M4 ]: R/ t( ^- Y 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 );/ Z s" Y6 J+ R: k7 z% J
}this
$ c5 N4 N( u; S# v f& M; l& j
4 U" q! L* ~# e) ^( J" kCode:: D' | g% H$ O7 {& s* S' D1 e2 Q
#ifdef __QUGET_SWAP_FIX- k2 f, T2 f" U) @ ^
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )$ @" o0 O2 T. T8 ]+ q- u
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 n' @* I2 V6 \; [! q
0 \# K' [6 J8 u9 o: N( A4 i$ D9 h
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): ^) j, f6 T+ Y3 m( p4 ^
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );3 X$ i9 O5 a6 Q& S
d1 s4 v% s7 M: O Z
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ), l1 x% ]! q/ J+ J
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 {7 E& M+ @: E8 w4 H
) n4 B/ s3 | B- @5 z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & m7 \& W' A/ K/ o$ t* e! c2 Z% x
* N2 @8 v0 s1 _$ k
2 {. i- S3 ^! {0 u& `
|
|