|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
# D4 ]; u' v; B+ F. q2 X; OI posted this because someone kinda posted a youtube thingy about it :O.
& k" l; {4 I/ c% L6 Y H1 j/ }( s
% b4 t2 \ I8 Y2 L E/ oFind this in DPSrv.cpp @ worldserver5 Q5 ~; j S' G8 h+ ]
, Y; P' B8 X+ e; c2 G/ aCode:' z" A( _1 c$ i ~
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
* ?# F! w. b. v8 @( D$ P{- Q1 [6 N2 X* S y7 W
DWORD nId;
3 f& [# V4 f5 B! z! ^. V int nPart;9 j( e; Q2 E1 F3 J! `
/ h! \, K& b3 }( @/ N$ q ar >> nId;3 w' g: ?0 {$ G+ C" V a9 o
ar >> nPart; 6 ^2 X: a+ @8 }& D% t+ O3 p
9 J* }: y4 s% n& _2 P$ p1 s
if( nPart >= MAX_HUMAN_PARTS ) " [$ }3 K: A$ }4 o# l+ A' Y
return;) w) C3 Z: N" L- v' Q+ g8 Y
& Z2 g4 J/ X& w- V1 g( V CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it, u1 ~: i/ \& w/ t: `: v) \/ R' ^
* K E9 w5 m6 [4 i" v+ Q6 ^- Q4 u- Z* _" R
Code:3 M y5 i Z* ~' r/ H! l3 p% h
#ifdef __QUGET_SWAP_FIX
5 c# a$ g: M5 n7 H1 ]/ }/ v9 d4 j
6 U7 m O; |9 m2 t! E if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )5 h& F7 i9 z3 W8 ^, X/ W; e" }4 v. C
pUser->SetHitPoint( pUser->GetMaxHitPoint());
; Y& G6 f, Q+ t2 s u- d
- b% s f2 T1 I( {9 u if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
9 S2 c. @5 g* _$ K" } pUser->SetManaPoint( pUser->GetMaxManaPoint() );
9 h' J5 A' G6 _# ~4 w$ U8 ]$ ^& X- O Q. R; V* x* m e8 x9 a$ |9 b
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )8 Y H4 T, d( A/ y }+ p' C
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
1 T6 T/ I# `7 v* ?, m$ f0 N
& G+ W* `4 J* X2 f$ ~/ J3 _6 h#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 @$ C) I1 Y, X& ?9 K5 ?and add under( D8 k- W, C+ |+ q. u9 P
9 @4 F S. {1 {; B" BCode:
Q8 c5 y- {/ d% V7 a# hif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 Q0 s5 r' x+ V$ D) | {
: Q, N, y: k3 n8 d! { 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 |9 E3 E7 b; W7 @ }this
/ b. Q) g" o2 K5 b& M6 Y: u0 p3 c( r4 w4 D
Code:
+ h, y6 @1 h& P& L#ifdef __QUGET_SWAP_FIX
- ?: j+ ^9 N- Z# f if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
$ `9 w/ P9 i& w: ~ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
& A+ }& X Z8 i$ L# e( j4 y" ]5 f, k I; n$ Q% _
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )4 z! l$ L) F4 V* u
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
% p# g3 I9 Y0 |3 o) p6 P* W' X& J6 h7 c" ?7 V# f6 Y4 L$ ~
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
Y6 E% X# y" i! [6 J pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );7 g4 A1 j, `( j w
- T- Q4 u9 R, K% U' v m#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver / G0 @# y" [ [$ B' `3 M0 s
" X" p+ [9 _& Z
& P+ f4 g! T t: e! g. P, \ |
|