|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 3 g- \! W6 ?/ I' K+ R# p/ Y
I posted this because someone kinda posted a youtube thingy about it :O.
, K. e! R R4 m4 [* E" J: V# r+ g. g0 L, u, L5 A. m( z4 h- \
Find this in DPSrv.cpp @ worldserver
" P3 h- M( z# p- t) i2 o6 u# s( ]5 j( ?9 W# D: Z
Code:6 j# b, N% e6 A
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )/ v' Z$ S; q# y: K1 J+ P3 s
{$ e' A# J+ Y! i9 w; {
DWORD nId;0 [! [( a0 F o. `, o; S1 Y0 V& b; Z" U
int nPart;4 V: O$ c9 g0 M. X0 q
2 \- x6 X- R; d' U7 F ar >> nId;
% u7 C2 I$ I; @- h2 F# ? ar >> nPart;
# p$ M* {. q8 J4 e' }, X
0 Y; e/ g* }5 R if( nPart >= MAX_HUMAN_PARTS ) % ~. m; g O8 f+ ~* D8 u5 A7 Q
return;# D+ S2 @; a) e* Q6 y: s* C
1 |+ ~. Y" \2 V# O) ^1 v6 ]' z CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. s) [1 p r. i2 _( n
6 \" ^3 n* p' c% G
$ Q- v) C4 Z+ A" XCode:
# J, L9 U& ?% ?2 I9 {+ G; I: t, o1 Z#ifdef __QUGET_SWAP_FIX
9 i6 |. d* {' G) h/ l3 D4 i
" z* w, u" R. Q0 ~ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
0 R2 I7 s2 L# a0 X5 \ pUser->SetHitPoint( pUser->GetMaxHitPoint());* I( i2 u$ E. ~% d6 B
# Y- n9 ^; ^& O& k+ o6 g4 c# p+ \
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
) T+ d% ^' I2 I! N# z9 H pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# h; O9 ?9 u' c. f2 @6 K( j9 n
' Q U& B' a9 Z+ X8 w8 t% d if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )0 U1 T. b, I1 l
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& W3 F# B7 Y% [' j. S2 J& _& \) I# H9 X, ?
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 [0 [0 w4 @6 ]0 O& j ?/ gand add under' _+ Z# U9 j7 J7 I+ m2 l2 y
! h9 @& f' p% ], t2 L5 G( L: B8 v
Code:" K4 g Q3 E- r# N4 X, f! N& n4 b p
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
; [8 s( o$ t, j! L* C; X" k- ] {. J. R) _- T. z/ M0 N) y$ c/ 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 );
. ~ A; V e8 V9 p! u& u }this! |) O' X/ ?1 Z
3 H" e2 v i6 g6 ACode:
/ f. j- u% q% O7 Q; S$ {#ifdef __QUGET_SWAP_FIX+ x! I$ [) { u1 O9 G+ y$ Q
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )% t4 A7 m* ^- ?, T1 A# k: G
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
+ j7 E% ]# o6 x' e- E* @) J8 Q- m: h0 P
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
7 K+ J- k+ z) a pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! s; N8 ~6 p: Y1 R' L0 ~1 l, h- Q
: m3 y3 Y9 A, y* G+ h* r& F if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
5 M' E8 d1 Y$ l5 P' |% n pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );% D. P& X/ _; M4 S3 }- {
W0 v6 M! ~, W4 y( s' E- s#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* c8 M1 U5 [6 c2 v$ ?+ ?" H8 i3 |. [! `5 Y# r+ N
& O: M9 ]+ d$ b; J. l
|
|