|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
8 Y, w9 N% X2 B0 o% U2 YI posted this because someone kinda posted a youtube thingy about it :O.# ^% a6 p. E. s E
! Y( P, r |* F4 c' y+ f- jFind this in DPSrv.cpp @ worldserver
3 K [! e& N3 } t4 ?9 m S* P3 I8 Q2 M. j
Code:
$ P) Z7 I0 m' b- m) T+ gvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
- X; [) x9 r, q* h- L8 j. r{) m# Y k! r/ l' T. Q0 C
DWORD nId;
! u2 g2 @, o2 R( a. Z3 y: `4 s" d int nPart;
1 e% D0 n/ B+ l, Z0 `3 x" f' _$ s8 a" i) v% G7 t9 \
ar >> nId;% Y, s5 [ }5 O* n
ar >> nPart; ; i6 t4 e* u2 \! F5 S
( F/ a& n& \: |6 i if( nPart >= MAX_HUMAN_PARTS ) % C' @/ c/ p W" v% l# I
return;- a8 G& o3 z) N: i5 `2 z! i& I
* q: ^+ Y- C8 h4 k' _2 w$ ?
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it' `' h/ S- J, |: s$ d' P
+ r4 b/ u0 L& ?/ q1 Y1 t. W5 Z4 _+ A2 y3 k8 r
Code:
! |7 B& @& U0 K#ifdef __QUGET_SWAP_FIX
* o+ ` S* t; x# o7 U6 L6 z. Q) B. \. C" M3 F7 n: m5 W
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
" P4 h: ] P$ G- m/ o; E pUser->SetHitPoint( pUser->GetMaxHitPoint());' f; M) a( w6 t. T! W
+ z9 E6 `* F8 a
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
. ?0 v/ ~; b8 G/ J$ m pUser->SetManaPoint( pUser->GetMaxManaPoint() );
B- Z5 c, ]5 H3 p( {9 L, K) D! `$ J2 M
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
7 N0 e1 E: L2 V pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ v0 g A& n9 M7 _' Q8 _! [
c, C, [0 o) v1 t/ g#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 r7 G; W) B6 s# m+ g {/ @
and add under6 u* q! U, {( [/ @6 `; N. T% b& l
1 a# Q8 r0 s0 r# q2 OCode:6 a7 ?) T5 d- f: e2 p; t- v
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% K4 V/ ~. |2 l
{
# d9 e. Z9 K A* ]( A9 Z+ Z 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 );
* Y% [0 C" K/ t0 |( N/ C2 E }this& t; w6 g9 @7 w
. x8 C6 z& V( }0 f+ l+ U c% sCode:
! C5 k: @( z; x/ Z/ E#ifdef __QUGET_SWAP_FIX
7 V7 L5 R2 s- y& L if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ), I0 V3 ]. t& D' `2 Y
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. ]# f! `' i( m7 B( J" K3 `: X7 j- C$ E! q* D' c
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )6 H# ]: t) A! T+ \% ^. P1 u! V
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( j" s1 N% E1 F! ] y( ~+ R0 n3 h8 N/ M5 p, k; {7 Q) F
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
+ s" q# a/ h+ D, y( c. ` pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
v8 y$ q3 Q. D$ d( V- C. f7 ~# z" c* i- P: v9 q; q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
, v7 {* }1 k- b$ P- j$ J* [3 G' s6 u
' F- k- U5 l& N
|
|