|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , Q: a7 D# B4 j1 A G. M! @
I posted this because someone kinda posted a youtube thingy about it :O.
3 Z* g+ ]7 }6 S9 ^6 F" x3 M" H/ ?& L3 O/ s, _
Find this in DPSrv.cpp @ worldserver3 l6 @: w- |0 V; y* r- M4 G6 A
3 ?6 | Q4 Y, DCode:2 _9 y$ c. i- k: q" v2 q4 @; U2 j4 K
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 X5 r/ Q+ I4 P) n{/ ? ^% c/ ?( F+ q2 h F
DWORD nId;4 z8 W6 [3 N1 I7 J" p
int nPart;+ E7 f3 Y& j2 f: j4 s# Q& U' A! ^+ k7 W
@0 |/ f; v! V: H% q% x
ar >> nId;
, h! L0 u; b+ n ar >> nPart;
' _2 f& `7 i& j% b$ O: ^% n 1 P' Y7 k" g5 E
if( nPart >= MAX_HUMAN_PARTS ) 1 y( I3 N5 C0 \3 _) G0 J6 p
return;# _5 b& s. q. ]3 m
0 a2 P! F% f) y1 S3 S; E/ c/ s CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
) O: N# _! B6 l. I, N6 o8 y) Z. `4 R! m& N* h
, P" V6 A) j- _6 V5 p1 i! ~
Code:
8 B0 Y# D0 D/ S( z! D4 I# h* c#ifdef __QUGET_SWAP_FIX) m) z* D& {! f1 r7 ^" G2 U9 T
8 q8 e) n Y8 P4 P- O# d) s& E
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ), u9 k" R3 z7 d0 W! l
pUser->SetHitPoint( pUser->GetMaxHitPoint());
6 t: N0 d3 U; _0 c( A
/ s& |% m* ~+ K0 ~6 A$ W5 w if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
6 O3 U. m ^1 p pUser->SetManaPoint( pUser->GetMaxManaPoint() );, K; k( K2 m3 { W% `
( u* P' b+ t/ \, m if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )* W: k5 M0 Q' T0 J; ]. G
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
" N/ O" V* x' h/ A# e
: y& O+ }' l" |. }* K D' ^#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
1 D$ C+ G2 u$ k+ c8 \/ Band add under
" ]9 B3 G6 m3 }( Z* ? D- T
; m" K- g% E7 W+ dCode:
2 C+ W b i: bif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
; S0 Q; K4 V8 {1 u5 U {
$ R- j& n3 G5 C2 s/ ~5 V$ K 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 );+ F/ w! \+ S: S" F+ s
}this3 H3 h5 w# r8 O' `9 P8 \
8 P/ I6 X( ], l" I+ dCode:+ A# `: [# t3 @/ V1 w
#ifdef __QUGET_SWAP_FIX
+ Y3 K3 s$ t5 U% a if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
4 w3 D; _6 k/ ?) W7 X. C) M5 X3 t pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
4 R. I6 @% v& X3 b' p7 S# Y4 C& D9 q! K1 b$ w# W0 s
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
f5 p' ?9 W( P2 j1 j: j pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
v( ]# `& m) Q% R4 m. W% d+ \( [: h9 m
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ). @( K# Q P: t8 A3 K9 O
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );' E3 r9 O: z+ X2 `% q7 P. j
9 S" C% M9 j* j4 \% o7 E#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver % s8 ~& Q9 G4 B3 Y2 F1 u! Y
; U! {( ]* A% F
: ^8 T/ }" P. k& M6 X: X" _0 b |
|