|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
6 r4 c! `3 S! s; {( c! b) G0 YI posted this because someone kinda posted a youtube thingy about it :O.
( J$ O/ |; }' R. i/ _
9 a# B% [! T+ bFind this in DPSrv.cpp @ worldserver
2 A- ]" x9 A' q' F# L& H# i& x; V# J$ |* K* H
Code:3 m) V7 B K0 M$ \
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )9 p% E' @# U5 f
{
S) Y) ~1 L7 n DWORD nId;
7 f1 z6 @& ^* o. B" ?6 a int nPart;0 _$ X) U% ]' Z
2 _7 l. p! b* R: w9 B" J
ar >> nId;
8 L6 L7 I" X6 l( @$ |# y& L1 A ar >> nPart;
' d) g9 h1 J6 A! M5 m5 v 7 w$ y! L. v# c: t$ ]2 T2 s8 w: \
if( nPart >= MAX_HUMAN_PARTS ) 2 W; `$ Z) M$ e& [
return;
* D! I- y: `) C: H0 W! e! n3 A2 \4 R6 h( E8 \" i
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it' ]6 b( n) j x
% e! p9 k' k. M* _( G. h
% I( |' v# \. F/ {. Z& _& ~Code:
( A- \9 G( ?4 l#ifdef __QUGET_SWAP_FIX* b+ G( k: P. a1 X" O! f
) d% H' J, E% ~; F1 a3 T% y; [ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
( k! g k6 P/ S9 r' A4 F pUser->SetHitPoint( pUser->GetMaxHitPoint());" L9 x" |9 X5 F/ Q
3 n7 u; s: M& ?* H' \1 [7 b
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )1 }6 K+ H7 y( [# G2 n
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: n* e3 N, G% z g" l& v
; }, N' G7 b0 c6 j+ a" h- C9 f if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
6 Q& r# A' ]% Z pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* k P! }: R! e7 H: }6 f
( o# z+ Y. a: A3 E#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
: ?. P0 o/ m9 v K/ W' O0 qand add under/ q! C3 Y3 r* N! }1 m! `
' R. I7 R% |9 H- l, kCode:- q+ U4 G- ]4 u" }2 s9 G
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )/ ]$ d ~4 O; P+ w$ }
{
8 b$ }& g! P4 G/ L7 M 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 );
0 B2 E2 u+ i9 U }this
C4 |% t& y' w O- G
2 e. d: h; V5 g1 a; {Code:
5 }2 ~1 ?1 R! h* M#ifdef __QUGET_SWAP_FIX8 v6 P# C" Y( W/ o' |0 `* z
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )4 V z7 Q6 F) \$ M1 m T
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* Q* e1 l; \7 {# U3 }3 G) `: l9 z$ |7 l, J0 {. _1 g
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
) ^! ~: ]' x% w5 a, a0 D# Q pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );9 X* S/ ?6 y8 X4 q
2 Q6 g9 w, k& g( d' U8 I; G- i
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
8 f3 g' j+ ^ q2 d! j pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
' j4 A1 O3 K& A
- g. n% a' Z0 R$ I#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 C& V% }) T1 B
7 }: `( R) ]+ G: [# G
! m4 L9 [1 U. V7 ?2 N# ` |
|