|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 5 ~; \7 _3 b0 I- r
I posted this because someone kinda posted a youtube thingy about it :O.8 U* q- O' ^5 w% z/ W- ], x
$ n7 A# u2 w7 xFind this in DPSrv.cpp @ worldserver" E7 W3 n$ q- Q4 i# {& C( U
+ K/ L6 C6 d6 h$ x) N6 z+ h5 m, \Code:2 K9 Y: N+ C' U+ [' B
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 e1 ]! T( \* L/ d8 }% W8 P z) k
{( Z5 ?* ]' Q- v( T$ ]* y( t( }
DWORD nId;
9 f* ~6 n% Q! B% @ int nPart; A, o5 g% f) {, m
1 y. q: {9 ^9 q* K9 s1 V) X ar >> nId;) W4 F# O; Y6 r. f, h7 p2 y) u
ar >> nPart;
0 O7 o P Y8 O9 O$ ?" T+ R , W: M" d7 G n! a E
if( nPart >= MAX_HUMAN_PARTS ) 5 ]. T$ V7 _5 H$ I) }$ N
return;0 ?$ }3 i6 J Q5 v( g
$ m8 d' `2 U- C4 z4 t, Q# u; q CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it- V2 |- D: H1 D0 R
* g) x# B4 h7 @& K0 e. Z
. D Y1 X6 c& M' Z) \! q2 s6 x# B
Code:6 l" P) v( M8 J) K$ L0 H' z2 R3 z+ H
#ifdef __QUGET_SWAP_FIX
0 y; p" o; r+ p4 h2 O0 ^- w% n' p4 m
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
, w4 g+ P$ {" |- `+ f* p5 z pUser->SetHitPoint( pUser->GetMaxHitPoint());) ^1 e, _# F3 N9 r+ I
' a; W! ^+ g! P! n' C; i if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
7 `# @' I5 b# t1 ?7 }) G pUser->SetManaPoint( pUser->GetMaxManaPoint() );. N' U: R9 X( y1 g9 a# p; A
; l9 V0 m7 @; v0 a- R
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( s" e, f: @6 j( \* x. Q5 d pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# ~# t( a4 J+ J6 l: B; b, d" N8 D
1 p e: Z/ u' I, M$ q; k#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
$ O. k3 R, t5 R6 ~3 V/ aand add under& X+ n- r' ?6 e& _
$ o% @, i5 l2 u/ VCode:. r8 z0 P2 \4 D8 a# C# [5 E
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )8 i% `( A. K5 H% N% F
{; d( }' ~- l- l K4 n$ c
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 p" A: n' G. x9 }1 Q
}this& ]) o0 A- Q- L: W/ _
" }; L% {# {6 @) K0 ?Code:
5 p. `' `, W1 {) Q#ifdef __QUGET_SWAP_FIX
" ?! E/ g4 Q/ [8 y if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
' u! ]+ t: O$ Q- q+ f' n7 Z$ j pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* c) [, n" O3 Y! r0 |5 J7 k- b( u8 {* ~1 A {
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )5 E& p: Z# Q) s* N
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! L# |& x! T8 q2 Q% A! {6 b. ^
9 x. P4 ]; X% H0 p if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )6 M6 s; V+ }5 @3 U$ j$ d$ b
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );2 [, X9 w; ^! n- P+ _) Q
4 _5 ?' m$ d U8 X! s# F#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 8 c6 s0 p# n9 K
6 S, d6 o: G! X. G
- M. V9 v# s5 C; }0 y
|
|