|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
T, h! V- v! G' [; YI posted this because someone kinda posted a youtube thingy about it :O.! }! l2 N- L8 G$ t q
% p1 B. }( J( C" M; u- w' ]5 QFind this in DPSrv.cpp @ worldserver- H: m5 L3 }* p) d, O5 F1 v' k
3 s" f8 r" n& R, U5 UCode:
) v& g1 O; u* V4 {; Vvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 g1 p+ G, q6 }5 |+ }! X
{
+ m0 e/ z2 }) [' @( ~0 B DWORD nId;: o" [/ f% K: E' t7 S' l. j8 F& T
int nPart;
+ {# s7 L0 \. C, T% Z, ]
8 d3 [. S; I" I1 o ar >> nId;
8 ~; D5 V1 v: S# @7 j ar >> nPart; 5 v6 Y X9 ^8 M+ v; s& e
. Z1 x6 @4 M: v( k9 H4 z5 G
if( nPart >= MAX_HUMAN_PARTS )
8 |# N/ ^3 }% W K& Y1 y return;
+ ~" W h L/ [2 Q9 u
" _6 x V- l ^; d ~, K CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it( ?2 ^- m- h! p7 w' Q8 n
+ Q, g7 z$ M5 a' V; _% z9 R
7 g; e! q4 t" n! ]" fCode:4 Z1 A) G* ]1 s0 H \
#ifdef __QUGET_SWAP_FIX
' t2 `. e3 p% s$ Z" T
' w! ?- ~4 `! u9 I5 u, @ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )0 Z2 v7 n7 F: d. G
pUser->SetHitPoint( pUser->GetMaxHitPoint());5 \( z2 k2 Y' @. m
* P+ |* M! H: Q: N if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
* }: e4 ~4 R# n' }! c pUser->SetManaPoint( pUser->GetMaxManaPoint() );9 A7 l8 U1 e9 ^5 V ~) K% ]
2 n+ d& N) j, P4 f* a% y' a3 ~# ]* k
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
3 T ^% a- e( T4 V5 r pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ u, k! F2 H6 n; O/ h# i8 [2 ~9 @8 H
# |6 f4 _4 y# x. n& }#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( s; A( W! p: {- @! b0 H8 J9 mand add under
0 J, v8 U0 x% Z# u4 h
0 g; a8 Y o, Q' HCode:
, c" @" s0 g. z" y! G7 gif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )# b6 V0 n" `* z2 k+ Z* K
{
! s4 H# x3 }/ r# @" a 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 );
1 L$ V# r; U4 |6 O) n }this1 y+ A' a! _7 [; ?( P1 G/ @/ w
% [ o2 O: R1 _9 f2 ZCode:
/ U* q& e& C3 S1 F2 C" G#ifdef __QUGET_SWAP_FIX; J1 q' ]# j' I7 d- k' S, h
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )2 b1 v# v8 ?4 ~' ^1 T1 f
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 W: B6 t1 ]6 R# U/ W; I, \
8 G4 A2 w: w; |. P' i* x6 P
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )* y X# `, q/ s# Q
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ b% ~5 |7 f8 [, b/ S
' K: ^& g- m; } if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )8 v) p8 n' y/ e
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
: K5 y. O ^8 j. M- ?) J
* M# S" j% P# g/ u5 x#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 E8 s0 w) N/ x# M: O8 O0 y' `, Z7 J, o
4 u! ^( W6 M* {' G7 g2 Y |
|