|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
( }0 Y8 b0 r3 X! G5 P, ^# eI posted this because someone kinda posted a youtube thingy about it :O.5 t J: J. U; V* k0 c( y4 K
. k: q |9 A; z& n s, c3 X
Find this in DPSrv.cpp @ worldserver
2 ^& V; k) _, O! d: j- n9 h
/ J0 H" a* j+ }" W5 }0 S/ fCode:
7 W, ]! Q# I7 i2 O1 H: _void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
9 j9 ~) [, e# j4 f/ ]: R/ ^{
6 H& d1 C( q4 W) u9 e+ g DWORD nId;
- P8 N6 J: y; A6 B$ Q" [ int nPart;
0 K1 @' X5 F0 I6 F
" ^( \& }( p. O L# i ar >> nId;, ^% \. Y! c$ B: b8 D
ar >> nPart;
; r# S; E. p: V8 Q/ V, ?
, L: x. `. w1 \& J/ Y if( nPart >= MAX_HUMAN_PARTS )
* F7 ?2 T6 E4 o return;
/ n3 g6 }' u; w8 P- X8 H$ _ @# w j; q9 E! A9 s
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it& Y7 m R- _+ \+ v' y$ `' e
9 A, C$ q2 O `8 j
9 d! E0 Y3 q* w2 {! u( j* xCode:9 M% Q# f/ Y# V7 `4 Q2 ^0 x
#ifdef __QUGET_SWAP_FIX1 S& j" x6 a: R" f/ q
% I4 k: F/ I, ?0 _' {: {$ `
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
! f& m$ q+ S$ B% S, i pUser->SetHitPoint( pUser->GetMaxHitPoint());
3 x) y. w1 Y- W% K' @" K/ [/ y6 ?, v2 }# N
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )) D' S+ o% x" s: `
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 q9 s6 \7 g, s' R# Z
( }9 J3 P N$ a2 E if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
* _+ \% f+ ~/ m0 W pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
9 Q0 c5 h, \8 \6 D+ b( D% T7 S, g& l) Q2 Z" [% G- z
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp9 I) \) L. f" c5 Y! P' `# x2 b% e
and add under; Y ]# v5 _. F" j
7 |% k; F/ L) u% |$ `
Code:- m3 A- U$ A* ?
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )& N# r2 d8 N2 K& U9 d8 A
{/ ~: _5 G; \; H6 \7 [) n) c1 B0 D
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 );
* A9 q, Z/ E) b6 S4 A7 J; c- K! h }this
{. ~& Q8 F& Y; m; x1 n0 P. @2 \9 }) K( D% ]- B
Code:) h8 T' Y- s- e2 X) p L8 q
#ifdef __QUGET_SWAP_FIX
, ^4 r7 @2 ~; T$ c6 l$ S if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )+ d$ p9 u; q! X" p+ |" w
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());2 M$ O2 j; `" B- h# X6 f1 `. ]0 y
}. R8 B S: T! p* ^
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )" x6 l. B+ h$ w0 s! h) J- K1 q' b
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() ); V1 t8 P* [6 a
' I' [" Z. {% [8 i if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )! s2 T5 ?8 i( o w: X8 ~, F; N) D
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 D9 k, q4 b; o# B- \0 N6 t# p2 b+ q3 B7 k4 B
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver * Y" e1 z' s% N0 p
, ^6 [- M8 C$ {) k" {# ?* N2 h5 {# V3 n
f0 I( K# [* u: { |
|