|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
4 a9 h' M1 l6 g+ V3 {I posted this because someone kinda posted a youtube thingy about it :O.
8 g |( j& b' n+ L! u* s" O j5 A5 F9 f, |3 V. D1 l3 P0 {
Find this in DPSrv.cpp @ worldserver
1 g& z2 Z- b2 m
5 t9 N/ y. |, u; R" LCode:
4 A* s! m7 C$ b/ Y6 |( Dvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 _6 v, b3 q/ z4 t& P7 u2 j{$ C4 b, j/ [4 f" ]8 H) J# y. n
DWORD nId;9 v, n6 s n5 |
int nPart;
, R' w" b4 L: b' Q" y0 r. T6 U7 @) L4 L- Z
ar >> nId;
# R0 K* |3 O( l ar >> nPart;
. {/ D! {- d" c: c2 ` ' A- K" n* a1 g6 o
if( nPart >= MAX_HUMAN_PARTS ) / \" f. Q+ G, A% c+ [1 r
return;+ t$ Q5 B% D1 U
/ Q! z1 p$ ]+ Y
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
4 b. Z. E# Q" K; {
+ q! `* I, y) h9 i7 e' s- y
2 w* o- t! Z* W n( V9 w1 GCode:9 n8 C% i2 j( v- p, H
#ifdef __QUGET_SWAP_FIX- x; ]) U- B# h" M. _/ ]$ v
( T* w' } u/ I
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )0 Z4 x# o, @* M" C
pUser->SetHitPoint( pUser->GetMaxHitPoint());
6 Z- j/ M! [+ Q. ~4 ~, V0 r6 ~+ L$ s5 }( w# s+ m: I. x
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
: `9 A$ X g* a# u3 y2 N pUser->SetManaPoint( pUser->GetMaxManaPoint() );
2 I% D4 N& m$ \
' H5 n7 }9 ?6 K- C if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )) \5 o1 o3 Z) E) L
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );; t: T; h# F% o6 A1 A1 H
9 f+ B* m$ @/ q! Z+ |/ r1 b1 S0 i#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
$ _* r9 v0 w# {4 L' h) yand add under
f% j$ L% }; T0 Q. t0 O$ ~' r$ d0 f
Code:
" h/ V5 n. M( r7 X, S. @+ R. Gif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% d) l7 {& ^* D) \* X) Y% t1 H1 T
{
& `5 A4 }* x% x5 _% 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 ); w- T1 q: m0 n$ h
}this3 A9 \/ ^* U3 Q( v. N( X) X @4 l
9 Y7 B; W+ i4 b7 q" }! PCode:3 B" d" K; \6 f6 ^" D4 Y
#ifdef __QUGET_SWAP_FIX
) P( A9 c! h5 G# j) r6 E& `- j if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
W" h( s+ y) ~# ]* Q7 V( v pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 V9 Z, D6 a4 D; j, Z
1 h- i, m- V& ?! D) [/ E, x if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
" w5 ^4 U; L% \ N9 s' I pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
. U/ j# X1 j( `" r. D/ b/ ^4 l" W8 h- i1 }
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
& P) l9 F2 E$ \ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. V. u& ~" R. c+ `5 E. ?5 N* X# F) c+ S0 [; I% P, P
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 3 s1 d' q7 j- u4 A: |/ V2 |, y
2 E {9 M8 X# u( V
! o: A4 Z( O5 t0 D7 M |
|