|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 3 u3 s& r( F4 @: N2 u1 D
I posted this because someone kinda posted a youtube thingy about it :O./ }" Q1 _/ O8 |
: u5 I2 k1 h) j- _3 m; cFind this in DPSrv.cpp @ worldserver. Q! x9 A f, ~
9 ^& n, A& } Z' j8 r
Code:5 |+ X5 n6 U. j4 M4 Z1 r) r
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: }5 V& d D( g7 }{
3 p# Q, p6 ?3 g DWORD nId;/ M+ E; G" k/ L
int nPart;2 @) \- e/ x* x9 N" V p9 }
! x6 p' _4 {2 D5 W0 n/ L
ar >> nId;
x% m' d! P- V, G- e- w ar >> nPart; _3 V6 F) g$ I
" N# k6 f w- H+ v" M# W
if( nPart >= MAX_HUMAN_PARTS ) 0 q0 ]* L/ L+ K, X2 B5 X5 K0 `
return;
3 n5 b2 N/ h* Y0 R( k6 w( u" q' b" G: [2 T. m
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 |# } |4 q/ Y* g8 i; Q& I5 \! N# v. T
2 h) ^* O$ r% n# |+ {0 x0 D" ^8 gCode:
) z( U; c/ f( Q8 ^2 V#ifdef __QUGET_SWAP_FIX
5 Y6 @& J* H4 T& {; R: _. a+ j' N* m% c% K; d, x$ a# P
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
. b: S7 |( x! B# V9 j/ t2 P pUser->SetHitPoint( pUser->GetMaxHitPoint());. d3 `4 [. |3 r; A' o4 x6 l
, M' c9 t2 J, Y1 _ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )1 l k' y2 k+ O9 m9 w7 q
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# D/ o9 t* t7 L, [
3 b6 D6 V% {' W, i if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) @! A; e! s! W# A
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 H. s4 \! M9 O
' w; L" g# F" C
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' @& O% ~+ k: O5 T- n# x2 Aand add under: {! j/ f6 `- ?, x# |% E
" U+ ^1 Z* p6 X/ M8 aCode:
8 y- @9 L3 H, X6 Xif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ): A7 ?, t3 |- x
{. k. e1 t# ^- }) r8 ` e
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 _, o& H/ v1 [# x; f. c8 C }this6 y# N% V$ O I3 ?1 e
3 t& b! E. f: \' H. m; | W9 v
Code:0 n9 F' p, a' {1 H6 U
#ifdef __QUGET_SWAP_FIX
|" P4 z& O3 I8 |1 i$ O$ T if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )3 u& M2 j2 Y& N
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 ?' j* a# F, w/ K4 A+ z: d0 K& g$ Y+ f9 U% Y# Y
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ) J& m" b" j `* }
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );1 c' J4 k+ r+ o
$ P# U! x8 [! z+ @ P if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% f, t$ y A8 H: X3 [. k) a
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
, P5 u0 k8 z) M3 P, [+ Y" D* X& A/ C1 }! l) G, b: N2 b
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & {' M2 _- J& [: }; U7 @
) ]1 R& u6 X" ~* z+ \9 t1 z
: o& v* U- I1 S( U, M |
|