|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
1 e) K# y9 ~6 E$ K9 PI posted this because someone kinda posted a youtube thingy about it :O.1 S1 ^- ?3 X8 m. o G
- l( @3 j1 M# i/ ^Find this in DPSrv.cpp @ worldserver4 I- O( ~1 G0 L; ]/ a! l
! b, T c* R9 ZCode:5 Q2 K$ t8 @7 H3 l
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 b# w+ p1 F" c7 [7 A8 N
{
% Q) ^0 L* y: E. k2 U/ O+ m DWORD nId;
: h" @5 ]5 R& J6 k* U int nPart;
! h5 E& {4 A1 Z
$ v) v" u; {9 b Y2 q$ m ar >> nId;: L6 _8 C. {, u5 D
ar >> nPart;
: h, c0 ?9 K+ ^3 G5 x# f5 j3 a
% L6 ^: k6 |1 o+ V1 q+ [+ d if( nPart >= MAX_HUMAN_PARTS )
& u% v6 { ~/ D2 W3 u4 z3 t; e# j return;8 H+ K/ P8 H+ u
3 @$ z9 d/ J/ @# g9 O2 I
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
6 g3 d6 a' _$ ?/ Q1 b* S' v$ A6 H4 B/ E
% X: E6 d P6 z6 }6 GCode: [- E6 y* Q8 N- t$ f |
#ifdef __QUGET_SWAP_FIX
9 O7 \& P* h5 ~; m7 B3 |
/ [. X) O' E4 j. b) f$ C if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
% N# W. ^. h& F pUser->SetHitPoint( pUser->GetMaxHitPoint());
V6 M$ J- O* [5 h! J: ?6 `8 e
4 D6 w2 y6 O( V7 M. K if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% o: N" w, w) k
pUser->SetManaPoint( pUser->GetMaxManaPoint() );, i0 o2 B7 B; N9 d
}0 D4 V0 f8 V+ Y/ T; ], X
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ). I4 a' S) q8 `" y
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ h4 p. y! T, L( x7 I
" o7 O- B5 [; s3 W" T
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 U2 O4 e, b6 L0 U" q8 S. p! d' w
and add under) L9 @4 R7 {. ?# u8 M
1 ^6 p% c9 U; `6 `& D ~/ |Code:
# B5 r z( O2 X* U; f3 |4 B* zif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% ~( U$ v9 H% t6 @4 p
{
6 r8 c5 G' K% _0 e- f" z 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 );
2 \- G$ e' ]; n6 w9 y }this. j8 ~0 Q: Z2 [ u; c
/ f5 C" [% L5 Z2 Q& f8 P2 O& R: UCode:8 w+ L; D' m) w) o7 H$ v3 Y
#ifdef __QUGET_SWAP_FIX
) j$ ]: M2 L1 I/ E1 @ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
8 E+ j7 i0 v0 S* B, l, n6 c pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 |) D8 `7 j3 ?- c) T' t, q9 ]
- n, O+ A' B9 J5 e% k if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 z& ^& V0 X; R( G2 ] pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
) y1 T, I/ n" D, v( m2 d5 T0 |' A% `- C5 _2 e0 H
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )3 _" J' a5 m1 P8 n/ V/ x1 K2 U( t8 e
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
5 e" k# u \$ e9 I# i: p! C: x2 t# o9 T
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 3 @8 p: @, ]5 Z5 i4 \3 ~
- Q' { g7 z$ I
* w7 L# Y( k n- m5 ~) X% N7 h ~3 b
|
|