|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked / A; t: S% X2 |1 b7 b& R# C: O+ W
I posted this because someone kinda posted a youtube thingy about it :O.
K8 ~( B, P/ S* m
1 ` z _% a: [ a0 UFind this in DPSrv.cpp @ worldserver E4 P2 F' {( `$ s" z
" h% [7 y. I- \, K4 [* qCode:2 v; k( N0 L1 U1 W; m! F
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# S# ^: {" i8 x' [. t
{
5 Z$ w/ A: h3 `1 w: `, [ DWORD nId;7 B: r0 M- u4 v. `
int nPart;9 R! p( ?. N: ?) V, f3 X2 }+ D
1 l2 T& m/ L( A7 B6 M- g ar >> nId;
# V- q, J% _; Y. x. t# _: Y3 S ar >> nPart;
& p$ e8 b, g8 [/ o+ @! F
% ]/ V$ g- U$ t( }0 a, I3 i if( nPart >= MAX_HUMAN_PARTS )
$ A# v: t' N. J: v4 X return;
& p9 u& y3 C* Q& r1 t4 j
n9 U' Q9 `$ q8 G CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
: o5 P! K. ]& o( T* @4 E
4 P! i* L) f7 A5 V* o3 ~2 B. Q5 `2 b( W0 G
Code:
. `% Q6 S3 i! A7 Z" @1 n#ifdef __QUGET_SWAP_FIX
! ]* ], z2 o5 a: R. T+ q0 C8 H* P7 @' e2 o. j
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
0 l2 g: k% j5 P# F6 q1 O pUser->SetHitPoint( pUser->GetMaxHitPoint());
4 x% G; ?: L3 p3 |
/ E+ J. P$ I' p$ h3 W) q if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )9 a( t0 O4 F6 {' N# G* @
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( \; R* A* P, W1 S1 [: P
: z6 x& K I5 U; G( z) m* ^ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
, s7 }! z* B* @ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) V i- P! N; N
q# f3 P$ [5 O' j0 [: i3 ?
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; T5 Q% W# d7 N ?and add under% t* o. y: i$ `, t9 V9 Y$ g
* e/ ^) h/ B; w1 r5 H0 }. f( RCode:
3 u* g* f" E' zif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: s+ U2 T U- A! j# I+ u {
7 W( i+ u7 |" f' S0 h 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 R3 d$ N; E. M
}this
/ c$ W' w6 q5 V& T R( a8 y2 w! I0 k4 ?/ I x2 {( t& C
Code:" ^: @3 |1 ?: a' T* v( r
#ifdef __QUGET_SWAP_FIX& y* ~$ P6 [2 P# k5 A) }
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
" K# s" Q% t$ y m! E; d pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());( |" }! w! j8 U( r
9 I' n! X, k' t# [
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
4 O, h. h8 ?. _* } pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() ); h. ]3 H: I$ _$ \7 ~
) \& K, C2 s# ? Z if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 E. ~5 [4 h1 D( q9 I& z2 ?$ K
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. Z3 d, |% j, [# }5 |! F/ v5 E& A' V% N# t
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
6 a6 C. o" ?, z' S2 K6 ]. A9 t, Q+ a7 T4 @
- R" z) q3 O5 f
|
|