|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; ]* L8 l8 G: {8 Q% d2 yI posted this because someone kinda posted a youtube thingy about it :O.& _7 E. U% q. R0 q: Y% s- v
3 H# `3 ~/ }8 c6 }" G5 k( IFind this in DPSrv.cpp @ worldserver4 F, T o0 }$ d Z: U$ j
( V0 j' f V2 z% ~" MCode:- ]! Z7 J) H5 W9 e$ t
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )' `$ K7 K6 Z$ {+ j4 ?* n$ j/ M
{- A8 u* x6 E. `, @) _
DWORD nId;0 R( [- z5 n7 ~* {3 u8 S
int nPart;1 w8 n) S z, b6 l7 i( ?2 i% z1 H
! `! y6 f: x2 x* L ar >> nId;
) H( ]5 g ^1 ~5 \ ar >> nPart; A4 w' _* _: }
$ n' A( p' x2 v4 W" e1 ] N( A5 S
if( nPart >= MAX_HUMAN_PARTS ) 0 ~1 z. T! Y0 H
return;9 Y, N( j( F$ B( {4 d: C! [
' ]' x( I5 m, R G& |$ ?7 l CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it, [. e7 G) O/ M9 e
; K" i( H* P n* c# Z( }
/ Y' v, ?: z* U2 l7 P5 p( C. C+ tCode:' H8 t1 @4 b8 J# ^; V
#ifdef __QUGET_SWAP_FIX: _$ o) s& k* g {$ ?3 m0 k
( e' ]9 l* g6 e7 F/ X
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
# K; g9 a0 z9 B) P pUser->SetHitPoint( pUser->GetMaxHitPoint());- B- z5 n" Z/ i7 c B' k$ \
# U& W# e; h1 z( M( U0 k' e/ m if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
6 x$ I! z& ~9 c) d9 [- R7 ` pUser->SetManaPoint( pUser->GetMaxManaPoint() );; ]' Z2 z$ ^1 G& |4 s& n) ^* d
, _- ` a( U8 g; v+ o6 c2 V
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )+ Z, g2 h7 N. }* K( Q! R( a, F) M
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
8 |' F/ G& J& B: b7 i J8 I9 I# K5 Q& B' T
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! B! n7 ?) h' Dand add under: u7 r3 A5 E+ \8 Y
& l9 k- [% u' ^8 o oCode:* f0 V7 N8 `, x" O
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
. U1 h% q/ S) }% t1 W6 |1 [ {
0 l$ T/ y; Y6 z1 _- s$ b a* x7 U2 r 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 );. S6 C2 e" s. ^
}this; o7 p6 N; E7 ~. M; J4 E: P* I' ^3 h
9 E0 ]8 P( A) a; s+ bCode:
9 Y @! w. Z: k4 V5 }#ifdef __QUGET_SWAP_FIX& i0 o) O# U1 v. A
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
: @. I* ?2 j- o) A) { pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());2 l; a5 e0 g3 E, z
" d4 R$ P. N2 r
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
: I8 f' c/ s4 [0 ~3 h5 b0 A pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
3 I9 p8 L) m7 X
7 ?) G! E1 p3 j6 y; [( G if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ), U& x. R3 }. g# X" o4 g
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
" h @2 ]6 O+ p, t. k7 F* w
4 D& r4 @- O2 G2 ~/ Q8 f2 G; O#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ) ^% D; v! E: A
, h/ x9 [; D9 I( f% J$ L
7 q/ l& a2 H7 w7 ^ z |
|