|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
6 n5 F$ `" h8 x, \% CI posted this because someone kinda posted a youtube thingy about it :O.4 p" {4 X( b; [1 \4 u1 X3 S9 ?
$ {3 W9 g) d7 y* fFind this in DPSrv.cpp @ worldserver5 O7 F! O; l" y
$ q) G* x6 u3 {. m6 ECode:
: e* W# a6 [* ^9 }1 @+ tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
9 S" H4 R) ~ I( }1 _{4 v2 o' ^- r- ~! T9 l6 X P/ t5 h( O
DWORD nId;# a+ N% X/ c e' F, F" e1 b
int nPart;, d f( y2 S4 ]7 R" {
4 Y0 C# g5 l3 \0 v* Q1 P
ar >> nId;' G4 P, j1 Y) Y' d/ Q
ar >> nPart; . z( @" }. R$ L% q" `9 ?
9 j# C/ n% J# @
if( nPart >= MAX_HUMAN_PARTS )
' w8 v& J: I3 ]4 F$ i4 {. o2 K return;! F" r! e+ T8 e _
. y: B9 q* c( d! i
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 o, Z; u6 ~6 p v6 y. E8 u5 G) c9 D2 B) R; J4 _. k, s
& E; @. y) }/ ]Code:* f, _1 _; ~. n: E) B' P
#ifdef __QUGET_SWAP_FIX
8 b! Z) H; ^& m% c7 d
% R8 L$ s9 W" D# ~ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ): p1 D9 Y" Q9 J, p0 L8 O
pUser->SetHitPoint( pUser->GetMaxHitPoint());
6 w, _' D; \0 D/ V3 D- C, ?8 g2 m3 T( \% }2 \
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
/ s( X$ w6 P, L5 J pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: k* z, Q( @7 f; w) f8 A- c4 k. N }" U T2 b
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ). l0 b& {, ^. m
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& w3 g s/ m$ x- d+ Q& Q6 j. z* u8 o8 Q9 X, v0 I* F, ^
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" ^$ c. E- U5 O+ P- U; H( ~' [6 X+ ~+ _and add under
: J4 Q: u( l7 C0 ?& @% `
; A# g' n3 K" z* zCode:3 u$ ^5 t2 f- B N1 H+ L
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ); y& K+ g" ~- c; i3 L
{
" U3 r' w$ M, Y6 ~7 w2 w- }4 D 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 );& P; Z: F/ Q6 K3 b
}this
+ W, l- V# j _0 ]. M. I6 d0 Y! k% F& H6 k8 s
Code:
; t5 E, }/ A# B% d; |9 n) i#ifdef __QUGET_SWAP_FIX7 k7 o7 k# m# m* V T' q6 o
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ). P3 o6 v6 b6 E# ]* Y
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
7 h" R5 {0 d$ v" F- i# @ m
( O& k; M' }2 O5 S4 x) I if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ), z/ k1 q3 y" D' @5 }/ p2 e7 V w' [
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ {! l. u3 ~# l. L% n8 }$ p) U
x# r4 p% `) \+ O if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )9 ?0 e6 q- @' o( ]( C$ c
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
* R) t: i8 c* C0 B X; b: I3 |
* E# Q; m$ t8 u9 d# C1 Y#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 d. }- C4 _9 d; W
- _* H: ^" H4 r1 X& [. E6 |3 T# s- `# |- w5 S; C& ?) A0 @8 ]8 b
|
|