|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' }' s; s7 e5 f0 V! Z- kI posted this because someone kinda posted a youtube thingy about it :O.
' o- R# _$ Q# Y+ l. r) I1 i' @7 f. u4 @+ w/ q
Find this in DPSrv.cpp @ worldserver
( [3 O3 o \9 @
1 W) a+ z' c% B8 I- ]; aCode:: E2 f0 B; C% c* Y( b$ C1 |7 d
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
U* y: f3 I" L- k1 O$ q{
& Z6 f& y; H5 }7 u7 n( n3 X DWORD nId;9 W9 n# ]0 ?, D$ e# `' ~5 ?
int nPart;2 I# H! }; y- x2 s- B+ g
3 F6 J4 j P; H" A
ar >> nId;( k3 D' X3 V1 r/ b5 P& n
ar >> nPart; ( s4 D# P7 c: A: x$ y4 L
9 D% C# x* h- [. b- g if( nPart >= MAX_HUMAN_PARTS )
% x% J9 ]0 h/ j% T$ y3 t return;7 U# C) q/ R$ X9 O4 ]
; l, C) |) T, G( \6 R
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 R0 K1 X( V( ~" U: X
$ C6 p6 h9 T8 z1 B4 s
_9 o* g6 T4 `. D" [Code:
+ Z' O9 h# U/ |% \# p- J; o#ifdef __QUGET_SWAP_FIX5 J5 @/ a' z" }: Q& z
/ I$ H3 H; o0 @' H2 l
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ Q7 W* v8 B7 C6 k
pUser->SetHitPoint( pUser->GetMaxHitPoint());" \1 ?# ^. p& J- x& {" t+ ~
/ |" {" r5 F9 z
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
+ v5 O! F- @7 N# G. O1 W L1 h pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# C* l- ~$ v/ I- D# P$ T; Y" n
2 n0 B, {% ~2 u5 b6 B if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) w3 Q4 x0 f1 B! U; p) E9 Z" j
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 f8 x7 Y$ U- W1 d' N" G# Y. C
% W/ q# i8 M2 m4 w
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ Q7 T- F( x* h6 F
and add under; ^2 R+ X" M1 N9 m4 Z+ K1 Z4 s
% V7 z9 m1 P7 H3 P# q
Code:8 P- f' k4 |- N' c0 N
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )# J/ Y0 i1 M% e0 \$ c
{) j7 Z- x7 L* ?% F& n
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 );
1 ]- Q$ u- v; W& n0 T }this6 ^ D9 K5 \, u& i4 O
1 f% S+ r2 Y; H% {7 Q" q2 ]# ECode:4 E& E% p6 h- \- D
#ifdef __QUGET_SWAP_FIX
* f: }& r7 N+ T* H1 s! g0 ]( m if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )+ f+ j$ w% ?# w
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ U& E, y0 T) V) v
5 T8 J! j) `3 a! R% F0 ^ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )7 w$ M0 h* H2 M! l
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );. W" U/ D' Y7 I2 a& i9 h8 x" ~
( B( P4 A3 T" h: @8 a P5 Z2 p if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ): g% j' `, J' b A' @# B
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 j) G8 k4 Y& E; T1 P) ^0 y! F) H
9 w/ d. J1 u" O" O8 h: X#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
; {1 \, d6 L: B
; |' A2 B- ^0 u& W5 w- F) o' l7 y) t
|
|