|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 }% T; J3 f% s( j1 DI posted this because someone kinda posted a youtube thingy about it :O.: {6 _6 O1 F- ?7 h1 C8 F# O! f
" J. `; u8 g+ z: U3 LFind this in DPSrv.cpp @ worldserver( e) ~3 m2 p) J
* O/ l; Y: t& d* t" G
Code:6 A/ [! L- ^6 H; S0 r
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 ~$ _) W; o- U/ }' _/ [7 h
{
0 c8 w( y" h7 A0 Z DWORD nId;
' K0 \5 e7 s$ m1 G int nPart;
' q+ d% f! c/ G/ u3 b
, I: p( ?% |( [: |+ j ar >> nId;4 w! k# Y' K: p
ar >> nPart; ; g0 q, i( E5 k. n/ K$ \5 Y: {
0 \; J( ^8 A0 v [
if( nPart >= MAX_HUMAN_PARTS ) 7 p# Q$ _/ k2 F; |% y7 d
return;9 L- N( d" R5 b0 S: N
7 d- @: I5 ~6 s0 h: F
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
! E( h3 j2 S6 N5 H$ P+ ?! K, g O- p( K# N! M* u9 X) P0 Z2 J
c( R/ s. e" B& \* ]( W' P1 l
Code:. ]# R+ o, [, f" _; Z G. Y
#ifdef __QUGET_SWAP_FIX: m% d. k* q- ~
# V! C+ ^- \5 [- ^; \: M X if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )( }6 E- F0 l$ p( t9 T! ~
pUser->SetHitPoint( pUser->GetMaxHitPoint());+ V( C$ ^( H( |2 Z+ F: {4 l
4 t+ i( a) H( I/ Z
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
& ^. g8 v1 Q- _6 @6 f" ^7 R4 x; L pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- O5 G' r1 f! n5 L; M6 N9 c& \ j( H' ]3 n
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )$ f1 `1 P0 n7 D y% g
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
* x; O2 X; z" U3 W5 y$ C
7 n3 T/ U- F5 P1 I0 w#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; d" T! A+ I0 x
and add under& g4 J L1 y3 _5 `- l! v
) M* i* b; `0 V1 sCode:
, `+ ^- v/ B+ P* b: qif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 K) s* X5 \& j
{
6 m$ H0 U6 t: v* @" U& J; { 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 );
8 _8 D4 M- b- K* p }this; f0 K/ Z5 [' V( K" d. `
1 H1 X9 i/ d2 [1 z6 C
Code:9 f/ D3 G& j/ h' R# ?: j
#ifdef __QUGET_SWAP_FIX H0 `$ u" \, Q/ Y: y2 ~! n1 P
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
, u4 \" {- I, B. R1 r# \ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
7 o; c9 ]7 d, ?9 e9 s* v" S0 W2 z# ` {/ f% N" J! b, ^+ O
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )5 r1 ?2 t/ P7 `4 R' Q
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
, z7 E7 ^; U4 g G, V# H
( A' t! ^* g5 m1 q3 ]6 ?0 _ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
2 [, \" ~1 [1 R; | pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ Y( K9 X W- s% m( v
. M7 F a$ M1 n7 X#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 G" N$ j' ?( C; B( k7 ?. \
, [! y7 Y3 M' q% P8 S+ A, }
2 O8 i' R S8 [5 f- M
|
|