|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
3 p: t8 D1 x* ]. t9 nI posted this because someone kinda posted a youtube thingy about it :O.
' H& |) d! k3 r6 J2 v$ Q
9 l: ?) C/ j/ Z E0 G6 z( ]Find this in DPSrv.cpp @ worldserver( s; r* {0 ?, `' L' [
) J8 I. S2 r+ M9 HCode:: Y) j' U- l( Y, N' F0 L- [
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 t& w @# D' P+ Z3 m( ?+ ^ h
{/ o) d( w( f! R; F$ j0 u
DWORD nId;
" d, |; s$ \4 Y+ f9 A; N int nPart;
5 U* V: i7 p v* ^
- T/ b% c j# l0 [. j9 ?. x ar >> nId;
2 h* ^+ d% [' ^+ r8 m ar >> nPart; 7 ~' }# V. p/ @$ J
7 b* @+ v7 K0 A! Y# e+ y( z" F+ G if( nPart >= MAX_HUMAN_PARTS )
' x% \( a" H/ {, A& A/ B return;
4 A/ I& v; {2 B4 Q$ T5 w' d- F4 g i( r# o
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ s! M% |3 `( f# h) H2 _$ n1 B& J Q/ C1 Q7 F
1 h; ]+ r( f; {! j- e4 T: [0 m
Code:9 ?/ c6 z! |5 g# \: M; \: d9 \6 C
#ifdef __QUGET_SWAP_FIX3 W) \. i* U6 g
( ~7 P8 P" X* T& ?; }
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
) u1 Z, N2 ]% H; b pUser->SetHitPoint( pUser->GetMaxHitPoint());! M/ i6 t2 e% @! n* o$ E
. `$ I$ V2 H3 t
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )3 S7 L. F4 f8 [1 e
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: \9 h: K* y1 x9 i Q' u; l. M+ H
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
) K3 q h+ {. d; M9 W, W pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( m: l8 q# ~& p1 \! U- _+ Y1 H0 d
# x# q% T, u' `- G" g. Q
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" `9 w; }/ ]& B6 ]2 D7 R$ Yand add under* `- ^, h- B" q1 v# C2 J
5 B; t1 ]$ q$ Z
Code:
0 E7 R+ l. h3 u0 k& z' ^+ }9 C0 J/ Lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ). n0 P( d0 e2 `& e! B0 @4 g6 K4 ]
{7 K! P0 R; J" r% N: G
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 );
4 v4 V( y+ | m5 m }this0 Y% I) S/ R$ u7 s2 @2 Y# G
8 R5 z7 I1 b6 c# @/ ECode:4 W' e I5 K/ `5 T ?
#ifdef __QUGET_SWAP_FIX) ]6 k0 z9 ~' b
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
0 l$ {7 L& p$ u) h! M* x pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' L2 h3 @5 b; p( x$ {. [* V
$ R; t8 J. T- G9 v) X; R
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )$ O3 z4 R- N L
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );5 K0 F \6 F) z( q% L# V; Z7 U
2 }- @1 \. R' ?1 M5 F$ k# k5 ~. g; l if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )9 p+ W# A9 G0 {2 S1 c n( O; M
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
* J. U! p; R. x/ e, O9 a1 m) b# X7 W" H4 x' e0 v
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
/ V$ y# [, F4 i* [% z' g, t& _8 w3 L' C2 U( r* e4 F
) B) O4 L' q# i/ G; Q |
|