|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 2 O( X2 p, F! h- h( L+ P9 a
I posted this because someone kinda posted a youtube thingy about it :O.! E( N) ^2 f1 y1 r5 o; \8 G& a- o
6 ?( r# u1 F G! M5 w: ZFind this in DPSrv.cpp @ worldserver
) m2 r2 @1 l) H" M% M0 ]+ b1 z/ e/ S5 a/ L
Code:) r- A! x6 N; P
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 E+ _7 @5 S- Q! D{. r$ J' r5 _& x3 Y5 s
DWORD nId;
+ s! }, _* U& j1 V0 D int nPart;" g+ w) t6 J/ M# x! a5 k) x7 l
+ ?3 M4 r, Z9 B8 h/ a ar >> nId;
- [2 R$ A _. x8 E ar >> nPart;
\4 F$ k% z! V7 @# |. B 7 Y6 L7 N8 i) }7 ?' K& F
if( nPart >= MAX_HUMAN_PARTS ) # S$ M5 W+ n7 A* F, F
return;8 c0 h' T3 O( X2 G. p( `
/ ?7 U z( K5 o9 R# _8 ]' n
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it3 u. z( Z" W: K* H# D6 v8 ^
& ~& b; b7 q+ b( V& q
) W% N/ s1 u: q/ G! y# J1 vCode:
2 Z' R0 u t) f9 Q7 \#ifdef __QUGET_SWAP_FIX! ^5 S. F8 s+ f& \# J- H# q- p5 z
. D; o) R- O& L: U h u2 u8 I) |
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )$ w9 N2 V) y, ?6 V
pUser->SetHitPoint( pUser->GetMaxHitPoint());8 \+ J0 b ]9 D& I* M9 A
1 B$ @7 Q9 s' \: B% ` if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )7 _5 M7 @/ `5 n0 P/ J
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
1 u X& O& m5 J% G1 t% S1 o E5 b# `( A; p3 h1 W
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
; H! [: A2 Y! \) U1 E# F* E/ k pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ q7 C5 y, W3 u$ G
( a1 y2 P f( D$ z7 ^8 M8 E' Q+ ^
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 j3 M$ N0 n5 ~% W, G4 x
and add under
: H) t' L# E; _' X6 a1 m
& F5 V5 Z1 K* n. J, `, w* hCode:9 {2 S6 X) k7 _; r( B
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) {8 W' f0 s( L0 |, t. {1 I
{) D+ ?) p: c0 x# u6 ~) O
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 );
3 x* ~% R" h2 Y }this' V1 a1 K/ M8 q- M6 C. L7 i H; \
6 E& e' h; Z# d$ W, Q9 ], \- i1 j
Code:
+ S; T+ r- h3 M#ifdef __QUGET_SWAP_FIX
2 _) R- h" Y0 J; e7 d9 u6 w+ ] if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )! c% P$ b# F& a6 v0 k
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
% ^) j% U$ r, i: |. L2 `* [) x0 B+ k! [. M- X) u% T0 ~& \9 k) B
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
! q. r$ }9 ?. c( ~: O pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ L! @* h* u: \' O/ D B
) v; R3 k2 E9 B. }/ y if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
, Y: f4 M) q7 E+ L) U' Q0 m pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. y" Y5 W3 c2 k1 e
. G& n% m9 R1 z3 w* e* y2 J
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver / J3 j. }0 M4 r: z! m, L
3 P1 V3 }3 E* A
/ `1 B* W. y4 l) |
|
|