|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 5 N( f6 @+ j! @7 S2 N+ K/ h0 r
I posted this because someone kinda posted a youtube thingy about it :O.
) J2 \* D A1 `. e1 P( J7 y; @6 Z. I8 q' e0 Y: F& [
Find this in DPSrv.cpp @ worldserver4 f1 o, w# ?. d7 e
( a% s$ F; J0 g3 \" LCode:
# ]" K3 g- e) k/ k( }- zvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )/ N, L0 Y& S1 y( ~3 U) p# V
{
: t( g _1 r: ]9 y, E DWORD nId;
# o# y) m7 q; z% j6 o+ m int nPart;
L: m) f* T" v- `+ ? o+ J0 f i6 }5 q5 ^+ w
ar >> nId;
! V4 v g* ~# L$ l8 x' u ar >> nPart; ) p4 E" P% \2 D+ j& e7 e8 V* m
9 Z1 e/ i% y2 d2 ]7 K* S: U; b if( nPart >= MAX_HUMAN_PARTS ) 9 R& _; w y. E3 L: D5 z
return;" _6 L& E( o6 j
7 ~+ [0 f$ I, f
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it2 E d, u& Z: I/ K, D4 T9 ?1 F
% g0 [' [) S! ?) Y0 q t1 b) q
+ p- R7 X& B( A1 O" ~
Code: C# T: P5 K, h& P
#ifdef __QUGET_SWAP_FIX
6 d& f9 i: n1 l
- h) c1 J' h+ I/ Z, R m& m if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )# {/ @: a" I, J
pUser->SetHitPoint( pUser->GetMaxHitPoint());' g2 _! z% _- [! F
9 \; ^1 |2 |: g+ m' ^ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )5 D; u' J6 O4 y& a
pUser->SetManaPoint( pUser->GetMaxManaPoint() );; \6 y y1 P7 I; R
" v# b) K! E5 @ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )* T- V) }9 ~% d3 n- p
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );+ Z. ?7 E6 S/ b9 o( E2 i; D$ w) ]8 ]
0 F& H$ u2 Y. a" r; V
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp, L( f; t- [3 }8 o
and add under$ Q$ b6 k/ H w6 s
( S# R/ v( K6 U; ^4 r2 gCode:/ O3 R, V3 o f6 N- r
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 d0 t0 S. D5 m% \; w6 Y
{
4 T5 z! w1 X8 r; 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 );0 [' [3 V3 D. y# x7 O! n: x, J
}this
! g- Q8 G. K7 J1 I, @; j4 c
* R% Y& Z6 G* O0 NCode:
9 ~8 Z) m* y7 ?6 C1 d: y4 P4 x5 e#ifdef __QUGET_SWAP_FIX/ e2 r# }7 J4 E* z1 b0 U+ i# j- m
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )% p4 u1 t$ t4 n+ F4 {
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 ]7 s9 A* n4 I h; G3 {0 f5 t5 @6 v8 o( z# a7 G
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
. V. g* \' k& b+ q/ x pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
' w1 ]& P5 n- B6 A# Y S' ]- S8 h8 x. I
9 L5 b; p0 b. W+ D$ G! F# c if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
5 O* D F( R9 ]$ L, q pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 a8 m7 u/ Q* i6 y, x& i
8 B' u. K0 ~ V& d5 d- H! q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# T' w; o5 m+ M. K: [$ g6 U8 l: B) `" h* O
- A# }% w' R4 x" V9 @* o. m5 g |
|