|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ; E; L+ @2 k7 Q
I posted this because someone kinda posted a youtube thingy about it :O.
8 e S S7 [ c2 V4 y7 G3 k W* k7 O; B2 `( |2 I1 g
Find this in DPSrv.cpp @ worldserver
+ E3 r& g. V# \& L
; M9 `4 _, m/ @. t( J9 o1 W5 u& C ^Code:
6 Q V8 k8 w" h* [void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 `5 q2 G7 |$ Z! d- g" L) U
{
. Z9 h; D/ G, {8 i% ^. d. F DWORD nId;4 l2 R" ^% r4 J4 P: q
int nPart;7 \) Z5 E9 L, X& m3 C" {
% a) ?" Y5 t! S
ar >> nId;
. \8 j# ?' R. u5 I3 `: g. ` ar >> nPart; : t' o6 N6 P \, G! E
) B0 ^4 f0 h- ?9 M5 B6 J
if( nPart >= MAX_HUMAN_PARTS ) : C& ~: q1 Y7 ?( M p+ ]5 F
return;! Y0 ^" J) J: x
9 e" T; o- d9 f h9 C o% U% s+ v CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it" C6 o- z0 b" i7 |" P" ]
; H* p7 O5 e4 R, Z* _% G+ s
- e. o; r" b: k5 A5 [0 s* N( RCode:
+ b+ h! x4 ]7 N: X#ifdef __QUGET_SWAP_FIX
, B k* L+ S5 F7 _# e+ o* N4 }( Y. U" Q0 i! y- c" k
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
+ H' C6 |. \; a7 A% Y+ |* Q" P: L pUser->SetHitPoint( pUser->GetMaxHitPoint());2 K% d9 U2 Y* U1 l% x7 p$ {" z
2 u+ L" k$ l8 @4 o9 h6 p
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )( U0 e$ \4 t9 l' P# s
pUser->SetManaPoint( pUser->GetMaxManaPoint() );% I; N6 Y o" c( @
" g. C: {/ ?5 M ~) v1 o if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
9 ~( c( l3 o$ w$ w' v3 s! i0 D5 r pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* R$ d1 M+ X8 q6 X: E& V
+ D, G" ^: h9 U! `) v
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ ]3 o3 ?( v( R. m2 T
and add under
; O, s# ^; T2 \. A" N5 Y
. j+ R& j, ]0 Q7 eCode:( n0 m0 {' Z; _' I+ H
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
+ Y1 g7 x5 l. A% F- ^ {* }6 F* i- D6 r2 p
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: W, A. Z7 Y
}this
- b( b$ J; h6 J7 q" T5 d% L3 c. E7 {4 I8 o, A# J- K& {
Code:9 [. j9 o% S# W% N: s6 x+ ~
#ifdef __QUGET_SWAP_FIX& _) R7 p7 L1 d) Y) r8 b' Q
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% @) a8 }1 r8 _: w$ x7 c pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
" u& q# p) W5 o5 R! y$ z# {
. v0 C4 e( l0 Z- { if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )$ [4 U4 b" ~- `$ C/ ?3 \+ S
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
6 N: w+ ]: ^1 C1 w- l, T: Q
, q$ o! U9 B; m( _9 R4 ?, o if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
X* c, Q8 p/ U g; ?8 J5 b pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );* o# k+ G5 ^$ r, y' t( F3 g$ l
. J' @4 m M; a: \& M- L8 N4 H& }
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! u' S" m; M0 ^# I- {5 Z
; ~9 [. R$ T8 a+ o8 i" j; a) r9 C+ e) s+ v
|
|