|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
0 {" L1 A* ]9 V: p6 V, A$ `" \I posted this because someone kinda posted a youtube thingy about it :O.4 J/ d; U; e& a v- F0 s, k
1 R& c- W9 U( d3 V* B- y( t
Find this in DPSrv.cpp @ worldserver
3 z" L) F3 f) x8 i6 X- v& @2 E* V. ]# v$ K3 k2 D" ]# N
Code:2 \4 M0 | f: K
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 T% G6 f8 K7 A5 d0 ]{0 c/ I6 `/ V( K4 Q2 w
DWORD nId;; j# k5 K e+ U3 q" g
int nPart;
9 b6 S" A. `3 J2 U/ w3 ]' _7 s5 M( F2 a: L% S3 b8 U# U7 L
ar >> nId;( v1 D2 @- [$ I4 v
ar >> nPart;
" Z6 b( g) b7 H9 i% t* m
' l/ C. [2 q8 Z/ Y; d if( nPart >= MAX_HUMAN_PARTS )
; Z( X5 @8 j8 l return;
+ a4 ^6 L/ ~+ M4 A
5 ?3 ?; B( B0 k' x, W CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it8 Y8 A1 }7 J2 w7 h
( r, `$ Z: o" Q3 {. I I+ o3 S. P
$ m; t0 K8 g7 b2 ]Code:! `1 S8 B6 t7 t* ?% D7 R# s
#ifdef __QUGET_SWAP_FIX
1 h- V$ g+ X& ]$ h: `% ^0 e8 o9 m w0 b
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
& A1 S$ R+ m6 z' p pUser->SetHitPoint( pUser->GetMaxHitPoint());
0 U; y! K6 ]* h* \) V( ?3 E1 e* }& s! @& B5 r
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ): y4 z l6 u, o7 Y$ b1 q
pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 l( _/ u0 Y6 @( T8 y
+ X* O2 K, f# w
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )5 m2 c9 f' I/ X. G1 Y
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' `( Y7 g6 ^: F" ^+ Y6 ?& D
3 A! {; x8 Z t* T" d) l#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! P0 V% S; d7 M$ K: n0 w. h' g
and add under
& X. A; [' r. D0 @# q( q" k1 @, j& H. P+ D
Code:
' e @2 V+ V- S$ rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
% s4 q6 h7 n. @$ _ {
& Z+ d( ^5 z! y; V. 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 );- W" d7 w7 q1 s, p) k$ `2 f9 ^+ I
}this
q V' _# c+ K5 j% y/ o0 Y
. b# p* r8 }2 U0 K7 a+ jCode:
3 \1 v% {7 V) Z) q! i+ M#ifdef __QUGET_SWAP_FIX
# b5 b/ w; L: U if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )3 ^" a. r2 R; t. o& U2 e7 U
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. A) H5 U/ [; [# f! {0 y" B: j6 _& A* @: X$ W, z% c+ {2 w$ i5 L
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )) j: E$ G5 x( j; k
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- X$ J' {/ ~. x) r. W( r1 H1 t* y
( Z. t) W( e% m$ U6 V+ t if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )- ?2 L0 S5 N" }) j4 l3 n
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- _& M: }# |) j9 B( l' O9 k8 o E
1 h3 S! c8 k; ~#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ v4 n9 \$ _2 H2 B$ I9 F
2 v; {* `0 W q3 O! Y& c
8 ]0 `% h8 M( ~8 G* n |
|