|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; H* q% h3 i1 b! Q+ DI posted this because someone kinda posted a youtube thingy about it :O.5 m" k/ u8 T0 @
8 g( b, W+ N4 P- M9 u) U4 B
Find this in DPSrv.cpp @ worldserver
/ J9 p; F# G9 n0 b$ h/ m
( R; o- K0 A( }& {. m5 PCode:) r8 M$ N' ?5 g f$ ~* A1 w' I
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 A: z- v, Q5 }/ x, e3 M{* i8 i* @: x# D' ~2 i ~/ O9 P! C
DWORD nId;
1 ~7 ~3 I( s: F; c int nPart;( ]/ S- O# S# J; d5 o
% Y* z6 `1 J K5 M
ar >> nId;
0 E$ h! x. }: `! K ar >> nPart;
) V4 n8 J- d# u5 a/ l% |: D+ P
1 x$ D; H7 G5 w% ^7 W) c- ]) H if( nPart >= MAX_HUMAN_PARTS ) ; d% S) x, e9 W+ S% V
return;
e( u1 v" P% j3 h
& |' [1 @0 @ H% _, ` CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 b' q8 U; V. R) W" ^
6 p/ b2 ~5 \4 f/ j3 y8 W; i1 c) g7 c- N5 Q6 K6 d$ y
Code:
6 F! k9 p" T9 }8 U$ T#ifdef __QUGET_SWAP_FIX
" ]4 Q% W- M5 u* h
1 L4 i6 K( D- u. @4 _ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )8 [$ J! k$ t7 o5 ^6 y
pUser->SetHitPoint( pUser->GetMaxHitPoint());
" n5 u6 }. F* k- o; [; [% b2 z/ F! B, \3 E4 b7 Q
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
' q* @6 V* l$ g0 j$ `$ p. ~8 A pUser->SetManaPoint( pUser->GetMaxManaPoint() );
2 f" K; x- O5 z. K
0 _% p X7 ]5 _ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ): w b- o4 x* k9 u4 F) T8 g
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
S) m2 }% J6 J+ ?& K2 r; w' I
) q9 _/ z0 c0 J2 S#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
Q6 W4 b! Y& z* Y9 d$ Land add under
5 {3 |1 |. C. \* P x$ J& { ]. A% w6 t- l, M0 @
Code:$ j8 w8 U6 Q8 z4 Z) N
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ s) {8 J$ x2 ]0 b: v {
% k9 p" o! \' V/ h7 p# c 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 );' K4 d+ u' a- m/ t) \1 T, u/ E
}this0 F# b7 B) h3 l+ k0 l8 x
& }0 ]2 z1 {4 Q6 y) BCode:
1 d5 Q: w" m8 \1 n' R$ r( l4 i#ifdef __QUGET_SWAP_FIX' [: Z! c7 ^% n
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% k% {, n- _( C" i, N, R0 R" \: m pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
+ g9 g* c$ D6 D
* Z5 E: G, H4 i* G if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 q2 K8 O4 X I' u6 n T- i1 ], T: V pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- ]: E- N# Z4 b5 j, Z+ K6 S4 p% p& p/ G4 \) a
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
" V: d% M I5 s pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );, Z& Y0 v) K' L) f' y1 O
$ a% y! a0 I% s( _& A) `3 ~
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : g8 S5 d! V7 C) S& O0 `
- e% e6 {$ b2 y4 E
( L9 F6 ^# v: b( |: F |
|