|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
& x$ Y& u/ E2 I' b! I6 d4 lI posted this because someone kinda posted a youtube thingy about it :O.: a# @& E! {! c* E! r6 e0 U, H
* ^" G( m. O! z& j: F
Find this in DPSrv.cpp @ worldserver
+ L! U" T9 d9 k! e
7 Y% j8 l9 k5 H SCode:! H$ L9 [, z2 _5 c+ u/ R
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )4 Z8 f1 \3 {5 u4 a+ p k8 M- B
{
% a1 }6 Y5 o, F0 O. F- \/ @ S DWORD nId; N: r8 o; H4 w; S
int nPart;
+ R# J8 N" M- L3 |9 l( P! t. S3 y; j. ^' f) N1 ]
ar >> nId;
, m( p+ J$ A. M3 `% h2 U ar >> nPart;
* Z( {5 ~) Q! p u; [ % A8 h- _$ p0 ?5 T6 f, Q' F
if( nPart >= MAX_HUMAN_PARTS ) " P, U2 Q; W- o/ o6 q* w! h
return;
8 }; n5 H2 J/ _/ Z9 p
6 N& p3 }6 Y9 O& ~ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 Y7 p! W" y& }% r3 ]3 T" `
# g$ Q; \8 |+ w$ T$ r z4 N k$ n; h2 n! i+ r
Code: k7 ~* T2 w- ^% y; w% I% ?, ]3 E
#ifdef __QUGET_SWAP_FIX
0 c- g- P5 m1 A8 S4 W) G4 ]. X Q( |) ]6 b# ]4 `) o9 k/ ]
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ); H1 Y, b! [- ]0 G
pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 `" e3 M4 G$ t1 w" b4 D
$ F; p6 g3 Q1 V, B4 o' } { if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )' I# |. _# k3 v$ v1 J' n
pUser->SetManaPoint( pUser->GetMaxManaPoint() );& \3 }" U, O% G* r
/ W2 i3 @* ]( [9 S' |( r; ]
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
& h- A" x# j. K# P" d pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ A' T1 f# E! G, H0 _" w8 p
. `) q" ^# ^# p. R6 F- w) p
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
: H; R- e: ?% }1 E% |* V+ vand add under9 H I, k7 ]! }- x% d
7 t$ O/ Y& T3 w) X; k# | B. YCode:$ }) o w2 e* G6 P& o9 T( F
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
- y9 K& u: o+ T! e3 X% P5 N {
$ Q6 @+ `2 ^5 ^ 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 );; }9 y" m1 c J; f9 J, C) m
}this
) l3 m/ d. K7 N, x( q. B u* }* Q! }' z
Code:
3 A4 N8 [$ c/ q/ F5 H. e#ifdef __QUGET_SWAP_FIX
: V; C: X5 N5 n; O) x if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )3 ]" u+ F7 W/ a# K. s$ q; G& V; ]
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 B j/ T- p- c) N( j& M% w; l4 @5 P V: }; r$ [
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 a. V1 b2 X+ B. ? pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );6 F( ], q( @8 c$ S% P: W
% h. }- ]6 q8 t. m7 P$ r
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
` O* l, p1 \) z$ } pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
( j+ u) | v9 y9 ]8 J. X. r/ u9 E3 |+ }
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
( s4 V* }( e/ w
% a: V4 s) s8 |7 X+ D& l# q3 _8 e6 f( f- R
|
|