|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked : k3 ]! C; K, A0 d3 J( M* }
I posted this because someone kinda posted a youtube thingy about it :O.6 `1 z+ L( u2 m- O
' r' B9 r4 w- ?& b: N
Find this in DPSrv.cpp @ worldserver! [( F2 G0 \1 U0 w/ _
! a! @2 Z+ K1 E6 ^- S w( F
Code:, P" F3 P1 r+ ]7 e7 J
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 J& W1 K& W5 D% x d- m{: Y: D! ?7 L! L* \
DWORD nId;
3 g9 f! g6 \1 Y/ j2 }' N int nPart;
- i* a& \. U, F9 K' c! M' q E" M7 u' |9 ?0 t3 e# t0 Z
ar >> nId;
7 Z1 ]" w: H/ m6 \0 r. d2 N ar >> nPart;
. x: Q7 z2 |5 g- S. K' s 9 C- ^5 W" u& w6 u; h2 M+ ?
if( nPart >= MAX_HUMAN_PARTS )
) L% n1 H# D* J4 J2 @ return;& {" K2 q$ t r, W5 W
1 V; B. j& R) {4 k CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* a0 ~ v3 J/ K2 [4 r% z* l* r, L* N( O- @! A
( J' H! j4 J$ E; c- p# s
Code:5 |, Q$ p( l/ e* o' w3 t Z
#ifdef __QUGET_SWAP_FIX
8 C' X* p- ?% e0 C* q; I2 F0 S8 V" M) e! c+ X+ `8 i. S/ N1 q& ], m0 }) ^# Y1 w
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
; Q/ Q; O7 y3 J2 G- y pUser->SetHitPoint( pUser->GetMaxHitPoint());6 W6 o' h# G6 a2 l. Z
% |) p) I. n8 M$ v if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! W( M4 w i; z) V1 B+ c! I
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 M0 c+ F8 d9 S8 v: I5 n2 a
1 H7 Q, H% l& g( Q2 R/ _8 Y if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )% V. u9 }* S$ w. d1 U
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
- l+ \, F3 K+ [' @; t/ z3 w9 P; S9 p5 l h" T
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
* |) S5 o' h1 Uand add under9 E- k( C4 Y$ h8 V; {
* o( X( J7 n: E- R
Code: q! E+ {5 x$ }- _* V; a
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 b+ v* Y/ q: P: A9 n
{' h; r* f& z0 U6 t0 C
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 );
/ V2 J; s; j3 [; f4 o' P }this/ e% ~3 O: {4 \) q9 S2 \ u
8 P" j" b* p4 ?& R
Code:3 Q! E$ W3 @% M7 V- k+ b
#ifdef __QUGET_SWAP_FIX
& w/ ]& m* H8 t6 l3 v if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) Y+ R" K% D4 b- _& H
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
& Z. ~0 a, D! x# x% m& \
9 u/ \* v1 Q' c* [+ i if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ), G: Q o! N' d8 K' m R' H: u
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );1 \! Z5 c# @% H
6 F3 E+ x K7 o1 x
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
' D4 p' q0 @+ M pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 Y8 p( ], e% ?- I% L7 J) F7 B8 l+ e: x
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver f% Y: O1 B. d0 D$ M
4 w5 y# V: A7 o [/ I: H* B1 s# M
- ]! j0 [4 ~5 v& |- W7 E8 C$ G |
|