|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 l5 c+ K& z1 l7 C# O D% yI posted this because someone kinda posted a youtube thingy about it :O.
, r6 S2 c# o" M+ K& b* s- m# r; Q4 B3 j u9 e$ w. s3 [
Find this in DPSrv.cpp @ worldserver1 k$ I' A8 C1 u' k4 `$ U4 h) s
, f! g8 Y. |- ^4 t' [3 u9 Y
Code:
3 b2 ^& c! J6 Q7 cvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
( N( Z2 g I, O# v$ d7 Y+ @) [; W0 r{* A* ]2 w2 N, L' @2 @) _
DWORD nId;
q+ |& H+ _9 x6 W! G+ @ int nPart;- c+ u+ O! f' _ M) f2 `6 R# ^7 e
( p* \8 L; ^- N y7 c g ar >> nId;
% p% Q( i% J/ p' d) e( [9 G7 } ar >> nPart; + P7 Z7 x5 K+ _4 |3 e
8 n z& I( _& X/ P1 X( l& z" y if( nPart >= MAX_HUMAN_PARTS )
' H. ]$ \' h: { return;
* E8 M8 u8 P1 I7 C) S7 [/ l) |/ h& P4 S! k
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 i+ p$ \5 g4 t/ J/ E r+ M& t) D( w) F* ~
2 ^3 q. A7 V2 u, W0 O P
( f% x. N1 @- ]3 bCode:
* @: H# X. K, M: |4 h2 v#ifdef __QUGET_SWAP_FIX
9 J ?% t4 y* ?) P( M5 Q4 y2 D, L0 D5 G0 U' O+ }
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )) I9 ^, \7 `- m8 x
pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 {# x; T, N/ \6 i* g& Z" P. T' K, f/ [; ] H, y
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
& _2 C# d) N% o5 u( E2 t+ f pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ H% Z8 `" K% G) ]# G
6 H* ?) V8 g6 ]0 ?; M7 ?
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( ?' T9 p9 q9 C5 {" f; _ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% |# E4 [0 U; {/ J; e! z' n% j& o
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
v* I! A6 N) w1 k3 W8 zand add under
O! q2 @4 B5 M! L4 M$ j: f$ \
9 l) z. G. V" M4 y' U" dCode:6 h+ }% N6 Z% S
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 J4 x# V" F" A5 Y3 D) Z8 H+ S9 x
{
0 }8 l8 E/ q8 | 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 );
! J' I2 a: b6 |6 ]4 ` }this
6 X% M& [, t0 x& F" T0 V9 `6 E$ w4 Y2 i3 B0 Y
Code:0 ]. H) |7 `- B/ n
#ifdef __QUGET_SWAP_FIX" n! S y# K9 P& K: K2 t
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )! Y: l; g2 Q/ X2 D, L' {- C
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 O$ O4 g( k2 p' R
& k# `' p, E9 b! v
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
J5 n. q5 H+ U% x* z pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
, E+ p% \, g8 h6 b+ v8 M# Z7 P7 ^" d" M% I" O+ v/ T, U+ {
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
% @; [+ p& ^, r A4 A Z pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# k* D, k: r4 ?; C1 c9 D
% d& g0 o4 @4 n" f#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
( B# `5 R: s9 J
/ R# j. Q3 n% `7 H* }1 c7 j% b( U" D7 ~2 s# \8 @
|
|