|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 8 _8 x2 D, x2 P* K C9 t( H
I posted this because someone kinda posted a youtube thingy about it :O.
* f+ i1 Z% r$ T: B2 T2 M" B1 W, Z2 [
Find this in DPSrv.cpp @ worldserver0 v4 B5 ?- q) L# p4 T
. v* p2 N+ f) B" O' y
Code:
1 o M: q" ^! O) |void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 b% a, O/ g. H0 R& [5 `. V/ R, E) @2 G% e
{
) [+ e( K9 ^: n/ _, ?7 D DWORD nId;
1 P C* }; l+ f& H! k- `( r2 X int nPart;
- F# ?% R7 m$ K) B" S; Y# s6 A8 `% Q; @' j2 R! G- ?
ar >> nId;
( }4 X$ c; i& B- n6 w! B4 Y ar >> nPart;
g9 U1 r) R0 c! C ! j; x7 O% u" W
if( nPart >= MAX_HUMAN_PARTS ) 4 R3 k( p5 L, B/ r3 N0 H
return;
' n& w, u9 e2 L. U1 [- x' e
( M2 x# |1 } Q" P% v CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
! i8 c) o8 ^$ Z0 }; c% ^5 z X) K/ p% R' q
) b; j: Y' ]- B8 v* ]- ICode:4 A& y6 J% _" M' G
#ifdef __QUGET_SWAP_FIX
7 n8 D7 j& c- j3 |$ F/ A; `% Y/ D3 R
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
3 p+ V1 I4 p- \3 P K7 I3 ~8 \ pUser->SetHitPoint( pUser->GetMaxHitPoint());, I1 D2 [" z0 a; y z/ C, j! W& M
; L: p. F3 O# R+ f4 O$ H
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )5 z+ y9 w: z( w) T2 \, t
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ I5 k, e& T, T" x/ g. B8 _& |. I
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )8 ~ S( W9 O0 y5 r M, D- E
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );- \1 j4 Q5 P" J# S0 F
' H4 o6 X8 N9 T$ P9 f#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 ~: ` ~$ T, s7 C# z% H6 {+ P0 I- H8 h' N1 }
and add under: {3 o' \- o3 a9 z& X V( X) F
8 I5 ^! p+ j; b3 ~- O4 h
Code:
. I6 R$ n: _/ [+ vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )7 d# W- U4 V0 R0 F1 C
{( r# j b% W; j6 j2 v n
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 );
% v: z% D: K) C }this
" K5 {) o) O' h9 r* R4 h7 Q w/ t- ?# M$ d! g8 q/ s0 X2 j4 T
Code:
- ]3 w7 f O' s$ N#ifdef __QUGET_SWAP_FIX0 g: C2 `) E: J0 P8 m
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )" d$ ~, w9 ~0 N. G/ u" h6 p- M
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());8 T; L8 b% h* Y* M' w5 w
5 H; X) Q$ z. @/ [1 m! {0 o. w
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
& j8 ?" {3 X& U$ _7 Y0 {1 c pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
6 h$ G! E( l. [$ Q" _5 R5 P: V7 }2 Y7 m- e
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )) F: B9 K- ~! X# i8 C
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );2 ?; C& H! W$ h8 t; U. [ ~4 J [
6 u, A" Z% M2 b+ A' E: d#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver - c% h/ L( b; L0 }+ ]/ W
% C! d4 I6 b7 ^# a
/ ^) z2 P5 s: M1 p! u/ A& b |
|