|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
. q# O2 w/ p; h H k, p) mI posted this because someone kinda posted a youtube thingy about it :O.8 k" H& | t6 E& ?; F
& @* u) v$ m7 Z3 S, u
Find this in DPSrv.cpp @ worldserver) p3 R' S! `9 g( t
+ U6 ? w1 Q; l) M' @$ cCode:
2 E1 Z; c# n+ ~1 z2 bvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
3 S/ i) ~; V7 s% _{
: U4 k9 P# t0 \( a. Z2 v6 S DWORD nId;1 a1 d7 _1 z" _+ Z% T, z* Y1 H9 d
int nPart;
5 W5 o) v4 U' f9 q3 Z" P$ B7 G9 R+ t. ?, ^9 D1 m3 r* _+ C# m
ar >> nId;$ r5 W+ U e( K t$ B$ G& f* |' p
ar >> nPart; + U* M* I4 c) l+ U0 ]7 }8 O
, Y7 H- n7 V0 z9 A* a% M! Y/ O7 g* a if( nPart >= MAX_HUMAN_PARTS )
; c7 m4 t7 f' H return;
7 ^8 ?% ^. ~0 X' W9 }9 ~" y, Z
* A) B" G& L! x CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" z) a% E* \0 L( S
9 h' L( c$ }) R) C, T# F g" h; l/ a2 s U
Code:
" |) t5 N" v% x( u#ifdef __QUGET_SWAP_FIX
: m* ~# W- }9 b1 q1 h- }# [2 n9 r
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )- e# s% ?* c. m, {* U
pUser->SetHitPoint( pUser->GetMaxHitPoint());6 V2 T' l, \/ ~# r
/ x5 c" N# w+ `) H0 w if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
3 a. U, M; h9 R: E" \* g+ a, V7 ` pUser->SetManaPoint( pUser->GetMaxManaPoint() );' x8 L5 s+ E& r3 K6 w# Q
% k; X. q. f6 z- \6 z: ?" [ Z if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )9 D5 x+ ~4 Y" C9 b7 i* A$ h4 @2 K
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );; b& c: d8 y) Q) X7 W, Y. a- H
0 o4 I" X0 y6 I1 Q#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
0 z K" z+ p' y! b0 wand add under
0 @$ s$ ~3 l" A% R! v" T
' N. u( u8 }( H+ }# }Code:
) t" D+ I, `3 p% X3 p8 [if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
8 g* X6 @" R5 L& K; a {
* i: ?$ t1 U/ d6 @) d! I 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 );
/ V# x; l9 ^- w3 ~6 N }this- i! ^' w& b: U- u) Z3 q$ T/ O8 C
3 o( D9 r+ W6 _ m9 o
Code:, p y( O$ W# u3 j
#ifdef __QUGET_SWAP_FIX9 ~4 O" E R( O# ~) ~
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
4 d6 n( a9 v" J6 k% f pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());6 ~4 M. V$ L& o4 e
) `( m: K/ ?1 |6 S7 U9 s
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
' h0 U) i; R0 K pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ J0 D) B% Z% A2 q
/ k0 H4 q1 c7 ]5 V1 O j if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ); Q5 @; X8 `% f) T+ m: U, o( n! b1 p
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );2 F1 F" W) [+ d2 G& y9 m
+ r# s" k( n# J, X5 S#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
/ h; R3 u5 `* V7 K* M1 W# i" Z$ N* c; @5 m
! ?& o4 n$ E7 r7 H! q! U0 B0 c
|
|