|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
! I* t5 s, U0 H' y3 B8 Z# RI posted this because someone kinda posted a youtube thingy about it :O.2 q4 a( m: N* E' L
$ s ]9 H7 b) hFind this in DPSrv.cpp @ worldserver% n/ l9 q1 M1 T! f: R6 C& o
+ N/ P' Y; {9 D2 c, X3 }, z
Code:; o% a( f1 C Z* @
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
3 ^. L* n" O$ N{
( ~# C- ~0 C6 V+ Z# r# N8 W* L DWORD nId;- @9 I8 ?3 b4 J1 K
int nPart;
$ J2 Y( [3 Q. x& o; \3 ~5 W$ W" _* S$ E$ W# E: E
ar >> nId;
6 h6 V9 q" r( D; e5 H/ D) J ar >> nPart;
4 L! V5 H E0 `0 K8 o1 `
2 L4 X6 {/ I" `2 ] if( nPart >= MAX_HUMAN_PARTS ) ' _, [% A# J1 K: C H/ r
return;
& k9 P1 m9 [# m1 F4 F( n7 V
2 X/ P# g! g' f. D' P7 D+ u4 N CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
4 e6 T) B8 E; [% {* d8 e; f4 K# T; w0 D
8 c( N6 S% J8 K1 l; _/ O* {
Code:' q+ F( h" i/ L, e0 t% z
#ifdef __QUGET_SWAP_FIX
1 D; R) ` k9 G' L, f6 i; M5 n" U, f6 s$ b! D8 Y0 c8 p
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
- }, b1 t( l% t# `8 r pUser->SetHitPoint( pUser->GetMaxHitPoint());
) |' U/ ]% b7 k
F2 q% j. `/ X+ E A if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )+ B5 ]7 }( i- Q$ v; {
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
& n+ l A' ]' U7 u' |, D$ H" ?5 J/ f# W
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) ]- p O4 U- r$ W6 |" V% E
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
: l" w7 F( `: D6 v3 z
8 M3 I$ [. S ~#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp- T% p, u8 ?( U+ V! [
and add under+ [- | P+ S, S- F: R4 F
0 D. t" z U$ m( b/ K9 MCode:. ^. h4 A' @( ]
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 _4 c" o* |) u. o1 R/ ?0 \; v" Y
{) Z# U9 N4 a8 U
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 );
% W3 P0 |% Y; c6 v% S7 T1 }+ X }this
. M0 F9 B0 Z9 l, _# T& M) D$ z1 Y. Y, B6 k
Code:: o( @7 i7 u+ P9 E
#ifdef __QUGET_SWAP_FIX. `( @4 |* u6 o# _
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
) U0 h# K3 Q, N( ^- X# M# j pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());+ T5 a. W! j0 q0 q5 A
( T/ Y" B. n) G9 m3 ?9 k8 }! \
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )8 P& w S* }8 Y: Z) w K" `
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );, A/ j4 o; v' O6 J0 l$ r* y+ r6 `
$ D9 W: h* Z" p+ p& Z- c/ i3 z
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )/ c- E; l0 H' v( V% }( }0 y
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );; o' h8 b6 a" w9 ? |; K
4 F8 p9 @( V7 F, b2 y7 f#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 P2 x5 M0 e. p3 Y6 D5 ~" a8 J& W9 M6 y2 Z: L6 _
# |3 R9 |$ [5 B# w8 j* p; V
|
|