|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
" b1 ~: A; P4 RI posted this because someone kinda posted a youtube thingy about it :O.# V" u4 z; b' g$ }/ K0 r/ m
! {- v; `& j; w6 VFind this in DPSrv.cpp @ worldserver% {6 Y) Q3 H" w/ L. Q4 q( \
( r# r) D" S0 [3 Q& G2 m/ nCode:
$ \! P: b7 |. c% D9 e: d. u6 N! nvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* E8 A( t9 W* C
{) D+ [- A$ b4 F( K
DWORD nId;
, v$ g* ?0 B- q& U1 `! B int nPart;
( u1 N& E" K2 u2 D e; o0 r1 O4 u) |2 v2 s- f
ar >> nId;7 }1 K8 d- m7 J7 S6 V" s0 U( s7 M- K
ar >> nPart;
3 G# C- D2 K$ o6 L# N& d0 O, I / k& {! K4 G0 Q) v: J% o
if( nPart >= MAX_HUMAN_PARTS )
8 R9 r4 d' g) d+ F0 N return;& G3 ^8 l$ x& p- J: X; J
5 u v& V# M1 c/ {' p$ t
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it" R5 \5 w9 n! z$ b- R$ j! u
0 t8 |0 ~; O) n: N2 O4 c% M, M+ ?1 [* K3 T
Code:" O0 w9 B; `& X/ m- K/ K, M
#ifdef __QUGET_SWAP_FIX
1 P, J! a3 T6 T& ~; d- L& H- G% M1 p8 Z4 x7 ]0 {* P
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
) W0 J6 k3 N( @ pUser->SetHitPoint( pUser->GetMaxHitPoint());
4 u5 r7 Y1 E o( E. a' _ ]- M6 X. ^! w! p: p5 z# Q( M; A1 D
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
- c5 D6 t% `6 `, d: w6 F9 _ pUser->SetManaPoint( pUser->GetMaxManaPoint() );6 t* g3 q9 f% C7 [5 ^/ i
7 U Y; }: {8 f: p% M
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ). Y* \5 Z K! _. L: x
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ r4 W( d+ I8 d3 @4 [
# L4 g. ` x& N t( }5 E2 ]
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp3 a% ~' Z( e0 v. \. y) s* {9 c+ P
and add under5 n% a7 _0 b8 C; x" D' v
1 H3 b9 p/ m8 G& R0 fCode:+ `. D% k9 I- |5 h" R# n; L
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ); b* R' d! |7 X5 m# j2 N7 M
{1 \- f$ O1 s8 w* W9 [% W+ X- V# q
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 );
" C# F0 K1 ?# a2 G9 c6 J }this* b0 p8 M" B& Q+ C" Y5 h
+ t4 ?# n9 b0 u6 v, E8 ?7 K! JCode:% v% C2 _) L2 w: A1 v
#ifdef __QUGET_SWAP_FIX
# @" R$ p! ~7 U$ F if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ), o# u/ [# Z# {' [3 r4 S
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());; q; m: p0 u @, n. ^! l
1 \! T2 M& ]" R9 j if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )9 S: n) @& I/ ^3 ~: B
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
: h. [+ S; Q$ y( b
9 v3 E/ {* q/ x5 V4 ]5 O, ~9 o1 v if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
- i( A% j5 U9 f3 O pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# t6 r! z9 M/ q9 f2 t: N
. T6 O# A* C" I0 C5 q. Y" \$ M9 L7 m#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 Z( @9 A# D) i& {' c$ u
$ R9 _) Y( b6 k! W5 N3 g
, t" l4 F" a2 B H# d+ v
|
|