|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ( g; s- m" h% P; K/ U- H
I posted this because someone kinda posted a youtube thingy about it :O.
1 Z' G& n( i, n8 j4 S$ g% h9 S' }0 k2 R
Find this in DPSrv.cpp @ worldserver
# }0 d+ P. g: f) }1 T4 e3 {
( ^2 i( }: B9 w$ y7 E' \- BCode:- C4 M0 }: p) c( \) P; ]% K1 u, h
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ). }) ~. Q' T* B
{
% {" ~" U3 r' h* G9 ~3 v; p7 O DWORD nId;( @3 w+ u f& b) Y% Y: s1 D
int nPart;3 q6 c- j& R2 V+ M
5 S* u3 T9 ~0 ?0 [; c' S ar >> nId;; c, O6 n _( J: R
ar >> nPart; % h+ K6 s: v: e
5 m/ G3 Z5 H7 r' `& W4 s6 f
if( nPart >= MAX_HUMAN_PARTS )
5 \. Q8 h4 l" \0 j; p4 E return;; n5 u) l- ]& ]6 Q- A2 v* @7 V
& G X7 {) @/ n4 |- @5 F2 F8 i
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 Q. C( _( n/ I% h0 L b& [. M! O/ k4 m$ f" c! Z3 N! x: k
, ^; U1 ]' {/ Q
Code:6 h/ [; i9 S4 {5 @
#ifdef __QUGET_SWAP_FIX
+ W# H6 L) z" c7 E& V8 W! v/ H6 g, v3 k
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )# l' |4 f6 Z2 S7 F+ W, M) W4 b
pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 R. [& I4 J# n" ^
: C, l9 R' i) K. K' r if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )9 L I A) h# D4 R0 @+ c
pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 X" ~8 m9 o9 W' O0 N4 z3 K! I
$ {8 a1 n% Z" |; J6 ]7 | if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
, t$ ]5 ]& {* X1 v pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
! C u8 N: Q/ @6 ^' H) b# P2 _6 R2 c
8 v5 ~2 h4 L! U2 q& [: _/ U#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp# M4 G$ V5 n; Q" m
and add under! U: o: {* ?" t
0 ?0 M% }/ e1 v4 H7 P% ZCode:5 K- i% n' I; `* \- H
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
* S1 k7 `- |% f. o6 U# a( F# C( ~ {
% w; y- G5 K& K0 Y: p( x9 a( w/ 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 );) {# E/ }9 d% V
}this
1 |. s3 w& I- W4 R+ D+ Z- u/ |# T1 J/ |; ]8 M
Code:+ x6 e3 x# P! T5 H
#ifdef __QUGET_SWAP_FIX
6 D3 i4 t, N: [7 p' c if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )0 ]$ l" |; l% A# w |3 }8 ?) \
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. Y" C( O" w: v- q Z( y
5 m( p) a6 B: O# n2 j/ M9 w3 G if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )/ A/ S9 {1 N- |1 s. ^: v) J) D# _
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() ); t; r. v0 g P) J9 t y+ R( K
, ?+ ] @" F4 Z/ @ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
* u; N* f( I) L" N, z: N pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
5 h1 ^! e: F7 K* N0 k( Q
n& E" s" S7 ~1 d9 Z' Y0 \#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 b" C5 N, L! {
: o5 t2 K( q" q
: r% w+ e; n( J
|
|