|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; k+ @8 A2 c% M3 s5 y" \2 S$ @8 VI posted this because someone kinda posted a youtube thingy about it :O.1 v8 y! l' U6 {$ E
" A i. ^8 o4 r0 n5 kFind this in DPSrv.cpp @ worldserver" W7 g9 r0 U0 l5 j# j$ a
, E, W7 l1 P7 G+ h" V
Code:
' C, l& t) D: _void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 J' M& c( i3 T* h* s% \
{
& x& M* b5 F2 b1 Z! D% e) ^ DWORD nId;
: m5 e: Y, g) F3 h6 V, U+ B# K int nPart;0 q ^9 J) v- u
. Q* T9 x1 m: r" }, S ar >> nId;. A; n% h2 r7 ~( E, ~
ar >> nPart;
3 k/ ]1 j3 K9 a$ ?( E$ O8 t 5 _! Q# N% Z+ _$ k
if( nPart >= MAX_HUMAN_PARTS ) 7 k/ {- c2 _* u
return;
) G- R4 I7 e8 s8 h" _% t
( U/ L: }6 z0 z8 v2 s' ? CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 w' U4 F$ h# N/ }
3 v( }/ N) R# G* m( O, q% _
( J$ y# _1 Z* U- h* q4 R
Code:
5 I, a. O K; x1 O; ~#ifdef __QUGET_SWAP_FIX* i4 w0 N: M. A5 G
( c% _6 S5 N9 D4 G4 q if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )' \. O! E- F2 `5 E3 P, K, \
pUser->SetHitPoint( pUser->GetMaxHitPoint());7 o1 U+ P; G# J, V1 B/ i
1 ?+ S1 P5 \: X- r! T if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )6 p5 k# n6 i' t2 v
pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 r2 |* r# }2 B+ j' m
1 ]2 ~8 U7 L1 `5 X- a8 b4 }
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 v0 } X. F' g! P
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
: n# X M0 d6 a
" L- Y( o, |( ^* J#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
8 b, h5 {$ o7 Eand add under+ ^, r6 b$ p& E
) z( Y) |, g0 A$ T1 d
Code:
9 G4 ?. J' O; a* n9 N/ Bif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* \7 |+ S! n& g8 ]/ b! P+ r& |6 @
{
" L1 f/ b; p4 B/ d 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 );8 q) v0 ?4 g$ f
}this4 |% {( j! [/ `9 V/ t4 _" a3 M
4 v: _8 _9 f6 N7 a8 l
Code:# k/ d* L, r; u
#ifdef __QUGET_SWAP_FIX
7 B8 k. s0 N( x/ [7 t if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
* |7 ]7 L9 Z1 O/ X1 B2 r* b1 O pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint()); Z8 _6 H3 s" @7 ~
, d# T" O# x% A5 v/ n- v
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
& e7 m5 _/ H; C2 z- r: z; z, ] pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: U$ @( ]/ M: k; T2 c! u1 M& W
9 [" q$ J! c0 R% ]! M3 d if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
% T; ?" q) K# s% o+ ^) Q/ v9 u pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( n; d% \. c& m) j) u9 }# m
8 d8 D/ w+ m' ]' Y1 i& v
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
& }) t9 d3 p* P* a5 d! g- m, ]( Z
& V$ m5 J, t6 }
|
|