|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked . Q7 f7 s7 Q/ q2 f; Q% A, v0 x
I posted this because someone kinda posted a youtube thingy about it :O.
" R3 W! @( R; }7 X
2 A+ G: |% Z/ l- EFind this in DPSrv.cpp @ worldserver2 A- ?* s/ h$ ~; P7 q
; X. K1 J) _3 j8 V8 X" h& t8 D
Code:
/ S* b4 t$ l: Y5 a% ~7 { Q$ ?void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# F. T. E6 R: {5 P: ~/ V7 [
{# q& `9 [6 C& T2 r0 h" m
DWORD nId;' U- I' E4 a2 I5 A: q9 P
int nPart;
" S% R! q+ O5 g4 ^( N( Q7 x# f% A$ G# N
ar >> nId;) V" d( a; ?( h
ar >> nPart; / |5 j2 E% ]. H( a; y
5 x# N) {, S* y! H- z2 n& b, R1 Y
if( nPart >= MAX_HUMAN_PARTS ) % z% I+ l5 W: W: I
return;
! _0 S. @! Q& [. d
, p# c" @+ v8 G CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
6 k z# w) O1 }4 n2 R: D# y; o' M" d7 W# l
$ ~! l- N* n/ ~- Y! Z
Code:
& Z& D* j7 l7 F7 `4 C2 ]; C#ifdef __QUGET_SWAP_FIX* {4 [; m& m1 k! m+ e4 A8 u
" _2 V( E" J. J if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
1 T) |- `0 d# V6 Z pUser->SetHitPoint( pUser->GetMaxHitPoint());
. B6 }4 Z4 P- r) |- l3 L4 l$ k
7 z( d# {# F# H4 I if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
% x) ^: M& V# n& y2 j pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( ~$ F, ?0 ?% P# K
/ Y. q+ f) s9 T/ B" Q: }) O if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )& s7 L) q6 [$ o0 d4 p( O# W
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
- Z9 Y. O T) e" } _8 w, S4 ?
1 i; K5 F; p: g1 r$ F0 Y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
1 A$ R5 g0 h/ p q, h9 h$ Uand add under+ x2 Q4 F" j0 {8 @, S
* y0 ~) [- s; n0 E6 W
Code:
- z7 S: H- u O! G+ W) yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )9 [; w& t8 {0 F- B
{+ ^$ P# w! _1 K, A& K
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 l" \: U5 D8 H, D/ d& a0 n# P
}this% k* R- l+ ^7 n* o$ T
) K& z2 L: \ k7 B, g% S! [
Code:
% W1 R3 c: g* A/ B8 b. \# c#ifdef __QUGET_SWAP_FIX- s, h& z- F; Y4 Y$ `8 R+ V; N5 R/ i
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )( V& A4 ?3 a9 j: F |
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
: E: V6 h( J- t$ w
1 ^' m w! t- K! U if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): D. n8 ^5 r$ u4 ^! ~5 `9 e) ~
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
. w b% N% k3 r: B$ s1 N3 E. a/ r# P. f$ U Z
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
" f3 ~; k( D! m3 F pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
" r) x8 p/ O- v0 i- C7 o% [% u L
( i, g4 r, M5 l, Q# l2 p8 y+ T#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver - a* y A0 F& d0 k; Z7 B" ~1 ^+ d$ g- m
: x$ x1 }) s) p7 n; x; N/ R6 x
: W) C7 g( r3 C: n- w( X7 @
|
|