|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
2 p- Z* d. |/ A& @I posted this because someone kinda posted a youtube thingy about it :O.
- A4 e, @7 T' H2 m7 p6 E, \3 x% d( k
Find this in DPSrv.cpp @ worldserver" d+ L7 r$ R2 b; I8 B) T$ ]1 ?( B9 F$ l
8 p2 P% g5 @8 J
Code:' J' [ u5 @; J4 h) {# Q
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 z4 I4 _; S; m% b4 @. M
{
8 S% l, m; Z+ k9 G- _( E DWORD nId;
0 e& s) ^1 @! {' W+ u _0 U1 _ int nPart;
3 Y% O0 z3 Z4 F. v' |8 d# I- w
6 @8 e+ }& g. y2 p ar >> nId;
t9 f6 l5 o) Y9 {$ p# d/ l' C- U8 D ar >> nPart; ! {2 ~1 n' L+ |0 ?: B' F+ ]
`, c+ n: o* b$ r+ { if( nPart >= MAX_HUMAN_PARTS ) 5 p7 L! M6 e( _% W9 h
return;
2 E- b& L) l9 f: Y
9 K6 M5 I9 e2 a% l CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it$ N0 S+ T0 P2 z$ `0 B( x
2 o9 X! |; D v6 B6 P. d
- O7 Q& O! ]) R* p* \Code: N6 ?$ P N* S$ ] |7 G- t. Z
#ifdef __QUGET_SWAP_FIX7 ]( }9 D4 b; Z4 h
( S$ Z% k6 V, r5 p+ ]2 p4 ] I5 m, e if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )- N, M: C; d6 `' M
pUser->SetHitPoint( pUser->GetMaxHitPoint());
; [: g; Q4 B* I% C, K4 j/ |8 L$ l- Z7 K! {8 k
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
1 Y6 Z8 U6 |7 [+ v9 L pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 \0 r5 ^7 D! [# D( W6 K
$ K4 y1 f$ F4 y& W! F6 _& W# ` if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )( K4 f% O7 \5 S6 F4 K
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
9 y; v0 A- N" M Z0 T, J3 p
! [5 T: E7 u* M6 N6 t4 P#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
0 r0 T+ Z) V0 Q8 q H: T4 ^and add under
! o, K1 ]- E& \0 B' Z( Q
0 e# z' G3 _/ h1 W$ vCode:
! T: t: q: Q" t6 i0 N, Jif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) x5 i2 M) x! n/ Z: v8 e6 l
{3 X/ o8 F5 K7 e( z5 L' h7 P4 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 );
+ C: L, P9 s0 x }this9 `7 A2 E. B$ r4 p1 k/ ? j0 J3 v
$ O, M. o; T6 M, R' QCode:9 F$ Q1 a$ t$ e# ]$ v; r- {0 I
#ifdef __QUGET_SWAP_FIX6 ]* |& r7 ^# H0 b$ M }7 o' P
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
" X0 U; G3 \4 c" B. [* ?) I pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
, c3 K4 \* A9 g5 u' o& Y
- I3 Q0 ^3 q" W if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
, z, R3 d: X. g; ?: f3 p pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- n. T* x @% e. Q
! g1 m8 N! W8 S2 m, ? if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
% x l9 T9 T! J+ l0 } pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
6 U" Q, O- ~! ^+ D6 P; Q- b% c# w
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* T! _9 a# J0 k+ @1 z: ?1 Y+ K {
4 X& E4 ]7 K# T _# j4 ]$ p9 E8 D
|
|