|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked . R: n# f1 @" S7 x
I posted this because someone kinda posted a youtube thingy about it :O.
5 [9 r* j- p; W
5 Z; `. n+ M5 T' p$ `5 AFind this in DPSrv.cpp @ worldserver
+ r1 f* X+ R7 \' P' i% g H1 L2 `9 a* O, O8 e$ v
Code:
# P) ]. Q$ |+ K! P0 }0 hvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
( g7 n- S) r1 B& i$ t{
7 x/ W1 m2 t$ b. O2 ? DWORD nId;' K3 w9 M- H( s+ S
int nPart;# @/ z2 a A- u" O/ d! {
0 D9 Z3 M; q B7 [4 J E ar >> nId;
7 ^( {+ b8 [: k5 y- J! V z* y ar >> nPart; 2 v, n- |. U3 A m6 |: _$ G1 W" U1 p
4 v7 @% p2 R+ A$ {+ w) \& ^ if( nPart >= MAX_HUMAN_PARTS )
* M; C/ }% u6 z9 T- }, ?' p2 L return;
, D* P3 J) n+ W( c) a
, }) X' ~9 e5 b: I0 R- S CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( @2 O1 q5 ?8 q! ^# v/ m& h+ C$ k. P4 e* d* x
6 W8 f) t5 f1 S T k! U xCode:
( a9 y) i* m) C2 K1 W$ H' o#ifdef __QUGET_SWAP_FIX
" l/ e3 h% A3 b# o; _: E/ c
* E3 W$ Y4 K2 t# m% _ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )1 K# x8 }: [7 m; R6 o6 t( j' e9 K; l0 w
pUser->SetHitPoint( pUser->GetMaxHitPoint());
" ~3 ]: s% Y6 l( c: }- u X' |2 [4 [6 t- d( G
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
- _; Y0 V; X. B1 ]9 _7 c pUser->SetManaPoint( pUser->GetMaxManaPoint() );
2 b9 x6 z0 r* ?2 T' _: b
3 C4 l( A, E5 z( j' Z if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
- C! x1 m% X7 w0 @9 @ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
! F* n/ s* L9 P. c6 z5 k, j; Y3 M+ L+ N) f
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! o1 w# I( e8 a7 p8 \2 G( j" i1 S
and add under
0 u Q) J; b ~ [. O. N) O8 ?$ U& A/ P: F
Code:
H) W: n( O3 D1 R8 _# Wif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )( V" Q; w& P3 I4 S1 s
{
1 T' w0 ?" u/ i" G8 \ 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 );
, \# s3 u% j6 H }this8 J: i8 v: X0 Z6 w7 e. t5 Y; A9 o
+ |" K( p+ D2 z# m. A' bCode:* G1 k |& T, F% g. d0 K% ~
#ifdef __QUGET_SWAP_FIX" I7 }0 u0 V+ ^" ]' K( r
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ); j! s; x; T Q$ k$ e
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());/ r% {7 ^$ V3 U8 \ V& w% Z! {
- P5 h. ~- `! P2 f9 d4 a
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
4 W1 z: H2 C9 a pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );$ N; ~" o6 @$ h
* r! x5 }$ T! F: G
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )6 X+ o+ x( a) y" P
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) g1 c/ c4 q# u( u
* O" E6 [. T, a: X5 u
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
+ o9 ]8 H8 L' N! T2 m4 n. F9 F$ n$ W( Q
& @& ]( S8 {& a& s2 e/ q/ A& e/ e: ~ |
|