|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked * d, t! j9 Z; r- Z( O( F X
I posted this because someone kinda posted a youtube thingy about it :O.3 X# P' d4 [, m% o* U
8 q$ x6 ?8 v: t) g8 T) z+ @
Find this in DPSrv.cpp @ worldserver. S, s+ Z0 _* U3 g+ |
; t" Z6 ?; k2 |( ^
Code:4 q: F% m) n9 ~, _( k) J) F
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
3 ]( A, |) K# y{
/ v; r/ P8 O6 U6 ^ DWORD nId;* ?2 G: W0 o" [: i2 T
int nPart;
^8 T8 F; L8 n. p7 M: [! B6 ]! t, Z* I/ A$ j( B$ x! f
ar >> nId;
/ b5 p& Q% z% X( M2 J ar >> nPart; 3 B% C0 }' T, p6 \/ p! A
' W, C. s7 g$ p2 t% x if( nPart >= MAX_HUMAN_PARTS )
+ }2 I- Z' i4 S: w f, u return;3 z6 t; a* _' f' i8 ]* O. T5 W$ F; X
1 k* k0 D0 B- [, A: Z# D6 D CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. M; R- u9 r3 Q) `- g* h2 h! W: E0 O' D3 p# s
: _! n5 ?# r! G$ Z
Code:* k* ]2 W9 G2 \ B6 }7 p
#ifdef __QUGET_SWAP_FIX) b# d0 }, {/ A) S" v, {7 X
+ A+ T: V5 r6 X- A# [3 R+ J
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
& O% \1 p& Z9 L9 [0 t pUser->SetHitPoint( pUser->GetMaxHitPoint());( }% ]7 n9 x0 R& C3 N; R
. V$ q: N( ~6 i* c% S: e# u- w4 V g
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )# ^& _: ^" }5 w2 p4 {* D
pUser->SetManaPoint( pUser->GetMaxManaPoint() );' D0 ], W1 ^* N' [
) Y4 n4 e5 x* J! V0 i% o9 {! p. z7 D6 z
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )3 z2 F8 {3 ~/ C$ G* }1 N; |
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );: S7 S8 n! Y4 C; O" Q8 g: E
2 t8 Z# C" n- s4 i
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 z& h2 y5 K, ], e0 ~# Jand add under m2 ~. M, H3 ]0 a7 x" U& y# j
6 L0 [ {" W1 ]* ^; iCode:& d% [; _% h- X( b; Y
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
+ r4 N$ m; E4 ^, a {
2 X) v5 ?6 _( [) I2 r6 i" ^ 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 );
# J) w# M A0 B, G! o/ ]5 j7 Q5 w1 y }this; ?) `0 C9 y, C! A# @. M
; H( `% a2 R2 G8 D r6 s
Code:
p8 @- l o$ K( l#ifdef __QUGET_SWAP_FIX
2 d" z0 x9 i# @0 [. D. w' M if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
. \) F& u! j8 d pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());+ v7 P; m% Y# Y: N# X
! f$ Z: k: Y9 m3 ]! ~ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 \8 Y- s- l" ?# [/ @4 o; W8 s pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
! b9 O$ `, Z$ ]0 D3 |; p: {
/ K+ R- E" g6 s4 h' T4 F5 O2 e if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )( U) B; x1 @4 o! k: t
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% i6 O: Z/ T }: U3 G3 q
8 x( g6 x/ e. A. ~) F2 ?0 q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
( X P C" h6 g$ U4 J
/ O' L6 a/ g/ f0 g# f% I4 [
0 I" q- D3 i" q" N# O7 f+ N0 C3 U |
|