|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
3 g! m: h& X1 fI posted this because someone kinda posted a youtube thingy about it :O.
) L$ O* s$ ?* a6 O- s' q6 M9 q# T, B7 c/ s9 M. o+ F: r
Find this in DPSrv.cpp @ worldserver
l* t! I& Q* _ ^" B. w+ V
' N) d5 S5 v" a/ ~' J2 dCode:
: H; C S: o& N1 ]0 O3 ^4 _void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )9 H/ b; S/ H( `9 m- Z% q" Z# y3 P; E. J
{- N& q5 R; b0 j2 X9 A4 ^' e3 T$ t
DWORD nId;
8 b5 U3 a, O- @' z6 R int nPart;
5 z% x7 {7 Z& \# W& O& w$ U! x0 Q1 s7 l4 M5 b7 L) M% N0 S7 n* n
ar >> nId;6 x) ` R5 p5 Y" Z8 x* l
ar >> nPart;
7 M: `$ v& H7 F' f: G # [& f) P# L3 Y: H
if( nPart >= MAX_HUMAN_PARTS ) # C5 w0 y' ]' L: g9 L; s
return;7 h$ w# o& _. ]; U
+ B5 {$ K$ S4 Z. X9 o' Z
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* _, ]5 a6 E! O
* o7 }3 A/ M# y9 I, _& L* W: z G# |! D+ O
Code:
i a; d2 p& z' _9 a6 S! m9 o#ifdef __QUGET_SWAP_FIX
& [" @! u$ N' A' E% O0 H! o/ m
& \. Y+ e$ k8 `# W' h if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
$ M. T8 k. h: A/ n; C l pUser->SetHitPoint( pUser->GetMaxHitPoint());; k/ ]$ C$ Y7 H" b# M& @2 U. d4 ?" R
6 B( S+ r8 V4 K if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )# ~& @+ b/ P1 D/ E0 Q
pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 k" q' p" g4 O9 w* _
. Q2 D$ l% }! [
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
% B) \$ M; K4 X- U- A4 L6 w pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
1 W& w. [: ^2 c2 N( H$ U
0 \% E) q! F/ W#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' x. u& K+ G2 Y' u3 ]and add under4 g2 X* B8 h1 p4 |$ W0 H F' |
9 _' J8 C) ^8 s- V9 ]4 Z
Code:2 Z2 I% w7 r8 V, K3 p* O" @. f* j4 ]
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 M* T/ ]1 z1 N7 u) R8 V! Z' L
{# p0 a) ]! U; N4 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 );3 }9 X- Y7 t; {+ Y9 C6 `1 ?
}this
4 G) K6 r( y% [. r
$ g, B ?7 X# W- A& ]* |% LCode:
7 e# ^( p+ A& ^' S# [#ifdef __QUGET_SWAP_FIX
0 N( E2 G9 h# i9 m/ a6 ?5 r. X if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
* h1 Y$ \$ z8 v1 E* T pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- \4 U! ]. I# G9 @' p% r
' K5 [1 k+ X: t/ L$ J6 p$ R if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ); S4 Q) X' c- F& }. _; {9 s5 N3 j
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );- V- v7 m2 Q* U: z- Q
" f* W( ^$ t0 E7 s$ ~- N4 B3 U if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% i6 B, Y' V( w! C: z9 h" }# _
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
6 K$ Y7 x% r" r4 b8 w; o
) \' |, c( |4 q& P8 b9 Z#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 T w' `" `8 J8 g2 H
) ~. v1 }# W$ U, g$ C. C1 @
/ Y7 u' e- ~. E; P7 b- ` |
|