|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
# L' t/ A4 c }9 H# YI posted this because someone kinda posted a youtube thingy about it :O.5 g3 l& P" |* ^' g e" R
8 {/ a% b) @/ r' W5 y+ F" k
Find this in DPSrv.cpp @ worldserver
5 @( Y+ I. q# E8 f) \, P( L5 Y u; O
Code:
/ e7 ^ r2 d7 vvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 P/ v- a- V9 ]8 b+ _{2 T0 c9 A0 y& f8 M) j, l6 M- B
DWORD nId;1 ` i0 G$ X) D6 R% g. ]
int nPart;
0 {8 e% g8 \" T( D, o, L
( |6 f0 K" f% D" s8 S ar >> nId;
" A3 ~$ p+ S/ x! G; A, ] i ar >> nPart; $ T' \9 M3 L. E/ h! x: L; _* e
1 s9 Z8 z2 }& O9 g0 V6 d3 J if( nPart >= MAX_HUMAN_PARTS ) ' d! V0 N8 }8 r
return;
. s' a+ d7 r- C# N; u# Q: s5 ^$ a, d. ?9 U
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ x5 R" @' S$ \* o( |) V0 Y( @- B7 {; V& {0 v# [- X2 |2 _
4 `7 x, @& m& \0 M4 b+ r! `# Z
Code:, T4 m0 Q- o4 v' g
#ifdef __QUGET_SWAP_FIX
+ U) C$ d2 @+ j, F7 v3 `, O3 i
) D+ M u" v3 d8 ?, E U if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
$ T4 H: P o1 y pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 ^0 Q$ }' V6 `" H$ t5 j: k0 x- y& S# w. f6 V/ y5 y
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
) x" @6 u( `+ I3 i$ \3 _ pUser->SetManaPoint( pUser->GetMaxManaPoint() );
0 G( R* |( X% N8 f4 {, S7 \
7 y/ D9 u: t+ ^& T if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )& ~4 |/ |' e# G# |2 K; }
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% S% ^* C+ }7 q
9 V: M+ i& r1 @ {) }#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
: o; m# ^' k: P& b! p ~and add under) V% a' i- z5 @' M0 `7 K9 e5 H+ k% s
1 x! N3 d% J& e2 q) n: MCode:
' j% l4 y; ^) j) sif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
+ u3 ~5 P) p" U! d; s% h {2 ?2 Z# L& J$ }; K0 k/ n, @7 S; z
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 );1 Z* j& S5 d( E; X
}this& W" i3 H H3 h& B3 V+ g, E
0 \ Z' E1 P9 q X/ y( s6 c! g
Code:
, Q9 G0 L4 D$ J- P4 q$ ]#ifdef __QUGET_SWAP_FIX
8 @/ a4 H9 R# x if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
# N4 A$ z: K& x% J) r: C8 h pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
! D: F9 h3 @5 Q7 }2 C* f& Q# q5 S5 a1 @' m4 O4 r
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )- ` [9 P3 P* Z V g* v
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
T4 s4 L) e2 M% [) @$ T! M! g" ?9 y+ p3 R' z d
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ). j# U) N# Z& z1 L* c
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 E r6 Y: q0 b# ]2 r
" p/ z; k; ^5 q) U+ p
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
" w7 Q1 j$ C( m+ e9 ]( r! g" @% |: s/ Q' f- r+ Q( k
. d/ S/ M% f4 B
|
|