|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked # }/ g8 d6 T' i
I posted this because someone kinda posted a youtube thingy about it :O.6 D/ J. h5 }/ A- ]3 s/ O: v$ j
# S) s( F% t! qFind this in DPSrv.cpp @ worldserver! V) J2 z. t9 m$ k
2 q/ q1 G- M- M1 O T% d0 u* ]
Code:6 M, e3 A2 @" u. o. o
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )/ }, i+ a# |! g' J
{7 S; r' ]% Y. T. M4 Q4 A# t+ C
DWORD nId;$ {* E# P( Z. l5 G N
int nPart;
0 b1 O* K" ^& o r. f
G w u6 m& `' x3 v! Z ar >> nId;
% B! T" Y% A1 U" z" ?7 x) r8 V ar >> nPart;
3 e$ M2 T- }. D; U+ t# q. _
- G5 b* U" i7 u0 ?. G; S if( nPart >= MAX_HUMAN_PARTS )
6 M$ l: d/ U' z1 H6 O return;
! y4 l3 v `0 R# l+ g1 P( s6 g+ A1 j4 S8 }; p5 `/ C/ a# e
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 {# x, {* _+ {$ C7 Q$ ~1 `- {, K% A5 b7 C' b2 a
0 t% p! L! m' @4 Y/ bCode:
+ p; j' t/ O. ~9 U#ifdef __QUGET_SWAP_FIX1 C( K9 N1 W& U. T; k" V2 |
! O$ O" |- y- ^& w
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ): }+ y2 S, A$ e2 o
pUser->SetHitPoint( pUser->GetMaxHitPoint());
# `: L1 T. [. d/ k- H+ O
$ d: E9 B* A4 y6 o7 ^8 e; | if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
8 h9 }, V) A. { pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 U. w/ a. b9 B/ u$ Q- _
/ ~5 g- E5 A' H- K; q/ H! w& E if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
) \* H% a+ F5 n: g+ t pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );9 \4 l7 l) Q0 m2 m3 s0 Z
5 D$ L- p* I( L9 h& T) ^#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& p* P, P5 F" B6 g- H! u
and add under
& ~$ o, T0 |3 c& u
! P/ b3 L1 ]8 ?; s& a3 ?Code:3 o) {2 l8 D* _+ ~4 k* K' k9 r
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ); Q. ~! V K2 N5 T9 B% g- P& v# V& c
{
: `8 x9 y. C% ^0 | 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 );2 r. J- Q9 Y& u; e8 n& z# G0 l$ [
}this
3 P7 ^# x$ L5 z% ]# y! e' _ K/ `2 u6 v$ g( `" q! _! R% l
Code:. k: ]/ l& T: P/ v% i
#ifdef __QUGET_SWAP_FIX
" F: d4 E( F) x5 i if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) ^* B' V2 ]! [$ _9 e, \# D
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- l, u g8 E$ r3 {
5 n( ?* O2 C- ?9 e9 ]( x
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( H* U7 Q: v3 a" v* L pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );/ A6 x, c! m2 Y& i$ Z q0 J
0 J9 C; p+ b+ X0 g' c if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 J" s3 z! k2 F6 k# C u( ^
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );4 i8 n, a: @! s2 T
( C. r+ w3 i$ V! W2 Y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
& s" b# z/ ?- s" M. t- ~1 x, Y8 w `2 X% o
h5 a3 R6 h- j' ?9 c0 b
|
|