|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 0 z4 i, l1 z# _
I posted this because someone kinda posted a youtube thingy about it :O.2 {2 o& ~% L, z5 v, k8 D
: S, G% O# O2 V/ L2 fFind this in DPSrv.cpp @ worldserver$ F Q1 j+ _8 K9 N
. v! t) Q5 c7 N0 |. ICode:0 h$ X* o3 T2 [0 A
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
) Z& t: H. L) |5 E% I; W/ ]{
( b: N4 I. `2 ?3 R* \4 ~ DWORD nId;1 L8 t5 {) ]0 Q" ~- ]. b
int nPart;; {/ s0 J9 P) I% [1 g
9 a: N' F' o. h+ l+ z- r* G9 M0 @1 r
ar >> nId;/ z& @. f) }& C; }$ h4 b( J" ]* d
ar >> nPart; 7 D* k* p. a) G1 n1 v' _
/ X7 o( x' w. E if( nPart >= MAX_HUMAN_PARTS )
% q% }* h2 L7 {& h+ a+ [' t return;- r+ h u/ c8 a
! r3 F( Z! S$ ^& k) Z0 | CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
) o* q. a4 ]: @9 y9 @
# b M8 S+ m+ s8 P
8 w; e( s& b( t+ V. F1 q9 O8 K1 |Code:' q: W* F; `! Q: a
#ifdef __QUGET_SWAP_FIX8 H8 ~5 h: N# k$ ?: U8 V
[# h5 m1 t4 R0 u4 F4 Q# n2 a% t. m if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )8 O5 p3 {2 N3 h
pUser->SetHitPoint( pUser->GetMaxHitPoint());
' T" R% _$ q. t, W1 O# x. b" h0 }# d' x8 A% w$ l
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ), J l8 h6 {) T
pUser->SetManaPoint( pUser->GetMaxManaPoint() );: ]: G; W2 T# B% H# n
& E" k% B) J) |# A6 \7 i% c
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )' V O5 ?7 W% k: I% x
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
- a6 D1 c2 X1 u$ Q
9 P/ E% e( {: D1 _#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 W/ T0 D8 t- q& d( Q& V7 B; r& K+ H
and add under. T- I5 D) w* R ^
2 X! z) R. U5 W: `1 U
Code:
' @5 Z2 r' z) b$ l) I+ H! zif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% [7 b# L# R5 d6 d. G" D
{: V; Q2 J, t' m
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 );
0 \% d8 T% n$ S }this
5 a- g! C b8 s3 m' U' i
( s; H* c; `. }5 c1 l8 TCode:
) x; u1 j( N! X6 W7 O e#ifdef __QUGET_SWAP_FIX' I! X2 G7 j" C7 h M
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )+ P) H" B) J4 M, B/ P
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# w5 W' d7 i j9 o
' Z$ X! _) X/ i/ v
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )! ?- @& }$ p: W, P S
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
) \- S* U5 `. A3 K* v& w0 }( \; o7 @
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
& Q1 g! g: Y' X: [' Q, p! A pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. i* F4 Y' \* H2 d
; g. S( R5 j9 h& T#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver $ @6 v! g' |, }8 e6 L0 { ~# ^ }
7 a1 x4 u* o- L, V
) `8 i/ _3 |* @/ ?2 j* T |
|