|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
9 Y) \# h+ ~& j$ D' F2 R Q* {/ ^& lI posted this because someone kinda posted a youtube thingy about it :O.
/ W' @/ D8 `% Z2 t7 [: H) }8 l! v+ g1 @* z, l; w M$ x1 X0 c
Find this in DPSrv.cpp @ worldserver) U: w r f& i" l7 [( ^
0 f# z1 i0 G2 E i( JCode:8 ]( q; T0 \# s- N, O
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )) V5 W( a& C0 e
{
/ R% Z, X( j9 J/ _* J) x! w+ P DWORD nId;
`- L- K6 k/ ]2 i8 { int nPart;0 E" A& R5 N' j) S
2 S" D4 `6 b, ^4 v. M. l* {. r; S ar >> nId;( ~7 r5 E8 u" h6 ]
ar >> nPart; & J; L( z: S; t( `9 M- E
& ] A, Y: R0 J! e4 R( D if( nPart >= MAX_HUMAN_PARTS )
3 Z. u& B2 A( _+ s, h0 K return;$ a2 C5 }% h6 u% S2 {( g* c
) F; K3 {8 `' n& z( u! `) o CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it2 a Z6 H$ ~' o7 M
% k% Y& n3 c1 G$ K3 s9 T2 I: m
J' {' r2 I3 SCode:& Z$ J/ |; Y% z
#ifdef __QUGET_SWAP_FIX$ f3 a; m4 Z( d* x9 B* Z+ X0 Y
& i" W, ~5 n9 ?7 u
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )3 I. Y3 ]9 N) P- A
pUser->SetHitPoint( pUser->GetMaxHitPoint());
7 y) u: x( i3 V' ?5 V) Y2 e. A* }# c# V* f5 p$ S. q0 z
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
+ y6 z) K' A8 A. h5 t- z: ~! [ pUser->SetManaPoint( pUser->GetMaxManaPoint() );% C& D/ f+ L0 a( }
* E: a2 L3 E) c. p: i5 [4 I
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
. N' d8 V3 n5 W$ U. M/ S' L pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
6 q0 F0 n' m7 E" t* L
. [# x W2 l4 F$ _* e' b( {#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 N2 s# y, ]& b# Y' @and add under8 U" c# [* H# F& N) R1 r
! V5 f4 p- ~( H7 D
Code:
6 a- d5 k, d( q5 I, qif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 z. l K6 X9 B% f1 V {
) ~; n( |) J; w' A+ h 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 );
& P6 b& u4 ]: g8 H q' B }this
2 ?" ]5 e9 Z$ }" X5 R" U l. q( m" {. \7 {; k1 k5 Z+ V
Code: r2 s" u6 j$ Y7 ^9 k' _! \
#ifdef __QUGET_SWAP_FIX1 r- k: a, V+ b: Y; g/ A8 Z D2 B9 ^
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )- |+ ` p7 @/ X1 W0 \
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. f7 Y) U7 K! |7 ]& @
4 B q. x3 C* Y' d if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ) y' f5 o- _, L$ T
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
2 c4 b* p5 Y/ @9 C' X2 S+ s) a( n' \7 u$ d: N. E! }
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )2 b. h7 [, v" r
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- h' B' Y' t% M5 h" \
) r5 p9 c0 E% A' x _#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 X, i+ `$ [* E% |
, l! V1 I1 P% F6 Q* T
7 U. d8 V' u" a! \. C |
|