|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked : Y2 ^* G8 X- J7 O O! M$ m
I posted this because someone kinda posted a youtube thingy about it :O.
+ a7 }+ c8 _( A3 H
" l% J6 S0 ^$ [' w2 g8 V) wFind this in DPSrv.cpp @ worldserver
- r" ?' c* T4 R) v
9 g2 z" _2 m6 L1 n: c5 KCode:. U2 t. q; l' O2 |% e
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 K7 R5 G/ ~$ n; x{* z0 j3 ]' J, O) }: ]- \' J& o8 s
DWORD nId;
- y" G6 Z6 k1 V! k5 J int nPart;
+ c" w; m( M2 D L) l, ]9 ~4 h! e4 u1 m# c& u9 L1 P
ar >> nId;' K2 p" H5 p/ A8 e' r
ar >> nPart; , B: K! `3 L3 K. B* v
; i! ]( u: H' B) Z- N# ^
if( nPart >= MAX_HUMAN_PARTS ) & V# t$ V& [% W& d" R! i' \% f$ c
return;6 C" |1 Q w/ C7 Z2 a; x/ I! M! d/ }
3 g6 o6 x: a& B" k& j
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it$ W8 V9 Z) S; |# K
' G( M: h# }. _" z. y% y) Q- h3 B5 x* M2 N; J+ L
Code:
/ O. B3 a" q0 X p4 o6 }#ifdef __QUGET_SWAP_FIX
P0 D$ ~+ u, {, z' j- e, h. b9 W" Q3 k6 v
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
+ J3 s- O. K. G8 W pUser->SetHitPoint( pUser->GetMaxHitPoint());
2 e( S, l* m1 [. W3 G2 P' J
9 z( L+ \" P3 d* e* |9 m/ J if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )1 {% r! m2 Q: `4 i# D: l' b* `
pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ m, t3 U, ~9 o/ U+ f7 X. s
3 t+ e7 g: W6 I: L- _" Z) T if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 a O! R. f. Y/ t! W/ j$ k
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );' K* k& p3 g/ `0 L
4 q3 {, G' z/ ?2 y6 e: N) F
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ p' k7 f$ i9 Q% i I( c, @and add under% w# v0 @: G+ {% [
/ Q& F/ p5 { _$ wCode:& c0 R9 |4 S; X7 `/ M
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* E% K, l( L2 i- z0 @' x7 u4 \
{, i _- J4 R8 l* i7 U$ I
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 );9 n1 {; K# E4 C( k" q+ f' r
}this
5 ?) b+ O" s- O# X5 @, ~8 \- ?; G2 H% ^3 @& v9 j; d( Z
Code:. R. k2 a$ x7 i7 `! C
#ifdef __QUGET_SWAP_FIX; O' ^- Q/ ]* A7 B$ e1 y# M
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
! H; q3 K. P, T6 u4 a pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 U @3 E8 H3 I) S& U" b' `! r8 S: j! z1 I, @2 y8 f7 H
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
! ^; C$ u0 R2 c9 f pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
; x+ g4 R5 ^2 m K6 ^* e+ N% C& j' g) Z0 g" r3 O9 c
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
+ S, D% h2 B& h/ }: K# u pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% e' y. C1 [# L1 w& y: H# p* ^
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver - m4 P' D) t5 s8 @3 F
% n1 W7 `" L* l) V: M N; ?' w( g! j6 Y3 O5 |- a7 V
|
|