|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; x* c, C2 p3 i9 M0 i1 y. pI posted this because someone kinda posted a youtube thingy about it :O.8 J" G8 }1 c% N; a
# p# M, Y+ d+ SFind this in DPSrv.cpp @ worldserver
9 N% n% n; I/ P! k6 l- R: ?4 j6 L3 k1 r2 s3 N+ `/ g
Code:
6 x3 l) L1 x& v) i. k3 ]void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )' I, X' `# _- C2 p4 Q. p4 S/ E
{
& F7 E! q4 _- q1 i' v DWORD nId;! ~1 |* ^; M/ M' M6 b6 [* j/ `9 e
int nPart;8 t7 E9 V9 l6 w: s5 L4 c
4 y( H% ]5 ~) p4 j$ n- X4 G6 g0 p ar >> nId;+ ]8 G/ U2 c/ O
ar >> nPart; 9 H; q* \% S, p/ S
( c" y+ K8 i1 ?5 Q- H
if( nPart >= MAX_HUMAN_PARTS )
$ R$ ?0 m* ?0 e# o7 S$ H return;
5 E* [! q; h- s2 T" P# M2 {$ z( {7 E/ S
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 G, _5 Z2 l- h* a, J0 I
$ q r R( p9 h) l# f/ _. N
. A+ U- A+ Y5 Z6 PCode:
7 A1 N2 I# \7 S9 u) Z#ifdef __QUGET_SWAP_FIX
4 |- P! j8 n) [) ]* g$ P2 Y3 w
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )2 B4 x. s: _5 ?: \* V! e! _
pUser->SetHitPoint( pUser->GetMaxHitPoint());% V) Z4 h( ]. O( m- d. A
! X4 c7 K8 Z) r: c$ W8 f
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
9 Q9 c* p$ `% S pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 |0 c% C( t J3 q' O
. F5 u- O H/ Z' D9 N Q if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 y& u8 _- u7 m
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );7 C3 l( K- ^% z7 M$ B; A
& ?' G6 o0 g7 l6 {8 G#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' K! S7 _# G6 c. g1 ?& T; l- gand add under, n( \9 p# \& r8 X/ n
! h; l6 e* e/ N( S' ICode:
/ V$ W1 P0 a9 `( \, b/ v& W3 bif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 [& ^ m+ l6 }8 ` {
, }) F) c6 d( B$ b3 I, b) U* S 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 );# V& [# s/ }8 E( K5 ]4 s
}this
. F1 k5 N# Y# g+ E6 E
: ?% e2 l0 E0 @! V6 \$ E) S# JCode:8 ?7 A! M7 _! q% J* p
#ifdef __QUGET_SWAP_FIX. C5 L; G# Z6 a3 \" I5 k2 ~* l6 u
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
5 P* P3 T! S1 i1 E+ J$ y pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 l% r( L1 j" z: L. K/ b: |: }1 v
% F8 ]8 ?: U7 Q4 `# h+ P if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
6 k' r7 I3 Q$ K, n$ W) Z pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
5 n0 r2 Q1 H' }* j5 E3 Y* ?' v( F) V" H; E5 [: A4 I) Z U
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )9 [: `3 K$ s X4 l/ l! G: x+ D; F, S
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) t: z' u9 u# u1 t6 X" n0 ~0 S: n! V, Y9 U: L( W- V8 n
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
' G# V1 ?& N* y5 k+ y7 U$ {: z" }' R* h* J' ^, C) {5 I
7 G& k: K" I8 K; ~ |
|