|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% M( ~" b- ~% c7 l' KI posted this because someone kinda posted a youtube thingy about it :O.
+ [* O9 h; ~0 j2 i3 { A3 `3 I/ F9 L W1 u
Find this in DPSrv.cpp @ worldserver& E& L2 X" A$ i. R: L
* j% |" \3 @& \( HCode:
x" P: |( R! S3 n2 A0 Qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: j0 q! g. |0 ?1 h1 e0 Q{5 R& [- }. n4 e* g
DWORD nId;9 w( U @# j- L
int nPart;
+ h% P) J1 B2 P6 @& q8 P- E; y8 t1 T) E
ar >> nId;
$ F0 R7 ^- n9 [/ A ar >> nPart; 7 L% H5 S- R! V: J( K
- v \ i$ ]6 J2 `" K; w! j/ u- I9 H" t if( nPart >= MAX_HUMAN_PARTS )
" p. P/ `4 W9 U" D+ d } return;1 X! i, z0 j) Q6 v/ E* [
! Q7 _* \& k: K/ r
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" [! V. }# `4 p" J8 _) E
& |' C; V: E, U% M+ o8 ^9 A; Q' Q6 A1 B9 _5 d
Code:
9 y; |4 B: d7 ?#ifdef __QUGET_SWAP_FIX# L" j! }! i" V5 Y8 n' @. U
% S! o* K. x1 L! a3 `; d' b
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
z7 |* m+ L7 y' @& K B( X pUser->SetHitPoint( pUser->GetMaxHitPoint());* [' h3 g$ m( U
a& P! K" F+ @# J1 H, D+ S9 a if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )$ h' @) w; y2 D) H9 h- d: t
pUser->SetManaPoint( pUser->GetMaxManaPoint() );. H D% v# i; ], r+ x
- H. p" ^3 l, N3 j
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )3 m4 t7 ~, G' z/ F+ a& K, n
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* Y/ j1 z z0 M* y
5 K- f' |- R2 P% T/ [
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp# `; J9 e) _$ W( [
and add under: |7 Q! P3 H6 X+ m" @; Z
; b: [" e6 O% n6 J5 Y- ?
Code:9 R! ^) \9 i. w; q+ e+ a* _) l
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 Z& U, H( m& v, ~2 _
{
! Q# M# P* k1 I- k; Q; g% |: 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 );( a' C! ]: C* Z! d% w& E5 v
}this
. ~. D% j* ^8 k
9 o2 d' C" _. g0 R9 Y7 X& \Code:2 c1 _: [( p9 m
#ifdef __QUGET_SWAP_FIX: |' p# |7 [" j- B! R% }: q% d
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
5 h: N1 H4 N; L5 z3 v$ L$ B/ K pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& ^+ z @7 ?6 l" o" B
8 T$ H# W, M) S) m% S* u C7 `
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
# ]# \+ f! [, L6 H' d4 i pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
7 W1 a" X3 E( R! d% u
8 a- h* q* e6 F3 B" Q if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
: x! @. w0 i, a/ M* ^ y pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 A; {" s2 D+ r( j! e7 L1 }' o" [* M7 C; ]/ ]' q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver $ o& k3 C& |" P- k! [% i- w
3 t/ S4 r: P1 I8 h' S* E2 ~8 D/ R. J. l) u) ~4 Y: v F* ]
|
|