|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked / ?+ J" l, g# D/ E9 K
I posted this because someone kinda posted a youtube thingy about it :O.6 S( I2 v* ~- _2 _7 R
, t! I+ l5 D- q$ n$ f/ T: Z$ vFind this in DPSrv.cpp @ worldserver& _/ C4 i9 Z. |
3 `% |; h' t4 `& S! f9 q5 K" n. UCode:- K# {, ?. `* V8 N) l1 v
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 R! t/ }4 u1 S" l0 x) ^{
7 e- D8 P u, a5 P9 z5 ~. c DWORD nId;
3 R1 C( ]& j4 h8 l K7 o int nPart;( k3 \9 G& n2 A2 L1 c6 O1 T& T4 o) g
/ n U" }0 K2 l. y v
ar >> nId;
2 v4 y, k( y9 y# @3 c- v, ` ar >> nPart; . E9 W) j. S# t- Q9 N, ?' @$ W
k9 y1 Z/ Q, |, B4 Q2 I4 z5 X if( nPart >= MAX_HUMAN_PARTS )
7 w% q5 m5 X+ V: y0 W& j return;
" m! V4 c* I# G3 G& Q8 q
/ P: \( o8 L1 G0 I( e CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it* p/ t8 A# a7 B1 `' i; @' y( }9 b
1 z {: V' h0 `$ Z
9 o3 t4 F$ v2 N- B, MCode:! q# a: t$ Q3 e. N% Q% G
#ifdef __QUGET_SWAP_FIX* C' _9 F4 M; y$ R$ Z
" E% Z0 v! W, S; B" d- x- V if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )" V% t; N9 Q' p7 U& ? |. r
pUser->SetHitPoint( pUser->GetMaxHitPoint());
/ D h" n" @$ ?' p4 h) X; o5 t3 K- j, E2 Y
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% G; S& |: p% P5 d1 I+ n
pUser->SetManaPoint( pUser->GetMaxManaPoint() );' C, f; ^7 H/ ~
6 H7 b4 C4 a8 B$ f; V
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )5 R# z" q& z5 y8 j
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );% _1 [% |. a( }/ z
8 W" E4 A) K$ M
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
0 e$ E" {% j$ T/ X2 h: k% \3 q# v: y/ fand add under
' j4 |' h6 K+ m+ k
* @( W6 \8 |5 R, B1 m$ Z V- CCode:+ R. o1 p# U; | W$ D9 r# ]1 U
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ): H/ f$ d) C! }( D" K; D
{7 ?* Q9 y/ _0 P4 [, X! |
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 ^. H, j+ a1 J1 [8 I }this
- |' x$ |2 j) Z4 D* ~0 L8 B' r3 H/ c+ i0 K. w
Code:' Y, [" W& ?- c; ?+ k
#ifdef __QUGET_SWAP_FIX
- q$ H) b( P6 n6 k2 \ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
0 T, ^& T& |6 Y% { pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* E4 a5 C1 a1 J8 o5 G' ?6 N/ `0 W8 e: v' d" @& e- n
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
# g' q6 b0 h% L J5 N' q; G$ {5 m pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& V9 e, @' D/ t! @- Y* E
! Z2 T! [" v) m7 S K5 A, r4 b z if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ) b) b+ N& O& X+ _6 H
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
7 Z6 E1 \4 ^! ~$ L" F w! W! ~. H1 `- o3 u, u5 ~! w
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 V- q" e% n) x" t3 \! |7 t
$ t* S6 _$ z7 G' q0 z) E9 L
+ ^3 g( e7 ~. b$ { |
|