|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
/ i- y3 `8 D* j! ^; d8 w. b$ mI posted this because someone kinda posted a youtube thingy about it :O.4 x3 n7 z5 T! X( h8 n( `
* P; W; S3 {0 P/ z% G
Find this in DPSrv.cpp @ worldserver; M, Y& W+ V( D' V7 u
% g. B h- P" Q9 V: I3 ^
Code:) ^" g9 y9 W* F: U9 s K) P0 a# n
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 @- j: a1 S: d% ^
{0 P' n1 c" Q" H y0 e( L6 |) M
DWORD nId;
h& x& p. j6 c3 V int nPart;* C, f( o' \* n
7 S! }& x" L6 n5 U; Z* d' ^
ar >> nId;
8 Q8 l2 B' a9 T( f" i; S" \ ar >> nPart; 1 Y C o Y& c" p! o% B5 J3 K- d
0 Q# M. I. `+ @
if( nPart >= MAX_HUMAN_PARTS )
! E6 Q) u/ u9 J4 F5 n return;
) N% e3 g7 ~5 H, X3 w* W
1 y, p- }. o# B/ r; k9 m- ]$ ~ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it9 K- `6 v u p0 o$ |( z% d. o( w
5 x5 ?8 M0 G2 E5 ^3 W4 F$ ~' u Z
/ `. I7 k, c+ }9 A: `7 f% Q0 }
Code:
+ I$ j5 m S+ X2 H; l#ifdef __QUGET_SWAP_FIX
7 Y6 a0 i) ^- D, f' a7 J# C; _# _; d. V7 q) {& w- e, w
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ), w3 m2 N b+ h
pUser->SetHitPoint( pUser->GetMaxHitPoint());9 T( `$ k* }: J3 n/ Q, H+ s3 t
2 O& g W8 O( P# h' P0 w! A5 r" ~ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
1 V5 C" N# V( _ pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ \7 s4 E0 d! M; l" u5 z
. e2 ?1 j, w5 h) Y) d) L if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 s# r! g0 g/ g7 p1 d1 V! `
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( Y3 u* Z4 F2 m9 J' {
6 X S0 K- u5 a' A/ P% G+ C1 z' V! v
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; @# N" \5 @6 f+ h4 dand add under
' h* v6 d$ L- a2 T) L1 J' N2 [7 s1 n
: n1 B% B6 b* ^2 yCode:2 i; \8 J% L, Y% A
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* {! Z1 S* _ A9 z$ C% u, {
{
5 @/ }* }3 ?. 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 );5 N$ @% ?. O5 l
}this
: `' L/ E4 I/ b8 R; W+ j% V( @5 U% d' r: u0 I; g( u8 X
Code:
) U( H+ _0 c; U2 V#ifdef __QUGET_SWAP_FIX$ j4 @! B/ M: q) f0 z7 g# h# _: m
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% Z; {- d6 U+ i# Z* K pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
+ O1 z. E$ j) j8 L6 g% ]# g/ u- H1 f/ \ o
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( w& g' R9 D W' T pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" P$ T6 d# }6 ~( I/ e5 N# f
2 ^8 Q& y: l$ q9 P% P# e if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )+ ]. l4 W4 J- @+ b' M: p
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 y7 F1 H7 M, X5 ^2 s
3 ^/ U+ ^6 V* t/ j% S#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
9 d' T; [; _7 ?1 q( e) h, L, c4 P! [4 h8 s+ z- s
+ F( ~4 W) D) W
|
|