|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
8 }# D0 R3 O9 s/ D3 E6 S ~. \' K6 xI posted this because someone kinda posted a youtube thingy about it :O.
9 S8 D( `: y! W0 s/ H
. W! w X9 R" d, M8 I& QFind this in DPSrv.cpp @ worldserver/ g! ]/ X9 h! B) F, w+ H
$ |0 e# t* Z! C& TCode:
. K. Q7 X9 s. n+ b) Vvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' k" x2 L" O3 f% y- S{8 g: `0 b8 K, s: R0 A7 ^- x
DWORD nId;
9 l( T. M" c# z5 g int nPart;
" u0 P4 W, c9 x7 s( |" s# V- ^7 H! R* _; Z3 c* u2 _/ }
ar >> nId;. p! a8 L1 S+ H& h8 `9 Q
ar >> nPart;
* v3 e4 [) k8 z* b - O3 G7 Y0 H$ K. d
if( nPart >= MAX_HUMAN_PARTS )
5 j& v$ n3 Z N: g3 m3 C return;
\/ W3 T1 |4 w9 R: g
7 M0 W% s. y4 G/ { CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it- K/ n/ S6 _& m( h
8 ^; x7 ~8 F( { |0 J( h9 R0 f' m1 w" u$ o
Code:4 _* \7 V5 {( M1 ]
#ifdef __QUGET_SWAP_FIX* B$ x9 B5 W9 e' B+ n P
% I2 ^& s0 x# T
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )2 k1 b. A6 ^6 r
pUser->SetHitPoint( pUser->GetMaxHitPoint());
. }$ P4 ]6 j* \9 ^- X3 s' |! U# R. x/ ?: `8 _
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )8 s# g- d) j8 E) a
pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 u o( w5 k; U1 e
- ~! n4 G$ r7 p' K! L
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
4 W3 x& y7 W) u: X; k* G pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); C2 T" u7 i( s6 j7 t
; P2 T/ x1 a; ~1 H( o! z" M#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp, V' i* c1 q+ B6 v: e1 z; n. \* S
and add under
0 b: `. @; E# u' s. E3 K* k5 s% Y2 w0 h* ]* \% y! F
Code:
& L& m8 U& w3 m$ b; n3 N* Rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
% g5 L2 C* P: B' O# V$ g {6 \$ Z" k( _2 L) V
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 );5 Z1 B) T( W6 f9 ]- G8 a
}this& r" Y# ^9 q* X1 f0 z X) {
+ x9 ~9 I: h. P2 J4 d
Code:0 G4 A8 m0 }) @* H# i
#ifdef __QUGET_SWAP_FIX5 A& v6 F9 ^& ~7 `" I
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) D$ H7 R3 i7 S7 ~; L$ w: Y0 |' ~ d
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 g' F! U: a5 e- I
- k$ h/ y3 f, x' s1 w4 }4 O; Y if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
9 z3 x2 N% d2 K3 \/ z& g6 w pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 O, l j, y: w1 R2 p O' W7 ^
- z8 c6 c' u. G0 ` if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )/ O) Z3 A, \% i
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ p( D1 B k1 _$ l
# j& n5 E$ @. u5 C( r( Z0 A#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
N3 S, n' G, p4 X- p
) d8 Z9 X% s" b
/ C; ~. O- s- m' _' T' ~ |
|