|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked * \3 j3 ~5 k( F, {* V. H
I posted this because someone kinda posted a youtube thingy about it :O.$ w' F1 G. Z% _' c- G/ s
" ~8 y) b4 J4 L0 U$ J l
Find this in DPSrv.cpp @ worldserver
* K/ j0 h) k, ~
. ~3 W9 I; o% X+ S2 K: h/ zCode:' [8 L! k' t" s b3 ^/ u
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 ` r) q: q* J6 d' v9 J7 ]4 W3 a
{
0 _: V( r+ M5 I+ D1 d) m5 [ DWORD nId;) w. u9 \" A* Q c# \ x
int nPart;3 B: v& e; E2 v d
% Y4 f% t& o( n
ar >> nId;
; c8 v9 L' F: _- o) i6 X7 O! c ar >> nPart;
/ A$ m7 Y( i6 H, A3 J 2 U q* _2 L! ~+ k# C
if( nPart >= MAX_HUMAN_PARTS ) 9 Z8 z: C5 E) o0 q! u# b8 c1 ]
return;
8 e& v! W! u. ]4 t
1 W* q& a7 \. `! B1 w, T3 {) y CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it& P, l4 J2 h0 u& s3 Y
! L5 H4 e; ?. S5 o/ x
' E; l/ t) T, Q3 m
Code:
) y. c* f( {3 O3 A. b6 H5 t#ifdef __QUGET_SWAP_FIX
7 X5 w. v4 a3 c8 z
2 b Z- k5 d! f- ^ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
, y, S H9 c) k pUser->SetHitPoint( pUser->GetMaxHitPoint());9 h3 Q9 [! T0 d1 L- h
0 H, m+ A$ z8 I4 B if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
$ f: L( ^7 K. A pUser->SetManaPoint( pUser->GetMaxManaPoint() );
% E' t" ~. a5 A' @+ U' t% y3 j
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )" S0 k0 p8 ~/ W4 v0 V. u9 e
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );0 T1 C8 [( E+ |, n+ q3 [
! e$ y" _( ^* s4 k5 m% M# v
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ N5 ~2 P; m2 F" e( T. f2 s; B
and add under% l% d8 z, L1 A8 D. o7 Z5 Q
( ^9 l% z4 i# D
Code:/ F& N! \- c, ]& P
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) j P/ H0 O' R; r: i
{
3 Q! S/ V6 Q5 x+ \; A% 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 );) V! ]9 t( M0 J' z7 X: D2 J8 j
}this5 Y4 K8 j _5 N) H+ ]' b
$ A8 Q! h l4 LCode:
! w* c/ [4 c2 b0 W3 v- g; ^#ifdef __QUGET_SWAP_FIX9 b! `' J B' t& L
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
9 o% @! Q7 h2 S- x pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
& @) J. L; V) h n# K6 \
( u( E) A- }, g if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): V& n \% q0 C! g4 S# U m
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
# N' x% Z4 z6 _
" c. R; \4 ?3 u% P' K% }% l if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ). a' k- `( C$ q: \( p, s6 Y
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 F7 M j8 ~; l+ w) q
( |- q* u* z3 r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: x( X* a& W" q( ]* ^( P# B2 |6 x c7 g3 t: ?. F- l/ s
" R; T; r# F# l' B5 E6 j* ~
|
|