|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ! M% n$ \( D+ W" o
I posted this because someone kinda posted a youtube thingy about it :O., a5 l# V) w$ P2 \
, S- }# t5 F5 t3 v9 ~Find this in DPSrv.cpp @ worldserver! \: T$ L' [& U* y5 ~
; @! S6 \ F: N: \( N6 j5 U
Code:. o; y6 t4 K- [; Y5 l
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' Z$ L9 h8 w8 B' i* }{* k/ B# \% b5 ]; j
DWORD nId;7 Z% r4 m1 [0 z. m' L9 \" M4 n
int nPart;( }! ?5 b: z% P2 l
% H2 H* n$ D3 q$ ~ s1 C) U2 k* x
ar >> nId;2 }% t& C$ H. C: h8 `# v) E: b! ^
ar >> nPart;
% G, k& E. N3 Z9 X3 S 1 T' V- s9 I p+ h) K9 x
if( nPart >= MAX_HUMAN_PARTS ) 3 a. ~' H y( `0 k; n g3 H
return;4 ]# ~# F, f# z# m+ d
" ]- i$ ^3 [+ E5 D& a" j CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" j$ S' K/ O" r. M5 W8 Y
8 T1 s; y# a# f" n( D. r: H! W* p7 ^ m% J4 m, b- R
Code:6 _+ |4 I; u$ A7 f, `
#ifdef __QUGET_SWAP_FIX4 R$ Z1 w4 P1 `" D0 G
, w Y8 `1 @' _% w if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
8 C7 h- S6 ~# b! T* n! G pUser->SetHitPoint( pUser->GetMaxHitPoint());8 z6 Y. @ t8 G/ ?! T
2 B U6 f! D0 H; G% `
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )4 n3 I6 k4 e! }! c
pUser->SetManaPoint( pUser->GetMaxManaPoint() );- `' m0 f- G2 i' x1 G$ X* x
, n. v; f3 t, y' C if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )+ L* j$ h# x+ V% {
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); z. g) m' b# Z+ w" h/ T) g
0 Z6 j& F# {. D" ]6 {
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! ~& I/ ^0 Y9 Y8 X
and add under! d: ], T3 u, \. w/ {
$ Z% {0 p7 I9 Y, ~$ k8 ~+ Z
Code:
^9 N% Q& z9 f6 W+ k2 Eif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
) S; e+ T; J* X4 b4 O {. C2 Z: W9 ^! [
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 );) b- H" I( u- l7 R4 }/ l: ]
}this
; o4 g) l' o E: l& [+ f9 \6 _( d W7 s) @1 u
Code:
1 i1 w, x( {, Q: G- f& T% u#ifdef __QUGET_SWAP_FIX, \4 M/ n; Z0 K, n& x( l+ B
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
1 y- i5 @: E) F pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' E' {1 n- w3 H& p; x! F0 f
. ]5 ^+ I: S+ i/ e
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
- L7 |1 `! A. J8 L- X' T0 \ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );' r6 `5 B7 v6 D0 u
9 `; E5 E* {- d' Z' x2 A/ i
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )3 f( F$ M/ E/ x8 X
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 I ~. r ^/ Z0 d$ O# ?1 `: U( v+ m7 p: C' ]
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
% p/ r8 _% O4 F/ r# c A, ?8 H9 @$ L$ }! ]0 G
9 W4 a# Q" J% l- U/ J- ? |
|