|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
c2 X f& e5 H* `& e. y. kI posted this because someone kinda posted a youtube thingy about it :O.3 X9 k# b. c4 m( L2 w9 y
$ j) K. X+ Y T# y F$ ]% V$ b/ d
Find this in DPSrv.cpp @ worldserver
, |$ N+ Q( H! b1 K- D; U% h( g5 w& } V& O
Code:2 S& E4 z9 f( z5 @' B) d
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 H. Z( h0 d/ S1 Y3 {8 U
{5 x/ A# K }+ F2 L# Q# O
DWORD nId;
; G% s: T: j/ C) }4 w4 I int nPart;
: e. ?1 f+ L' H0 N v/ S" c4 k% M' u6 M7 e+ U
ar >> nId;
& F ^$ `4 z/ |# F+ k- V5 { ar >> nPart; & `: t% O; i3 [, s" M) @
1 F4 Z4 p8 _( z" B9 W1 V) @, p$ B4 g
if( nPart >= MAX_HUMAN_PARTS )
! W6 K+ ^, u8 i; o, U2 V+ ~4 p return;* A9 Y5 J! _' F* i; @
& p/ s/ x8 U# A, W CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& A1 p% k M$ A- n. A& i7 H' O# P: c9 Q- S6 |: L
( j( L$ D' e a" |; a% q
Code:' Q8 h5 y9 Q3 L+ E% ~$ _
#ifdef __QUGET_SWAP_FIX
6 E N5 W' `4 c8 ]% V7 {! q
6 Y- P% Y1 C9 _+ n) h$ w if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
+ x" i' r) q0 f* ~4 Z; F. q% i pUser->SetHitPoint( pUser->GetMaxHitPoint());
' y1 S% d! G7 c) s% L! y3 s" n: m5 |) j9 s) H$ Z) H2 f
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )0 R0 j% L1 U9 J
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 W; y# F. T5 \+ j6 [7 Q; L7 E9 H9 [9 V+ l2 X
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
! p1 Q% b, r, z2 K9 E$ z9 x2 k$ e$ f7 I: i pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );4 P: V; }1 w7 C, u; Q2 Q- r
" q6 G2 ?& G: {: C5 ~& D* |0 E
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp- \- C( r; z# C5 d9 b
and add under" ]3 l% L+ m$ `+ {: L' H4 W' K
# T+ U8 c% w' L) S9 n+ P fCode:
& [1 w. d1 m9 G1 x# C( j- @( o* Dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ a3 F- y4 J# c2 | {
7 H$ K+ E- y# N7 Q: D# r 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 );
- u( }+ R" O' x3 k }this
* Z$ U- h% o% T+ t0 @2 a1 _. c9 l1 B' \) u S- ~& D# ?
Code:& R E7 p, r T; z9 B
#ifdef __QUGET_SWAP_FIX1 t8 A$ h! i$ R9 R$ w
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
# }3 z# A( J4 |9 b$ D pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& Z3 P% V$ B, E7 T3 C$ M" ]' o
. F$ ?0 j7 i! y% f g) G9 T; _ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )2 x! g z. C$ _5 E9 `4 t) g
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ m! s. j' V1 b) f$ }& l( Y
, h z8 Z8 d* J& C& m, h
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ) M; B! w6 ?4 w. Q, {3 ?% n
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
( S' b+ B) U, v# F# t, j6 L: o/ K7 }9 d h
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 I" ^9 b1 W7 k+ C
! I z4 A+ s& C4 W4 s
( ]; Q( K; J. Z( V% q! x# s |
|