|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked / j; B+ w* n% u& I8 H- y/ y
I posted this because someone kinda posted a youtube thingy about it :O.
+ s! c3 p: C! o Z5 Z6 S& k. ?! b
- d6 @9 D, x; y3 m& DFind this in DPSrv.cpp @ worldserver
( V! R, J/ O/ u1 |/ S
. l+ e- D# C" I: i3 r# O' b* QCode:
, W5 m( I; N+ G: \$ tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )- q. E* F2 i' W( Q: i9 e
{
2 I, P% ?6 n, w8 Y* `, K8 _) K DWORD nId;6 d2 Z4 R1 D' S) A% O: Z$ G* u
int nPart;
7 g c7 c: [6 [7 j/ p4 g+ y4 C" g( o2 Q
ar >> nId;8 b4 v( J' F# G" g# X
ar >> nPart; $ P: L) z% Y& H4 _% l
2 X" ~8 e# D: N' ~/ ~! u# o if( nPart >= MAX_HUMAN_PARTS ) - u. Z- h; h y! V. m! f
return;
7 a ~% Y, v: Q$ `1 |# \/ C! x( X
: i3 G* n# {1 N8 i7 S% k7 M CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* |1 ~( G/ }5 |) V7 G! h
! K( |( L! q# b, ^
' g5 ~4 `9 \0 d" T* x$ r$ D1 dCode:
1 Q7 ~+ f, H% \6 {- b#ifdef __QUGET_SWAP_FIX* t' T$ `% i9 Z ~' `) Z9 f$ O
& k( ~) d; A. J4 R+ V# H
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
, L" b9 n9 S( m2 k pUser->SetHitPoint( pUser->GetMaxHitPoint());
. b; y4 b. m7 p# n" e
6 M, L5 u) R) S- s7 t2 `0 _* l if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
; n; @9 `9 p1 s% o0 e) q pUser->SetManaPoint( pUser->GetMaxManaPoint() );4 K" Z8 ~/ L! r' J- q
6 J) |5 g4 q( I; c) E; M/ K& m
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ), L- x* U% C+ a
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# f& g1 x! M7 q0 \9 I9 ^
3 M& h; Z5 T' F0 ?' [& m& d) ~# Q#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
k% E; P( Q1 ]) L4 W- V# }. D+ |; wand add under9 U+ @: _' x8 }- w
( q1 {3 h L, l) Q& m
Code:
, Q2 L4 ~; [0 ~/ p* o" Qif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )( v. F! t* _4 J" n; N0 O
{
2 |) ]$ U1 g3 T7 J" s) C1 v/ J1 T 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 w! i. s9 `1 r' ~) g }this: H; w% i" ]/ Q& n* g( D0 U& C7 D
1 N" n, K; \* g! K% @" dCode:% O- e v+ Z) R: O1 ]- I6 u5 { k
#ifdef __QUGET_SWAP_FIX
' w W3 X/ K F) e" c; N if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% t* a6 ?, Y. g, [# r$ e pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
; w( ^0 S- U7 b+ a$ i1 K
/ f: ^ J0 K4 R/ ? if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
7 c. m) }/ p/ @+ k3 Q+ d8 {4 [ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );& r' e- f9 \* }# n, l- X5 R$ G
" j" d- u9 l' r8 G2 u
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )* x/ S* f9 O) C# Q3 ?; K7 }
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. L9 I( H. G- q0 e8 R2 I3 @
& w% @$ c0 Y k" B U5 w. y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ' Z! C+ c3 J* Q! O0 i2 o
/ k9 {2 k3 F2 ^1 p6 e
# I: y3 [" |: [* I+ C |
|