|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
( f8 D9 X$ E8 a! j0 s/ MI posted this because someone kinda posted a youtube thingy about it :O./ _3 a- @% N, W$ @; Q5 u. S
' o( J8 ?3 q5 Q: o. |- F# G
Find this in DPSrv.cpp @ worldserver
1 Y. e+ z4 O7 H! W9 G5 n6 ^, @1 S/ L4 @. q: k
Code:) `! A1 ]; J( J6 r9 m
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )2 ^- L& r$ y6 K! L* F6 g4 D, E* i, a# @* H
{
/ @0 L- O$ ~; O8 f1 X: w1 ^ DWORD nId;0 I& Y! v* w2 u+ E- p
int nPart;( Q( t0 s8 F' S
" g9 C' z/ R' }1 y) \" O* @
ar >> nId; r( T. B7 p: \; f; ?
ar >> nPart; " Z3 }. \( F6 t/ T) I: R
% v* G! R2 z: J- y5 j* E% b0 V
if( nPart >= MAX_HUMAN_PARTS ) 2 f3 ~0 }" N9 p8 w
return;
$ C2 D# J. E' ^. Z* j! ^; G" H" O2 z9 s0 y, p5 l: `
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. t& Q9 }' }7 N+ P* v/ }) q$ \; R O6 k X, v$ h# _4 j& q
u# X6 ^: O; m# O/ `. DCode:) `+ A7 f2 T. S, |- a
#ifdef __QUGET_SWAP_FIX0 h) }8 X% O5 N! V3 y3 z1 S, B
9 K, P+ u2 J/ b6 R2 H/ r0 ` L if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )6 P2 c$ `2 w0 c3 x
pUser->SetHitPoint( pUser->GetMaxHitPoint());
1 U% D" E8 l' H+ x/ C( j7 y
4 x% p1 W( y0 e6 n1 s" } if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
; z! P' B' s9 U pUser->SetManaPoint( pUser->GetMaxManaPoint() );
. [% l" a7 @& M( u* g1 y/ M) v# J0 }7 q1 h8 Q
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
; W! S, {9 o" Q$ N, W pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ ]5 [& c) t+ F7 ^; @9 e# T
6 o$ t: J6 C; x#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 I+ O4 x7 w( z A2 G4 f5 Z% oand add under$ _8 W: h; l1 B9 \% Y7 j1 W5 J
8 b6 j( B; l; xCode:) Y: |6 v8 P. w( a: n1 w
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ), j: y1 Y$ i1 d' A
{: h. O% V, u5 P8 X) O
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 );; `( c6 K( V- l) L
}this1 W9 E- J2 d( c( _# }' x9 B
3 Q3 `4 U9 g+ O5 _4 S5 dCode:! W9 l" P3 q `+ p
#ifdef __QUGET_SWAP_FIX
- T$ t: S7 d: E1 x if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
& _, z+ J/ z" h1 T: i g6 P( V/ ? pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 h$ h. U& B5 C" B/ O
2 d% d2 \0 Q1 `2 f& { if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
: L9 J% j' ~. F2 \' ~; w0 ] pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
; \; I: c& a( t5 s# {5 a+ F4 l! ?+ b# F2 w$ S6 I, L( D
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
! E$ w* X1 I5 H/ M+ B P pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; [6 n9 }# r8 L3 m( M5 i
: F/ |2 @! Z( s" z#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 3 r9 @$ u" @8 s4 U2 }
& @9 x4 \* V1 h+ n$ v9 b; h0 N/ K; d
6 x/ q* a! q+ {. i. k! o |
|