|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
) N6 h( ^( j/ R$ G+ @0 U5 c/ ^I posted this because someone kinda posted a youtube thingy about it :O.3 }& c- y) H5 E- f: ]; J* W
* w& @9 D6 L- Y% h; oFind this in DPSrv.cpp @ worldserver' H9 E* t- D: a/ w1 t% [' p. y* H# E
$ `; j- @0 k5 I2 z2 W
Code:
- \3 x( u+ D) n$ f$ x& qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ), T+ z! p* v4 W: N5 A
{
7 _. S' i( x3 Z" I, B+ M# E x' l DWORD nId;, C8 P" p; {! e( O
int nPart;5 N; R- _9 X9 [+ `. @
& I2 F5 f- t# z( p- @+ J9 y
ar >> nId;
8 L4 u1 s+ s! F$ f- l8 g" A ar >> nPart;
3 u, e1 K% x7 o o. u4 f
+ Q8 R% x3 M. ^! N if( nPart >= MAX_HUMAN_PARTS ) " ]( E3 M* {, q( u l
return;# p7 s. Z* c/ [% \8 U
7 d) A, o" ]4 ?% m9 ?
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, X) G$ B- `! {0 e! y4 F% b9 R3 g \/ n" l
7 M! a: y i# I8 M
Code:
* w5 H9 S6 z% U9 f#ifdef __QUGET_SWAP_FIX
4 W6 w# K1 M- e% T3 m; W
5 S( C, G% m$ J/ ] if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )" K6 `: I. J9 q, T+ _/ w
pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 N& ~4 g3 L9 Q+ S5 K) y1 d6 s+ O; _# b$ u0 K
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
0 P. \: F" F; m P pUser->SetManaPoint( pUser->GetMaxManaPoint() );
6 }3 w" s. h/ w x! f7 `/ h3 }# Y) Z6 s
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
& V: J+ |8 q9 i# d$ S9 M' _; S pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# Q5 ?) ?0 Y, [+ O3 J; t$ K
" c" F. {/ v) C1 s' V; p#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ ^5 L. g' I) Z% E' Iand add under
; L/ y5 _% p5 ]! N2 ]0 [% @- ^; o
: {9 l4 L* N. {- J7 y, o2 u; kCode: {3 [' i: A" e1 r- }: ~
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: n {1 F; G K6 d0 D {% `; U' Z/ |+ N H- X7 y3 {
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 );4 V# P+ U* J' x1 T3 F4 u$ a
}this
3 Y3 ^6 p' x; p/ ]6 X/ v: j. S& I5 k3 k' j$ R
Code:; ~0 e( H7 {- i( D( k
#ifdef __QUGET_SWAP_FIX2 P5 O8 F2 H0 z) G+ G: M, ~1 ]
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )7 R2 A! w( E" A/ ^8 ^- D
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 b. |1 W9 S2 B- `
; g+ q5 t/ {+ y% E if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' Y# R; N2 i m5 i' X1 Z1 j9 R# G7 ~
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );, S1 Z& m! a, W
5 ?% y( z$ M: B* E5 O }9 \ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
/ e. W( [4 w/ i8 ^ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. z# e' z+ x2 w' l) e: ^
% D, H l' T9 o5 m" l# x#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver " i% S) m. V: g% _/ @# v0 O
6 q0 {5 C- i8 h) a F/ D
- y/ b; B3 I* {: P! x# l |
|