|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 3 H4 p: K8 u; S: x
I posted this because someone kinda posted a youtube thingy about it :O.
, a; E* w4 k5 v! j" ^8 p8 l9 ?5 I, E, |+ ~2 ^2 c4 h
Find this in DPSrv.cpp @ worldserver
u. k1 {2 W" r
' W7 A9 F6 k7 m0 K( CCode:" N5 K( T+ o8 {5 @% N' G7 N
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 L& Z# n& J+ c! q" I) T{
3 t$ L, e4 a3 N4 L$ n DWORD nId;
# j/ t( K. ~8 R) k int nPart;/ e7 H7 Y. \& W/ M) S
7 f7 G' I& |6 {; @
ar >> nId;+ W( @% ~3 r7 h2 p% ?5 n
ar >> nPart;
/ t, V @$ r7 p9 v0 {
( U2 J( B& W, d5 a if( nPart >= MAX_HUMAN_PARTS )
* m$ u. T2 W5 U& i6 T2 T return;
% t1 Y w8 C$ ^; i( v2 h
' I) F# ^. Z2 t CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
4 y- v( u" s/ g$ r
$ R* v5 P: R5 c$ h3 ?9 y9 y7 k5 Z) d- Z- s3 `
Code:3 d6 I/ E* q# }2 q* j6 ~
#ifdef __QUGET_SWAP_FIX3 V- i1 ]$ ~- Q% J. U
5 u' ]8 t8 _- v$ i! _8 H if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )) Z6 d( G& [6 |7 ~
pUser->SetHitPoint( pUser->GetMaxHitPoint());/ ]+ e0 W! e# L' E) G, @
" S" ~' ^# i! R& O' B& q- | if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )8 F* X$ w% g" R) Y
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
2 k K+ x* h, Q: r
$ F' w, e7 |4 j- f% i- q if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
- ^3 q- u$ O1 s3 Q( ~ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
- o7 e4 S+ S' X' \& ?! g$ G( C/ m" K; |4 C7 U
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp# E- V0 h$ c& m7 G$ F
and add under1 J' |1 V, g* r1 l6 u
. K& F9 S9 u i
Code:
) }0 V& t3 \& T! k8 @( ~3 Iif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
7 Y$ ^0 y/ q5 B {
- p; C7 q( I6 g8 B! D/ L 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 );! ~5 F5 c1 @+ n$ Q+ n8 _; z" c
}this! f2 ^! ^, b; w" F2 z( D1 w
/ K" r+ o: i; h
Code:
3 s; Z6 v' t, v: e8 q4 d#ifdef __QUGET_SWAP_FIX4 T; ?" c4 f; Y" k; b
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
& x* t0 _3 L; R3 G+ J+ N' a pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' h$ F& J, X& y
; r3 m: \% O9 r
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )# { Y2 A, M7 o9 n
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
: ?4 M: x6 t, b5 ^5 V" P' l. |/ `2 c" I& e& O0 P
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
! I5 T4 A& x. v- y1 K pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );# I% N1 e& s [! e
9 E6 {; o: M, F$ Q! y3 I+ v. x. V#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver " ?5 p0 D' {; q; g+ j
8 q8 T4 o6 M( }4 z
1 l9 _4 o8 u( o
|
|