|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
2 K; h {8 `, J; n$ }! ^) cI posted this because someone kinda posted a youtube thingy about it :O." Q8 A: ~9 p$ R" ~4 [5 n
% ^( ^' d$ G2 i h9 {, ~: D" eFind this in DPSrv.cpp @ worldserver
. @6 ~2 x" S9 Q" k: M0 I \( x0 r/ l. Y
Code:
& V: t$ X. q# b/ u" | {% n- j( [void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 a2 Z+ G' S( u" B6 h7 Q, Y
{
/ s+ f! r7 @! ] DWORD nId;* x3 U" }+ m# b) d9 s
int nPart;
+ C0 R: U. |/ H: g& f( L. e' m& z3 e) H
ar >> nId;+ W- d, l8 p% [1 [
ar >> nPart; ; Z& A% [5 f+ ]
% L3 N( d. @# X/ M! m7 O if( nPart >= MAX_HUMAN_PARTS ) ' O- P4 {4 S# j5 ?+ p+ j
return;" T1 y1 G$ l: @; V/ h
3 O/ |+ M2 { Q CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it+ ~$ S3 i0 d; u9 S, b
: r7 X' O9 ^6 t) o3 X/ d; @0 p( l& t* y3 J; j4 D m
Code:
: f+ l( t4 W5 m#ifdef __QUGET_SWAP_FIX
0 ]* P7 h2 w$ e" K3 Q. Z
/ ~: u% L7 Y1 Q3 g3 ] if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )0 E. j7 [ A* n9 v$ i0 k/ B
pUser->SetHitPoint( pUser->GetMaxHitPoint());- R6 _2 a1 h8 ^2 I [ F* u
P. f+ ]2 s2 m! X3 P
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )) M- s$ E( I2 R
pUser->SetManaPoint( pUser->GetMaxManaPoint() );. x# n$ K, I7 x) } S
9 E, g4 F1 P+ ?3 Z0 n% v) t: p
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
; P; Q$ m9 Z0 B4 |5 F( N1 K pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
! N$ S. c% @( `6 ~: D3 V$ ]* ~, V) N2 |; C, `% I" f6 q$ I
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
8 _2 u' n) r m& x c6 R1 Hand add under( k* V3 x P7 `+ [6 A) i) q
9 L1 u P3 ] s r7 Y8 a
Code:
( L4 q' S( A: y: Yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
* V- }/ D, K0 M2 X {# V8 l6 \% o+ R$ i1 L& 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 );
( } }9 S B% W; C }this* L6 w- A( @) E/ g+ _* g
3 c6 n% _. f6 BCode:# R& K# i; Z3 H$ k! O* P
#ifdef __QUGET_SWAP_FIX, Z3 d- R4 B, s/ E2 g9 G# V/ C
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% c4 W9 ~; L o$ j/ a# `1 Q pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 W3 a5 h+ ~3 W7 W1 N
. g0 ~6 z8 h& s8 q D+ j if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
& X9 n, M8 z0 \% |. K pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
8 Q* l5 ]; h' h* F' P! r: ?- i \. M' l1 M8 R j2 w9 b7 l
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )- K4 O* Y; `; ~* y* U
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );4 Y5 I) \# ?) \: E1 Z& U* ~
. C" h* K' o m3 q( v' }
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
' Y6 {* x3 }- Q: g6 Q, |! ?$ Y: Y! c4 W4 ?- {! f# T4 l9 [
# A Q9 ?7 q7 A1 B |
|